Skip to content

fix(web): keep seek interval controls editable after a failed capabilities refetch - #4526

Merged
Quick104 merged 2 commits into
mainfrom
fix/web-playback-seek-failed-refetch
Nov 18, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/web-playback-seek-failed-refetch

Conversation

@Quick104

@Quick104 Quick104 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A (found while reviewing #4519)
Validation tasks: none (no validation task covers seek intervals; the board itself couldn't be read, so the check searched issues labeled Validation)
Other clients: N/A (web query-cache handling; the fix is local to the web app)

The seek interval controls on the web Playback settings page could go blank and stop working mid-session. When a background refetch of the settings capabilities failed after it had already answered, TanStack Query kept the earlier answer but marked the query as errored. useSeekPreferences passed that error through, so the page:

  • replaced the video and audiobook rewind and fast-forward choices with a disabled "Unavailable" and a "Could not load the … interval" description;
  • disabled the "Use this browser's audiobook intervals" import button.

The cached answer still said the server supports the shared seek keys, and the seek values themselves kept loading. The audiobook player's settings menu reads the same error and said the profile's intervals failed to load. The refetch happens after the 30-minute stale window, on a remount or a network reconnect, and needs the capabilities request to fail twice (one retry).

Approach

useSeekPreferences now ignores a capabilities error once the cached answer shows the server supports the shared seek keys. Without such an answer, the error still counts: a request that never answered, or one whose last answer predates seek support, shows the existing discovery error rather than reading as an older server.

A failed effective-settings read still counts as an error, as before. Saves only invalidate that query, so if the read after a save fails, the cached interval is out of date. Showing it as current would also block picking the old value back, since the Select sends nothing for the value it already shows.

The intro control on this page still requires a successful capabilities answer, as #4519 left it.

Validation

  • Live reproduction on a local sandbox, scripted in a browser: open Settings → Playback, make the capabilities request return 503, move the clock past the 30-minute stale window, and trigger a network reconnect. On main (4102bca), after the second 503, all four seek Selects went blank and disabled and Import was disabled. With this change, the same steps keep every Select's value, the controls stay enabled, and Import stays enabled.
  • On the fixed build, choosing a new rewind interval while capabilities were still failing saved it (PUT 200), and a reload read it back. With capabilities failing from the first load, the page still shows the discovery error and no Selects. A save followed by a failed settings read shows the load error rather than the old value. A cached answer from before seek support, followed by a failed check, shows the discovery error rather than "not supported".
  • The same before and after states hold at phone width.
  • Web lint, format check, build, bundle budget, and the full web test suite pass.
  • No test added: the change is UI state outside the areas CONTRIBUTING lists for tests, and the live run above is the proof.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/playback-seek-failed-refetch/

Surface and build: web Settings → Playback, desktop and phone width, local sandboxes built from main (4102bca desktop, d4a2117 phone) and from this PR's head 9890903.

Risks

If the server is rolled back mid-session while capabilities keep failing, the page keeps offering the seek controls from the newer server's last answer until a refetch succeeds. A save would then fail with the existing error toast. #4519 accepts the same window for the player.

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 in T3 Code
  • Tool(s): Claude Code, GitHub CLI, Playwright
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated; human review pending
  • Adversarial review: plan round skipped (a few lines at the root cause, nothing added); one code-review pass over the diff found nothing. Background adversarial review by gpt-6.2-sol (Codex) on 2f24578: F1 (a failed settings read after a save showed the old value as current) and F2 (a failed check after an old cached answer read as "not supported") both fixed in 9890903 and rechecked live; Kody raised F1 too.

🤖 Generated with Claude Code

Note

Keep seek interval controls editable after failed capabilities refetch

Fixes useSeekPreferences in seekPreferences.ts. The hook no longer returns a capabilities-query error when the retained capabilities data already confirms support for all seek keys. This keeps the seek interval controls editable after a failed capabilities refetch. The effective-settings query error is still returned, and the capabilities error is only returned when support is not confirmed.

Macroscope summarized 9890903.

…ities refetch

When a background refetch of the settings capabilities failed after the
query had already answered, TanStack Query kept the last answer as data but
set the query's error. useSeekPreferences reported that error, so the
Playback settings page blanked and disabled the video and audiobook seek
interval Selects and the legacy audiobook Import button, and the audiobook
player's settings menu said the intervals failed to load.

The hook now reports a capabilities or effective-settings error only when
that query has no answer to show. A request that has never answered still
counts as failed. Cached values stay editable because each write sets one
key to the value the user picked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-triage silo-triage Bot added the size/S 0–49 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

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 2 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: 0e64c177-a44e-442f-90c1-d29098f05f6f
Commits

Reviewing files that changed from the base of the PR and between d4a2117 and 9890903.

Files selected for processing: 1

  • web/src/hooks/queries/seekPreferences.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@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-18T21:29:35.515118Z 9890903 New commits
🔒 Security Review ✅ Completed 2026-11-18T21:31:09.246901Z 9890903 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-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 ❌

@silo-triage silo-triage Bot added bug Something isn't working evidence-required Needs before-and-after evidence before the Evidence check passes priority: P2 Limited scope, workaround exists, or polish labels Nov 18, 2026
@silo-triage

silo-triage Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Resolved: the requested mobile-web before-and-after captures have been added, with the surface and builds identified.

Original request

Please add before-and-after captures of the failed-refetch state on mobile web, with the surface and build identified. The Evidence section covers desktop only, but this shared seek-settings change also affects the Playback page at phone width; the contribution guide treats mobile web as a separate surface.

@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 2f24578)

AI disclosure: Codex (gpt-6.2-sol), adversarial review run from a Claude Code /silo session.

Ignore a capabilities error only once the cached answer proves the shared
seek keys are supported, so a failed check never reads as an old server.
Keep a failed settings read as an error: after a successful save, a failed
refetch leaves the cached interval out of date, and the Select would show
it as current with no way to pick it back.

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

Copy link
Copy Markdown
Contributor Author

Added phone-width before and after captures of the failed-refetch state to the evidence page, with builds named (before: main at d4a2117; after: 9890903). The states match desktop.

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

@silo-triage silo-triage Bot removed the evidence-required Needs before-and-after evidence before the Evidence check passes label Nov 18, 2026
@Quick104
Quick104 merged commit 71c07fe into main Nov 18, 2026
26 checks passed
@Quick104
Quick104 deleted the fix/web-playback-seek-failed-refetch branch November 18, 2026 22:13
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/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant