After a phone approves the Android TV's sign-in code, the TV can show "Signed in!" even though saving the session failed. It stays on that screen with no error and no way to retry from the QR card.
Why
TvLoginViewModel.handleDeviceLoginApproved saves the approved session. When that fails (AccountSessionChangedException, a generation mismatch afterwards, or a storage error that left the tokens uncommitted), it sets uiState.error and leaves loginSuccess false (TvLoginViewModel.kt).
- The QR card only receives the device sign-in state, not
uiState.error. It renders the repository's Approved state as "Signed in!" (TvLoginScreen.kt).
uiState.error is only drawn inside the password form (TvLoginScreen.kt), so the user never sees it unless they open that form.
Expected
The QR card shows that the TV couldn't finish signing in, with "Try again". The server has already issued and consumed this request's tokens, so "Try again" needs a new code.
Notes
AI disclosure
- Harness: T3 Code (Claude Code agent harness)
- Tool(s): Claude Code, GitHub CLI
- Model(s): claude-opus-5-5
- Involvement: AI-drafted at the maintainer's request, from reading the code on
main at c38fb93; not reproduced on a device
- Adversarial review: n/a
After a phone approves the Android TV's sign-in code, the TV can show "Signed in!" even though saving the session failed. It stays on that screen with no error and no way to retry from the QR card.
Why
TvLoginViewModel.handleDeviceLoginApprovedsaves the approved session. When that fails (AccountSessionChangedException, a generation mismatch afterwards, or a storage error that left the tokens uncommitted), it setsuiState.errorand leavesloginSuccessfalse (TvLoginViewModel.kt).uiState.error. It renders the repository'sApprovedstate as "Signed in!" (TvLoginScreen.kt).uiState.erroris only drawn inside the password form (TvLoginScreen.kt), so the user never sees it unless they open that form.Expected
The QR card shows that the TV couldn't finish signing in, with "Try again". The server has already issued and consumed this request's tokens, so "Try again" needs a new code.
Notes
AI disclosure
mainat c38fb93; not reproduced on a device