Skip to content

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

Merged
Quick104 merged 15 commits into
Silo-Server:mainfrom
Rhainland:fix/web-next-up-from-file-end
Nov 19, 2026
Merged

Quick104 merged 15 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, first released in 2026.11.19-7f7a2ef). Main's translation pin already includes them, so this branch changes no generated translation files.

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

  • 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 end of file and remove marker-triggered next-episode overlay

  • The Next Up prompt now triggers when playback enters a window before the file end, sized by a new playback.next_up_prompt_seconds setting (choices 0, 10, 30, 60, 120 seconds). The new isInNextUpPromptWindow helper in nextUpPrompt.ts drives the check; a zero value defers entry to the ended path.
  • Removes the marker-based auto-play flow: the NextEpisodeOverlay component, useNextEpisode hook, and resolveAutoplayMarker utility are deleted, along with the autoPlayNext/autoPlayNextPreview props throughout VideoPlayer and WatchPage.
  • Adds a NextUpPromptSetting select row in PlaybackSettings.tsx, replacing the old preview switch. Settings search indexes "next up" instead of "preview".
  • The player's floating HUD now navigates adjacent series episodes directly from seriesContext.episodes, skipping the next episode in Watch Together. PlayingNextContent no longer starts its countdown while the settings query is pending.
  • Risk: PlayerPlaybackStateChange gains an optional fileId field and WatchPageProps drops autoPlayNextPreview/autoPlayNext; out-of-tree consumers of these props would break. The playback.auto_play_next_preview setting is now hidden and has no effect.

Macroscope summarized fa6b87a.

@silo-kody

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

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR adds a configurable Next Up prompt setting. Playback now uses that setting to decide when the Next Up window is active. The player removes the old next-episode autoplay overlay and related hook. The locale files, navigation labels, and marker documentation also change.

Changes: Next Up playback

