Adjust external app docs based on jpelgrom comments#6950
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates KDoc/documentation around the frontend external bus message types and handler events, aligning wording with feedback from PR #6872 discussion to better describe request/response expectations between the Android app and Home Assistant frontend.
Changes:
- Refines KDoc for outgoing command messages (Improv + barcode scan) to clarify intent and response behavior.
- Refines KDoc for incoming external bus messages to emphasize whether a response is expected and how correlation via
idworks. - Minor KDoc tweak for the handler event describing Improv scanning responsibilities.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/src/main/kotlin/io/homeassistant/companion/android/frontend/handler/FrontendHandlerEvent.kt | Adjusts Improv scan event documentation to better describe ViewModel responsibility. |
| app/src/main/kotlin/io/homeassistant/companion/android/frontend/externalbus/outgoing/CommandMessage.kt | Updates outgoing message KDoc wording for Improv discovery and barcode scan results/aborts. |
| app/src/main/kotlin/io/homeassistant/companion/android/frontend/externalbus/incoming/IncomingExternalBusMessage.kt | Updates incoming message KDoc wording, especially around “no response expected” vs correlated id responses. |
Comments suppressed due to low confidence (1)
app/src/main/kotlin/io/homeassistant/companion/android/frontend/externalbus/outgoing/CommandMessage.kt:138
- The KDoc was simplified, but now the
forActionboolean ininvoke(id, forAction)is no longer documented anywhere. This makes it hard to know when to passtruevsfalse, and what effect it has (it changes thereasonsent to the frontend). Please document the meaning offorAction(and the resultingreasonvalues) in the KDoc.
/**
* Notifies the frontend that the user closed the scanner without producing a result.
*
* Sent in response to a [io.homeassistant.companion.android.frontend.externalbus.incoming.BarcodeScanMessage]
* when the user cancels.
*
* @see CommandMessage
*/
object BarcodeScanAbortedMessage {
operator fun invoke(id: Int, forAction: Boolean): OutgoingExternalBusMessage = CommandMessage(
id = id,
command = "bar_code/aborted",
payload = frontendExternalBusJson.encodeToJsonElement(
ScanAbortedPayload(reason = if (forAction) REASON_ALTERNATIVE_OPTIONS else REASON_CANCELED),
),
jpelgrom
reviewed
Jun 1, 2026
Contributor
Test Results 267 files 297 suites 12m 7s ⏱️ Results for commit 4f83e11. ♻️ This comment has been updated with latest results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR tries to adjust the documentation of the Outgoing/Incoming/Events we have in the FrontendScreen to aligned with the comments from @jpelgrom in #6872 (comment)