Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis change consistently attaches Changes
Sequence DiagramsequenceDiagram
actor User
participant ChatInterface as ChatInterface (Client)
participant WebSocket as WebSocket
participant Server as Server (claude-sdk / cursor-cli / openai-codex)
User->>ChatInterface: Start new chat / switch session
ChatInterface->>ChatInterface: set pendingViewSessionRef
ChatInterface->>WebSocket: emit session init / subscribe
WebSocket->>Server: init received
Server->>Server: capture sessionId
Server->>WebSocket: send claude-response / token-budget / error (+ sessionId)
WebSocket->>ChatInterface: deliver message (+ sessionId)
ChatInterface->>ChatInterface: isSystemInitForView? / match pendingViewSessionRef
alt Message matches current view
ChatInterface->>ChatInterface: apply updates, clear pendingViewSessionRef
ChatInterface->>User: render content
else Message for background session
ChatInterface->>ChatInterface: route to background handler (no view streaming)
end
User->>ChatInterface: switch away
ChatInterface->>ChatInterface: resetStreamingState(), reset UI state
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~28 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
This fixes an issue with streaming response to another session when clicking another session while the current session is still not finished.
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.