Skip to content

fix(web): pick Auto subtitles by the subtitle language, as the apps do - #3008

Merged
Quick104 merged 1 commit into
mainfrom
fix/web-auto-subtitles-follow-subtitle-language
Oct 24, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/web-auto-subtitles-follow-subtitle-language

Conversation

@Quick104

@Quick104 Quick104 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

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

With subtitles on Auto, the web player shows different subtitles from the Android and Apple apps for the same profile and title. The web turns full subtitles off when the playing audio matches the profile's audio language. The apps compare the playing audio with the profile's subtitle language, which is also how Silo maps Auto to Jellyfin's Smart mode. A viewer with English audio preferred and Spanish subtitles preferred gets no subtitles on English audio in the web app, but Spanish subtitles in the apps. Web also falls back to English when no subtitle language is set and assumes untagged audio matches the profile.

This change makes the web follow the apps' rule.

Approach

resolveSubtitleAutoSelect now compares the playing audio with the profile's subtitle language. Audio in that language gets no full subtitles, only the forced track when "Show forced subtitles" is on. Other audio gets that language's best track, and full dialogue still outranks forced tracks. With no subtitle language set, Auto shows no full subtitles. Untagged or und audio never counts as matching. The audio preference no longer feeds the rule, so the profileLanguage prop it needed is removed from the detail page and player.

Two forced-track edge cases still differ from the apps and are left for a separate decision: with no subtitle language and forced subtitles on, the web shows the forced track in the audio's language (the apps show none); and when the subtitle language has no track at all, the web shows nothing (Android falls back to any forced track). jellycompat's Smart mapping also still differs in two places: it keeps a regional subtitle preference exact where the web compares base languages, and it treats an unset subtitle language as matching any track.

Validation

  • Reproduced on a dev sandbox running main: with profile audio English, subtitles Spanish and Auto, English audio showed subtitles off on the detail page and in the player. On this branch the detail page reads "Auto: Spanish" and the player renders Spanish.
  • The Auto rule's test table now covers different audio and subtitle languages, no subtitle language, untagged and und audio, regional tags, ISO 639-1 and 639-2 codes, forced on and off, and full dialogue over forced. Its new rows fail on main.
  • Web typecheck, lint, prettier and the player and detail-page test suites pass.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/web-auto-subtitles/

Risks

Web viewers whose audio and subtitle preferences differ see different Auto subtitles than before, the same ones the apps already show.

Follow-ups: none. A separate PR saves audio picks for the series; it is independent of this rule.

User manual: Silo-Server/siloserver.org#207, draft docs PR Silo-Server/siloserver.org#248

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 (in T3 Code)
  • Tool(s): Claude Code subagents for implementation and browser captures; sandbox tooling for a dev Silo deployment
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated; a maintainer requested the work and has not yet reviewed it
  • Adversarial review: the rule was confirmed by six independent claude-opus-5-5 reviewers in an audit of the Android, Apple and web resolvers; a multi-agent code review flagged the jellycompat differences noted above. A background adversarial review by gpt-6.1-sol (Codex, reviewed 80a41a7) found nothing to report.

🤖 Generated with Claude Code

Note

Fix web Auto subtitle selection to use subtitle language, not profile language

  • resolveSubtitleAutoSelect in subtitleSort.ts now picks Auto subtitles from the subtitle language preference, matching app behavior. It no longer falls back to the profile's language for audio or subtitle matching, and treats und (undetermined) as unknown audio.
  • In Auto mode, the resolver returns no full subtitle when there is no concrete preferred language or when audio matches it; otherwise it selects the preferred-language track. Forced tracks now match only against the actual audio language.
  • Removes the profile-language prop from the whole watch-page chain: WatchPageProps, VideoPlayerProps, ActionBarProps, SubtitlesPopoverProps, and related helpers and tests.
  • Behavioral Change: Auto subtitles may differ for users whose profile language differs from their subtitle preference. sameLanguageCode now rejects empty or unknown normalized codes, and undetermined language values no longer count as concrete languages.

Macroscope summarized 80a41a7.

In Auto mode the web player turned subtitles off when the playing audio
matched the profile's audio language. The Android and Apple apps, and
Jellyfin's Smart mode, compare the playing audio with the profile's
subtitle language instead, so the same profile and title showed
different subtitles on the web. The web now uses that rule: audio in
the subtitle language gets no full subtitles (forced only, per the
setting); other audio gets the subtitle language's best track. The
hard-coded English default, the audio preference standing in for a
missing subtitle language, and the guess that unknown audio matches the
profile are gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/L 200–499 added + deleted lines (all files); change volume, not priority. label Oct 24, 2026
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

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 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: c71a2254-9cc5-4855-82f9-7fd03a690740
Commits

Reviewing files that changed from the base of the PR and between aed3302 and 80a41a7.

Files selected for processing: 12
  • web/src/pages/ItemDetail/EpisodeContent.tsx
  • web/src/pages/ItemDetail/MovieContent.tsx
  • web/src/pages/ItemDetail/components/ActionBar.tsx
  • web/src/pages/ItemDetail/components/SubtitlesPopover.tsx
  • web/src/pages/ItemDetail/components/prePlaySelection.ts
  • web/src/pages/WatchRoute.test.tsx
  • web/src/pages/watchRouteHelpers.ts
  • web/src/player/components/VideoPlayer.tsx
  • web/src/player/components/WatchPage.tsx
  • web/src/player/types.ts
  • web/src/player/utils/subtitleSort.test.ts
  • web/src/player/utils/subtitleSort.ts
  • 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T04:16:59.936440Z 80a41a7 PR opened
🔒 Security Review ✅ Completed 2026-10-24T04:17:43.174878Z 80a41a7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-kody

silo-kody Bot commented Oct 24, 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 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 24, 2026
@silo-triage

silo-triage Bot commented Oct 24, 2026

Copy link
Copy Markdown

Please add phone-width web before-and-after captures of the detail-page Auto subtitle selection and the player's selected/rendered subtitles, using the same data and identifying each build. This changes subtitle selection on mobile too; sharing selection code and leaving layout unchanged does not make that surface unaffected. The desktop captures show the primary change.

@macroscopeapp

macroscopeapp Bot commented Oct 24, 2026

Copy link
Copy Markdown

The PR changes the recorded Web Auto outcome: with English audio and a Spanish subtitle preference, the resolver now selects Spanish instead of showing no full subtitles. The 14 October human-verified comments report Web C2 and C4 as passing with #2451/#2452 (the task’s Results table still says Not run, and the comments record no build ID). This is a major change: the PR should explicitly connect its app-parity rationale to these validated results, and C2 and C4 need re-validation after merge. C4 also checks cross-client preference reads and rendered captions.

Validation tasks: unblocks #1159 C2 does not match the recorded pass. Suggested line: Validation tasks: changes #1159 C2, C4.

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

Posted via Macroscope — v1 validation impact

@Quick104
Quick104 merged commit 6e952e0 into main Oct 24, 2026
26 checks passed
@Quick104
Quick104 deleted the fix/web-auto-subtitles-follow-subtitle-language branch October 24, 2026 06:50
randrini pushed a commit to kipsilabs/Vio that referenced this pull request Nov 5, 2026
Group text cues into top, middle, and bottom bands with their authored alignment and position, and port the fork's identity-based subtitle selection: an adopted plan resolves the committed asset, a manual pick survives a re-minted ordinal, a version switch carries the selection by identity, and a refused replan rolls back to the accepted row.

Auto keeps Silo-Server#3008's subtitle-language rule for known audio and restores the fork's profile-language fallback only when the audio language is unknown. The series-choice write keeps show_forced_subtitles off the legacy row: the server copies that member into the canonical profile_series row, so echoing it would pin the setting.
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/L 200–499 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant