Skip to content

feat: live session page updates with join link and board preview#902

Open
marcodejongh wants to merge 1 commit intomainfrom
sesh_2dotoh
Open

feat: live session page updates with join link and board preview#902
marcodejongh wants to merge 1 commit intomainfrom
sesh_2dotoh

Conversation

@marcodejongh
Copy link
Owner

Summary

  • auto-update the session detail page while a session is in progress using the existing websocket stats flow
  • show a Join Session button that links to the board b-route with a session query parameter
  • show the board the session runs on with a compact preview under the participants/session overview
  • extend shared schema/operations and backend session detail/subscription support for board path and in-progress state
  • add/update session detail UI tests for board preview and join-link behavior

Validation

  • npm run typecheck --workspace=@boardsesh/shared-schema
  • npm run typecheck --workspace=boardsesh-backend
  • npm run test:run --workspace=@boardsesh/web -- app/session/tests/session-detail-content.test.tsx
  • npm run test:run --workspace=@boardsesh/web -- app/components/sesh-settings/tests/sesh-settings-drawer.test.tsx
  • npm run typecheck --workspace=@boardsesh/web (fails due existing .next generated-route validation errors unrelated to this PR)

@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
boardsesh Building Building Preview, Comment Mar 2, 2026 5:42pm

Request Review

@claude
Copy link

claude bot commented Mar 2, 2026

Claude Review

Ready to merge - Minor issues noted below, but nothing blocking.

Issues

  1. Code duplication - SESSION_STATS_SUBSCRIPTION in packages/web/app/lib/graphql/operations/activity-feed.ts:92 duplicates SESSION_STATS from packages/shared-schema/src/operations.ts:273. Import from shared-schema instead.

  2. Missing test coverage - No unit tests for mergeStatsIntoSession() function in session-detail-live-shell.tsx:30-54. This merge logic handles tick deduplication and timestamp updates - worth testing edge cases like empty ticks arrays.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +42 to +45
const initial = await buildSessionStatsUpdatedEvent(sessionId);

const asyncIterator = await createAsyncIterator<SessionEvent>((push) => {
return pubsub.subscribeSession(sessionId, push);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +52 to +54
for await (const event of asyncIterator) {
if (event.__typename === 'SessionStatsUpdated') {
yield { sessionStats: event };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Base automatically changed from better_sessions to main March 2, 2026 20:11
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.

1 participant