Layer / File(s) Summary
Message keys and translations
web/src/locales/keys.ts, web/src/locales/*.json, .silo-translations
The message catalog adds Next Up labels and removes environment-managed setting notices across the locale files. The translation manifest and generated key header also change.
Next Up setting controls
web/src/pages/settings/NextUpPromptSetting.tsx, web/src/pages/settings/PlaybackSettings.tsx, web/src/lib/deviceSettingGroups.ts, web/src/lib/userSettingsNav.ts
The playback settings add a duration selector for the Next Up prompt. The settings navigation uses the new title, and the preview setting is hidden from device settings.
Configured post-roll window
web/src/playback/WatchPlaybackChrome.tsx, web/src/playback/nextUpPrompt.ts, web/src/playback/nextUpPrompt.test.ts, web/src/pages/watchRouteHelpers.ts, web/src/player/components/WatchPage.tsx, web/src/player/types.ts, web/src/hooks/queries/autoPlayNext.ts, web/src/player/components/PlayingNextScreen.tsx
Playback reads the configured duration and checks whether playback is within that window. The related autoplay setting query and page props are removed, and the loading state now gates auto-play.
Player next-episode controls
web/src/player/components/VideoPlayer.tsx, web/src/player/components/NextEpisodeOverlay.tsx, web/src/player/hooks/useNextEpisode.ts, web/src/player/utils/watchPageMarkers.ts, docs/markers-api.md, internal/markers/credits_placement.go, web/eslint-suppressions.json
The player removes the next-episode autoplay countdown and overlay, and derives adjacent episodes for navigation. The marker documentation and comment describe the updated credits-placement wording. The related lint suppression is removed.

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

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

Possibly related PRs

  • Silo-Server/silo-server#2971: It also changes how credits markers relate to Up Next timing. This PR moves the trigger to the configured prompt window instead of credits-marker timing.

Suggested reviewers: quick104

Merge Risk: Moderate · up to 000e2

The new Next Up timing setting is mostly in place, and HLS end-of-playback handling now works. Before merging, fix the multi-part case where Next Up can open at the start of the final part, re-pin the translations to a released catalog, and decide whether minimized playback should still advance to the next episode. The device-override picker edge case is deferred to a follow-up.

Security architecture risk: Minimal · up to 000e2

The inspected changes alter when Next Up appears without establishing a change to media-access authority. Existing room exclusions, session guards, and dismissal paths remain. No introduced security or material failure-containment regression was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed effect demonstrated by the inspected paths is the active viewer's prompt and next-item lifecycle. The added file identity is consumed as a multipart-timing hint, not as a credential, authorization decision, or network destination.

Trust Boundaries and Controls

  • observed — Watch Together sessions remain excluded from early post-roll, and their navigation and ended paths return to the room instead of independently choosing the next episode. Post-roll reducer actions require the current request key and foreground mode. The existing profile-switch effect tears down playback owned by the previous profile.

Resilience and Maintainability Implications

  • observed — The automatic countdown requires video completion, loaded autoplay preference, and a next item; it also respects the still-watching gate. Its interval is cleared on dependency changes and unmount. The existing shuffle continuation checks whether the viewer left before starting playback after an asynchronous advance.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(web): time Next Up from the end of the file" matches the main change: the web player now opens Next Up based on the viewer's configured lead time before the end of the file, replacing t…
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.
Description check Passed The description states the PR's purpose and approach. It explains that web Next Up ignored the viewer's Show Next Up setting, that Next Up now opens at the chosen lead time before the file ends, that …
Full details: Title check

Explanation

The title "fix(web): time Next Up from the end of the file" matches the main change: the web player now opens Next Up based on the viewer's configured lead time before the end of the file, replacing the fixed 30-second and credits-marker timing. It is specific and concise, and it names the web scope.

Full details: Description check

Explanation

The description states the PR's purpose and approach. It explains that web Next Up ignored the viewer's Show Next Up setting, that Next Up now opens at the chosen lead time before the file ends, that a new Show Next Up picker is added under Settings → Playback, and that the credits-marker card is removed. The description also lists validation steps, risks, and the files touched (docs, internal/markers, translations), which match the raw summary's changeset.

  • 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: 9dc480f3-2d6e-4369-bb78-d7ce051d086b
Commits

Reviewing files that changed from the base of the PR and between 015af63 and 000e29c.

Files selected for processing: 3

  • web/src/playback/WatchPlaybackChrome.tsx
  • web/src/player/components/VideoPlayer.tsx
  • web/src/player/types.ts

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

Comment on lines +977 to +982
const nextUpPromptSeconds =
effectivePlaybackSettings === undefined && !settingsReadFailed
? 0
: Number(
effectivePlaybackSettings?.[SETTING_KEYS.PLAYBACK_NEXT_UP_PROMPT_SECONDS]?.value ??
SETTING_DEFINITIONS[SETTING_KEYS.PLAYBACK_NEXT_UP_PROMPT_SECONDS].defaultValue,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug high

At end can autoplay before the disabled preference loads

A slow settings read can advance viewers who disabled autoplay because PlayingNextScreen starts its countdown with the default value. Load the preference before post-roll or wait for the settings query to resolve before starting the countdown.

Prompt for LLM
File web/src/playback/WatchPlaybackChrome.tsx, lines 977-982:

At end can autoplay before the disabled preference loads

With `At end` selected, the post-roll screen mounts only when playback ends, and `PlayingNextScreen` starts its countdown using the default autoplay value while its settings query is still pending; a slow read can therefore advance a viewer who disabled autoplay. Load the autoplay preference before entering post-roll or prevent the countdown until its query resolves.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 7f5e6b9. useAutoPlayNextSetting now reports whether its first read is still pending, and PlayingNextScreen starts no countdown until it has the real value, so a viewer with auto-play off no longer sees the default start one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for addressing this in 7f5e6b9f1. Waiting for the initial autoplay preference read before starting the countdown addresses the reported race for viewers who have autoplay disabled. I haven’t independently verified the fix.

@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Nov 18, 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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Major · Handle the HLS completion signal in the end-of-playback path. · VideoPlayer.tsx:3459

web/src/player/components/VideoPlayer.tsx:3459
Major · Functional Correctness · Quick win

Handle the HLS completion signal in the end-of-playback path.

With “At end” selected, every early-window check returns false. If HLS finishes without native ended, hls.js emits MEDIA_ENDED with stalled: true. This case is explicitly supported in hls.js 1.6.15. (raw.githubusercontent.com)

The existing bridge dispatches MEDIA_ENDED_EVENT, but this completion handler listens only for "ended". The buffering hook handles the custom event only as a pause. Next Up therefore never opens for this case. Route the custom event through the same guarded completion handler and remove both listeners during cleanup. (raw.githubusercontent.com)

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: 8a98b39f-f7f4-40c3-a07b-3dbb2a9692f8
Commits

Reviewing files that changed from the base of the PR and between e8de111 and 58141fc.

Files selected for processing: 60

  • .silo-translations
  • docs/markers-api.md
  • internal/markers/credits_placement.go
  • web/src/hooks/queries/autoPlayNext.ts
  • web/src/lib/deviceSettingGroups.ts
  • web/src/lib/userSettingsNav.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/bg.json
  • web/src/locales/ca.json
  • web/src/locales/cs.json
  • web/src/locales/da.json
  • web/src/locales/de.json
  • web/src/locales/el.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/et.json
  • web/src/locales/fi.json
  • web/src/locales/fr.json
  • web/src/locales/he.json
  • web/src/locales/hi.json
  • web/src/locales/hr.json
  • web/src/locales/hu.json
  • web/src/locales/id.json
  • web/src/locales/it.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/ko.json
  • web/src/locales/lt.json
  • web/src/locales/lv.json
  • web/src/locales/ms.json
  • web/src/locales/nb.json
  • web/src/locales/nl.json
  • web/src/locales/pl.json
  • web/src/locales/pt-BR.json
  • web/src/locales/pt-PT.json
  • web/src/locales/ro.json
  • web/src/locales/ru.json
  • web/src/locales/sk.json
  • web/src/locales/sl.json
  • web/src/locales/sv.json
  • web/src/locales/th.json
  • web/src/locales/tr.json
  • web/src/locales/uk.json
  • web/src/locales/vi.json
  • web/src/locales/zh-Hans.json
  • web/src/locales/zh-Hant.json
  • web/src/pages/settings/NextUpPromptSetting.tsx
  • web/src/pages/settings/PlaybackSettings.tsx
  • web/src/pages/watchRouteHelpers.ts
  • web/src/playback/WatchPlaybackChrome.tsx
  • web/src/playback/nextUpPrompt.test.ts
  • web/src/playback/nextUpPrompt.ts
  • web/src/player/components/NextEpisodeOverlay.tsx
  • web/src/player/components/VideoPlayer.tsx
  • web/src/player/components/WatchPage.tsx
  • web/src/player/hooks/useNextEpisode.ts
  • web/src/player/types.ts
  • web/src/player/utils/watchPageMarkers.ts
Files with no reviewable changes: 7

  • web/src/hooks/queries/autoPlayNext.ts
  • web/src/pages/watchRouteHelpers.ts
  • web/src/player/components/NextEpisodeOverlay.tsx
  • web/src/player/components/WatchPage.tsx
  • web/src/player/hooks/useNextEpisode.ts
  • web/src/player/types.ts
  • web/src/player/utils/watchPageMarkers.ts

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

Comment thread docs/markers-api.md Resolved
)}
<NextUpPromptSetting
seconds={read<number>(SETTING_KEYS.PLAYBACK_NEXT_UP_PROMPT_SECONDS)}
disabled={pending}

@coderabbitai coderabbitai Bot Nov 18, 2026 •

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.

Minor · Data Integrity & Integration · Quick win

Disable the picker until its effective value loads.

If a device override exists, selecting “At end” before the read completes saves only the profile value. useProfileDefaultWriter captures effective=undefined and skips clearing the device override. The picker then returns to the device value. Disable the picker until this key loads, as well as during saving. (raw.githubusercontent.com)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Leaving this PR on the screen's existing pattern, where every row is disabled only while a save is in flight. #4503, stacked on this PR, rebuilds this row and keeps it disabled until the capabilities and values reads have answered, which covers the device-override case.

@silo-kody

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

1 similar comment
@silo-kody

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

@Rhainland

Copy link
Copy Markdown
Contributor Author

On the outside-diff note about the HLS completion signal (VideoPlayer.tsx): fixed in d1f3fcd. The player now treats the stalled MEDIA_ENDED that hls.js reports (re-dispatched as silo:media-ended) as the end of playback, through the same guarded handler as ended, and removes the listener on cleanup. Main opened Next Up 30 seconds early in every case, so that path only mattered once At end became a choice.

The web player opened the post-roll Next Up screen 30 seconds before the
end, whatever the viewer chose, and also showed a separate 10-second card
when the credits (or, with Preview next episode on, the preview) marker
started. The native apps open Next Up only from the viewer's
playback.next_up_prompt_seconds lead time before the end of the file.

- Post-roll opens within playback.next_up_prompt_seconds of the file end;
  0 (At end) opens it on ended only. The existing exclusions stay.
- The credits-marker card and its countdown are gone. Skip Credits stays,
  and a skip to the file end reaches Next Up through the ended path.
- Settings > Playback gets a Show Next Up picker with the native choices
  (At end, 10 s, 30 s, 1 min, 2 min before end).
Until the effective setting loads, the player opens nothing early, so a
viewer who chose At end and resumes near the end does not get Next Up on
the 30-second default. The picker names a value stored off the list
instead of adding it as a choice, and the credits-placement rationale no
longer says players open Up Next at the credits start.
The toggle stores playback.auto_play_next_preview, which no player acts on
any more: the web stopped starting the next episode at a preview marker
when Next Up moved to the end of the file, and Apple and Android never
read it. A control that saves a choice that changes nothing only
misleads.

Remove it from Playback settings and its search entry, and keep the key
off the device settings screen. The server key stays, so other clients
are unaffected.
Playback settings had grown past the file size limit with the new row.
With At end, Next Up opens only when playback ends, which can be before
playback.auto_play_next has loaded. The countdown read the default (on)
meanwhile, so a viewer who turned auto-play off saw it start, and on a slow
read could be moved to the next episode.
hls.js can finish a stream without a native ended event and reports it as a
stalled media end instead. Main opened Next Up 30 seconds before the end in
every case, so that path never mattered; with At end it was the only way in.
Treat it as the end of playback.
@Rhainland
Rhainland force-pushed the fix/web-next-up-from-file-end branch from 7457ffa to 9f2f972 Compare November 18, 2026 17:49
@silo-kody

silo-kody Bot commented Nov 18, 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 ❌
⚠️ 4 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:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

Comment thread .silo-translations Outdated
Comment on lines +2 to +3
version=local-0e9d51971d87
sha256=-

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug medium

Local translation pin breaks the default sync command

Contributors and automation cannot reproduce the checked-in translations through the normal sync workflow because scripts/sync-translations rejects local-* pins. Pin a published translation release and its checksum instead.

Prompt for LLM
File .silo-translations, lines 2-3:

Local translation pin breaks the default sync command

Running `scripts/sync-translations` without arguments now fails because the script explicitly rejects a `local-*` pin, preventing contributors and automation from reproducing the checked-in translations using the normal sync workflow. Pin a published translation release and its checksum instead.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Known and intended until the catalog change is released: docs/architecture/i18n.md says to sync with --local while the catalog change is unmerged, and --version once it has a release. Silo-Server/silo-translations#86 holds these strings; this branch is re-synced to its release, with version and checksum, before merge. The description lists that under Risks.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for the clarification. The local pin is intentional during development and follows the documented workflow, so the original suggestion does not warrant a change now.

The pre-merge requirement remains: once the catalog release is available, re-sync with --version and commit the published version and checksum.

Quick104 and others added 3 commits November 18, 2026 15:09
Remove the ESLint suppression for the deleted useNextEpisode hook and
the "preview" settings search keyword, whose only control on the
Playback page was the removed Start next at preview switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The early Next Up window skipped files with a later part only during a
shuffle. With Show Next Up at up to two minutes, part one of a split
episode could open Next Up, and Play Now there skipped the rest of the
episode. Every item with a later part now waits for its last part, as
the end-of-playback path already does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Skipping credits at the end of the file finishes the item, but what
follows depends on the item: a later part, Up Next, a Watch Together
lobby, or a movie's detail page.

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

@Quick104 Quick104 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.

🤖 Claude Code (claude-opus-5-5)

Review of 9f2f972. The approach holds: web now opens Next Up on the same window check the Apple client uses, and removing the credits card leaves one Next Up path. Four findings are below. I'm fixing three of them in commits on this branch, so there's no need to change them yourself. The fourth needs a maintainer decision.

One more cleanup isn't on a diff line: web/eslint-suppressions.json still has a suppression for the deleted src/player/hooks/useNextEpisode.ts. I'm removing it in the same commit as the search keyword below.

if (idx <= 0) return null;
return seriesContext.episodes[idx - 1] ?? null;
})();
// The neighbouring episodes for the floating player cluster. Next Up itself

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.

Medium, maintainer decision: a minimized episode no longer moves on to the next one.

Trigger: play an episode that has a credits marker, with auto-play on, and minimize the player to the background bar (or Picture in Picture) before the credits.

Before this PR, useNextEpisode kept counting down while the player was detached, because only the card's rendering checked isDetached. When the count ran out, handleNavigate started the next episode in the background bar. Now the early window only opens in the foreground. At ended, handleEnded calls enterPostRoll, which the reducer ignores outside the foreground (watchPlaybackReducer.ts, ENTER_POSTROLL). Playback stops on the finished episode.

On main, an episode without a credits marker already stops this way when minimized. So the open question is whether minimized playback should start the next episode at the end when auto-play is on (subject to the still-watching limit), or stop as it does now for unmarked episodes. The old card did this invisibly, with no countdown on screen.

Comment thread docs/markers-api.md Resolved
Comment thread web/src/lib/userSettingsNav.ts Resolved
@silo-kody

silo-kody Bot commented Nov 18, 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 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Claude Code (claude-opus-5-5)

Review summary

Reviewed head: fa6b87a8bf (updated from fc7a8e13f9; the first review's head was 015af63fec).

Fit: 8/10 · Readiness: 8/10 — conditional (assuming CI is green)

Addressed on this branch

  • 4391bb50b7: an item with a later part waits for its last part before Next Up opens early. Before, only shuffles waited, so part one of a split episode could open Next Up and Play Now skipped part two.
  • 000e29c519: the later-part check now uses the file the player is playing (Kody's follow-up). Without a file on the request, an item with any multi-part version used to keep early Next Up shut until the end, even on a single-part version or the last part.
  • 015af63fec: the credits-placement sentence in docs/markers-api.md no longer promises Up Next.
  • ba5db560fa: removed the ESLint suppression for the deleted useNextEpisode.ts and the "preview" settings search keyword.
  • 5fcda0513b: merged main, which had moved the translation pins, and re-synced .silo-translations to the published catalog release 2026.11.19-7f7a2ef. feat(catalog): share the Show Next Up strings and the Off value with web silo-translations#86 got its translation pass and merged first. The release also carries catalog changes merged after main's pin; the web typecheck and test suite pass with it.
  • fc7a8e13f9: merged main again. fix(web): show an administrator's stop reason and keep notices visible #4554 and fix(web): keep a seek made during a replan when the new stream takes over #4571 changed VideoPlayer.tsx and fix(web): send the device name and platform on player requests #4555 changed WatchPlaybackChrome.tsx; the merge was clean, and the player still reports the playing file the later-part check reads. The web typecheck, ESLint, and the playback, player, settings, and lib tests pass on the merge.
  • fa6b87a8bf: merged main again after it re-pinned the translations to 2026.11.19-36be281, which already holds this branch's Show Next Up keys. The branch now uses main's pin and changes no generated translation files. The same checks pass.

Left for the maintainers

  • Maintainer decision: minimized playback at the end of an episode. The removed card kept counting down while the player was minimized, so an episode with a credits marker moved on in the background bar. Post-roll only opens in the foreground, so minimized playback now stops at the end, as it already did on main for episodes without a credits marker. CodeRabbit raised the same point. The open question is whether minimized playback should start the next episode when auto-play is on.

Other feedback

  • The auto-play race (Kody), the HLS stalled end, and the doc wording (CodeRabbit) were fixed earlier. CodeRabbit's re-pin note is resolved by 5fcda0513b. The picker's device-override case is handled in feat(web): let Show Next Up be turned off #4503.

Validation

  • Validation tasks: line kept as written: Markers / skip intro & credits — Web #1149 C1's pass covers the Skip controls, and Series — Web #1252 C9 has not been run.
  • nextUpPrompt.test.ts tests a helper this PR adds, so it can't fail on the base. Next Up timing hasn't been shown in live playback; the later-part fixes were checked by tracing, the web typecheck, and the playback and player tests. Nobody has played a split episode on a live server.

User manual and other clients

Scores

  • Fit 8: web gets the Show Next Up timing the native apps have, as Discussion Next Up "end" detection should be based on file end and not the credits marker #4443 asked, and one of two web Next Up paths goes away. The new settings row is the stretch; the setting already exists on the other clients.
  • Readiness 8: the translation blocker is gone and no verified defect remains. It stays conditional on the minimized-playback decision and on nobody having shown the timing in live playback.

shuffledRef.current = Boolean(shuffleId);
awaitsLaterPartRef.current =
Boolean(shuffleId) && hasLaterPart(activeItem ?? undefined, activeRequest?.fileId);
awaitsLaterPartRef.current = hasLaterPart(activeItem ?? undefined, activeRequest?.fileId);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug medium

Early Next Up is suppressed for the wrong playback variant

Pass the player's resolved current file ID to hasLaterPart.

Prompt for LLM
File web/src/playback/WatchPlaybackChrome.tsx, line 1006:

Early Next Up is suppressed for the wrong playback variant

When playback starts without a route `fileId`, `hasLaterPart` checks whether any edition has multiple parts rather than the file actually selected by the player. Resuming the last part, or playing a single-part edition alongside a multipart edition, therefore suppresses the configured early Next Up prompt until playback ends; use the player's resolved current file ID for this check.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

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.

🤖 Claude Code (claude-opus-5-5)

Confirmed and fixed in 000e29c. Without a file on the request, an item with any multi-part version kept early Next Up shut until the end, even when the player chose a single-part version or resumed into the last part. It failed safe (Next Up still opened when playback ended) but ignored the viewer's Show Next Up time. The player now reports the file it plays in its state change, and the later-part check uses that file, falling back to the request's. Web typecheck, ESLint and the playback and player tests pass. I didn't play a split episode on a live server.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for confirming the fix in 000e29c519 and sharing the test results. The reported change addresses the wrong-variant concern by using the player’s resolved file ID.

Live-server playback of a split episode remains unverified; the passing automated checks do not replace that end-to-end test.

@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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Minimized playback no longer advances to the next episode when… · VideoPlayer.tsx:2495-2516

web/src/player/components/VideoPlayer.tsx:2495-2516
Minor · Functional Correctness · Heavy lift

Minimized playback no longer advances to the next episode when auto-play is on.

Before this PR, the in-player countdown ran while the player was minimized. When it reached zero, it navigated to the next episode. That was early advancement at the credits marker. This PR removes that countdown. The end-of-file path does not replace it for minimized playback. handleEnded calls controller.enterPostRoll, but the reducer ignores that action unless the mode is foreground. A minimized player is in background-bar mode, so the end of the file does not open Next Up or start its autoplay countdown. A minimized viewer with auto-play on therefore stays on the ended file. Only a next part of the same item continues automatically.

Decide whether minimized playback should advance to the next episode at end of file when auto-play is on. If it should, the advance must start at the end of the file, not at the credits marker. If it should not, the PR and the auto-play setting text must state that minimized playback stops advancing.

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: 37736e23-feb8-4d9e-a785-6c217ad54c39
Commits

Reviewing files that changed from the base of the PR and between 58141fc and 015af63.

Files selected for processing: 51

  • .silo-translations
  • docs/markers-api.md
  • internal/markers/credits_placement.go
  • web/eslint-suppressions.json
  • web/src/hooks/queries/autoPlayNext.ts
  • web/src/lib/userSettingsNav.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/bg.json
  • web/src/locales/ca.json
  • web/src/locales/cs.json
  • web/src/locales/da.json
  • web/src/locales/de.json
  • web/src/locales/el.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/et.json
  • web/src/locales/fi.json
  • web/src/locales/fr.json
  • web/src/locales/he.json
  • web/src/locales/hi.json
  • web/src/locales/hr.json
  • web/src/locales/hu.json
  • web/src/locales/id.json
  • web/src/locales/it.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/ko.json
  • web/src/locales/lt.json
  • web/src/locales/lv.json
  • web/src/locales/ms.json
  • web/src/locales/nb.json
  • web/src/locales/nl.json
  • web/src/locales/pl.json
  • web/src/locales/pt-BR.json
  • web/src/locales/pt-PT.json
  • web/src/locales/ro.json
  • web/src/locales/ru.json
  • web/src/locales/sk.json
  • web/src/locales/sl.json
  • web/src/locales/sv.json
  • web/src/locales/th.json
  • web/src/locales/tr.json
  • web/src/locales/uk.json
  • web/src/locales/vi.json
  • web/src/locales/zh-Hans.json
  • web/src/locales/zh-Hant.json
  • web/src/playback/WatchPlaybackChrome.tsx
  • web/src/player/components/PlayingNextScreen.tsx
  • web/src/player/components/VideoPlayer.tsx
Files with no reviewable changes: 1

  • web/eslint-suppressions.json
Files skipped from review as they are similar to previous changes: 41

  • internal/markers/credits_placement.go
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/ca.json
  • web/src/locales/cs.json
  • web/src/locales/da.json
  • web/src/locales/de.json
  • web/src/locales/el.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/et.json
  • web/src/locales/fi.json
  • web/src/locales/fr.json
  • web/src/locales/he.json
  • web/src/locales/hi.json
  • web/src/locales/hr.json
  • web/src/locales/hu.json
  • web/src/locales/id.json
  • web/src/locales/it.json
  • web/src/locales/ja.json
  • web/src/locales/ko.json
  • web/src/locales/lt.json
  • web/src/locales/lv.json
  • web/src/locales/ms.json
  • web/src/locales/nb.json
  • web/src/locales/nl.json
  • web/src/locales/pl.json
  • web/src/locales/pt-BR.json
  • web/src/locales/pt-PT.json
  • web/src/locales/ro.json
  • web/src/locales/ru.json
  • web/src/locales/sk.json
  • web/src/locales/sl.json
  • web/src/locales/sv.json
  • web/src/locales/th.json
  • web/src/locales/tr.json
  • web/src/locales/uk.json
  • web/src/locales/vi.json
  • web/src/locales/zh-Hans.json
  • web/src/locales/zh-Hant.json

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

Comment thread .silo-translations Outdated
Comment on lines +2 to +3
version=local-0e9d51971d87
sha256=-

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.

Minor · Maintainability & Code Quality · Quick win

Re-pin .silo-translations to a published catalog release before merge.

The pin still names local-0e9d51971d87 with sha256=-. AGENTS.md allows a local pin only while the catalog change is unmerged. Merging this PR with the local pin violates that rule.

Until the pin changes, scripts/sync-translations stops at line 67 before any download. No build, test, or deployment step reads .silo-translations, so the impact is limited to catalog synchronization.

After the catalog pull request merges and its release is published, run:

scripts/sync-translations --version <release>

This command downloads the release archive and SHA256SUMS, verifies the checksum, and writes the new pin. It does not need a local checkout. Commit the regenerated pin with this change.

Without a file on the request, an item with any multi-part version held
early Next Up until the end, even when the player chose a single-part
version or resumed into the last part. The player now reports the file
it plays, and the later-part check uses it.

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

silo-kody Bot commented Nov 19, 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 ❌
⚠️ 5 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:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility
  • Retain distributed firing claims through their own validity windows

Quick104 and others added 3 commits November 19, 2026 11:20
Re-syncs the web translations to silo-translations 2026.11.19-7f7a2ef,
which carries the Show Next Up strings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main re-pinned the translations to 2026.11.19-36be281, which already carries this branch's Show Next Up keys; re-synced to that release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added size/XL 500–999 added + deleted lines (all files); change volume, not priority. and removed size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. labels Nov 19, 2026
@Quick104
Quick104 merged commit 7019d69 into Silo-Server:main Nov 19, 2026
7 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 priority: P2 Limited scope, workaround exists, or polish size/XL 500–999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants