Repository navigation
test: cover stale conversation switching - #18211
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded ChangesSingleChatBox hydration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds regression coverage for stale conversation switching without changing production behavior, so no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Poem
🚥 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 |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
Add focused frontend regression coverage for stale conversation messages during chat session switching.
Why
When the URL already points to a newly created conversation while the child still receives the previous conversation prop, the old messages must not be hydrated into the new session. This reproduces the race fixed by #18140.
The production guard is already present on
main; this PR adds the missing component-level regression test.Validation
npm test -- --runInBand src/pages/next-chats/chat/chat-box/single-chat-box.test.tsxnpx oxfmt --check src/pages/next-chats/chat/chat-box/single-chat-box.test.tsxnpx oxlint src/pages/next-chats/chat/chat-box/single-chat-box.test.tsxRelated: #18140.
Replaces #18208.