Inject shared chat mode notices - #26
Conversation
📝 WalkthroughWalkthroughThe PR updates ChangesCollaboration-mode notice injection
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/multiplexer/session-runtime-core.test.ts (1)
206-260: ⚡ Quick winConsider adding test coverage for single→multi transition and shareId switching.
The current test validates multi→multi(dedupe)→single, which covers the core functionality. To ensure robustness, consider adding test cases for:
- single→multi transition: Start in single mode then upgrade to multi mode to verify the upgrade notice.
- ShareId switching: Write with share_A→share_B→share_A to confirm the deduping behavior when switching conversation contexts.
These additions would validate edge cases but are not critical for the current implementation.
🤖 Prompt for 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. In `@src/multiplexer/session-runtime-core.test.ts` around lines 206 - 260, Add two focused test cases in session-runtime-core.test.ts: one for single→multi transition and one for shareId switching. For the single→multi test, use writeAgentInput to send an initial message with mode "single" (e.g., client-1), then send another with mode "multi" and the same shareId (e.g., client-2) and assert writes contains the "Aimux collaboration note" upgrade message and both messages are recorded via readSessionMessages with correct chatMode values. For the shareId switching test, call writeAgentInput with shareId "share_A", then "share_B", then "share_A" again and assert writes and readSessionMessages reflect deduping/notice behavior when switching shareId (verify messages keep correct shareId fields and ordering). Use the existing helpers writeAgentInput, readSessionMessages and the writes array and expect(...) assertions to mirror the style of the surrounding tests.
🤖 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.
Nitpick comments:
In `@src/multiplexer/session-runtime-core.test.ts`:
- Around line 206-260: Add two focused test cases in
session-runtime-core.test.ts: one for single→multi transition and one for
shareId switching. For the single→multi test, use writeAgentInput to send an
initial message with mode "single" (e.g., client-1), then send another with mode
"multi" and the same shareId (e.g., client-2) and assert writes contains the
"Aimux collaboration note" upgrade message and both messages are recorded via
readSessionMessages with correct chatMode values. For the shareId switching
test, call writeAgentInput with shareId "share_A", then "share_B", then
"share_A" again and assert writes and readSessionMessages reflect
deduping/notice behavior when switching shareId (verify messages keep correct
shareId fields and ordering). Use the existing helpers writeAgentInput,
readSessionMessages and the writes array and expect(...) assertions to mirror
the style of the surrounding tests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c7b9e1c1-ba59-44e6-bfb8-7f5c3e250d97
📒 Files selected for processing (2)
src/multiplexer/session-runtime-core.test.tssrc/multiplexer/session-runtime-core.ts
Summary
Verification
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests