feat(syncdeck): expose Learn session status - #320
Conversation
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR expands the Learn SyncDeck active-status response with a join code and live participant and instructor counts. It adds integration coverage, documents the response contract, and updates development startup instructions and environment handling. ChangesSyncDeck status response
Development startup configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@activities/syncdeck/server/learnIntegration.test.ts`:
- Around line 267-283: Add two participant sockets sharing the same studentId
before invoking the active-status handler, then update the expected
participantCount to 1 while keeping instructorCount at 1. Extend the response
assertions to include activeSessionId, studentLaunchUrl,
connectedParticipantCount, and connectedInstructorCount, using the established
expected values for the created session and connected sockets.
In `@activities/syncdeck/server/learnIntegration.ts`:
- Around line 464-474: Update the response-building flow around countConnections
so participant and instructor counts are derived from the active session state
in session.data.students, using the stored SyncDeck role/state rather than
socket.isInstructor or socket.studentId. Ensure participantCount,
instructorCount, connectedParticipantCount, and connectedInstructorCount all use
these session-derived counts and ignore unrelated active sockets.
In `@package.json`:
- Line 14: Update the package.json dev script to set NODE_ENV cross-platform by
using cross-env before NODE_ENV=dev, ensuring the existing concurrently commands
remain unchanged; if NODE_ENV is not consumed, remove the prefix instead.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 7f0f79ef-58d3-4c3f-9c79-c2ae7e9e81cd
📒 Files selected for processing (6)
.agent/knowledge/data-contracts.md.agent/plans/learn-syncdeck-session-integration.mdREADME.mdactivities/syncdeck/server/learnIntegration.test.tsactivities/syncdeck/server/learnIntegration.tspackage.json
There was a problem hiding this comment.
Pull request overview
Adds additional fields to the Learn→SyncDeck “active session status” response so Learn can display the session join code and live connection counts, while keeping the legacy fields for backward compatibility. Also updates developer docs and the root dev script to support optional .env loading.
Changes:
- Extend Learn status response for active sessions to include
joinCode,participantCount, andinstructorCount(while retaining existing fields). - Add/expand test coverage verifying join code exposure and live connection counting semantics.
- Update developer docs and root
npm run devbehavior to support optional root.envloading.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents npm run dev and optional root .env usage, including HOST/PORT hints for external reachability. |
| package.json | Updates root dev script to load .env via Node before launching client/server concurrently. |
| activities/syncdeck/server/learnIntegration.ts | Adds joinCode, participantCount, instructorCount to the active status JSON payload. |
| activities/syncdeck/server/learnIntegration.test.ts | Tests active status includes join code and live participant/instructor counts (with participant de-dupe). |
| .agent/plans/learn-syncdeck-session-integration.md | Updates documented active status shape/semantics to include new fields. |
| .agent/knowledge/data-contracts.md | Records the new status-response compatibility contract and semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit
New Features
Documentation
Tests