* perf(state): stop handler churn on session updates and repeated JSON work
- Shell handlers: AppSideEffects registers ~58 glue callbacks for the Host
islands. Several close over sessions/workspaces/hosts (split/copy/duplicate,
close tabs, delete host, keyboard-interactive, connect...), so every session
status change and host update (connect bursts, last-connected times)
re-notified the bridge and rebuilt all four shell bags, re-rendering AppView
and TopTabs. They are now registered behind per-key stable wrappers that
call the latest implementation (stabilizeAppHandlers); local callbacks and
their effects are unchanged. All registered entries are actions, setters or
refs, never read during render.
- Session actions: moveFocusInWorkspace, copySession and copyWorkspace read
workspaces / orphan sessions / log views through refs at call time (the same
snapshot the closure captured), so they keep a stable identity. Getters read
during render (isBroadcastEnabled, getOrderedWorkTabs, ...) are untouched.
- AI history: the live store was parsed five times when the AI state root
mounted; parseSessionsStore parses once per call (two parses total).
- AI history writes: the synced branch serializes once and reuses the string
for the disk mirror, and rewriting the same immutable sessions array (save
path, then cloud-sync collection) is skipped while storage still holds that
exact write in the same mode.
- Command history: saving after each Enter parsed the whole store (up to 10k
entries) only to read its clear generation, and every other window parsed it
again on the storage event. The generation is now serialized first and read
from the raw string (full parse only to adopt a peer clear), and the
debounced write runs when the renderer is idle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: retrigger CI after cancelled lint-and-test run
Previous lint-and-test was cancelled mid-run.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: binaricat <binaricat@users.noreply.github.com>
Add the Global history clear-all action with confirmation and five-language copy. Clear local shell history, autocomplete and compose recall while preserving drafts, keeping peer windows consistent on clears, and allowing new commands afterwards.
Verified with 116 focused checks, two clean independent final reviews, real Electron multi-window SSH-fixture interaction and restart, current-head Codex review, and both required CI jobs.
Co-authored-by: fyhax1ki <fyhax1ki@gmail.com>