Skip to content

fix(tv): drop a stale scrub preview when AI subtitles resume playback - #729

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/1163-tv-scrub-after-resume
Oct 12, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/1163-tv-scrub-after-resume

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-server#1163
Validation tasks: unblocks #318 C5

On Apple TV, starting an AI subtitle job closes the info panel and pauses playback while the first subtitles are prepared, with focus on the scrubber. Pressing Select there opens a scrub preview. When the subtitles arrived and playback resumed, the frozen preview stayed on screen until Menu was pressed, and a second Select would seek back to it.

Approach

When the AI job resumes playback while such a scrub preview is open, the preview is cancelled without seeking. Scrubs outside the AI pause are unchanged.

Validation

  • Apple TV simulator against a local server with a mock AI provider: Select during "Preparing subtitles" still opens the preview, which now disappears when playback resumes; time keeps advancing and the AI subtitles show. The AI subtitle test suites pass on tvOS.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-apple/pr-729/

Surface and build: Apple TV simulator, with a short recording; before = main a8cc50c, after = this branch.

Risks

None identified. Select during the pause still scrubs rather than plays, which is standard tvOS scrubber behaviour.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code; OpenAI Codex CLI only to generate translation text for the local test provider
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: Claude Code /code-review (medium) over the combined fix branch for this repository; every confirmed finding was fixed and re-validated

On Apple TV, starting an AI subtitle job closes the info panel and pauses
playback with focus on the scrubber. Pressing Select there opens a scrub
preview. When the first subtitles arrived and playback resumed, the
preview stayed on screen, frozen, until Menu was pressed, and a second
Select would seek back to it.

When the AI job resumes playback during such a scrub, the preview is now
cancelled without seeking.
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fc72eb34-bf2d-41b5-ac4e-06d71b3da374

📥 Commits

Reviewing files that changed from the base of the PR and between 12c778c and b00fc7d.


📒 Files selected for processing (2)
  • iosApp/iosApp/Screens/Player/tvOS/TVPlayerControls.swift
  • iosApp/iosApp/Screens/Player/tvOS/TVPlayerScrubber.swift

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@silo-kody

silo-kody Bot commented Oct 11, 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 ❌
⚠️ 3 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Centralize server-relative authentication path validation
  • Enforce latest-link-wins centrally across deferred deep links
  • Rank subtitles using container capabilities and one stable cross-client policy

@silo-triage silo-triage Bot added bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Oct 11, 2026
When AI subtitles resume playback while Left or Right is held, the
controls end the scrub session, but the scrubber's auto-seek task kept
stepping the preview and its speed chip stayed up. The scrubber now
stops auto-seek whenever its timeline session ends, whoever ends it.
@silo-kody

silo-kody Bot commented Oct 11, 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 ❌
⚠️ 3 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Centralize server-relative authentication path validation
  • Enforce latest-link-wins centrally across deferred deep links
  • Rank subtitles using container capabilities and one stable cross-client policy

@Quick104
Quick104 merged commit abae5ab into Silo-Server:main Oct 12, 2026
9 checks passed
Quick104 added a commit that referenced this pull request Nov 5, 2026
)

* fix(tvos): follow playback after Play/Pause resumes during a scrub

On Apple TV, Select pauses and opens a timeline scrub at the paused
position. Resuming with Play/Pause, Now Playing, a remote, or a watch
party started playback but left the scrub open. The bar kept showing the
paused position, and the auto-hide removed the scrubber before its blur
could end the scrub, so it stayed stuck until the player was reopened.

Cancel an open timeline scrub without seeking whenever playback resumes.
The AI subtitles case from #729 already did this; it now covers every
resume.

Closes #993

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

* fix(tvos): hold a landing resume when a scrub reopens

Select right after a timeline commit that resumes playback, while its
seek is still landing, opened a new scrub without pausing: playback was
not running yet, so the pause was skipped. When the resume landed, the
new resume handler cancelled that scrub and dropped its target.

Opening a timeline scrub now pauses a resume that is still pending and
gives it back on the scrub's own commit.

Refs #993

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

* fix(tvos): re-arm the auto-hide when a resume ends a scrub

A timeline scrub pins the controls. A watch party or server remote play
does not re-arm their auto-hide, so after the resume cancelled the scrub
the controls stayed over the video until the viewer dismissed them.

Refs #993

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

* fix(tvos): don't resume an interrupted player from a timeline scrub

An audio interruption that ends without .shouldResume keeps the play
intent but leaves the player paused. isResumePending treated that as a
resume still landing, so a scrub opened on the paused player resumed
playback when committed. Use viewerWantsToPlay, which excludes an
interrupted session.

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

* fix(tvos): hold a landing resume when a held arrow opens the scrub

Holding Left or Right opens a timeline scrub without pausing. If a
commit's resume was still landing its seek, the resume then cancelled
that scrub mid-hold. Pause the pending resume and give it back on
commit, as Select already does.

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

* fix(tvos): don't pause for a held arrow that can't open a scrub

A watch party member who can't seek gets no scrub from beginScrub, so
pausing a landing resume for that hold paused the room with no commit
to resume it. Only hold the resume when the scrub can open.

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

* fix(tvos): keep held and replacement play intents through a reopened scrub

A Pause held for a fresh load lives in freshLoadPlayIntent, so
isResumePending read the outgoing controller's stale Play and a no-move
scrub commit started the replacement. Read the held intent first.

A scrub reopened while a reanchor replaces the transport, then closed
without moving, called play() on the outgoing transport and ran the old
stream at its pre-seek position. Record the Play for the replacement
instead, as the reanchor itself does.

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

* fix(tvos): give back a landing resume when a hold scrub is cancelled

A hold opened while a resume was still landing pauses it so the resume
can't cancel the hold. Menu or blur then left playback paused, though a
hold over playback otherwise keeps it running. Resume without seeking
when that hold ends without a commit.

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

* fix(tvos): defer a scrub's Play only for a real replacement, and keep newer Pauses

A subtitle report keeps the running stream, so deferring a reopened
scrub's Play to a replacement that never comes left video paused. Defer
only while a seek replan or a Protocol V3 replacement is in flight.

A Pause from Now Playing or SiloControl during a hold that paused a
landing resume was overridden when the hold was cancelled. Give the
resume back only when no newer Play or Pause came after the hold.

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

* fix(tvos): don't let a hold pause a watch party room

Holding a pending resume from a Left/Right hold paused the whole room,
and room Play and Pause requests bypass the viewer command count, so a
newer room Pause could be overridden when the hold was cancelled. In a
watch party a hold now leaves playback alone, as it does on main.

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Quick <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants