Skip to content

fix(web): time Next Up from the end of the file - #4502

Open
Rhainland wants to merge 11 commits into
Silo-Server:mainfrom
Rhainland:fix/web-next-up-from-file-end
Open

Rhainland wants to merge 11 commits into
Silo-Server:mainfrom
Rhainland:fix/web-next-up-from-file-end

Conversation

@Rhainland

@Rhainland Rhainland commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Discussion #4443
Validation tasks: changes #1252 C9 (Next Up timing on web; the case is not run yet); changes #1149 C1 (the credits-marker Up next card is removed; Skip Credits itself is unchanged)

Other clients: Apple N/A (already times Next Up from the end of the file); Android Silo-Server/silo-android#994; Roku N/A (already times Next Up from the end of the file)

On the web, Next Up ignored the viewer's Show Next Up choice. The post-roll Next Up screen always opened 30 seconds before the end, and a separate 10-second "Up next" card also popped up when the credits marker started (or the preview marker, with "Start next at preview" on). The native apps open Next Up only from playback.next_up_prompt_seconds before the end of the file, and Discussion #4443 asked for the same timing everywhere.

The web player now opens Next Up at the viewer's chosen time before the end of the file, Settings → Playback gets the same Show Next Up picker as the native apps, and the credits-marker card is gone.

Approach

  • Post-roll opens inside playback.next_up_prompt_seconds of the file's end; 0 ("At end") opens it only when playback ends. Until the setting loads, the player opens nothing early. The existing exclusions (trailers, Watch Together members, and so on) still apply.
  • The credits-marker card (NextEpisodeOverlay, useNextEpisode) is removed. Skip Credits stays, and skipping credits that run to the end of the file reaches Next Up through the normal end-of-playback path.
  • Settings → Playback → Next episode gets a Show Next Up row: At end, 10 seconds, 30 seconds, 1 minute, 2 minutes before end. A value another client stored off that list still shows as itself.
  • The "Start next at preview" switch is removed. It stores playback.auto_play_next_preview, which no player reads any more. The server key stays, so nothing else changes.
  • An item with a later part (a split episode) waits for its last part before Next Up opens early. Before, only shuffles waited, and with a two-minute window Play Now in part one could skip the rest of the episode.
  • docs/markers-api.md and a comment in internal/markers no longer say players open Up Next at the credits start.
  • The labels come from the shared catalog (feat(catalog): share the Show Next Up strings and the Off value with web silo-translations#86). .silo-translations points at a local build of that branch until it has a release; this pull request needs a re-sync with --version before merge.

Validation

  • Web: pnpm run lint, format:check, build, budget:check and make test-web pass. The new tests cover the window edge, "At end", playback that has not started and an unknown duration. Waiting for the setting to load is not unit-tested.
  • Contracts and docs hygiene: verify-settings-bindings-all, verify-local-paths, verify-size-ratchet pass.
  • Not captured: a recording of Next Up opening during playback; the timing is covered by the unit tests above.

Evidence

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

Settings → Playback, desktop and 390 px wide, before (main) and after (this branch), same profile.

Risks

  • Until the catalog release, .silo-translations names a local build (version=local-…); it must be re-synced before merge.
  • Viewers who relied on the credits-marker card now see Next Up at their Show Next Up time (30 seconds before the end by default).

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 how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code, running in T3 Code
  • Tool(s): Claude Code, GitHub CLI, Codex CLI (review only)
  • Model(s): claude-opus-5-5; reviewers gpt-6.2-sol, gpt-6.2-astra, claude-fable-5-2
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: four independent reviews (gpt-6.2-sol, gpt-6.2-astra, claude-opus-5-5, claude-fable-5-2) of the branch diff for correctness, repository standards and the discussion's request; the real findings were fixed before opening

Note

Time Next Up prompt from the end of the file, not credits markers

  • Replaces the credits-marker-based auto-play countdown overlay in the player (NextEpisodeOverlay, useNextEpisode path in VideoPlayer.tsx) with a new isInNextUpPromptWindow check in nextUpPrompt.ts that fires when playback is within the configured lead time of the file's end.
  • The lead time comes from a new PLAYBACK_NEXT_UP_PROMPT_SECONDS setting, editable in Playback settings via a seconds select (0/10/30/60/120) in NextUpPromptSetting.tsx. The countdown screen (PlayingNextScreen.tsx) now waits for the setting to load before starting.
  • Removes the old auto-play-next-preview setting and its props, query, and marker utility across the player, watch-page builders, and settings pages.
  • Adds localized Next Up strings across all locale catalogs and removes six environment-managed settings messages no longer used.
  • Behavioral Change: post-roll now opens based on the file's remaining duration instead of credits markers; zero lead time waits for the MEDIA_ENDED_EVENT fallback, and the prompt is deferred when the active item has a later part (not only for shuffled playback). The next control does nothing during room playback, where the next reference is unavailable.

Macroscope summarized 015af63.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: P2 Limited scope, workaround exists, or polish size/XXXL 3000+ added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants