Skip to content

fix(tv): make the player controls reachable, and Center mean pause - #214

Merged
RXWatcher merged 4 commits into
Silo-Server:mainfrom
RXWatcher:fix/tv-player-controls-reachable
Aug 11, 2026
Merged

fix(tv): make the player controls reachable, and Center mean pause#214
RXWatcher merged 4 commits into
Silo-Server:mainfrom
RXWatcher:fix/tv-player-controls-reachable

Conversation

@RXWatcher

@RXWatcher RXWatcher commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Two things stopped a viewer on the scrub bar from doing the obvious thing. Both were found on a Google TV Streamer and the fixes were verified there.

D-pad Down did not reach the controls

Down inside the player is consumed by the activity-level remote-key bridge, which maps it to FocusTransport and asks the overlay to focus the transport row. That request is retried until observed — but the arrival test was idleOverlayHasFocus, which is hasFocus on the overlay root, and that is already true whenever any control holds focus, the scrub bar included. The retry loop therefore concluded focus had already arrived and never issued a request, so Down did nothing at all.

It also explains the workaround people found: Back hides the controls, which clears the flag, so the next Down took the "controls hidden" branch and genuinely requested focus. Hence "hit Back, then Down".

Focus is now observed per control row, and the retry loop tests the row it actually asked for.

Center on the bar entered a scrub mode instead of pausing

The Google TV remote has no dedicated play/pause key, so Center with the overlay up is the only one-press pause a viewer has. It was bound to entering a scrub mode — something Left/Right already cover (skip, and long-press auto-seek).

Center now lands any scrub in flight and then toggles playback. Racing forward it stops on the frame you asked for; hunting a spot while paused it plays on from it. Same key, one meaning.

Verification

  • :androidTvApp:testDebugUnitTest passes.
  • On a Google TV Streamer: scrub bar focused → Down → play/pause focused in one press; Center on the bar toggles playback.
  • Lint was not run on this branch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9UyH5fvug685dzUFLtdpW

Summary by CodeRabbit

  • Bug Fixes
    • Improved D-pad navigation between the player’s scrubber and transport controls.
    • Fixed focus handling so controls receive and retain focus reliably.
    • Updated the scrubber’s center/Enter action to commit seeking and toggle playback correctly.
    • Prevented idle scrubber activation when center/Enter is pressed.

Two things kept a viewer on the scrub bar from doing the obvious thing.

D-pad Down is consumed by the activity-level remote-key bridge, which
maps it to FocusTransport and asks the overlay to focus the transport
row. That request is retried until observed — but the arrival test was
`idleOverlayHasFocus`, hasFocus on the overlay ROOT, which is already
true whenever any control has focus. With the scrub bar focused the retry
loop concluded focus had arrived and never requested, so Down did
nothing. It also explains the workaround: Back hides the controls,
clearing the flag, so the next Down finally requested. Observe focus per
control row and test the row actually asked for.

Center on the bar entered a scrub mode. The Google TV remote has no
play/pause key, so that spent the viewer's only one-press pause on
something Left/Right already do (skip, and long-press auto-seek). Center
now lands any scrub in flight and then toggles playback: racing forward
it stops on the frame you asked for; hunting a spot while paused it plays
on from it.

Verified on a Google TV Streamer: scrub bar -> Down now focuses
play/pause in one press.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 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: 59 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: 2c9a6c73-3b3f-489d-81ad-a820139e0a0a

📥 Commits

Reviewing files that changed from the base of the PR and between 10dd2b4 and eb8c671.

📒 Files selected for processing (2)
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScrubber.kt
📝 Walkthrough

Walkthrough

The TV player overlay now tracks scrubber and transport focus independently. Focus requests validate the requested row. The scrubber commits active seeking and invokes playback toggling on Center or Enter.

Changes

TV player focus and playback controls

Layer / File(s) Summary
Independent control-row focus
androidTvApp/.../player/TvPlayerScreen.kt
The overlay tracks scrubber and transport focus separately. Focus-request completion checks the requested row. Both controls report focus state.
Scrubber playback input
androidTvApp/.../player/TvPlayerScrubber.kt, androidTvApp/.../player/TvPlayerScreen.kt
TvPlayerScrubber accepts onPlayPause. Center/Enter commits active scrubbing and invokes the callback. The screen wires the callback to the scrubber.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DPad
  participant TvPlayerIdleOverlay
  participant TvPlayerScrubber
  participant TvPlayerTransportControls

  TvPlayerScrubber->>TvPlayerIdleOverlay: report scrubber focus
  TvPlayerTransportControls->>TvPlayerIdleOverlay: report transport focus
  DPad->>TvPlayerScrubber: send Center or Enter
  TvPlayerScrubber->>TvPlayerScrubber: commit active scrub
  TvPlayerScrubber->>TvPlayerIdleOverlay: invoke onPlayPause callback
Loading

Possibly related PRs

Suggested reviewers: quick104

🚥 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 clearly and concisely summarizes both main changes: improved player-control focus navigation and Center-button playback behavior.
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.

RXWatcher and others added 3 commits August 11, 2026 15:35
Center commits the in-flight scrub and then toggles playback. Solo that
applies locally and in order, but in a Watch Together room they are two
independently launched requests and the play/pause carries the LIVE
position rather than the committed one — so it can land after the seek
and pull every participant back to where the scrub started.

Skip the toggle when a room owns transport; Center there commits, as it
did before. The surface is compile-time disabled
(CLIENT_WATCH_TOGETHER_SURFACE_ENABLED = false), so this is latent rather
than reachable, but the ordering hazard is real.

Found by Codex review of Silo-Server#214.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@RXWatcher
RXWatcher merged commit 3efdbd9 into Silo-Server:main Aug 11, 2026
3 checks passed
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