Skip to content

TV QA sweep + Apple parity: navigation model, calendar, player, sign-in, DV & frame-rate toggles - #44

Merged
RXWatcher merged 31 commits into
Silo-Server:mainfrom
RXWatcher:feat/tv-qa-sweep-and-parity
Jul 8, 2026
Merged

RXWatcher merged 31 commits into
Silo-Server:mainfrom
RXWatcher:feat/tv-qa-sweep-and-parity

Conversation

@RXWatcher

@RXWatcher RXWatcher commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Clears the full 2026-07-08 QA feedback from on-device testing (Shield, Streamer, Fire TV) plus follow-up parity work. Apple (silo-apple) treated as authoritative throughout. 28 commits, grouped below.

Sign-in / pairing

  • Sign-out sticks: a 401-refresh racing logout could re-persist the session after clearTokens (logout revokes the access token server-side, so concurrent requests 401 exactly then). Both interceptors now drop refresh responses when the refresh token was cleared mid-flight; pinned by a new SiloAuthPlugin test.
  • Set up with phone works after sign-out: the advertiser always broadcasts st=setup — Apple's companion card filters to state == .setup and its own advertiser hardcodes it; our registry-derived login state made the TV invisible exactly when setup was needed.
  • tvOS consent step: the first pushed server of a pairing session waits for Allow/Don't-allow on the TV before device-login (and the code) appears; per-session consent, deny sends Cancel(consent_denied).
  • First sign-in focuses the SETUP WITH PHONE card; returning users keep URL-field focus.
  • Splash: Apple's asset, rendered in Apple's small centered box (tvOS min(25% width, 440pt) → 220dp; phone 60%/320dp) on pure black — full-bleed rendering had the logo ~4× oversized, and off-black surfaces boxed the video.

Shell / navigation (QA back-stack model)

  • Back climbs from content to the nav bar on the current section; Back on the bar goes Home; Back on Home exits; Select from the bar lands on the top-left item.
  • Top bar is locked (tvOS parity — no scroll-hide) with a shell-owned near-opaque scrim; the bar's focus dim now only affects labels.
  • For You root tab (tvOS .recommendations order) with Watchlist/Favorites dropdown; opens only on explicit d-pad-down/OK — dwell-preview let a focus transient during cascade commits trap users in the dropdown.
  • Cascade's Collections pill gated per library (probed once) so empty libraries don't offer a dead-end; genre chips are one scrollable line.
  • Calendar: tvOS CalendarEventCard portrait cells at reduced scale, day-snap owns vertical scrolling exclusively (no orphaned caption strips / fold clipping), meaningless midnight air-times hidden.
  • History/Favorites/Watchlist pages: standard 6-column grid, clear of the wordmark.

Detail / series / person pages

  • Track selector values: "Auto - " while Auto; bare name after manual pick; subtitles preview "Auto - None" / default track.
  • Section headers match tvOS TVSectionHeader (single-line titles; eyebrow only where it adds context).
  • "More Like This" uses /recommendations/similar and hides when the server has recommendations disabled (the old genre browse produced alphabetical non-suggestions); never shown on episodes.
  • Season switching replaces the nav entry (no stacking); episodes-section focus anchors the window at one canonical offset.
  • Manual track pre-selections survive page rebuilds (session store).
  • Person page: hero-scale name, 6-column grid, filters gated by the profile's actual libraries, label clearance fixes.
  • Cast rail focus ring un-clipped; Details section is a focusable stop.

Player

  • In-player Version switching (HUD Video pane): restarts the session on the chosen server file at the current position.
  • Dolby Vision toggle (player.dolby_vision_enabled, default ON): off advertises no DV profiles (except 5, which has no watchable base layer) and drops the DV MIME preference — plays base-layer HDR10. Shared DolbyVisionPolicy port with tests; precedence over the P7 fallback toggle matches Apple.
  • Match Content Frame Rate toggle (default OFF, Apple TV parity): gates the HDMI display-mode matching that was previously always-on.
  • First-video-frame watchdog (8s): a DV P7 TrueHD remux on the Shield played audio over a silent black screen with no decoder error; the watchdog now escalates into the recovery ladder (MPV base layer first).
  • Buffering-stall watchdog (30s): wedged server remuxes (e.g. The Office US S8E15) no longer spin forever — escalates to an alternate engine / fresh route. (Server-side remux wedge still needs diagnosis with the file.)
  • D-pad-down with nothing on screen opens the hover menu (HUD), tvOS behavior; Back while playing reliably dismisses the transport (handled at the key bridge before Compose eats it as focus-deselection); paused Back exits the player (tvOS f12a928).
  • MPV box subtitles get real padding (border-style-4 inflation); "No background" quick toggle can be turned off again.
  • View-level keepScreenOn on the player view (Fire OS screensaver engaged mid-playback despite the window flag).

Testing

  • Full ./gradlew test green across all modules (new tests: DolbyVisionPolicy, pairing consent, sign-out race; updated source-guard pins).
  • Iterated on-device on a Shield through 11 QA builds (0.3.3-qa1…qa11) with tester feedback each round; calendar/scrim/navigation verified visually.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Dolby Vision and match frame rate playback settings, plus a new “For You” home tab.
    • TV playback now supports in-player version switching, with version details shown in the player UI.
    • Pairing now requires explicit consent before continuing setup.
  • Bug Fixes

    • Improved sign-out handling so expired refresh attempts won’t restore a logged-out session.
    • Fixed playback refresh behavior when sign-out happens mid-refresh.
    • Refined player startup, focus navigation, subtitles, and splash-screen layout for a smoother TV experience.

RXWatcher and others added 28 commits July 8, 2026 06:41
The subtitle pane's No background quick control unconditionally set
backgroundStyle=None, so once enabled it could never be turned off from
that row. Activating it while already On now restores the default Box
background (Apple parity default).

Co-Authored-By: Claude Fable 5 <[email protected]>
…ck + Back exits paused player

Apple parity (silo-apple e9bd775 + f12a928):

- New per-device "Dolby Vision" setting (wire key
  player.dolby_vision_enabled, default ON). Off stops advertising DV
  profiles in the capability payload (server plans base-layer/HDR10
  delivery) and drops the DV MIME preference from TV track selection.
  Profile 5 always plays as DV (no watchable base layer); DV-off
  supersedes the Profile 7 HDR10 Fallback toggle.
- Shared DolbyVisionPolicy (commonMain port of Apple's, with tests) is
  the single decision source for capability payload and track selection.
- Toggle surfaced in the TV HUD Video pane (next to HDR passthrough)
  and the phone player settings sheet (next to HDR).
- TV: Back while paused exits the player instead of hiding controls
  over a frozen frame; playing-state stepping unchanged.

Co-Authored-By: Claude Fable 5 <[email protected]>
…nsent step

QA feedback (2026-07-08), sign-in cluster:

- 401-refresh racing sign-out could re-persist a fresh session after
  clearTokens (logout revokes the access token server-side, so requests
  401 exactly during sign-out): both interceptors now drop a refresh
  response when the refresh token was cleared mid-flight. Pinned by a
  new SiloAuthPlugin test.
- Pairing advertiser always advertises st=setup: Apple's companion card
  filters to state==setup and its own advertiser hardcodes it, so our
  registry-based 'login' state (always true after sign-out — the
  registry keeps entries) made the TV invisible to phones exactly when
  set-up-with-phone was needed again.
- tvOS-parity consent step: the first pushed server of a pairing session
  now waits for Allow/Don't-allow on the TV before device-login (and the
  pairing code) starts; consent is per-session, deny sends
  Cancel(consent_denied). Receiver tests updated + 2 new.
- First sign-in focuses the SETUP WITH PHONE card instead of dropping
  into the URL field; returning users (URL pre-filled) keep field focus.

Co-Authored-By: Claude Fable 5 <[email protected]>
QA: Android's splash video had a purple gradient that bands on most TV
panels and its own logo animation; tvOS ships a different cut on pure
black. Use silo-apple's startup_splash.mp4 verbatim (identical pixels =
identical logo scale) and switch the TV splash from Crop to Fit to match
StartupSplashView's .resizeAspect.

Co-Authored-By: Claude Fable 5 <[email protected]>
…t resets to top-left

- Back from tab-root content focuses the top nav on the current section
  (was: popped tab history).
- Back while the nav is focused: Home exits the app; any other section
  navigates Home with the bar still focused.
- Selecting a tab from the nav focuses the top-left content item and
  scrolls to top (revives the contentFocusRequest nudge for Home and
  bumps the section nonce for library-type tabs), instead of restoring
  the last-focused card.
- Secondary screens (Settings, Search, admin, …) keep their pop-first
  Back behavior.

Shell focus-state unit tests and source pins updated to the new model.

Co-Authored-By: Claude Fable 5 <[email protected]>
…mmendations, cast clip, focusable Details

- Version/Audio selector values read "Auto - <resolved>" while Auto is
  selected and just the name after a manual pick; Subtitles previews the
  auto resolution ("Auto - <default track>" / "Auto - None").
- Section headers match tvOS TVSectionHeader: single-line titles
  ("Cast & Crew", "Details", "More Like This"); the eyebrow survives
  only where it adds context ("Season N" over "Episodes").
- "More Like This" now uses /recommendations/similar (Apple parity) and
  disappears when the server has recommendations disabled or empty —
  replacing the genre browse that produced alphabetical non-suggestions.
  Episodes never show the shelf (Apple showsSimilarRail).
- Cast rail safe-area inset moved into the LazyRow contentPadding so the
  leftmost card's focus ring isn't clipped by the viewport edge.
- Details facts section is a focusable stop (subtle highlight) so the
  D-pad no longer drives from Cast & Crew straight past it.

Co-Authored-By: Claude Fable 5 <[email protected]>
…, label clearance

- Name scales down to the detail-hero title size (was 38sp — larger than
  anywhere else in the UI); grid goes 7 → 6 columns to match every other
  catalog grid's card size.
- Audiobooks/Music filmography filters only show when the profile
  actually has such libraries (graceful full set on lookup failure).
- Grid gains label clearance so a single row's year isn't clipped.

Co-Authored-By: Claude Fable 5 <[email protected]>
Manual audio/subtitle pre-selections lived only in the nav-entry-scoped
ViewModel, so a season switch or detail re-entry silently reset them to
Auto (QA 2026-07-08). A session-scoped store keyed by contentId restores
them when the page rebuilds; durable per-playback preferences remain the
player's job.

Co-Authored-By: Claude Fable 5 <[email protected]>
…ow anchoring

- Switching seasons from a season detail page replaces the nav entry
  instead of pushing, so paging through seasons never stacks pages — one
  Back returns to the originating screen (QA 2026-07-08). Series pages
  already swapped episodes in place via the season chips.
- Focus entering the episodes section (season chips OR episode cards)
  anchors the body scroll to one canonical offset, so focusing
  "Season N" sits where an episode focus sits and returning up from
  Cast & Crew restores the same window position.

Co-Authored-By: Claude Fable 5 <[email protected]>
…rity)

QA 2026-07-08: For You was missing from the TV top menu. Root order now
matches tvOS TVMainTabView (Home, library types, For You, Calendar); the
tab selects the For You screen, and d-pad-down / dwell opens a dropdown
(tvOS TVForYouDropdown) with Watchlist and Favorites, riding the existing
persistent-panel machinery.

Co-Authored-By: Claude Fable 5 <[email protected]>
The calendar's scroll-fade could leave the menu invisible while focused
(QA 2026-07-08): visibility only snapped back on explicit menu-focus
requests, not on geometric D-pad focus entry. Any focus on the bar now
restores it (the new Back-to-menu model also routes through here).

Co-Authored-By: Claude Fable 5 <[email protected]>
… pane

- Long server URLs wrap to up to 3 lines in the Active Server group
  instead of truncating into unreadability.
- Up at the top of a category's detail pane no longer escapes to the top
  menu; Left still exits to the category rail.
- (The 'Server box smaller than the rest' report needs a screenshot —
  all rows share RowHeight/RowMaxWidth in code.)

Co-Authored-By: Claude Fable 5 <[email protected]>
…enu, Back fix, box padding

- New "Version" row in the HUD Video pane lists the server's file
  versions (4K/1080p encodes) and restarts the session on the chosen
  file at the current position — the in-player quality selection QA
  asked for (tvOS parity). Versions are plumbed through the playback
  start result.
- D-pad-down while playing with nothing on screen opens the hover menu
  (HUD), matching tvOS; with an overlay up it still routes focus into
  the transport.
- Back while playing with the transport overlay up is handled at the
  key-dispatch bridge, so Compose can no longer eat it as a button
  focus-deselection — it now reliably dismisses the overlay.
- MPV box-style subtitles keep a minimum border size: in ASS
  border-style 4 the border inflates the box (no ring), giving the
  requested padding around SRT box subtitles. (Media3's SubtitleView
  has no public box-padding control — noted as a known limitation.)

Co-Authored-By: Claude Fable 5 <[email protected]>
…fall back to another engine

QA 2026-07-08: a 4K DV Profile 7 TrueHD remux (Framestor) played audio
over a black screen on the Shield. The device CLAIMS P7 via its DV
decoder, so the Media3 route is chosen — but the decoder renders
nothing and raises no error, so the error-driven recovery ladder never
fires. If playback is rolling and no first video frame arrives within
8s, treat it as an engine failure: the existing ladder prefers an
alternate direct engine (MPV plays the P7/P8 HDR10 base layer) before
conceding a server transcode. MPV dispatches onRenderedFirstFrame too,
which cancels the watchdog on healthy playback.

Co-Authored-By: Claude Fable 5 <[email protected]>
…ions

QA 2026-07-08: certain remuxes never start on the compatibility route
(e.g. The Office US S8E15) — the server-side remux wedges and the client
buffers forever with no error. After 30s of buffering with no position
progress, escalate into the existing recovery ladder (alternate direct
engine first, then a fresh server route). The server-side wedge itself
still needs the file for diagnosis — this ends the infinite spinner.

Co-Authored-By: Claude Fable 5 <[email protected]>
… top bar

QA (jake-, 2026-07-08): the personal grids used the adaptive cell size
(~5 oversized columns vs the 6-column standard everywhere else), and
their header rendered under the floating top bar, overlapping the Silo
wordmark. Fixed columns to 6 and top-inset the header like every other
page.

Co-Authored-By: Claude Fable 5 <[email protected]>
The HDMI display-mode matching (resolution/refresh via
HdrDisplayController) was always-on. Apple TV ships this as the
user-facing "Match Content" system setting, default OFF, because the
mode switch black-screens for 1-2s on player entry/exit. Parity: new
device-scoped player.match_frame_rate setting (synced wire key,
default off) gates applyForMedia; toggle lives in TV Settings >
Playback.

Co-Authored-By: Claude Fable 5 <[email protected]>
… the list

QA 2026-07-08 (screenshot): default bring-into-view only revealed the
focused CARD, leaving the previous day's caption strip stranded under
the week picker and clipping the focused row at the bottom fold. When
focus enters a day's shelf, the list now snaps that day to the top —
full row visible, no orphaned fragments.

Co-Authored-By: Claude Fable 5 <[email protected]>
…estamps

QA 2026-07-08 (screenshots): the portrait poster with caption below was
too tall for the day shelves (captions clipped at the fold, previous
day bleeding under the week strip even with day snapping). Cells are now
a single landscape row — small poster left, badges/title/episode/time
beside it — so a full day shelf fits comfortably. Air time only shows
when it is a real broadcast time; date-only entries rendered a
meaningless "00:00" on every card.

Co-Authored-By: Claude Fable 5 <[email protected]>
…reduced scale

The landscape poster+text cell was a deviation; tvOS CalendarEventCard
is a portrait poster (badges top-left, watched check top-right, air-time
capsule bottom-right ON the poster) with a 2-line-reserved caption
below. Restored that structure at 120x180dp so a full day shelf fits
between the week strip and the fold; midnight-only air dates stay
hidden.

Co-Authored-By: Claude Fable 5 <[email protected]>
The focused card's default bring-into-view fought the day-snap — it
re-scrolled the column to give itself a gutter, dragging the previous
day's caption tail back under the week strip and pushing captions past
the fold. The day list now suppresses focus-driven vertical scrolling
(no-op BringIntoViewSpec) and relies on the shelf snap alone; the
horizontal rows re-enable the smooth spec inside each shelf. Verified
on-device (0.3.3-qa5).

Co-Authored-By: Claude Fable 5 <[email protected]>
…ver)

A Fire TV user reported the screensaver engaging 15-30 min into
playback. The activity window already holds FLAG_KEEP_SCREEN_ON for the
player screen's lifetime, but Fire OS has known cases where the window
flag alone doesn't inhibit its screensaver — android:keepScreenOn on
the visible PlayerView (the standard TV-player belt-and-braces) covers
both the Media3 and MPV routes.

Co-Authored-By: Claude Fable 5 <[email protected]>
Matching the tvOS asset wasn't enough — StartupSplashView renders the
video in a small centered layer (tvOS: min(25% width, 440pt); iOS:
min(60% width, 320pt)), while Android stretched it across the whole
panel, making the logo ~4x too large (QA 2026-07-08). Both apps now use
Apple's box sizing at Android scale (TV: 25%/220dp, phone: 60%/320dp)
centered on black.

Co-Authored-By: Claude Fable 5 <[email protected]>
The splash video encodes true #000000 black; the surrounding surfaces
used 0xFF070509 / 0xFF050505, so the small centered video layer showed
as a faint box (QA 2026-07-08). All splash backgrounds are now pure
black on TV and phone.

Co-Authored-By: Claude Fable 5 <[email protected]>
After a cascade pill commit, focus can transiently fall back to the bar
while the new content composes; it landed on the adjacent For You tab,
the dwell timer opened the dropdown, and its focus trap swallowed the
user into Watchlist/Favorites with the bar dimmed (QA 2026-07-08:
Movies→Browse/Genres all 'landed' there). The dropdown now opens only
on a deliberate d-pad-down/OK, and its panel is visible/focusable only
once actually entered.

Co-Authored-By: Claude Fable 5 <[email protected]>
… Collections pill

QA 2026-07-08 (Genres screen):
- The top bar no longer scroll-hides: tvOS's TVTopMenuBar always floats
  and dims to 70% when content owns focus; our scroll-away fade let
  content slide under the wordmark and stranded users with an invisible
  bar.
- Genre chips are one scrollable line instead of a 3-row FlowRow wall
  that consumed half the viewport.
- The cascade's Collections pill only shows for libraries that actually
  have collections (shell probes /collections per library once), so an
  empty library no longer offers a dead-end black page.

Co-Authored-By: Claude Fable 5 <[email protected]>
- With the bar permanently visible, scrolled content passed beneath it
  and the bar's focus dim weakened its own gradient exactly then — the
  wordmark/tabs floated unreadably over posters (QA 2026-07-08). The
  SHELL now draws a fixed top gradient scrim behind the bar; the bar
  keeps no band of its own so dimming only affects labels.
- The cascade cached its pill list before the per-library collections
  probe finished, so empty libraries kept offering Collections; the
  filter is now evaluated outside remember and recomputes when the
  probe lands.

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@RXWatcher, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

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).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 76918ea3-e796-453a-b0ee-1ad9a92f8d59

📥 Commits

Reviewing files that changed from the base of the PR and between 458e19c and 1b080b6.

📒 Files selected for processing (19)
  • AGENTS.md
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/pairing/PairingReceiver.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/AndroidPlayerSettingsStore.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/DeviceCaptioningAppearance.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/PlayerSettingsStore.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/MediaAuthInterceptorTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/settings/ServerDrivenConfigRefresherTest.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/data/preferences/TvLibraryScopeStore.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/di/AndroidTvModule.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibraryDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/settings/TvSettingsScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/settings/TvSettingsViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMainShell.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMediaDestinations.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/data/preferences/LegacyTvPrefsMigrationTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/shell/TvMediaDestinationsTest.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/settings/PlaybackSettingsKeys.kt
📝 Walkthrough

Walkthrough

This PR adds tvOS-parity pairing consent gating, a shared Dolby Vision policy applied across capability detection and settings, an auth-refresh sign-out race fix, in-player file-version switching, splash video sizing changes, a new TV "For You" shell tab with reworked back-navigation, and various TV detail/calendar/personal/player UI and settings adjustments.

Changes

Pairing Consent Flow

Layer / File(s) Summary
PairingReceiver consent state machine
.../pairing/PairingReceiver.kt, .../pairing/PairingReceiverTest.kt
Adds ConsentRequested status, pending-push/consent tracking, allowPendingServer/denyPendingServer, and gates device-login on consent, with unit tests.
TV consent UI, focus, and DI
.../auth/TvServerSetupScreen.kt, .../di/AndroidTvModule.kt, .../TvAuthFocusSourceTest.kt
Adds Allow/Deny consent UI, phone-setup focus anchoring, and always-Setup receiver state DI wiring.

Dolby Vision Policy and Settings Integration

Layer / File(s) Summary
DolbyVisionPolicy core logic
shared/.../player/DolbyVisionPolicy.kt, .../DolbyVisionPolicyTest.kt
New singleton computing DV profile resolution and advertisable-profile filtering.
Settings keys and stores
PlaybackSettingsKeys.kt, PlayerSettingsStore.kt, AndroidPlayerSettingsStore.kt, test fakes
Adds DolbyVisionEnabled/MatchContentFrameRate keys, flows, setters, and a policy-snapshot helper.
Capability detector filtering
PlaybackCapabilityDetector.kt
detect()/detectPlaybackContext() accept a DV snapshot and filter advertised profiles.
Mobile app wiring
PlayerViewModel.kt, PlayerSettingsSheet.kt, PlayerOverlay.kt, MobileVideoPlaybackStarter.kt
Exposes a DV toggle in settings UI and threads policy snapshots through capability detection.
TV app wiring
TvVideoPlaybackStarter.kt, TvPlayerViewModel.kt, TvPlayerScreen.kt, TvPlayerHud.kt
Adds a DV HUD toggle and applies DV policy to HDR profile filtering during playback.

Auth Refresh Sign-out Race Fix

Layer / File(s) Summary
Refresh-vs-sign-out guard
AuthInterceptorImpl.kt, MediaAuthInterceptor.kt, SiloAuthPluginRefreshFailureTest.kt
Aborts token persistence if a refresh token is cleared by sign-out while a refresh request is in flight.

In-Player File Version Switching

Layer / File(s) Summary
Version data plumbing
VideoPlaybackStartResult.kt, VideoPlayerUiState.kt, VideoPlaybackSessionCoordinator.kt, TvVideoPlaybackStarter.kt, TvPlayerViewModel.kt
Adds a versions field populated from backend results.
TV version-switch action and HUD
TvPlayerViewModel.kt, TvPlayerHud.kt, TvPlayerScreen.kt
Adds onSelectFileVersion reload logic and a HUD "Version" row/picker.
Auto label formatting
TvPlaybackFormatting.kt, TvPlaybackSelectorRow.kt, tests
Updates version/audio/subtitle "Auto" value labels.

Startup Splash Video Sizing

Layer / File(s) Summary
Splash layout constraints
StartupSplashVideo.kt, MainActivity.kt, MainTvActivity.kt
Constrains splash video to a centered, 16:9 box with black background.

TV Shell For You Tab and Back Navigation

Layer / File(s) Summary
ForYou destination and menu tab
TvRootDestination.kt, TvMediaDestinations.kt, TvTopMenuBar.kt, tests
Adds a ForYou root destination and top-menu tab with focus/key handling.
ForYou panel and shell wiring
TvMainShell.kt
Renders the ForYou dropdown panel, top scrim, and focus-refresh counters.
Back-key routing rework
TvShellFocusState.kt, TvMainShell.kt, tests
Replaces MoveFocusToContent with MenuBack/MoveFocusToMenu keyed on onTabRoot.

TV Collections Gating and Detail/Calendar/Personal Screen Polish

Layer / File(s) Summary
Collections gating
TvCascadeSelector.kt, TvMainShell.kt
Filters the Collections pill by per-library data via a new SectionRepository lookup.
Calendar shelf focus and card styling
TvCalendarScreen.kt, tests
Adds shelf snap-to-focus scrolling and reworks event card sizing/captions.
Item detail navigation and recommendations
TvItemDetailScreen.kt, TvItemDetailViewModel.kt, TvCastCrewSection.kt, TvDetailSectionHeader.kt, TvAppNavigation.kt, DI
Adds season-replace navigation, focus anchoring, track-selection recall, and a recommendation-driven similar-items shelf.
Person detail sizing and filters
TvPersonDetailScreen.kt, TvPersonDetailViewModel.kt, DI, test
Adjusts grid/typography sizing and gates filmography filters by library type.
Personal grid and library genre chips
TvPersonalScreens.kt, TvLibraryDetailScreen.kt
Adjusts grid inset/column count and reworks genre chips into a scrollable row.

TV Player Controls, Watchdogs, and Settings

Layer / File(s) Summary
MPV subtitle box fix
MpvSubtitleStyle.kt, test
Clamps minimum sub-border-size for the Box preset.
Back key and D-pad remapping
TvPlayerScreen.kt, TvPlayerRemoteKeyAction.kt, tests
Hides controls on Back while playing; DPAD_DOWN mapping depends on dpadHorizontalSeek.
Playback watchdogs
TvPlayerViewModel.kt, TvPlayerScreen.kt
Detects black-screen and buffering-stall conditions and triggers engine-switch fallback.
Subtitle toggle and screen lock
TvPlayerHud.kt, tv_player_view.xml, test
Toggles subtitle background style; keeps screen on during playback.
Match Content Frame Rate setting
TvSettingsScreen.kt, TvSettingsViewModel.kt
Adds a persisted device toggle and multi-line settings row support.

Estimated code review effort: 4 (Complex) | ~75 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the PR’s main TV QA/Apple parity changes across navigation, playback, sign-in, and toggle work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 458e19cdda

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

.filter { type -> libraries.any { type.matches(it) } }
.forEach { type -> add(TvRootDestination.LibraryType(type)) }
// tvOS root order: libraries, then For You, then Calendar.
add(TvRootDestination.ForYou)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep For You out of the TV top navigation

The repository instructions for /workspace/silo-android say Android TV navigation is limited to Home, available media-type tabs, Calendar, search, and profile actions; For You should be reached from Home rather than exposed as a tab. Adding TvRootDestination.ForYou here makes it a top-level TV tab for every profile, which violates that product exposure rule and changes Back/menu behavior around the For You route.

Useful? React with 👍 / 👎.

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.

Deliberate product change, not an oversight — the doc was stale. For You as a root tab (with the Watchlist/Favorites dropdown) was explicitly requested in the 2026-07-08 QA feedback and mirrors tvOS, where TVMainTabView.visibleRoots ships .recommendations between the library tabs and Calendar. Updated CLAUDE.md/AGENTS.md in the follow-up commit to reflect the new exposure.

Comment on lines +1283 to +1286
bufferingWatchdogJob = if (isBuffering) {
viewModelScope.launch {
val positionAtStart = _uiState.value.position
delay(BUFFERING_WATCHDOG_MS)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Cancel stale buffering watchdogs before reloading playback

This watchdog is scoped only to the ViewModel, but loadContent(), retry, and in-player version switching do not cancel it or clear isBuffering. If playback enters buffering and the user retries/switches versions or a fallback starts before the 30s delay expires, the old delayed job will read the new _uiState and can call onEngineSwitchFailed after only the remaining time, causing a premature second fallback or stale-session recovery during the next load.

Useful? React with 👍 / 👎.

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.

Good catch — fixed in the follow-up commit: loadContent() (which retry, version switching, and fallbacks all route through) now cancels the buffering watchdog and clears isBuffering alongside the first-frame watchdog reset, so a stale timer can't fire into the next session.

RXWatcher and others added 2 commits July 8, 2026 09:50
…n TV nav

- Codex PR#44 P2: loadContent/retry/version-switch now cancel the
  buffering watchdog and clear isBuffering, so a stale 30s timer can't
  fire a premature fallback into the new session.
- Codex PR#44 P1: the product-exposure doc predated the QA request —
  For You is a deliberate root tab now (tvOS .recommendations parity,
  requested by the Apple lead in the 2026-07-08 QA); docs updated to
  match.

Co-Authored-By: Claude Fable 5 <[email protected]>
Apple's TVSettingsView rail is exactly General/Playback/Subtitles/
Server; the Library section (Watchlist/Favorites/History/Collections
links) is iOS-only, compiled out on tvOS. On TV those destinations
already live in the For You dropdown, the profile menu, Home, and the
library cascades. Dead nav plumbing stripped through the chain.

Co-Authored-By: Claude Fable 5 <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
shared/src/commonMain/kotlin/org/siloserver/silo/network/AuthInterceptorImpl.kt (1)

141-184: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Add the same sign-out guard here. clearTokens()/signOutCurrentServer() clears the active server slot, so a pinned refresh started before logout can still complete and saveTokensForScope() the old credentials back to disk. Re-check the pinned scope’s refresh token after the network call and drop the response if sign-out cleared it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@shared/src/commonMain/kotlin/org/siloserver/silo/network/AuthInterceptorImpl.kt`
around lines 141 - 184, The refresh flow in AuthInterceptorImpl’s pinned-scope
retry path can write stale credentials back after sign-out because
`refreshMutex.withLock` only checks the refresh token before the network call.
In the `refreshToken`/`refreshResponse` flow, add the same sign-out guard by
re-reading the pinned scope’s refresh token from `tokenManager` immediately
after the refresh request succeeds and before `saveTokensForScope()`, and
discard the response if `clearTokens()` or `signOutCurrentServer()` has cleared
that scope.
🧹 Nitpick comments (4)
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/people/TvPersonDetailViewModel.kt (1)

63-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace fully qualified names with imports.

The init block uses three fully qualified names inline (org.siloserver.silo.repository.PersonalDataRepository, org.siloserver.silo.network.ApiResult.Success, org.siloserver.silo.model.navigation.isAudiobookLikeLibraryType) which hurts readability. Add imports at the top of the file (or use import aliases if there are naming conflicts).

♻️ Proposed refactor: use imports instead of FQNs
 // At the top of the file, add:
+import org.siloserver.silo.model.navigation.isAudiobookLikeLibraryType
+import org.siloserver.silo.network.ApiResult
+import org.siloserver.silo.repository.PersonalDataRepository

 // In the class body:
 class TvPersonDetailViewModel(
     private val catalogRepository: CatalogRepository,
     private val personId: Long,
-    private val personalDataRepository: org.siloserver.silo.repository.PersonalDataRepository? = null,
+    private val personalDataRepository: PersonalDataRepository? = null,
 ) : ViewModel() {
     init {
         viewModelScope.launch {
             val repo = personalDataRepository ?: return@launch
             val result = repo.listUserLibraries()
-            if (result !is org.siloserver.silo.network.ApiResult.Success) return@launch
+            if (result !is ApiResult.Success) return@launch
             val types = result.data.map { it.type.lowercase() }.toSet()
             val gated = TvPersonMediaFilters.filter { filter ->
                 when (filter) {
                     TvPersonMediaFilter.Audiobooks ->
-                        types.any { org.siloserver.silo.model.navigation.isAudiobookLikeLibraryType(it) }
+                        types.any { isAudiobookLikeLibraryType(it) }
                     TvPersonMediaFilter.Music ->
                         types.any { it == "music" || it == "audio" }
                     else -> true
                 }
             }
             _uiState.update { it.copy(availableFilters = gated) }
         }
     }

Also applies to: 69-91

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/people/TvPersonDetailViewModel.kt`
around lines 63 - 64, The init block in TvPersonDetailViewModel uses fully
qualified names inline, which hurts readability and makes the code harder to
scan. Add imports for PersonalDataRepository, ApiResult.Success, and
isAudiobookLikeLibraryType at the top of the file (or use aliases if needed),
then update the constructor parameter and the init logic to use the imported
symbols instead of FQNs. Refer to TvPersonDetailViewModel and its init block
when making the cleanup.
androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvPlaybackFormattingTest.kt (1)

60-67: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add test coverage for versionValueLabel and subtitle Auto-with-default-track.

The updated audio and subtitle expectations are correct, but the new versionValueLabel function (4 branches: null/non-null version × null/non-null selectedVersionFileId) has no tests in this file. Additionally, the subtitleValueLabel Auto path is only tested with no default track — the case where a default-flagged track exists (producing "Auto - ") is untested.

🧪 Suggested test additions
     // --- versionValueLabel ---

+    `@Test` fun versionValueLabel_autoWithNullVersion() {
+        assertEquals("Auto", TvPlaybackFormatting.versionValueLabel(null, selectedVersionFileId = null))
+    }
+
+    `@Test` fun versionValueLabel_autoWithResolvedVersion() {
+        val v = fileVersion(resolution = "2160p", hdr = true)
+        assertEquals("Auto - 4K · HDR", TvPlaybackFormatting.versionValueLabel(v, selectedVersionFileId = null))
+    }
+
+    `@Test` fun versionValueLabel_manualSelection() {
+        val v = fileVersion(resolution = "1080p", hdr = false)
+        assertEquals("1080P", TvPlaybackFormatting.versionValueLabel(v, selectedVersionFileId = 1))
+    }
+
     // --- subtitleValueLabel / subtitleOptions ---

+    `@Test` fun subtitleValueLabel_autoWithDefaultTrack() {
+        val v = fileVersion(subtitles = listOf(subtitleTrack(index = 0, lang = "eng", default = true)))
+        assertEquals("Auto - English", TvPlaybackFormatting.subtitleValueLabel(v, selectedSubtitleTrackIndex = null))
+    }
+
     `@Test` fun subtitleValueLabel_offForMinusOne() {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvPlaybackFormattingTest.kt`
around lines 60 - 67, Add missing coverage in TvPlaybackFormattingTest for the
new versionValueLabel branches by adding tests for null and non-null version
with null and non-null selectedVersionFileId, using the
TvPlaybackFormatting.versionValueLabel entry point. Also extend
subtitleValueLabel coverage to include the Auto path when a default-flagged
subtitle track exists, asserting the resolved “Auto - <title>” behavior via
subtitleValueLabel. Keep the new cases alongside the existing audioValueLabel
tests so the formatting matrix stays easy to find.
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt (1)

572-576: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated "hide controls on Back while playing" predicate across two handlers.

The same condition (showControls && !isPaused, plus the modal-state exclusions) is implemented independently in the BackHandler (line 576) and the raw key-dispatch bridge (lines 658-667). Since the bridge consumes KEYCODE_BACK first and returns true, the BackHandler branch is likely dead for TV remote presses under this state, leaving two copies of the same rule that must be kept in sync by hand.

Consider extracting the shared predicate into a single val/function used by both paths to prevent future drift.

Also applies to: 652-673

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt`
around lines 572 - 576, The “hide controls on Back while playing” rule is
duplicated between the BackHandler branch and the key-dispatch bridge in
TvPlayerScreen, which can drift out of sync. Extract the shared `showControls &&
!isPaused` logic with the modal-state exclusions into one reusable `val` or
helper function in `TvPlayerScreen`, then have both the BackHandler and the
`KEYCODE_BACK` handling path call that same predicate before deciding whether to
hide controls or fall through to exit/leave-room behavior.
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvShellFocusState.kt (1)

243-254: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stale KDoc references non-existent MoveFocusToContent and misdescribes which actions are caller-handled.

The KDoc above onBack (Lines 237–241) says [TvShellBackAction.MoveFocusToContent] and [TvShellBackAction.DelegateToNav] are "left to the composable." But MoveFocusToContent no longer exists (replaced by MoveFocusToMenu), and MoveFocusToMenu is now handled internally via requestMenuFocus(). The actions actually left to the composable are MenuBack and DelegateToNav.

📝 Proposed KDoc fix
 /**
  * Apply the state half of a shell Back press and report what the caller
- * should do for the side-effecting cases ([TvShellBackAction.MoveFocusToContent]
- * and [TvShellBackAction.DelegateToNav] are left to the composable, which owns
- * the focus manager and nav controller).
+ * should do for the side-effecting cases ([TvShellBackAction.MenuBack]
+ * and [TvShellBackAction.DelegateToNav] are left to the composable, which owns
+ * the focus manager and nav controller).
  */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvShellFocusState.kt`
around lines 243 - 254, Update the KDoc for onBack in TvShellFocusState so it
matches the current TvShellBackAction names and behavior: replace the stale
MoveFocusToContent reference with MoveFocusToMenu, and revise the description of
which actions are left to the composable. The comment should reflect that onBack
handles ClosePanel, CloseProfileMenu, and MoveFocusToMenu internally via
requestMenuFocus(), while MenuBack and DelegateToNav are the caller-handled
actions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/pairing/PairingReceiver.kt`:
- Around line 156-167: `denyPendingServer()` can briefly revert `_status` back
to `ConsentRequested` because it closes `activeTransport` asynchronously,
allowing `handlePushServer` to process a buffered `PairingMessage.PushServer`
first. Add a denial guard on `PairingReceiver` (for example a `denied` flag)
that is set in `denyPendingServer()` before launching the cancel/close work, and
have `handlePushServer` ignore or drop incoming pushes while that flag is set.
Clear the guard when the session fully resets, and keep the existing synchronous
`cancelActiveSession()` behavior as the reference for preventing this race.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt`:
- Around line 1863-1867: Compute the Dolby Vision policy snapshot once in the
PlayerViewModel playback setup flow and reuse that same value for both
capabilityDetector.detect and capabilityDetector.detectPlaybackContext. In the
section that builds capabilities and playbackContext, store
playerSettingsStore.dolbyVisionPolicySnapshot() in a local variable first, then
pass that variable to both calls so they stay consistent; follow the same
single-snapshot pattern already used by MobileVideoPlaybackStarter.start().

In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibraryDetailScreen.kt`:
- Line 695: The genre chips in TvLibraryDetailScreen are keyed directly by the
raw genres list, so duplicate genre strings can produce repeated LazyRow item
keys and crash. Update the rendering path around the items(genres, key = { it })
block to either deduplicate the genres before composing or switch to a stable
per-item key that stays unique even when the same genre appears multiple times.
Keep the fix localized to TvLibraryDetailScreen and the genre list handling used
by the TV view models.

In
`@shared/src/commonTest/kotlin/org/siloserver/silo/network/SiloAuthPluginRefreshFailureTest.kt`:
- Around line 55-90: Add a MediaAuthInterceptor test that mirrors the existing
sign-out-during-refresh race covered in SiloAuthPluginRefreshFailureTest. In
MediaAuthInterceptorTest, create a scenario where the refresh request is in
flight, call tokenManager.clearTokens() before the refresh response returns, and
verify the successful refresh response does not repersist access or refresh
tokens. Use the existing MediaAuthInterceptor.attemptRefresh path and the same
token manager/session assertions already used by the other refresh tests.

---

Outside diff comments:
In
`@shared/src/commonMain/kotlin/org/siloserver/silo/network/AuthInterceptorImpl.kt`:
- Around line 141-184: The refresh flow in AuthInterceptorImpl’s pinned-scope
retry path can write stale credentials back after sign-out because
`refreshMutex.withLock` only checks the refresh token before the network call.
In the `refreshToken`/`refreshResponse` flow, add the same sign-out guard by
re-reading the pinned scope’s refresh token from `tokenManager` immediately
after the refresh request succeeds and before `saveTokensForScope()`, and
discard the response if `clearTokens()` or `signOutCurrentServer()` has cleared
that scope.

---

Nitpick comments:
In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/people/TvPersonDetailViewModel.kt`:
- Around line 63-64: The init block in TvPersonDetailViewModel uses fully
qualified names inline, which hurts readability and makes the code harder to
scan. Add imports for PersonalDataRepository, ApiResult.Success, and
isAudiobookLikeLibraryType at the top of the file (or use aliases if needed),
then update the constructor parameter and the init logic to use the imported
symbols instead of FQNs. Refer to TvPersonDetailViewModel and its init block
when making the cleanup.

In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt`:
- Around line 572-576: The “hide controls on Back while playing” rule is
duplicated between the BackHandler branch and the key-dispatch bridge in
TvPlayerScreen, which can drift out of sync. Extract the shared `showControls &&
!isPaused` logic with the modal-state exclusions into one reusable `val` or
helper function in `TvPlayerScreen`, then have both the BackHandler and the
`KEYCODE_BACK` handling path call that same predicate before deciding whether to
hide controls or fall through to exit/leave-room behavior.

In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvShellFocusState.kt`:
- Around line 243-254: Update the KDoc for onBack in TvShellFocusState so it
matches the current TvShellBackAction names and behavior: replace the stale
MoveFocusToContent reference with MoveFocusToMenu, and revise the description of
which actions are left to the composable. The comment should reflect that onBack
handles ClosePanel, CloseProfileMenu, and MoveFocusToMenu internally via
requestMenuFocus(), while MenuBack and DelegateToNav are the caller-handled
actions.

In
`@androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvPlaybackFormattingTest.kt`:
- Around line 60-67: Add missing coverage in TvPlaybackFormattingTest for the
new versionValueLabel branches by adding tests for null and non-null version
with null and non-null selectedVersionFileId, using the
TvPlaybackFormatting.versionValueLabel entry point. Also extend
subtitleValueLabel coverage to include the Auto path when a default-flagged
subtitle track exists, asserting the resolved “Auto - <title>” behavior via
subtitleValueLabel. Keep the new cases alongside the existing audioValueLabel
tests so the formatting matrix stays easy to find.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0dd8ab6c-ddf0-4b54-9188-7c4ebe0d696b

📥 Commits

Reviewing files that changed from the base of the PR and between 01e36e7 and 458e19c.

⛔ Files ignored due to path filters (1)
  • android-shared/src/androidMain/res/raw/startup_splash.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (63)
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/pairing/PairingReceiver.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/MediaAuthInterceptor.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackCapabilityDetector.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvSubtitleStyle.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/VideoPlaybackSessionCoordinator.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/VideoPlaybackStartResult.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/VideoPlayerUiState.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/AndroidPlayerSettingsStore.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/PlayerSettingsStore.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/ui/components/StartupSplashVideo.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/pairing/PairingReceiverTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/mpv/MpvSubtitleStyleTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/settings/ServerDrivenConfigRefresherTest.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/MainActivity.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/MobileVideoPlaybackStarter.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerOverlay.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerSettingsSheet.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/MainTvActivity.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/di/AndroidTvModule.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/components/TvCascadeSelector.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/navigation/TvAppNavigation.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/auth/TvServerSetupScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/calendar/TvCalendarScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvCastCrewSection.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvDetailSectionHeader.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvItemDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvItemDetailViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvPlaybackFormatting.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvPlaybackSelectorRow.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibraryDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/people/TvPersonDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/people/TvPersonDetailViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/personal/TvPersonalScreens.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerHud.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerRemoteKeyAction.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvVideoPlaybackStarter.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/settings/TvSettingsScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/settings/TvSettingsViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMainShell.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMediaDestinations.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvRootDestination.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvShellFocusState.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvTopMenuBar.kt
  • androidTvApp/src/androidMain/res/layout/tv_player_view.xml
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/data/preferences/LegacyTvPrefsMigrationTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/TvUsabilityGuardTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/auth/TvAuthFocusSourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/calendar/TvCalendarSizingSourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvPlaybackFormattingTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/people/TvPersonDetailSourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerControlsUsabilityTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerRemoteKeyActionTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/shell/TvMediaDestinationsTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/shell/TvShellFocusSourceTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/shell/TvShellFocusStateTest.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/settings/PlaybackSettingsKeys.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/AuthInterceptorImpl.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/player/DolbyVisionPolicy.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/network/SiloAuthPluginRefreshFailureTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/player/DolbyVisionPolicyTest.kt

Settings parity (tvOS is authoritative):
- Playback > Streaming gains the Dolby Vision toggle (was HUD-only) and
  the Profile 7 HDR10 Fallback toggle (store existed since PR#38 with no
  UI anywhere); P7 nests under DV and only shows while DV is on, as on
  Apple TV.
- General > Top Menu gains Show Audiobooks (tvOS navPrefs parity): the
  Audiobooks tab is now OPT-IN, hidden by default, stored device+profile
  locally in TvLibraryScopeStore.
- Subtitles > Appearance gains Match Device Settings: playback styling
  follows the OS captioning preferences (CaptioningManager mapped onto
  SubtitleAppearance) via a new effectiveSubtitleAppearanceFlow; the
  stored custom appearance stays untouched underneath. Local-only flag.
  (Apple's Seek Cache toggle is N/A — loopback-engine specific.)

CodeRabbit PR#44 (4/4):
- Pairing deny no longer lets a buffered PushServer re-open the consent
  prompt mid-teardown.
- Phone selectVersion computes the DolbyVision snapshot once.
- Genre chips dedupe before keying (duplicate server genres crashed the
  LazyRow).
- MediaAuthInterceptor gains the sign-out-during-refresh race test
  mirroring the SiloAuthPlugin one.

Co-Authored-By: Claude Fable 5 <[email protected]>
@RXWatcher
RXWatcher merged commit 423f66b into Silo-Server:main Jul 8, 2026
4 checks passed
@RXWatcher
RXWatcher deleted the feat/tv-qa-sweep-and-parity branch July 13, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant