Fix terminal focus on toggle, clean up orphaned terminal state, and revoke optimistic message blob URLs on unmount

- Add setTerminalFocusRequestId call when terminal opens via toggle so the
  terminal panel receives focus automatically
- Call clearTerminalState when deleting threads in the Sidebar and add
  removeOrphanedTerminalStates to prune stale entries after read model sync
- Track optimisticUserMessages via ref and revoke their blob URLs in the
  unmount cleanup effect to prevent memory leaks

Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
32fe80d164Cursor Agent committed on 3/2/2026, 9:13:19 PM· committed by Julius Marmingeparent6e93d42
4 files changedLine totals unavailable