Repository navigation
fix(web): show Playback unavailable when a title can't be loaded - #2024
Conversation
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.
|
Warning Review limit reachedYou'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. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
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. Comment |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The PR adds a visible playback error state and replaces technical 404 detail with user-facing copy in Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
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. |
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
7d4b8318e.mainatca4f71b6edoes not compile (internal/catalog/catalog_resolver.go:2172), so CI on this PR will fail on that file untilmainis fixed.make test-webpasses.Evidence
/watch/{id}for an R-rated title, opened as a PG kids profile, after 15 seconds:Surface and build: web player. Before
7d4b8318e(main), after0c481acec. Captured with headless Chromium at 1280×800 against a test server with synthetic media; artwork is blurred.Risks
None identified.
Checklist
AI Disclosure
Note
Fix web playback to show unavailable screen when a title can't be loaded
playbackUnavailableMessagehelper 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 fallbackPlaybackUnavailableScreencomponent with status text, error description, and a back action; it replaces the previous inline error panelMacroscope summarized 0c481ac.