Skip to content

feat(syncdeck): expose Learn session status - #320

Merged
mrbdahlem merged 3 commits into
mainfrom
learn-status-env-config
Aug 1, 2026
Merged

feat(syncdeck): expose Learn session status#320
mrbdahlem merged 3 commits into
mainfrom
learn-status-env-config

Conversation

@mrbdahlem

@mrbdahlem mrbdahlem commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Active SyncDeck session status now displays the session join code.
    • Live participant and instructor connection counts are included in status information.
    • Existing session status details remain available.
  • Documentation

    • Added development setup guidance, including environment variables and externally accessible server configuration.
  • Tests

    • Expanded coverage for active sessions, join codes, and live connection counts.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 34 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: ec043991-149f-4be7-84fd-cdbdc7c3cc43

📥 Commits

Reviewing files that changed from the base of the PR and between cd257a6 and df681fb.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • activities/syncdeck/server/learnIntegration.test.ts
  • package.json
📝 Walkthrough

Walkthrough

The 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.

Changes

SyncDeck status response

Layer / File(s) Summary
Active status response and validation
activities/syncdeck/server/learnIntegration.ts, activities/syncdeck/server/learnIntegration.test.ts
The active status response now includes joinCode, participantCount, and instructorCount. The integration test verifies these fields after an instructor WebSocket connection.
Status contract documentation
.agent/knowledge/data-contracts.md, .agent/plans/learn-syncdeck-session-integration.md
The data contract and integration plan document the new fields and live connection-count rules.

Development startup configuration

Layer / File(s) Summary
Development command and instructions
package.json, README.md
The dev script loads an optional .env file and uses the local concurrently executable. The README documents environment loading and HOST/PORT settings.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: exposing Learn session status for SyncDeck.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch learn-status-env-config

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.

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

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

📒 Files selected for processing (6)
  • .agent/knowledge/data-contracts.md
  • .agent/plans/learn-syncdeck-session-integration.md
  • README.md
  • activities/syncdeck/server/learnIntegration.test.ts
  • activities/syncdeck/server/learnIntegration.ts
  • package.json

Comment thread activities/syncdeck/server/learnIntegration.test.ts
Comment thread activities/syncdeck/server/learnIntegration.ts
Comment thread package.json 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

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, and instructorCount (while retaining existing fields).
  • Add/expand test coverage verifying join code exposure and live connection counting semantics.
  • Update developer docs and root npm run dev behavior to support optional root .env loading.

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.

Comment thread package.json 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 6 out of 7 changed files in this pull request and generated no new comments.

@mrbdahlem
mrbdahlem merged commit 7c2cddf 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