Repository navigation
feat(watch-together): staged lobby, inline picker, and a redesigned web room - #1280
Conversation
Selection used to start playback the moment the host chose an item, so a room was either empty or already playing and guests in host-pick rooms had nothing to do but wait. Add a staged lobby: the host stages an item, guests mark themselves ready over the socket, and a separate start begins playback. The host can also stop playback and return everyone to the lobby with the item still staged, and switch a lobby between host picks and voting. New v2 operations: staged-selection, playback/start, playback/stop, selection-mode, member-state, picker, and a capabilities endpoint. Staging and mode switches bump the generation only; start and stop advance the selection revision, which is the playback epoch. A host who rejoins a playing room alone is told the room's position and their state reports are treated like a guest's until the seek lands, so a fresh stream cannot rewind the anchor to zero. The picker rows and member watch state are computed server-side over the members connected to the serving node. Item cards come from a new batch card builder in catalog that skips the per-item image resolves and folder reads the detail builder does; the picker went from tens of seconds to well under a second on a large library. The five operations run through the room runtime's operation lock, and the lobby-ready and rejoin-sync flags ride in the persisted room runtime so every API server sees them. Vote rooms let the host promote any suggestion; the tally is advisory. v1 promote no longer returns 409 for a non-winner. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…tate Add v2 clients and connection-hook methods for stage, start, stop, mode switch, lobby ready, member state, picker, and capabilities, fenced on profile authority like the existing selection call. Map lobby_ready on the room snapshot. The host gets a Stop button in the player's room panel. When the room phase leaves playing the player exits with a notice instead of stalling on a dead session. Every exit path back to the room now carries the selection it just left, so the room page does not bounce the viewer straight back into the player. Co-Authored-By: Claude Fable 5.1 <[email protected]>
… picker Replace the join page and the old room page. The hub at /rooms leads with a Start a party card next to Join a party, lists recent rooms with Rejoin, and explains the flow. The room page keeps a persistent stage and a people/activity rail across the empty lobby, staged lobby, voting, and playing phases, with a status strip holding the room code, invite link, and mode. The picker lives in the room page instead of a dialog. A browse shelf with search, filter chips, the server-computed together rows, the home screen's discovery rows, and per-kind recently added rows sits under the stage; choosing a tile puts it on the stage as a candidate. Movies show details and who has seen them. Series show a season list with room progress and an episode list with stills, per-member watched dots, a next-up row, and an in-panel confirm with a spoiler heads-up. Host-pick lobbies list guest suggestions without votes so the host can queue one. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ll and pointer styles Item pages get Start a party with this in the overflow menu, plus Suggest to and Play in when a recent room is still live. The start sheet stages the next-up episode or the movie, picks the mode, then creates the room. MediaCarousel gains a compact variant for the picker rows. Room scroll containers use the existing overlay scrollbar style, and hover-revealed row actions stay visible on touch screens. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
Quick104 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Important Review skippedToo many files! This PR contains 147 files, which is 47 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (147)
You can disable this status message by setting the 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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2112f07526
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Quick104
left a comment
There was a problem hiding this comment.
Verified two additional defects while reviewing the room lifecycle. I am handling the bounded repairs and regression coverage below.
AI review: Codex harness, model gpt-6-astra; tools: gh CLI, source inspection, Go tests against an isolated PostgreSQL database.
Quick104
left a comment
There was a problem hiding this comment.
One additional recovery defect is reproduced by the new presence-hook tests. I am handling the fix. AI review: Codex, gpt-6-astra.
Quick104
left a comment
There was a problem hiding this comment.
The remaining roster review found a client cache issue. I am fixing it with a hook regression. AI review: Codex, gpt-6-astra.
|
Reviewed and repaired head: 31b6ff866. The follow-up repairs preserve the frozen v1 roster and reject lobby_ready on v1, make identical staging a no-op, retain Rejoin after transient hub errors, and let an explicit player exit reach the room after a concurrent selection change. The two newer bot findings are also repaired: readiness retries stop after server acknowledgment, and season defaults select playable episodes. The same pass fixes recent-history identity collisions, guest readiness counts, vote-mode readiness presentation, browse search preservation, personal season labels, and picker episode/title resolution. All six follow-up finding threads are resolved. Independent source review found no further defect in these repairs. The reported missing runtime persistence and anchor/CAS race were not confirmed: production operations lock and reload the authoritative row before mutation, then commit runtime changes before delivery. Profile transitions clear the shared query cache, and the enclosing player is keyed by room. The v2 required response-field addition is informational in the repository's semantic contract gate. Validation: 106 Watch Together tests pass with PostgreSQL and race detection (three Redis-only credential tests skipped locally); the full handler package passes; 4,505 web tests pass; Go build/vet, changed-line lint, TypeScript, web build, formatting, and all repository verification gates pass. The full local Go run has a macOS resource-capability failure reproduced on main cbc13de; a policy timeout passed its focused rerun. The repair has not been deployed or validated in a live browser. Go and Web CI are running on this commit. The staged room remains a good fit for the existing transaction and playback-epoch model. Normal-playing guest correction coalescing remains separate work in #1282. Mergeability: 8/10 — conditional at AI review and repair: Codex in T3 Code, model |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a30ad64a2
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…r barrier exit A seek held the room in "Syncing playback" until the 30s waiting deadline whenever a member's single ready acknowledgement was rejected: readiness was edge-triggered from three media events, the seeked handler bailed on snapped seeks, and state reports were dropped while waiting, so nothing retried. Readiness is now evaluated on every playable-media event and on the state tick, which carries command_id and is_ready while the room waits. The host is accepted within 15s of a seek target and re-anchors the room to its actual position, since a rebuilt stream lands on a keyframe or segment boundary. Guests keep the 1s bound. The waiting deadline drops to 10s as a safety net. Withheld acknowledgements log their reason at debug level. Also: a play() aborted by a transport swap (subtitle or quality change) no longer shows the "browser blocked playback" prompt, and the replan request timeout rises to 45s so the client cannot cancel a transport that the server is still allowed 30s to start. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fab292640d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Quick104
left a comment
There was a problem hiding this comment.
Two additional verified defects are being repaired below. The same pass also corrects per-profile recent-room history, guest readiness counts, vote-mode readiness presentation, browse search preservation, season progress labeling, and picker episode resolution.
AI review and repair: Codex in T3 Code, model gpt-6-astra. Independent agents traced the backend, identity, and room lifecycle paths. Tools: gh CLI, source inspection, Go tests with PostgreSQL and race detection, Vitest, ESLint, Prettier, and the Modern Go Guidelines CLI.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31b6ff8660
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if item == nil { | ||
| continue | ||
| } | ||
| out = append(out, PickerViewEntry{Item: item, Members: entry.Members, NextUp: entry.NextUp}) |
There was a problem hiding this comment.
Exclude unsupported media types from picker rows
Filter resolved cards to movies and series before appending them. When two members have the same audiobook in progress—or a member has an audiobook or ebook on a watchlist—Picker emits that content ID and GetItemCardsByIDs resolves it here. The web picker then treats every non-series card as a movie and submits it, but CatalogSelectionResolver.ResolveSelection accepts only movies and episodes, so the user reaches a candidate that consistently fails with an invalid-selection response.
Useful? React with 👍 / 👎.
| onSelect={(entry) => onSelect({ card: cardOf(entry.item) })} | ||
| /> | ||
| ) : null} | ||
| {homeSections.map((section) => ( |
There was a problem hiding this comment.
Hide discovery shelves when a scoped chip is selected
Gate these home sections to the All, Movies, and Series chips. After the initial All view has loaded homeSections, selecting Together, Watchlists, or Recent still renders this unconditional block; disabling the home queries does not clear their cached results. Those scoped filters therefore continue showing unrelated discovery shelves, and their visible-count and empty-state behavior is also incorrect.
Useful? React with 👍 / 👎.
The web Watch Party started playback as soon as the host selected an item, left guests with little to do in host-pick rooms, and sent viewers to the join page when they left the player. This adds a staged lobby, an inline shared picker, and room navigation that follows playback state.
Related issue: #1279
Hosts can stage content, start it, stop back to the lobby, and switch selection mode. Guests can mark themselves ready, suggest items, and see shared watch progress. The hub offers recent-room rejoin, item menus can start a party, and series selection includes playable episode defaults and season progress.
Room transitions and readiness use the existing PostgreSQL operation lock and shared runtime. Staging and mode changes preserve the playback epoch; start and stop advance it. Repeating an identical resolved staged selection preserves generation, idle time, readiness, and broadcasts. Picker cards use batched catalog and artwork reads. Member-state reads filter requested IDs through the caller's catalog access, and picker watchlists collapse episodes to their series.
The web returns to the room after an explicit exit even if the host changed content during navigation. Transient hub reads preserve Rejoin, recent history is scoped to account and profile, and folding the browse shelf preserves search. Guest readiness counts exclude the host; vote mode starts through promotion without a ready check.
Playback readiness retries continue until the server acknowledges the member, then stop while other members load. The host can re-anchor within 15 seconds of a seek target; guests retain the 1-second bound. The waiting deadline is 10 seconds. The replan timeout is 45 seconds to cover server transport startup, and interrupted play calls only show the autoplay prompt for NotAllowedError.
Validation
Compatibility and follow-up
Frozen v1 HTTP and socket snapshots keep their six-field member representation, and v1 sockets reject lobby_ready. V2 keeps its member status fields and advertises the new operations through capabilities. V2 hosts can promote any suggestion; v1 retains the winner-only gate.
Native coordination is tracked in Apple #344 and Android #355. Jellyfin has no corresponding room protocol surface. Normal-playing guest correction coalescing remains separate work in #1282.
AI disclosure
claude-fable-5-1. Tools included gh CLI, Go tests and race detection, Docker PostgreSQL, Vitest, TypeScript, ESLint, Prettier, golangci-lint, browser automation, and development deployment logs. The maintainer directed the design and tested the development deployment.gpt-6-astra. Tools included gh CLI, Go tests and race detection, PostgreSQL, pnpm, Vitest, TypeScript, ESLint, Prettier, golangci-lint, and the Modern Go Guidelines CLI. Independent agents reviewed backend transactions, identity and room lifecycle behavior, and the final repairs. Validation and remaining limits are recorded above.