Files
orca/src
NeilandOrca 3b4dc246d8 fix(terminal): evict lastCompletionIdentityByPaneKey on genuine pane teardown (#5822)
dispatchCompletion writes a per-paneKey entry into the module-scoped
lastCompletionIdentityByPaneKey on every completion. paneKey is a
never-reused ${tabId}:${leafUUID}. The map is module-scoped so it survives
a live-stream remount (dispose-then-recreate, isLive() still true), but
dispose never evicted it, so genuine teardown (PTY gone) leaked one entry
per closed pane.

Evict in dispose only when !options.isLive() — the same discriminator the
cross-remount dedup tests rely on (remount disposes with isLive() true).

Regression test fails before the fix (identity survives teardown, 200 leak)
and passes after; the existing cross-remount dedup suite still passes.

Co-authored-by: Orca <help@stably.ai>
2026-06-19 12:34:50 -07:00
..