Skip to content

fix(web): show Playback unavailable when a title can't be loaded - #2024

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/web-watch-load-error
Oct 7, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/web-watch-load-error

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #1179
Validation tasks: changes #1181 C4

Opening a player link for a title the profile cannot see, or one that does not exist, leaves the web player on "Preparing playback" indefinitely. The server answers GET /api/v2/watch/{id} with 404 at once, but the player never shows its Playback unavailable screen. A child following a link to a restricted title, or anyone with a stale link, sees a spinner that never ends.

Approach

The player returned its preparing screen whenever the title had not loaded, before it checked for an error, so a failed first load could never reach the error screen. The not-loaded branch now shows Playback unavailable with Go Back once the request has failed and is not being retried. A 404 says "This title isn't available. It may have been removed, or you may not have access to it.", like the item page, instead of the server's technical detail. The background mini-bar is unchanged.

Validation

  • Built on 7d4b8318e. main at ca4f71b6e does not compile (internal/catalog/catalog_resolver.go:2172), so CI on this PR will fail on that file until main is fixed.
  • Web lint, format, build and bundle budget: pass. make test-web passes.
  • A new component test reproduces the hang (it fails without the fix) and checks that a later title still plays after a failed one.
  • Checked in a browser against a running server, see Evidence.

Evidence

/watch/{id} for an R-rated title, opened as a PG kids profile, after 15 seconds:

Before After
before-watch after-watch

Surface and build: web player. Before 7d4b8318e (main), after 0c481acec. Captured with headless Chromium at 1280×800 against a test server with synthetic media; artwork is blurred.

Risks

None identified.

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 (running in T3 Code)
  • Tool(s): Claude Code, GitHub CLI, Playwright (evidence capture)
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: An independent Claude Code review agent (claude-opus-5-5) checked for a stale error from an earlier title, background mode, refetch on focus and non-404 errors. It found no defects.

Note

Fix web playback to show unavailable screen when a title can't be loaded

  • When a foreground playback request has no active item and the watch-detail query settles with an error, the host now renders an unavailable screen instead of staying on the preparing screen indefinitely (WatchPlaybackChrome.tsx)
  • Adds a playbackUnavailableMessage helper that maps not-found responses to neutral copy so raw server error details are never shown; other errors keep their own message with a generic fallback
  • Adds a reusable PlaybackUnavailableScreen component with status text, error description, and a back action; it replaces the previous inline error panel
  • Adds jsdom integration tests that mock the V2 transport and cover the not-found path, backward navigation, and recovery when switching to a title that loads successfully
  • Behavioral Change: refetching requests with no active item keep showing the preparing screen until fetching ends

Macroscope summarized 0c481ac.

Opening /watch/{id} for a title the profile cannot see, or one that does not
exist, left the player on "Preparing playback" indefinitely although the
server answered 404 at once: the preparing screen returned before the error
branch was reached. A failed watch-detail request now shows the existing
Playback unavailable screen with Go Back, and a 404 says the title isn't
available.
@coderabbitai

coderabbitai Bot commented Oct 6, 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 56 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
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1edd17b9-0331-4854-a96b-7b3d9ab1a4d3
📥 Commits

Reviewing files that changed from the base of the PR and between 4bed990 and 0c481ac.

📒 Files selected for processing (2)
  • web/src/playback/WatchPlaybackChrome.tsx
  • web/src/playback/WatchPlaybackChrome.unavailable.test.tsx
  • Autopilot · 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-kody

silo-kody Bot commented Oct 6, 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 ❌

@macroscopeapp

macroscopeapp Bot commented Oct 6, 2026

Copy link
Copy Markdown

The PR adds a visible playback error state and replaces technical 404 detail with user-facing copy in web/src/playback/WatchPlaybackChrome.tsx. The before-and-after screenshots cover the UI, but this change also depends on the transition from “Preparing playback” to the error screen after the request fails. Please add a short recording of that same failure flow so reviewers can see the transition.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

Quick104 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Evidence: FAIL (desktop-only web)

Before|After stills and surface/build at 1280×800 look good for the Playback unavailable end-state, but this screen is also visible at phone width and there is no phone-width capture (and no note that mobile is unaffected).

Fix: add phone-width Before|After for the same title/state, or state that mobile is unaffected / identical.

Grok commenting on Quick's behalf.

@Quick104
Quick104 merged commit ed0d3ed into Silo-Server:main Oct 7, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants