Skip to content

fix(web): play series trailers to the end without the next-up screen - #3077

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/3067-no-postroll-for-extras
Oct 26, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/3067-no-postroll-for-extras

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #3067
Related issue: N/A
Validation tasks: none (the change reaches #1252 C9, which has not been run yet)

A local trailer or other extra that belongs to a series showed the episode post-roll on the web watch page. Thirty seconds before the end, the video shrank to the corner and a "You've finished " next-up screen covered the rest of the clip. On a 45-second trailer that is two thirds of it. Movie extras were not affected.

The server sends series_id on a series-owned extra, and the watch page used series_id alone to decide that an item is an episode with a post-roll.

Approach

The watch page now checks the item's type. An extra is kept out of the episode order even when it carries the series' id: it does not enter post-roll, does not load the series' episode list for next-episode navigation, and when it ends it goes back to the page it was started from, or to its series page when it was opened from a direct link, instead of /item/<extra id>, which renders "Unsupported item type: extra". Episodes and shuffles keep their post-roll.

The fix stays on the client. series_id on series extras is part of the watch payload and is used for series-level track preferences, so the server response is unchanged. Scaling the 30-second lead-in for short episodes, which the issue also suggests, is a separate change and is not included here.

Validation

  • Reproduced on a local build from main with a synthetic series and a 45-second trailer in its trailers/ folder, played from the series page in headless Chromium at 1440 px and 390 px: seeking into the last 30 seconds put it into post-roll.
  • Same steps on this branch: the trailer stays full size to the end, then returns to the series page. An episode of the same series still shows "Playing next" for the following episode.
  • Opened from a direct /watch/<trailer id> link and played to the end: lands on the series page, not the unsupported extra page (rechecked on a local build after the review fix).
  • New host test for a series extra near its end with and without a return location; failed before the fix and passes now.
  • make test-web, pnpm run lint, pnpm run format:check, pnpm run build, pnpm run budget:check, make verify-local-paths, make verify-bidi, make verify-size-ratchet: pass.
  • Go checks not run: no Go files changed.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3077/

Surface and build: web watch page, desktop 1440 px and phone 390 px, local build of main (before) and this branch (after), same data.

Risks

None identified. Only items the server marks type: "extra" change behaviour.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (via T3 Code); Codex CLI for code review
  • Tool(s): Claude Code, Codex CLI, GitHub CLI, Playwright (headless Chromium), ffmpeg
  • Model(s): claude-opus-5-5; gpt-6.1-sol (code review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: independent reviews by claude-opus-5-5 and gpt-6.1-sol on correctness, repository standards and the issue spec, reconciled. GPT found nothing. Opus raised three low-severity points: the test file name no longer matched its content (renamed); an extra opened from a reloaded or shared watch link, with no page to return to, ended on the unsupported extra page (fixed after CodeRabbit raised the same point: it now goes to its series page); and the scaled lead-in is not implemented (out of scope, noted above).

Note

Play series extras to the end without the next-up screen in web playback

  • In WatchPlaybackHostContent (WatchPlaybackChrome.tsx), items with type extra now get a separate owner-series identifier, and series episode loading and next-episode lookup exclude extras.
  • When a non-shuffled extra ends, playback stops and navigation goes to the stored return location, or to the owning series when no return location exists. Shuffled extras still qualify for shuffle post-roll handling.
  • Adds tests in WatchPlaybackChrome.endOfPlayback.test.tsx covering series-owned extras with and without a return location, asserting no post-roll UI appears and navigation targets the expected destination.
  • Risk: post-roll tracking now keys on the episode-series identifier instead of the item's series identifier; check WatchPlaybackHostContent memo/callback dependencies if next-up behavior regresses for regular episodes.

Macroscope summarized a989fb4.

A trailer or other local extra that belongs to a series carries the
series' id, so the watch page treated it as an episode: 30 seconds before
the end it shrank the video into the corner and showed the next-up screen.

The watch page now treats an item of type "extra" as outside the episode
order. It plays to its end and returns to the page it was started from.
Episodes keep their post-roll.

Closes Silo-Server#3067
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 25, 2026
@silo-kody

silo-kody Bot commented Oct 25, 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 ❌

@silo-triage silo-triage Bot added bug Something isn't working impact: playback Can't play, stalls, or wrong media priority: P2 Limited scope, workaround exists, or polish labels Oct 25, 2026
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

Playback now distinguishes extras from episodes when loading series episodes, resolving next episodes, and entering post-roll. When an extra ends outside shuffle playback, it returns to its playback destination. Tests cover a series-owned trailer.

Changes: Series extra playback

Layer / File(s) Summary
Exclude extras from episode progression
web/src/playback/WatchPlaybackChrome.tsx, web/src/playback/WatchPlaybackChrome.endOfPlayback.test.tsx
The active item type determines episode series context. Extras do not load series episodes, resolve a next episode, or qualify for series post-roll.
Return extras to their playback destination
web/src/playback/WatchPlaybackChrome.tsx, web/src/playback/WatchPlaybackChrome.endOfPlayback.test.tsx
When playback ends without episode or shuffle context, extras navigate to their return destination. The trailer test checks navigation to the supplied return URL and confirms no post-roll near the end.

Priority: Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Suggested labels: bug, javascript, impact: playback, impact: usability, size/M, needs-review, evidence-required

Suggested reviewers: quick104, neurekadev

Merge Risk: Low · up to fc7b3

Extras launched from their detail page return as intended, but an extra opened through a direct watch URL may end on an unavailable page. This is a bounded navigation issue that should be fixed or accepted before merge.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Linked Issues check Warning Issue #3067 requires local trailers to play to the end without episode post-roll. The change implements this by excluding type: "extra" from episodeSeriesId, series episode lookup, and post-roll e… Implement duration-aware post-roll timing for short content, such as a threshold based on the media duration, and add automated coverage for the short-content case.
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title names the change: series trailers play to the end without the next-up screen. It matches the linked issue #3067 and the code change that skips episode post-roll for series-owned extras. It i…
Out of Scope Changes check Passed The changed watch-host logic and regression tests directly support issue #3067. The changes preserve episode and shuffle post-roll behavior, avoid a server contract change, and do not introduce unrela…
Description check Passed The pull request description clearly explains the fix for series-owned extras entering episode post-roll, the client-side approach, validation, scope, and risks. It directly matches the reported code …
Full details: Title check

Explanation

The title names the change: series trailers play to the end without the next-up screen. It matches the linked issue #3067 and the code change that skips episode post-roll for series-owned extras. It is specific and follows the fix(web) convention.

Full details: Out of Scope Changes check

Explanation

The changed watch-host logic and regression tests directly support issue #3067. The changes preserve episode and shuffle post-roll behavior, avoid a server contract change, and do not introduce unrelated product behavior.

Full details: Description check

Explanation

The pull request description clearly explains the fix for series-owned extras entering episode post-roll, the client-side approach, validation, scope, and risks. It directly matches the reported code changes.

Full details: Linked Issues check

Explanation

Issue #3067 requires local trailers to play to the end without episode post-roll. The change implements this by excluding type: "extra" from episodeSeriesId, series episode lookup, and post-roll eligibility. The change also returns an ended extra to returnHref, and the new test covers these behaviors. However, #3067 also identifies the fixed 30-second lead-in as an independent requirement for short content. The PR explicitly excludes that change, so the linked issue requirements are not complete.

Resolution

Implement duration-aware post-roll timing for short content, such as a threshold based on the media duration, and add automated coverage for the short-content case.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@coderabbitai coderabbitai Bot added evidence-required Needs before-and-after evidence before the Evidence check passes impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. labels Oct 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


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: d329387d-b739-433d-be97-d984fe858f14
Commits

Reviewing files that changed from the base of the PR and between 6de6d5e and fc7b3f9.

Files selected for processing: 2
  • web/src/playback/WatchPlaybackChrome.endOfPlayback.test.tsx
  • web/src/playback/WatchPlaybackChrome.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

A watch link opened directly carries no return location, so an ended
series extra fell back to its own item page, which cannot render an
extra. It now goes to its series page instead.
@silo-kody

silo-kody Bot commented Oct 25, 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 ❌

@Quick104
Quick104 merged commit cfbf7c7 into Silo-Server:main Oct 26, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working evidence-required Needs before-and-after evidence before the Evidence check passes impact: playback Can't play, stalls, or wrong media impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. 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] Trailers get the post-roll next-up screen over their last 30 seconds

2 participants