Skip to content

fix(tv): match Apple TV's sign-in states for new, declined and wrong-password - #754

Merged
Quick104 merged 2 commits into
mainfrom
fix/issue-743-tv-signin-states
Oct 31, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/issue-743-tv-signin-states

Conversation

@Quick104

@Quick104 Quick104 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #743 (this covers the sign-in code and password states; the server address screen, the phone setup panel, and sign-out follow in their own pull requests), Silo-Server/silo-server#1192
Validation tasks: changes #337 C1 (renewed code and decline wording), C3 (wrong-password text, recovery after a decline), and C4 (the declined screen's buttons); none has been run yet.

Three states on the Android TV sign-in screen don't match Apple TV:

  • When an expired code is replaced, the status says "New code. Waiting for approval." for five seconds and then goes back to "Waiting for approval". Someone who walks up after that can't tell the code changed. Apple TV and Roku keep saying "New code" while the replacement is on screen.
  • After a decline, "Change server" is cut off as "Chan…". The text still says "Scan the code with your phone's camera…" although no code is shown. The status says "declined on your phone" even when the decline came from the browser. The TV can't tell which, since the server reports denied either way.
  • A wrong password says "Invalid username or password" where Apple TV says "Incorrect username or password."

Approach

  • The status follows the sign-in machine's own renewed flag, which stays set until someone asks for a new code. That's the same rule as Apple TV's codeWasRenewed. The five-second timer is gone.
  • On a declined sign-in, the text under the title reads "Show a new code to try again." and the status reads "Sign-in was declined." Both match the Apple TV wording in [bug] Apple TV's declined sign-in screen cuts off its buttons and still says "Scan the code" silo-apple#960, which fixes the same screen there.
  • The action buttons wrap onto a second line when all three don't fit, so no label is cut off. The D-pad links between them are unchanged.
  • "Incorrect username or password." replaces "Invalid username or password", in the provider variant too.

Validation

Reproduced live on an Android TV emulator (Android 14) against a dev server, main at 238134a before and this branch after, on the same screens:

  • Renewed code: expiring the TV's pending request in the database made the TV fetch a new one. Before, the status read "Waiting for approval" within a few seconds. After, it read "New code. Waiting for approval." at 3 and 10 seconds.
  • Declined: choosing Not now on the code's /activate page. Before: "Chan…", the stale scan text, "declined on your phone". After: all three labels in full ("Change server" on a second line), "Show a new code to try again.", and "Sign-in was declined." Down from Show a new code and Right from Sign in with a password both reach Change server, and Left goes back.
  • Wrong password for a test account: before "Invalid username or password", after "Incorrect username or password."

:androidTvApp:testDebugUnitTest, :androidTvApp:lintDebug and :androidTvApp:lintVitalRelease passed with no new findings. No new tests, per AGENTS.md for UI and copy changes.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-android/issue-743-signin/

Android TV only. The phone app's sign-in screen isn't touched.

Risks

Follow-ups

  • The Android phone app still says "Invalid username or password". That's left for a phone pull request.
  • The password form still offers Create Account when the server allows sign-up, which Apple TV doesn't. It stays: nothing records a decision to drop it, and it's the only way to create an account from the TV.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code; agent-device and adb on a temporary Android TV emulator; headless Chromium for the browser decline
  • Model(s): claude-opus-5-5
  • Involvement: AI-assisted: the agent reproduced each state, wrote the change, and ran the emulator checks
  • Adversarial review: the plan round was skipped because each part copies Apple TV's existing behavior and wording. A background adversarial review by gpt-6.1-sol of e3e2304 found one P3 issue, open in its thread: with a "Continue as" button present, Up from a wrapped "Change server" skips the first row of actions.

🤖 Generated with Claude Code

Note

Match Apple TV sign-in states for new code, declined, and wrong-password on TV login

  • Shows decline-specific instructions instead of scan-and-activate instructions when device sign-in status is Denied, in TvLoginScreen.kt
  • Maps non-opened renewed ShowingCode states to NewCode and other non-opened states to Waiting in the TvLoginViewModel state mapper; removes the five-second coroutine-based NewCode announcement
  • Replaces the single-row code-action layout with a FlowRow so controls can wrap; when Change server is on a later row, its left and up focus overrides are skipped
  • Behavioral Change: NewCode now persists for as long as the renewed state is mapped instead of reverting to Waiting after five seconds

Macroscope summarized 7140d90.

…password

A code that replaced an expired one now says "New code. Waiting for
approval." for as long as it shows, as Apple TV does, instead of for five
seconds. A declined sign-in says "Sign-in was declined." (the decline may
have come from a browser), replaces the scan-the-code text that pointed at
a code no longer on screen with "Show a new code to try again.", and wraps
its three buttons instead of cutting "Change server" off. A wrong password
says "Incorrect username or password."

Part of #743

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 30, 2026
@silo-kody

silo-kody Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 130 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9ca1784a-2df0-4b1b-81ca-c89aa30333c5
Commits

Reviewing files that changed from the base of the PR and between 76dee90 and 7140d90.

Files selected for processing: 3
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/auth/TvLoginScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/auth/TvLoginViewModel.kt
  • androidTvApp/src/androidMain/res/values/strings.xml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T23:27:15.894273Z e3e2304 PR opened
🔒 Security Review ✅ Completed 2026-10-30T23:28:01.614024Z e3e2304 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review (gpt-6.1-sol, reviewed e3e2304)

One verified finding, F1, on the wrapped action row.

AI disclosure: model gpt-6.1-sol; harness Codex in T3 Code; AI-generated review.

When the declined screen wraps Change server onto its own line and a
network sign-in is offered, Up jumped past the first row of actions to
"Continue as …". Change server now keeps its Up and Left overrides only
while it shares the first row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104
Quick104 merged commit 0548b92 into main Oct 31, 2026
8 of 10 checks passed
@Quick104
Quick104 deleted the fix/issue-743-tv-signin-states branch October 31, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant