Repository navigation
fix(watch-party): return web members to the room when an episode ends - #1655
Conversation
… item A web member of a Watch Party entered post-roll in the last 30 seconds of an episode. When the room then returned to its lobby, the player's room exit saw a non-foreground mode, tore playback down without navigating, and left the member on a black player page with no room socket. Skip the early post-roll trigger inside a room. The room decides what follows the item, and the member stays in the player until the room's lobby snapshot sends it back to the room page. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The room is part of the request key the callback already depends on, so a ref adds a render of lag and nothing else. Match the other room branches in checking both the room id and its token. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe playback state handler now excludes Watch Together playback from its early post-roll condition. Tests cover post-roll behavior inside and outside a room, and verify that exiting the room player navigates to the room URL with its token. ChangesWatch Together playback
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to Watch Party members stay in the player near the episode end, so the room lobby snapshot or the member's own end event can navigate them back to the room. Playback outside a room is unchanged. The author did not test in a live room, but no concrete merge risk was found. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change keeps room playback in the player until the existing room-return flow runs. No new privileged room action or weakened access control was identified, though the full room lifecycle was not verified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Problem
Closes #1654
Related issue: N/A
Validation tasks: none
A Silo Web member of a Watch Party ends up on a black player page at the end of every episode, and drops out of the room until they reload. This change keeps room members out of post-roll, so the room's return to its lobby takes them back to the room page like the rest of the party.
The web player enters post-roll 30 seconds before the end of a series episode, without checking for a room. When the room then returns to its lobby (#1489), the player's room exit runs
handleExit, which only navigates to the room page fromforeground. In post-roll it callsexitPlayback()and returns, so the player unmounts with its room socket and the watch route renders nothing.Approach
Skip the early post-roll trigger when the request belongs to a room, using the same room id and token check as the other room branches in
WatchPlaybackChrome. A room already decides what follows the item for everyone, and post-roll has nothing to offer there: its next-episode action only returns to the room page. The member stays in the full player until either its ownendedevent or the room's lobby snapshot sends it to the room page; both paths already navigate there fromforeground.handleExitstill does not navigate from post-roll. With this change no room member reaches that mode, so I left it alone rather than change exits for non-room playback.Validation
vitest run src/playback: pass. The new host test renders the real provider and host with the player stubbed; its room case fails without the guard and passes with it.make test-webwas not run locally: the workstation runs Node 26, whose built-inlocalStorageshadows jsdom's unless web storage is disabled. CI runs the suite on Node 22.Risks
None identified. Non-room playback is unchanged. A room member now sees the full player for the last 30 seconds of an episode instead of the post-roll screen.
Checklist
AI Disclosure
handleExitwas left out as unnecessary for this bug.🤖 Generated with Claude Code
Note
Skip post-roll and return web watch-party members to the room when an episode ends
WatchPlaybackHostContent's playback-state handler, playback now stays in foreground when a series episode nears its end, if the active request has both a room identifier and a room token. Non-room playback still enters post-roll as before. See WatchPlaybackChrome.tsx.Macroscope summarized 5dcd673.