Skip to content

fix(syncdeck): redirect instructors when sessions end - #321

Merged
mrbdahlem merged 2 commits into
mainfrom
fix/syncdeck-instructor-session-ended
Aug 1, 2026
Merged

fix(syncdeck): redirect instructors when sessions end#321
mrbdahlem merged 2 commits into
mainfrom
fix/syncdeck-instructor-session-ended

Conversation

@mrbdahlem

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@mrbdahlem, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 45112abb-db03-48aa-ba29-1b3a003df92f

📥 Commits

Reviewing files that changed from the base of the PR and between d68fa3d and 135843f.

📒 Files selected for processing (3)
  • .agent/knowledge/repo_discoveries.md
  • activities/syncdeck/client/manager/SyncDeckManager.tsx
  • activities/syncdeck/playwright/instructor-session-ended.spec.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Ensures SyncDeck’s instructor/manager view responds to authoritative session termination by redirecting to the shared /session-ended route, and adds Playwright coverage to prevent regressions.

Changes:

  • Attach the shared useSessionEndedHandler to SyncDeck’s instructor/manager resilient WebSocket connection.
  • Add a Playwright spec that ends a SyncDeck session and asserts the instructor manager redirects to /session-ended.
  • Record the lifecycle discovery in .agent/knowledge/repo_discoveries.md for future refactors.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
activities/syncdeck/client/manager/SyncDeckManager.tsx Wires attachSessionEndedHandler into the instructor manager’s useResilientWebSocket so session-ended broadcasts redirect the manager.
activities/syncdeck/playwright/instructor-session-ended.spec.ts Adds browser coverage verifying the instructor manager redirects when the session is deleted/ended.
.agent/knowledge/repo_discoveries.md Captures the rationale/expectation that instructors must also attach the shared session-ended handler.
Suppressed comments (1)

activities/syncdeck/playwright/instructor-session-ended.spec.ts:60

  • This test forwards instructorPasscode from an unknown JSON payload into the DELETE call without validating it, and it returns only response.ok on failure. Add a runtime type check + throw with HTTP status to make failures actionable and avoid sending an invalid body.
    const { instructorPasscode } = await passcodeResponse.json() as { instructorPasscode?: unknown }
    const response = await fetch(`/api/syncdeck/${encodeURIComponent(id)}`, {
      method: 'DELETE',
      credentials: 'include',
      headers: { 'Content-Type': 'application/json' },

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread activities/syncdeck/playwright/instructor-session-ended.spec.ts
Comment thread activities/syncdeck/playwright/instructor-session-ended.spec.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@mrbdahlem
mrbdahlem merged commit 5c1f202 into main Aug 1, 2026
17 checks passed
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.

2 participants