Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e023a7c78c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (!sessionMatches && !runMatches) { | ||
| return; |
There was a problem hiding this comment.
Scope chat event handling to the selected session
This new gate accepts events when runId matches even if sessionKey does not, so switching to another session while a run is still in flight causes the old run's partial/final updates to mutate the currently viewed chat state (and trigger loadChatHistory() for the wrong session). The previous behavior dropped cross-session events; now content from session A can briefly appear in session B. Keep runId matching only for clearing run flags, and require sessionKey to match before appending/streaming messages.
Useful? React with 👍 / 👎.
WIP