Repository navigation
fix(tv): name the TV by its device name when it asks to sign in - #746
Conversation
The sign-in code request, the setup and sign-in adverts, the pairing identity, and the SiloCast advert used the hardware model, so the browser approval page and phone cards said "sdk_google_atv64_arm64" while the TV's own chip said the name the person gave it. All of them now read the same Android TV device name the chip shows, as Apple TV does. Closes #740 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 18 minutes. View limit details
Comment |
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. |
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:
|
|
The browser captures show the name change, but the PR also changes what nearby phones display in the TV setup and sign-in cards. The validation section says neither phone card was captured; checking the advertised name does not show those visible results. Please add before-and-after captures of the affected phone cards using the same TV name. The phone surface is affected even though its code is unchanged. AI disclosure: Silo Triage via OpenClaw; model |
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (gpt-6.1-sol, reviewed b5ec9f3)
Two verified findings below. Verification used the pinned client source, Android platform source, the server contract, and UTF-8 boundary checks; no device reproduction was performed for these cases.
AI disclosure: model gpt-6.1-sol; harness Codex in T3 Code; AI-generated review.
The pairing and SiloCast adverts use the device name as their service name, which holds 63 UTF-8 bytes. Android 14 cuts a longer one; older releases refuse to register it, which would hide the TV from phones. Cut the name once, on a character boundary, so every place shows the same name. 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:
|
|
The changed names reach phone UI even though the phone app does not execute the changed code:
Suggested fix: No diff; add these captures to the linked evidence collection. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
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 TV's name on the nearby-TV offer card, the in-app Sign in a TV approval card and the SiloCast target picker. Devices: Pixel 8 phone, Pixel Tablet and Pixel Fold emulators (API 34) with an Android TV emulator named Living Room TV. Before is TV |
Problem
Closes #740
Related issue: Silo-Server/silo-server#1192
Validation tasks: changes #337 C1 and C2 (what the browser page and phone cards call the TV); both are not run yet.
An Android TV shows the name its owner gave it ("Living Room TV") on its own screens, but it uses the hardware model when it talks to anyone else. The browser approval page asked "Sign in sdk_google_atv64_arm64?", and phone cards said "Set Up sdk_google_atv64_arm64". On real hardware that would be the product model. Apple TV and Roku use the name the person chose, so a household with more than one TV can tell which one it's approving.
Approach
A small helper,
TvDeviceName, reads Android TV's device name (Settings.Global.DEVICE_NAME) and falls back to "Android TV". That's the same rule the setup screen's chip already used. It cuts a name longer than 63 UTF-8 bytes on a character boundary. A DNS-SD service name can't be longer: Android 14 cuts it, and older releases refuse to register it, which would hide the TV from phones. Cutting once keeps every place showing the same name. Every place the TV names itself now uses it:device_name), so the server, the/activatepage, and phone approvals show it;name) and the pairing hello's identity;The
X-Silo-Device-Nameheader on every request still sends the manufacturer and model. Apple sends the device name there too. But OkHttp rejects header values with non-ASCII characters, so a TV named "Café TV" or "Nathan’s TV" would fail every request. That needs header encoding first, so it's left out of this change.Validation
Reproduced live on an Android TV emulator (Android 14), with its device name set to "Living Room TV", against a dev server. Before (
mainat 238134a): the request storeddevice_name = sdk_google_atv64_arm64,/activateasked "Sign in sdk_google_atv64_arm64?", and both adverts were namedsdk_google_atv64_arm64. After: the request storesLiving Room TV,/activateasks "Sign in Living Room TV?", and both adverts (st=setupandst=login) are namedLiving Room TV. The adverts were read fromdumpsys servicediscoveryon the TV. With a 78-byte name (accents, a typographic apostrophe, and an emoji), the stored request and both adverts used the same 63-byte cut, and both adverts registered. No phone was paired in this run, so the phone card wasn't captured. It shows the advert's name, which the check covered.:androidTvApp:testDebugUnitTest,:android-shared:testDebugUnitTest,lintDebugfor both modules, and:androidTvApp:lintVitalReleasepassed with no new findings. No new tests, per AGENTS.md for small changes.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/issue-740/
Android TV emulator only. The phone app doesn't run any of the changed code.
Risks
TvPairingAdvertiser.ktand theTvLoginViewModelwiring inAndroidTvModule.kt, which other open TV pairing work also edits. Whichever lands second needs a small rebase.Follow-ups
X-Silo-Device-Nameonce non-ASCII header values are encoded, so session lists match too.AI Disclosure
🤖 Generated with Claude Code
Note
Use configured Android TV device name in pairing, cast, and login identity
TvDeviceNameutility that reads the configured Android TV name from global settings (API 25+), with a generic fallback when unavailableSiloCastNsdAdvertiser,TvPairingAdvertiser, TvLoginViewModel.kt, and the Koin module, so the TV identifies itself by its user-configured namecurrentIdentityin TvPairingAdvertiser.kt and the advertiser default in SiloCastNsdAdvertiser.ktMacroscope summarized 36a5313.