Skip to content

fix(web): stop series subtitle picks pinning the forced-subtitle setting - #2452

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/web-subtitle-forced-pin
Oct 21, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/web-subtitle-forced-pin

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #1157
Validation tasks: unblocks #1159 C3

Picking a subtitle track or Off in the web app locks that series to whatever "Show forced subtitles" was at the time. Turning the profile's toggle off later has no effect on any series the viewer ever picked a subtitle for, and the web offers no way to see or undo it short of resetting the series to Auto.

The web sends the resolved show_forced_subtitles value on PUT /api/v2/subtitle-prefs/{series_id}, both from the player and from the item page. The server copies that member into the series' canonical profile_series row, which outranks the profile setting. The member is optional, and when it is absent the server keeps whatever the series already had, so the web now leaves it out.

Approach

The player's and item page's subtitle-preference requests stop sending show_forced_subtitles; the callers no longer pass it. A series that was already pinned is cleared by the existing "Auto" reset on the item page, which deletes the series override. The Apple player still sends the resolved value on its own picks, which can pin a series again after an Auto reset; Silo-Server/silo-apple#870 tracks that.

Validation

  • Web lint, format and typecheck pass on the changed files; the subtitle-preference, player and item-page test files pass (34 files). The request tests now assert the member is absent.
  • Local stack: after a Spanish pick on the web, turning the profile's "Show forced subtitles" off is reflected for that series (see Evidence); on main the series kept true.

Evidence

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

Steps on each build: pick Off in the player on episode 1, turn off Show forced subtitles, play episode 2 at its forced line. Before (main): episode 2 still shows the forced line. After (this branch): no forced line. Desktop and phone-width web.

Surface and build: web player, desktop and phone width; before = main, after = this branch.

The resolved value behind it, GET /api/v2/watch/{episode} trimmed:

main:          "effective_show_forced_subtitles": true    (canonical profile_series row: true)
this branch:   "effective_show_forced_subtitles": false   (no profile_series row for the key)

Follow-ups

Risks

None identified. Existing pinned rows stay until the series is reset to Auto.

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
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: an independent Claude Code review of the branch diff verified the server handler's behavior when the member is absent (v1 and v2 paths), checked every reader of the forced value and that a pinned series can still be cleared. It found no defects; two comments that still described the old behavior were corrected.

Note

Stop sending show_forced_subtitles in subtitle preference requests

  • Removes the showForcedSubtitles input from subtitles.useSetSubtitlePreference and from subtitleChoicePersistence.ts, so subtitle preference PUT requests no longer include show_forced_subtitles
  • Updates all callers that passed the resolved forced-subtitle value: episode and movie pre-play selection handlers in EpisodeContent.tsx and MovieContent.tsx, plus the player callback in WatchPage.tsx
  • Updates tests in subtitleChoicePersistence.test.ts to assert the legacy composite row omits show_forced_subtitles; the server copies that member into the canonical profile row when provided
  • Behavioral Change: picking a subtitle during playback no longer overwrites the user's forced-subtitle setting; canonical language, mode, and track requests are unchanged

Macroscope summarized 828e408.

A subtitle pick in the player or on the item page sent the resolved
show_forced_subtitles on PUT /subtitle-prefs. The server copies that member
into the series' canonical profile_series row, so every pick pinned the
profile's "Show forced subtitles" choice on the series, and turning the toggle
off later never reached it.

The member is optional and the server keeps what the series already had when
it is absent, so the web no longer sends it. The Apple clients already leave
it out.
@silo-kody

silo-kody Bot commented Oct 14, 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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f08b1dc-1d76-4bd6-addf-a6ccd4475a00
📥 Commits

Reviewing files that changed from the base of the PR and between dca66a9 and 828e408.

📒 Files selected for processing: 4
  • web/src/lib/seriesSubtitleSettings.ts
  • web/src/pages/ItemDetail/EpisodeContent.tsx
  • web/src/pages/ItemDetail/MovieContent.tsx
  • web/src/player/utils/subtitleChoicePersistence.ts
💤 Files with no reviewable changes: 2
  • web/src/pages/ItemDetail/MovieContent.tsx
  • web/src/pages/ItemDetail/EpisodeContent.tsx
🚧 Files skipped from review as they are similar to previous changes: 2
  • web/src/lib/seriesSubtitleSettings.ts
  • web/src/player/utils/subtitleChoicePersistence.ts

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

📝 Walkthrough

Subtitle preference mutations and player-generated requests no longer send the forced-subtitle setting. Other preference fields and request flows remain unchanged.

Changes: Subtitle preference persistence

Layer / File(s) Summary
Preference mutation payloads
web/src/hooks/queries/subtitles.ts, web/src/pages/ItemDetail/EpisodeContent.tsx, web/src/pages/ItemDetail/MovieContent.tsx, web/src/lib/seriesSubtitleSettings.ts
Subtitle preference mutations omit the forced-subtitle field. The setting documentation states that writer paths omit it, including the legacy composite row.
Player subtitle-choice persistence
web/src/player/utils/subtitleChoicePersistence.ts, web/src/player/components/WatchPage.tsx, web/src/player/utils/subtitleChoicePersistence.test.ts
The request builder and its caller omit the forced-subtitle field. Tests verify that canonical and legacy request bodies exclude it.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 828e4

Subtitle selections no longer pin the resolved forced-subtitle setting, while existing overrides remain intact. The change is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: preventing web subtitle selections from pinning the series forced-subtitle setting.
Description check Passed The description directly explains the bug, implementation, validation, evidence, risks, and follow-ups related to the changeset.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • 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-triage silo-triage Bot added bug Something isn't working evidence-required Needs before-and-after evidence before the Evidence check passes javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish labels Oct 14, 2026
@silo-triage

silo-triage Bot commented Oct 14, 2026

Copy link
Copy Markdown

The API excerpts show the resolved setting changing, but not the subtitle behavior viewers see. Please add before-and-after web captures for the same series showing a subtitle pick followed by turning off the profile’s “Show forced subtitles” setting and the resulting playback behavior. Cover desktop and phone-width web, or explain why mobile is unaffected; name the builds used. A short recording can show the multi-step flow.

@Rhainland

Copy link
Copy Markdown
Contributor Author

Added before-and-after web captures of that flow to the Evidence section: pick Off in the player on episode 1, turn off Show forced subtitles, play episode 2 at its forced line. On main the forced line still shows; on this branch it doesn't. Desktop and phone width; before = main, after = this branch. The evidence page goes live once it's published.

@Quick104

Copy link
Copy Markdown
Contributor

Review summary

Reviewed head: 828e408 (your dca66a9 plus a merge of current main).

I found no defects in the change. The v2 PUT /api/v2/subtitle-prefs/{series_id} handler keeps the series' existing canonical forced-subtitle override, or none, when show_forced_subtitles is absent. Leaving it out is enough to stop new pins on the web. Movies go through the same path with their content ID, and the item page's Auto reset still clears an existing pin.

What I changed on the branch

Validated features

  • leaves show_forced_subtitles off the legacy composite row fails against main's subtitleChoicePersistence.ts and passes on this head.
  • Web typecheck, ESLint on the changed files, and the 34 related vitest files (190 tests) pass on the merged head.
  • I didn't reproduce the bug live. The author's before/after evidence covers the player flow on desktop and phone width.
  • A Codex (gpt-6.1-sol) adversarial review of the diff found no defects. Its one note was the Apple call site above.

Validation: this should unblock #1159 C3. That case needs a re-test on a build with this change.

User manual: unaffected. The Subtitles page describes the profile's forced-subtitle toggle, and this change makes the web follow it.

Apple/Android parity: Apple is tracked in Silo-Server/silo-apple#870. Android needs no change.

Left for maintainers: series pinned before this change stay pinned until someone resets them to Auto. A blanket cleanup can't tell those rows apart from deliberate overrides, so I left them alone.

Fit: 9/10 · Readiness: 9/10 — ready (assuming CI is green)

  • Fit: a small web-only fix that makes the profile's "Show forced subtitles" toggle work as documented, with no new surface.
  • Readiness: the regression test fails on the base, the server path was checked in source, and the merge with main is clean.

@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 21, 2026
@Quick104
Quick104 merged commit 36a8027 into Silo-Server:main Oct 21, 2026
20 checks passed
@macroscopeapp

macroscopeapp Bot commented Oct 21, 2026

Copy link
Copy Markdown

The forced-subtitle playback behavior is visible: after a web subtitle pick, playback should follow the profile toggle instead of a pinned series value. The linked evidence describes before-and-after desktop and phone-width captures for the player flow, but this multi-step change also needs a short recording showing the subtitle pick, profile toggle change, and subsequent playback. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@macroscopeapp

macroscopeapp Bot commented Oct 21, 2026

Copy link
Copy Markdown

Major change — #1158 C2 (Server): The recorded server run ties a series-level forced-subtitle value to a web pick. This PR stops sending that field, so the outcome observed in C2 changes. The PR must explain why the validated behavior changes; its description currently gives the rationale. C2 needs re-validation after merge.

Unblocks — #1159 C3 (Web): The recorded Web run identifies the same forced-setting pin after a manual track/Off pick. The selection fields remain persisted, and C3 is ready to re-test after merge; this check does not accept the result.

Suggested fix: Validation tasks: changes #1158 C2; unblocks #1159 C3

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

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 javascript Pull requests that update javascript code 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.

2 participants