feat: live session page updates with join link and board preview#902
feat: live session page updates with join link and board preview#902marcodejongh wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Claude Review✅ Ready to merge - Minor issues noted below, but nothing blocking. Issues
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d02df532d
ℹ️ 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".
| const initial = await buildSessionStatsUpdatedEvent(sessionId); | ||
|
|
||
| const asyncIterator = await createAsyncIterator<SessionEvent>((push) => { | ||
| return pubsub.subscribeSession(sessionId, push); |
There was a problem hiding this comment.
Subscribe before taking session stats snapshot
Fetching initial before attaching the pubsub listener creates a race where ticks logged in between are never delivered: buildSessionStatsUpdatedEvent captures old totals, then pubsub.subscribeSession starts after that point, so the in-between SessionStatsUpdated event is dropped and viewers can remain permanently stale if no later ticks arrive. This resolver should subscribe first (or use the eager iterator path) and then emit a snapshot to avoid missing updates.
Useful? React with 👍 / 👎.
| for await (const event of asyncIterator) { | ||
| if (event.__typename === 'SessionStatsUpdated') { | ||
| yield { sessionStats: event }; |
There was a problem hiding this comment.
Propagate session end state in sessionStats stream
The subscription drops every non-SessionStatsUpdated event, but session termination is published as SessionEnded (from sessions/mutations.ts), so clients using this stream never learn that an in-progress session ended. On the session detail page this leaves isInProgress stale and can keep showing "Join Session" until a hard refresh. The stream needs a way to signal end-of-session state transitions.
Useful? React with 👍 / 👎.
Summary
Validation