Repository navigation
fix(pairing): word phone setup failures for people, not the server - #753
Conversation
The setup card showed the server's raw error ("Device login request has
expired.") and raw socket or TLS errors. A failed code lookup or approval
now maps the HTTP status to the same messages the iPhone app shows, and a
transport error says the connection to the TV was lost.
Closes #669
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 56 minutes. View limit details
Comment |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The pairing-failure copy in Suggested fix: No diff. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
A saved server marked as needing an update never gets a request; the API gate answers with the app's own notice. The new failure mapping hid it behind "Try again", which can't help. Show the notice as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Evidence updated: phone, tablet and foldable (folded and open) before/after captures of the expired-code failure and the lost-connection failure. Devices: Pixel 8 phone, Pixel Tablet and Pixel Fold emulators (API 34) with an Android TV emulator. Before is |
Problem
Closes #669
Related issue: Silo-Server/silo-server#1192
Validation tasks: changes #336 C1
When phone or tablet setup of a TV fails, the Android setup card showed whatever text the server or the network stack produced: "Device login request has expired.", "Device login request was canceled on the device", "Cannot write application data on closed/failed TLS connection", or "Connection reset". The TV, the iPhone app, and the web page explain the same failures in plain words.
Approach
CompanionPairingCoordinatorno longer passes through raw error text. A failed code lookup or approval is mapped by HTTP status to the messages the iPhone app uses:The sign-in-provider-unavailable message is unchanged. A socket or TLS failure after the phone reached the TV now reads "Connection to was lost. Try again." (the iPhone app's wording), and one before it reached the TV keeps the existing "Couldn't connect to the TV" text. The coordinator's own messages are unchanged.
The iPhone app says "this iPhone" or "this iPad" in the sign-in-again message. This change says "this device" so tablets aren't told "phone"; #668 covers the phone and tablet wording on the card.
This edits the same file as #749 (the #738 fix) in different functions; whichever merges second needs a rebase. " closed the connection. Try again." is unchanged here. The issue comment lists it because the TV reports its hardware model as its name, which #740 covers on the TV side.
Validation
./gradlew testDebugUnitTest, the five lint tasks, and bothassembleDebugbuilds pass. The supply-chain scripts could not run locally becauserubyis missing; this change touches no build or workflow files.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/issue-669/
Surface and build: Android phone emulator (API 34) and Android TV emulator (API 34); silo-server sandbox at
9d3f24ca.Risks
None identified. Only the text of failures changes.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Word phone setup failures in
CompanionPairingCoordinatorfor people, not the serveruserFacingPairingMessagenow picks a connection-lost or setup-guidance message based on whethertransportFactory.connectsucceeded. Only nonblankIllegalStateExceptionmessages (other thanSiloAuthUnavailableException) are still shown.approverFailureformatters mapApiResult.ErrorandApiResult.NetworkErrorvalues to specific messages for update-required, provider-unavailable, unauthorized, conflict, and expired/missing-code cases. Other errors use the caller-provided fallback.signInAgain, a server-specific message for unauthorized and auth-unavailable cases, plus test coverage in CompanionPairingCoordinatorTest.kt.userFacingPairingMessageandapproverFailureif a previously surfaced diagnostic message is needed.Macroscope summarized d791a48.