Skip to content

fix(tv): let Left and Right seek while a skip pill has focus - #928

Merged
Quick104 merged 1 commit into
mainfrom
fix/issue-926
Nov 15, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/issue-926

Conversation

@Quick104

@Quick104 Quick104 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #926
Validation tasks: unblocks #322 C2, unblocks #322 C3

Other clients: Apple Silo-Server/silo-apple#1175 (merged fix for Silo-Server/silo-apple#1172); Roku Silo-Server/silo-roku#80; Web N/A (its skip buttons aren't reached with a D-pad)

On Android TV, while the player controls are showing, the remote's Left and Right stop seeking once a skip pill has focus. The Skip Intro pill takes focus when it appears, and Skip Recap and Skip Credits can be reached with Up from the scrubber. The pills have no Left/Right handling, so those presses did nothing.

It got worse when a focused pill went away, after its 5-second offer ran out or once the playhead left the marker. Focus went nowhere, and every press kept the controls up without seeking.

The common way in: with the controls hidden, a Right that lands inside the intro brings the controls up, Skip Intro appears and takes focus, and the next Left or Right is dead.

Approach

Left and Right on a focused skip pill now seek as they do with the controls hidden, matching the Apple TV fix:

  • a tap skips back or forward by the profile's seek intervals, through the scrubber's existing skip (overlaySkip, hoisted from its tap callbacks);
  • a hold starts the usual hold seek (beginCleanPlaybackSeek), which Select commits and Back cancels.

The pill handles the keys itself (TvIntroPromptPill, shared by both pills). It classifies the press as the remote bridge does: a release before the first repeat is a tap, and the first repeat starts a hold. With the controls hidden the bridge still takes Left and Right before Compose, so each press has one owner.

Focus stays on the pill while it is up, and Select still skips the marker. When a focused pill hides, focus goes to the scrubber, or to the player root with the controls hidden. This reuses the buffering pill's hand-off (refocusAfterPillHides), tracked per pill because the intro pill can hand straight over to the recap or credits pill. The hand-off doesn't act while the HUD or Up Next is open, since they own focus.

While the picture is loading or failed, Left and Right on a pill do nothing, as the bridge does in those states. That keeps a press from moving Retry's resume point.

Android TV only: the change is in androidTvApp.

Validation

On an Android TV emulator (API 36, 1080p) against a Silo dev deployment (server 436f0fb9), with a manual intro marker at 0:40–3:20 and a recap marker at 0:00–2:00 on another episode:

  • Focused Skip Intro, controls up, six Right taps: on main (73e55b9) no tap seeked (0:42 → 1:01, normal playback), and after the pill timed out nothing had focus. On this branch (b8fb3e0) every tap seeked (0:43 → 3:57); the pill timed out after the first tap and focus moved to the scrubber.
  • Seeking into the intro with the controls hidden, five Right taps from 0:32: on main the first tap landed at 1:02, Skip Intro took focus, and the next four did nothing. On this branch all five seeked (0:32 → 3:02), with Skip Intro keeping focus inside the intro.
  • Also on this branch:
    • Holding Right on a focused Skip Intro started the hold seek, and Select committed it with the scrubber focused.
    • Up from the scrubber to Skip Recap, then Right and Left, seeked 0:12 → 0:42 → 0:32.
    • With the HUD opened from a focused Skip Intro, the HUD kept focus when the pill timed out behind it.
  • ./gradlew :androidTvApp:assembleDebug passes, and ./gradlew :androidTvApp:testDebugUnitTest passes (1397 tests). No test was added: the change is key and focus wiring in composables, and the live before and after runs are the proof.
  • Not checked live: the intro pill handing straight over to an overlapping recap or credits pill with the controls up (checked against the source), a physical TV device, and Watch Party rooms.

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

Devices: Android TV only. The phone and tablet player has no skip pill focus or D-pad seeking, so phone, tablet and foldable are unaffected.

