You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(ipc): gate session:screen delivery on renderer interest and split the picker onto its own channel #762
session:screen is 93% of recorded IPC bytes (recording g00000190: 16,728 frames × 8.8 KB = 158 MB / 123 min) and arrives 6–10×/s per thinking session, yet the live UI reads only picker (TileLeaf.tsx:970) and the Enter-baseline latestScreenRef (useComposerKeybinds.ts:233,321, claudePaste.ts:155-162). runtime.screen/recentScreen/*Markdown are consumed only by ReaderView's fallback, DebugPanel/DevDebug and saveDebugBundle. Every frame is still structured-cloned, dispatched, committed via setRuntimes (new map identity → whole-tree re-render, see the selectors issue) and stringified by the recorder. Routing is per owning window, never per visible/attached/focused session (sendToSessionWindow, windowRegistry.ts): terminal-mode panes, hidden tiled tabs, Reader-hidden sessions and background grid tabs all receive full frames.
Expected
Renderer declares per-session interest: none (terminal-mode / hidden / background), picker (visible feed panes), full (a lease while ReaderView live mode, DebugPanel, paste-confirm or the Enter-baseline capture need the text). Forwarder sends full frames only for full, a tiny session:picker message only when the picker state changes, nothing otherwise.
Enter-baseline and paste-confirm take a lease before they need the screen or call a new session:get-screen invoke; they must never observe a stale screen.
The headless snapshot in main is NOT throttled or gated (condition parsers, prompt gate, permission/trust/resume detection run on every raw frame for every session). Only the IPC forward is gated.
Minimal first step (≤1 day): renderer tells main "terminal-mode or hidden" → forwarder skips session:screen for those sessions (excluding Reader-visible ones); picker split onto its own channel on change.
Impact
Estimated −90–99% screen messages, −90% recorder bytes, −60–100 setRuntimes/s in a 10-session workspace, −~1 MB/s main-thread serialisation.
Queued as the next isolated implementation increment after #808 and #810; no screen-interest code changed in either PR. Current-source review confirms that raw main snapshots must continue feeding readiness/condition parsing, and that terminal/hidden-to-feed or Reader transitions need an explicit fresh snapshot even when an idle backend emits nothing. Enter/paste baseline capture must wait for or independently acquire that fresh state. I will keep renderer forwarding policy separate from lifecycle/readiness and from A6 remote buffering work (#804/#805). The historical percentage estimates above are not newly measured results.
Activity
Juliusolsson05 commentedon Sep 5, 2026
Queued as the next isolated implementation increment after #808 and #810; no screen-interest code changed in either PR. Current-source review confirms that raw main snapshots must continue feeding readiness/condition parsing, and that terminal/hidden-to-feed or Reader transitions need an explicit fresh snapshot even when an idle backend emits nothing. Enter/paste baseline capture must wait for or independently acquire that fresh state. I will keep renderer forwarding policy separate from lifecycle/readiness and from A6 remote buffering work (#804/#805). The historical percentage estimates above are not newly measured results.
fix(ipc): #762 review — same-document guard, bundle seam tests, dead …
fix(ipc): #762 review round 2 — key screen leases to the document, pi…