Skip to content

fix(web): fail offline admin setting and subtitle/audio saves instead of replaying them - #4534

Merged
Quick104 merged 7 commits into
mainfrom
fix/web-admin-subtitle-writes-send-now
Nov 21, 2026
Merged

Quick104 merged 7 commits into
mainfrom
fix/web-admin-subtitle-writes-send-now

Conversation

@Quick104

@Quick104 Quick104 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none (#1221 C1 and #1159 C3 use these saves online, where nothing changes)

Other clients: N/A (web-only: the fix is to TanStack Query's offline queue in the web app; Apple, Android and Roku don't share this code)

On the web, an admin's setting change or a viewer's subtitle or audio choice made while the browser was offline could wipe out a newer change made in another browser. The save waited until the connection came back, then sent the value this page had built before going offline, and the server replaced whatever was stored.

Two cases from the review of #4527, both reproduced on a dev sandbox:

  • Admin → Users → a user → Preferences → Web apps: an admin saves an edited primary menu while offline. Meanwhile the user adds a menu link in their own browser. When the admin reconnects, the held save replaces the menu and the user's link is gone.
  • On a movie or episode, a viewer picks subtitle Auto while offline. Meanwhile the same profile picks French in another browser. When the first browser reconnects, the held reset deletes the French choice.

The same happens with the admin's device override saves and resets, "Reset all" for a device, and the title page's subtitle and audio picks.

With this change, these saves are refused right away while offline, without sending anything, and the page says "You're offline, so this change wasn't saved". Nothing is held back and sent later.

Approach

The nine mutations behind these saves used TanStack Query's default networkMode ("online"), which pauses a mutation started offline and runs it on reconnect. They now spread settingWriteOptions, the shared option #4527 added for setting writes: networkMode: "always" plus an onMutate that throws SettingWriteOfflineError while TanStack reports offline. The save is refused before any request goes out, and each hook's existing onError toast shows the localized "You're offline, so this change wasn't saved". Refusing before dispatch is what makes the failure certain: a request sent over a dropping connection could still be stored while the page reports a failure. The admin hooks are in hooks/queries/admin/users.ts; the subtitle and audio title-preference hooks are in subtitles.ts and trackPreferences.ts.

Title track choices also wait in a per-title queue behind earlier choices, so the last one sticks. The browser can report offline while an earlier request in that queue is still pending. Because onMutate refuses an offline choice before mutationFn runs, it never joins the queue, so it can't wait in line and go out after reconnect.

Because that refusal can settle before an earlier pick's save, the item page's track selector (usePrePlayTrackSelection, which the Audio and Subs menus share since #4538) shows the earlier pick when it lands after the refused one rolled the menu back, unless the viewer has chosen again or changed version since.

This isn't a global default in lib/query-client.ts because other mutations keep the default pause on purpose: several admin mutations send If-Match, and tests assert they pause offline. The rest still need a look of their own (see Follow-ups). A revision check on the setting and track-preference endpoints would also catch two browsers saving at the same moment while online, but it would be an /api/v2 change across every client and isn't needed to stop the replay.

Validation

  • Live on a dev sandbox, two browsers on one profile, following the two cases above, before (main) and after (this branch). On main, both held writes ran on reconnect (PUT 200, DELETE 204) and the other browser's newer menu link and French choice were lost. On 6af7388, both offline saves were refused without sending a request and showed the offline notice, nothing was sent on reconnect, and the other browser's changes stayed.
  • Live, the same way: browser A's English save is stored but its response held, A goes offline and picks Auto, B picks French, A reconnects and the response is released. On 6af7388 A's Auto was refused at once and sent nothing, and French stayed. The subtitle case was also run at phone width with the same result.
  • Hook test covering all nine mutations offline: each must fail with SettingWriteOfflineError without calling fetch. It fails on main (each mutation stays paused) and on 94aebf7 (the admin hooks sent their request and the track hooks rejected with a plain TypeError), and passes now. A second case, a reset made offline behind a pending save, fails on this PR's first commit (the reset waits in the queue) and passes now.
  • The EpisodeContent case for an earlier audio pick landing after a refused one fails on main's usePrePlayTrackSelection and passes here.
  • Tests under hooks, pages/ItemDetail, pages/admin and player pass (174 files, 1932 tests); tsc -b, eslint and prettier pass on the changed files. The Go gate wasn't run; no Go code changed.

Evidence

Before-and-after captures and recordings of both cases, the pending-save case, and the subtitle case at phone width, recaptured on 6af7388.

Evidence: https://evidence.siloserver.org/r/silo-server/offline-pref-writes/

Risks

An offline save on these pages now shows the offline notice instead of waiting. A save that fails for another reason (the server can't be reached while the browser reports online) still shows the browser's raw error text, as on main; #4537 handles that.

Follow-ups

  • Error toasts on these saves show the browser's raw "Failed to fetch" when the server can't be reached while the browser reports online. Also on main; fix(web): show the action's own message when a preference save can't reach the server #4537.
  • In-player track choices share the per-title queue without the offline check, so a choice made offline there can still go out after reconnect. Also on main: [bug] Web player track choice made offline is sent after reconnect when an earlier save is pending #4576.
  • Title track-preference writes have no request deadline, so a stalled request holds later picks for the same title. A choice queued behind it while online goes out after a disconnect and reconnect, as on main. Not fixed here.
  • Other admin saves still pause offline and replay: Home sections save and reset on a profile's Preferences, and Clear limit on a device. Also on main; not fixed here.
  • "Reset all" for a device, the admin subtitle appearance autosave, and a track write retried after a sign-in refresh can each send a write made before a disconnect after the connection returns. Also on main; not fixed here.
  • The admin subtitle appearance editor says "Changes saved automatically" after a failed save and keeps the unsaved value in its preview. Also on main; fixed separately.

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.

Council review

Rounds: 2, last reviewed 6af7388

Member Round 1 (94aebf7) Round 2 (6af7388)
Sol (gpt-6.2-sol, xhigh) 8/10 9/10
Opus (claude-opus-5-5, high) 7.5/10 8.5/10
Gemini (gemini-4-neon, xhigh) 6/10 9/10

Fixed: the hand-made offline check and raw toast text, by using settingWriteOptions (6af7388); a test assertion and a comment (beb0cf3). Answered: replays across a disconnect of writes sent or queued while online, the in-player path, and other admin saves that still pause happen on main too and are listed under Follow-ups; repeated offline picks each show the same notice, left for #4537, which rewrites these toasts.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, Codex (plan and council review), Antigravity (council review), GitHub CLI, Playwright (headless Chromium), Vitest
  • Model(s): claude-opus-5-5 (implementation, plan cut review, code review finders A and B), claude-sonnet-5-5 (code review finder C), gpt-6.2-sol (plan attack review, council), gemini-4-neon (council)
  • Involvement: Fully AI-generated; human review pending
  • Adversarial review: before implementing, gpt-6.2-sol attacked the plan and claude-opus-5-5 cut it; a background review by gpt-6.2-sol found the queued offline choice fixed in ad61cab; the maintainer review's council is in Council review above.

🤖 Generated with Claude Code

Note

Fail offline admin setting and subtitle/audio preference saves instead of replaying them

  • Spreads the shared settingWriteOptions into nine admin, subtitle, and audio preference mutation hooks in users.ts, subtitles.ts, and trackPreferences.ts. Offline writes now fail immediately with a SettingWriteOfflineError instead of being queued and sent after reconnect.
  • Fixes usePrePlayTrackSelection in usePrePlayTrackSelection.ts: if a later choice fails while an earlier save is still pending and then succeeds, the selector now shows the saved choice instead of the rollback value.
  • Adds offline-write tests for all covered mutations in preferenceWritesOffline.test.tsx and a pending-request selector test in EpisodeContent.test.tsx.
  • Behavioral Change: offline preference changes that previously succeeded after reconnect now surface an error to the user at save time.

Macroscope summarized beb0cf3.

Admin user setting and device override writes, and a title's subtitle and
audio choice (including Auto), used TanStack Query's default network mode.
Started offline, they paused and ran on reconnect, replacing or deleting
whatever another browser had saved meanwhile. They now use networkMode
"always": the request fails at once and the hook's existing error toast
shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Nov 18, 2026
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Preference mutations use shared write options. Pre-play track selection state also handles saves that settle after a later selection.

Changes: Offline preference writes

Layer / File(s) Summary
Configure offline mutation behavior
web/src/hooks/queries/trackPreferences.ts, web/src/hooks/queries/subtitles.ts, web/src/hooks/queries/admin/users.ts, web/src/hooks/queries/preferenceWritesOffline.test.tsx
Admin-setting, subtitle, and audio-preference mutations use shared write options. Tests check offline errors and verify that a pending subtitle write does not cause an offline delete to be sent later.
Reconcile pre-play selection results
web/src/pages/ItemDetail/usePrePlayTrackSelection.ts, web/src/pages/ItemDetail/EpisodeContent.test.tsx
The selector records a choice rolled back after failure. A successful save restores its choice only if the selector still shows the rolled-back choice. A test covers a save that succeeds after an offline Auto selection.

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

Change: Bug fix

Possibly related PRs

Suggested reviewers: rhainland

Merge Risk: Minimal · up to 6af73

Offline admin-setting and track-preference saves are now refused before anything is sent. This prevents stale replays that could overwrite newer changes from another browser. Online behavior is unchanged, and no merge-blocking risk was found.

Security architecture risk: Minimal · up to 6af73

Offline saves are rejected rather than held for later replay, and selection recovery respects subsequent choices. No introduced or worsened privilege, ownership or failure-containment risk was identified in the inspected changes.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed paths retain their existing targets: administrator-selected account/profile/device settings and the acting profile’s movie or series track preferences. The inspected diff narrows offline execution rather than adding a target scope or credential capability.

Trust Boundaries and Controls

  • observed — The offline policy is a client-side write-admission check, not an authorization boundary. Accepted requests continue through the existing session transport, which checks captured profile context after the exchange.

Resilience and Maintainability Implications

  • observed — Bulk device reset still deletes keys sequentially, treats an already-absent key as completed, stops on other errors and refreshes settings caches after failure. Its partial-completion behavior predates this PR; the added gate prevents offline initiation without promising atomic reset.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the primary change: offline admin setting and subtitle/audio saves now fail immediately instead of being replayed after reconnect. The changeset matches this: nine mutations use networ…
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 is specific and related to the changeset. It explains the problem (offline admin setting and subtitle/audio saves replaying after reconnect and overwriting newer changes from another b…
Full details: Title check

Explanation

The title names the primary change: offline admin setting and subtitle/audio saves now fail immediately instead of being replayed after reconnect. The changeset matches this: nine mutations use networkMode "always", runOrderedPreferenceWrite refuses offline choices, and usePrePlayTrackSelection rollback handling is updated. The title is specific and follows the fix(web) convention, though it is long at 87 characters.

Full details: Description check

Explanation

The description is specific and related to the changeset. It explains the problem (offline admin setting and subtitle/audio saves replaying after reconnect and overwriting newer changes from another browser), names the nine mutations and the files that change (admin/users.ts, subtitles.ts, trackPreferences.ts, usePrePlayTrackSelection), describes the approach (settingWriteOptions with networkMode "always" and an onMutate refusal with SettingWriteOfflineError), lists validation and tests, and gives risks and follow-ups. It matches the raw summary of changes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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: e9ee60fa-d628-4646-b769-a8c4f0d4b379
Commits

Reviewing files that changed from the base of the PR and between 94aebf7 and 6af7388.

Files selected for processing: 4

  • web/src/hooks/queries/admin/users.ts
  • web/src/hooks/queries/preferenceWritesOffline.test.tsx
  • web/src/hooks/queries/subtitles.ts
  • web/src/hooks/queries/trackPreferences.ts

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

@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 ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T23:32:43.114107Z 6af7388 New commits
🔒 Security Review ✅ Completed 2026-11-21T23:53:57.294797Z beb0cf3 New commits
ℹ️ 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-triage silo-triage Bot added bug Something isn't working evidence-required Needs before-and-after evidence before the Evidence check passes impact: data-loss User data deleted, corrupted, or unrecoverable priority: P0 Fix/merge first: data-loss, security, or widespread breakage labels Nov 18, 2026
@silo-triage

silo-triage Bot commented Nov 18, 2026

Copy link
Copy Markdown

The Evidence section covers desktop web only, but these shared save hooks also change offline error behavior on mobile web. Please add before-and-after phone-width captures for the affected web admin and title-page flows, plus a short recording showing offline save → reconnect, or explain why either surface is desktop-only. CONTRIBUTING.md treats desktop and mobile web as separate evidence surfaces.

@Quick104 Quick104 left a comment

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.

Adversarial review (gpt-6.2-sol, reviewed 7251f77)

I reproduced both findings in Chromium using the web hooks against a synthetic API.

Generated by gpt-6.2-sol (Codex) as an automated adversarial review.

Comment thread web/src/hooks/queries/subtitles.ts Resolved
Comment thread web/src/hooks/queries/admin/users.ts Resolved
…a pending one

Title track choices run in order behind earlier writes for the same title.
The browser can report offline while one of those requests is still
pending; a choice made then waited in line, went out after reconnect, and
could replace a newer choice made in another browser. It now fails at
once, like the request it would have sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 left a comment

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.

One finding the guard introduced. I'm fixing it in a commit on this branch, so there's no need to change it yourself.

I also merged main into the branch (#4541 changed trackPreferences.ts); it merged cleanly.

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

… was refused

An audio pick refused offline now fails at once, ahead of an earlier pick
still in flight. The selector rolled back to the last saved choice, and
when the earlier pick then saved it was recorded but never shown, so the
next Play asked for a track the server no longer held. Show it when no
newer choice or file change has happened since the rollback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 ❌

@Quick104

Quick104 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Review summary

Reviewed head: beb0cf3 (main merged in at 94aebf7; fixes in 6af7388 and beb0cf3).

Main since this branch was cut

Addressed

  • The offline guard was rebuilt by hand: the track choices were refused with a made-up TypeError, which put the browser's English "Failed to fetch" in the toast, and the admin saves were still sent while the browser reported offline. All nine mutations now use settingWriteOptions, so an offline save is refused before any request with the localized "You're offline, so this change wasn't saved". Fixed in 6af7388.
  • The offline test now also checks the error type and that nothing is sent (beb0cf3 adds the same check to the queued-reset case).

Tests that failed before the fix
The nine-row table fails on main (each save stays paused) and on 94aebf7 (the admin saves sent a request, the track saves rejected with a plain TypeError), and passes now. The queued-reset case fails on this PR's first commit. The EpisodeContent case fails on main's usePrePlayTrackSelection. Tests under hooks, pages/ItemDetail, pages/admin and player pass (1932 tests), and tsc -b and eslint are clean.

Live check
On a sandbox built from 6af7388, two browsers on one profile: an offline admin menu save, an offline subtitle Auto, and an offline Auto behind a pending save were each refused with the offline notice, nothing was sent offline or after reconnect, and the other browser's change stayed. The subtitle case gave the same result at phone width. The evidence page has the new captures.

Left for the maintainers (all happen on main too, so they don't block this PR)

Validated features: not checked against the validation board (the board query failed in this run). By trace, the saves behave as before while online (the offline check passes and the same request goes out), so the cases in the body's Validation tasks: line are unaffected.

User manual: unaffected; no page covers saving web settings or track choices while offline.

Apple and Android: not applicable; web only.

Council: Sol (gpt-6.2-sol, xhigh) 8/10 then 9/10; Opus (claude-opus-5-5, high) 7.5/10 then 8.5/10; Gemini (gemini-4-neon, xhigh) 6/10 then 9/10. Round 1 reviewed 94aebf7 and round 2 reviewed 6af7388.

Fit: 9/10 · Readiness: 9/10 — ready

Fit: it stops offline saves from silently replacing newer choices made elsewhere and tells the user plainly, using the offline handling the settings pages already have, with no new setting or API. Readiness: the fix was shown live and by tests that fail without it, every council member scored it 8.5 or higher in round 2, and what remains happens on main too.

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

Quick104 and others added 2 commits November 21, 2026 23:15
…e-writes-send-now

#4538 replaced usePrePlayAudioSelection with the shared
usePrePlayTrackSelection, which the Subs menu now uses too. The rule from
4070f66 (show an earlier pick that lands after a later one was refused
offline) moves into the shared hook, so it covers both menus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e notice

The nine saves now use settingWriteOptions, the shared option #4527 gave
setting writes: an offline save is refused in onMutate before anything is
sent, with the localized "You're offline, so this change wasn't saved"
message. Before, the admin saves were still sent while offline (one that
reached the server could be stored while the page reported a failure), and
the track choices were refused with a made-up TypeError whose toast showed
the browser's "Failed to fetch" in English.

The queue's own offline check goes, since an offline choice no longer
reaches it, along with the two networkMode constants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Quick104 Quick104 left a comment

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.

Review of 94aebf7 (main merged in, see below). One finding the PR introduced, and I'm fixing it in a commit on this branch, so there's no need to change it yourself.

Main had moved on since this branch was cut: #4538 replaced usePrePlayAudioSelection with the shared usePrePlayTrackSelection, which the Subs menu also uses now, and #4527 added settingWriteOptions and SettingWriteOfflineError for setting writes. I merged main in (94aebf7) and moved the "show an earlier pick that lands after a refused one" rule from 4070f66 into the shared hook, so it now covers both menus. The EpisodeContent case still fails on main's version of the hook and passes with the port.

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

Comment thread web/src/hooks/queries/admin/users.ts Resolved
…d fetch mock

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Quick104
Quick104 merged commit 3fd01aa into main Nov 21, 2026
18 checks passed
@Quick104
Quick104 deleted the fix/web-admin-subtitle-writes-send-now branch November 21, 2026 23:56
Quick104 added a commit that referenced this pull request Nov 22, 2026
…r's own subtitle errors

The nine setting and track saves refuse an offline save with the translated
offline notice (#4534), but each toasted it without an id, so picking
several tracks or saving several admin settings offline stacked one toast
per click. They now report it through reportOfflineSettingFailure, which
shows it once for a burst, and otherwise toast the action's own message.

The player's subtitle search and download still showed the browser's
"Failed to fetch" beside the upload form this branch already fixed; they now
use readableErrorText with the modal's existing fallbacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quick104 added a commit that referenced this pull request Nov 22, 2026
…reach the server (#4537)

* fix(web): show the action's own message when a preference save can't reach the server

Admin setting and device override saves and resets, and a title's audio
and subtitle choices, toasted error.message for any failure. When the
request never got an answer, that is the browser's "Failed to fetch" (or
a timeout or proxy-page message in developer English), untranslated in
every language. The device reset embedded the same text in its
"Reset stopped" message.

v2ErrorText would hide the translated errors these actions throw on
purpose (a value that doesn't parse, a reset that stopped part-way). Add
readableErrorText, which keeps any Error's message except the ones in
developer English (a failed fetch, V2TimeoutError, V2TransportError, and
StaleApiRequestContextError) and uses the action's existing fallback for
those. Subtitle downloads and uploads get the same treatment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): show the upload's own message in the subtitle upload form

A failed subtitle upload toasted the translated message, but the upload
form also caught the rejection and showed err.message ("Failed to
fetch") as its inline alert. Use readableErrorText there with the form's
existing fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): show the action's own message when subtitle detect or search fails

The upload form's language detection and the subtitle search dialog still
showed a failed fetch's browser text. Use readableErrorText with each one's
existing fallback, as the upload alert does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): drop the singular reason when a device reset stops offline

With readableErrorText, a lost connection gave the reset-all message the
fallback "The remaining override could not be reset.", which is wrong when
more than one override is left. A failure without a readable reason now
ends the message at the count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): show one offline notice for a burst of saves, and the player's own subtitle errors

The nine setting and track saves refuse an offline save with the translated
offline notice (#4534), but each toasted it without an id, so picking
several tracks or saving several admin settings offline stacked one toast
per click. They now report it through reportOfflineSettingFailure, which
shows it once for a burst, and otherwise toast the action's own message.

The player's subtitle search and download still showed the browser's
"Failed to fetch" beside the upload form this branch already fixed; they now
use readableErrorText with the modal's existing fallbacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(web): describe reportOfflineSettingFailure for its new caller

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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: data-loss User data deleted, corrupted, or unrecoverable priority: P0 Fix/merge first: data-loss, security, or widespread breakage 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.

1 participant