Risks

  • A hold on a pill gives the hidden-controls hold seek: the controls go away and the seek chip shows until Select or Back. A hold on the scrubber keeps the controls and moves its own preview. Both seek, but they look different. Apple TV made the same choice.
  • A Left or Right press that begins on a pill and ends after the pill has swapped or gone (its offer runs out mid-press) is dropped.
  • Left and Right no longer move focus sideways out of a pill. Down still reaches the controls.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code; Codex (plan review); GitHub CLI; agent-device (emulator remote input)
  • Model(s): claude-opus-5-5 (implementation, code review); gpt-6.1-sol (plan review); claude-sonnet-5-5 (code review finder and validation check)
  • Involvement: Fully AI-generated, human-directed
  • Adversarial review: Plan round before implementing: gpt-6.1-sol (xhigh) and claude-opus-5-5 (high). Opus found the plan already minimal and asked to reuse the scrubber's skip, which this PR does. Sol showed that moving focus to the scrubber on the key's first down let the hold's repeat start the scrubber's own auto-seek. That led to classifying taps and holds on the pill itself. A /silo code review at high (claude-opus-5-5 finders, claude-sonnet-5-5 validation) found that a pill could seek while the picture was loading or failed (now gated) and that one shared visibility flag missed the intro-to-recap hand-off (now tracked per pill). Live checks then found the stranded focus after a pill times out, and the shape was matched to the merged Apple TV fix. A simplify pass ran on the diff. A background adversarial review (gpt-6.1-sol, xhigh, read-only) of b8fb3e0 checked key ownership, the hold seek, the focus hand-off, the buffering pill and room seek gates, and found nothing.

🤖 Generated with Claude Code

With the player controls up, the remote bridge leaves Left and Right to
Compose focus navigation, and only the scrubber turns them into seeks.
The Skip Intro and Skip Recap/Credits pills sit outside the controls and
take focus as they appear (or by Up from the scrubber), so Left and Right
on them did nothing. When a focused pill then timed out or left its range,
focus was stranded and the remote stayed dead while the controls were up.

Left and Right on a focused pill now seek as they do with the controls
hidden: a tap skips by the seek interval and a hold starts the hold seek.
The pill keeps focus while it stays up, and a pill that hides while
focused hands focus to the scrubber (or the player root with the controls
hidden), reusing the buffering pill's hand-off.

Closes #926

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 Nov 15, 2026
@silo-kody

silo-kody Bot commented Nov 15, 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 ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T01:21:55.284252Z b8fb3e0 PR opened
🔒 Security Review ✅ Completed 2026-11-15T01:22:36.639464Z b8fb3e0 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.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Skip pills now support Left and Right seeking while visible. The player screen routes tap and hold input, checks playback readiness, shares skip handling with scrubber controls, and restores focus when a focused pill hides.

Changes: Skip-pill interactions

Layer / File(s) Summary
Skip-pill directional input
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvIntroAutoSkipBanner.kt
Intro and marker pills accept a seek callback. A matching repeated key-down starts hold seeking; a matching key-up invokes tap seeking. Left and Right events are consumed.
Player seek routing
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt
The player ignores pill seek input when playback is not ready. Holds start clean-playback seeking; taps use the shared skip handler. Scrubber skip callbacks use that same handler.
Focus restoration when pills hide
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt
The player tracks focus on intro and marker pills. When a focused pill hides, focus returns to the scrubber or player root unless the HUD or Up Next overlay is open.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: rhainland

Merge Risk: Minimal · up to b8fb3

Left and Right now seek while a skip pill has focus on Android TV, and focus returns to the scrubber or player root when a pill hides. No actionable merge-blocking risk was identified.

Security architecture risk: Minimal · up to b8fb3

The skip pills reuse existing seek behavior and retain playback-readiness and Watch Party permission checks. No introduced or worsened risk to security, failure containment, rollback, or ownership was established.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: Left and Right on a focused skip pill now seek. It matches the changeset, which adds seek callbacks to the skip pills and the Left/Right key handling.
Linked Issues check Passed [#926] Requirement: Left and Right seeking must keep working while Skip Intro (or another skip pill) is showing. The diff adds Left/Right handling to TvIntroPromptPill in TvIntroAutoSkipBanner.kt. The…
Out of Scope Changes check Passed All changed code is in androidTvApp, in TvIntroAutoSkipBanner.kt and TvPlayerScreen.kt. Each change serves the #926 objective. The new onSeek parameter and key handling in TvIntroPromptPill serve the …
Description check Passed The description is specific and on-topic. It names the Android TV skip pills (Skip Intro, Skip Recap, Skip Credits) and the Left/Right seek bug on a focused pill. It explains the tap and hold seek app…
Full details: Linked Issues check

Explanation

[#926] Requirement: Left and Right seeking must keep working while Skip Intro (or another skip pill) is showing. The diff adds Left/Right handling to TvIntroPromptPill in TvIntroAutoSkipBanner.kt. The pill uses onPreviewKeyEvent. A repeat count of 0 records the direction. A key-up before any repeat calls onSeek(direction, false), which is a tap. A first repeat calls onSeek(direction, true), which is a hold. Both paths return true, so the press does not stop at the pill. In TvPlayerScreen.kt, handleSkipPillSeek routes a tap to overlaySkip (the scrubber's existing skip, using resolvedSkipBackMs/resolvedSkipForwardMs) and a hold to beginCleanPlaybackSeek. Taps and holds therefore seek with the controls up. Focus behavior is unspecified in #926. The change keeps focus on the pill while it is visible. Focus hand-off on hide is handled by rememberRefocusWhenPillHides, which moves focus to the scrubber or the player root. This prevents focus from being stranded, which would block further presses. The author reports live emulator runs for tap, hold, and hand-off. I did not run these. The source supports the stated behavior. Overlapping intro-to-recap/credits hand-off was not checked live. No automated test was added. The author reports that testDebugUnitTest passes.

Full details: Out of Scope Changes check

Explanation

All changed code is in androidTvApp, in TvIntroAutoSkipBanner.kt and TvPlayerScreen.kt. Each change serves the #926 objective. The new onSeek parameter and key handling in TvIntroPromptPill serve the Left/Right seek requirement. The TvMarkerSkipPill signature and the Box/modifier wrapper serve the same pill and its focus tracking. The overlaySkip extraction moves the scrubber's existing skip into a shared function. Both the scrubber and the pills use it, so the seek logic is not duplicated. The refocusAfterPillHides and rememberRefocusWhenPillHides changes generalize the buffering pill's existing focus hand-off to the skip pills. This supports the focus hand-off requirement. The HUD/Up Next guard and the picture-loading/error gate in handleSkipPillSeek limit the new seek path to states the author describes. None of these changes is unrelated to #926. Phone, tablet, and Apple/Roku code are not changed.

Full details: Description check

Explanation

The description is specific and on-topic. It names the Android TV skip pills (Skip Intro, Skip Recap, Skip Credits) and the Left/Right seek bug on a focused pill. It explains the tap and hold seek approach, the focus hand-off to the scrubber or player root when a pill hides, the loading/failed gating, and the Android TV-only scope. It also lists emulator validation steps, unit test results, and risks, which matches the summary of changes in TvIntroAutoSkipBanner.kt and TvPlayerScreen.kt.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

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: 95c4ea37-18fb-4935-9a52-0798b1d1d943
Commits

Reviewing files that changed from the base of the PR and between 73e55b9 and b8fb3e0.

Files selected for processing: 2

  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvIntroAutoSkipBanner.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@silo-triage silo-triage Bot added bug Something isn't working impact: usability Core flow broken or severely blocked priority: P2 Limited scope, workaround exists, or polish labels Nov 15, 2026
@Quick104
Quick104 merged commit cc35bac into main Nov 15, 2026
11 checks passed
@Quick104
Quick104 deleted the fix/issue-926 branch November 15, 2026 01:33
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: usability Core flow broken or severely blocked 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.

[bug] Skip Intro takes focus and stops left/right seeking (Android TV)

1 participant