Files
CodePilot/src/components
7418andClaude Opus 4.6 cf14791de0 fix: abort active stream on session switch and warn before closing during streaming
- Add useEffect cleanup to abort in-flight fetch when ChatView unmounts
  (e.g., session switch via key={id} remount). This triggers the existing
  server-side cleanup chain: saves partial message to DB, auto-denies
  pending permissions. Also resets streamingSessionId and
  pendingApprovalSessionId global state to prevent stale UI.

- Add beforeunload handler during streaming to show browser confirmation
  dialog when user attempts to close the window/tab, preventing accidental
  data loss. Listener is automatically removed when streaming ends.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:33:51 +08:00
..