Skip to content

Android TV shows "Signed in!" when saving the device sign-in failed #422

Description

@Quick104

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions