Repository navigation
docs: expand the moderated chat room example - #227
Conversation
|
Warning Review limit reached
Next review available in: 44 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe chat-room example now implements a moderated multi-channel workflow with three participants. It adds deterministic scenario execution, transcript assertions across repeated runs, reliable cleanup, expanded documentation, and explicit separation between Vitest suites and Node application tests. ChangesModerated chat-room workflow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant runScenario
participant createChatApplication
participant Alice
participant Bob
participant Carol
runScenario->>createChatApplication: start application
runScenario->>Alice: connect and join channels
runScenario->>Bob: connect and join channels
runScenario->>Carol: connect and join channels
Alice->>createChatApplication: send channel message
createChatApplication-->>Bob: deliver targeted room message
Bob->>createChatApplication: request announcement
createChatApplication-->>Bob: reject unauthorized request
Carol->>createChatApplication: send moderator announcement
createChatApplication-->>Alice: broadcast announcement
createChatApplication-->>Bob: broadcast announcement
Bob->>runScenario: disconnect
createChatApplication-->>Alice: emit departure notification
runScenario->>createChatApplication: close application
createChatApplication-->>runScenario: return transcript
Possibly related issues
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
2537182 to
8d67272
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@examples/chat-room/app.js`:
- Around line 23-34: Update the join-channel handler to guard both acknowledge
calls with typeof acknowledge === 'function' before invoking them, preserving
the existing accepted and unknown-channel responses when a callback is supplied.
Add tests covering clients with and without acknowledgement callbacks, and
verify completion using a subsequent marker event.
🪄 Autofix
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: CHILL
Plan: Pro Plus
Run ID: 041fed91-1640-4a04-b853-9f6d826d5333
📒 Files selected for processing (9)
examples/chat-room/README.mdexamples/chat-room/app.jsexamples/chat-room/index.jsexamples/chat-room/package.jsonexamples/chat-room/scenario.jsexamples/chat-room/scenario.test.jspackage.jsonvitest.browser.config.tsvitest.config.ts
8d67272 to
44ba8b2
Compare
Summary
examples/chat-roominto a moderated application where Alice, Bob, and Carol joingeneralandsupport, exchange a room message, handle an authorization rejection, receive a multi-room announcement once, and observe Bob's departure.app.js,scenario.js,index.js, andscenario.test.js, with cleanup verified by running the scenario twice in one process.pnpm example:chat-room, preservesmocket: workspace:*, and document how the example combines behavior already covered by the dual-run conformance suite.Related issue
Closes #113
Checklist