Repository navigation
perf(terminal): release hidden parked workspaces' terminals and layouts so memory stays flat - #45956
Conversation
…ives under its id
…s that can never park
…perseded capability retries
…mpty split panes mounted
a3ec07d to
5913a8c
Compare
…ies, index settled and release checks, keep strip scroll through hidden prewarm
…-ask and keep tab-strip offsets until their group closes
…wer instead of polling
…e live local re-probe on tab-strip remount
… offsets of closed groups, cap capability reuse at the re-probe ceiling
…eturning from a released layout
… shared capability answer, as a retained strip did
Perf scan (fresh perf reviewer) on a3ef93aPerformance scan complete; no introduced P0/P1 findings. FindingsNone. Static verdict: clean. The change releases eligible hidden layouts without adding recurring idle polling or fleet-wide expensive derivation on status updates. Compared Coverage: trigger, population, boundNotation: W = workspaces; M = mounted workspace shells; Tᵥ/Gᵥ/Pᵥ = tabs/groups/panes in one workspace; R = revived PTYs awaiting an answer; S = accepted app-store writes/second. Examined W = 1,900 and 10× = 19,000. Actual S was not measured; examples use S = 2, consistent with the supplied hook workload exceeding 1/s.
The newly reached main-process capability handler, Listener and selector censusLayout selectorThe added selector at TerminalWorktreeSplitSurface.tsx:51 has one production consumer: each
Scroll and resize listeners
Every consumer of the strip’s restored/native scroll event at head is:
Thus 3–5 scroll callbacks per event, local to the scrolled strip. The new callback adds one property read, no store write. Restoration dispatches at most one synthetic scroll event per saved offset; a native scroll event may also follow. Windowing coalesces its update through one pending animation frame. The existing shared resize subscribers are the windowed-strip range and indicator thumb. Existing strip ResizeObserver/MutationObserver registrations, the new pending-restoration observer, and scroll listeners all disconnect on teardown. Idle and unrelated status updates cause 0 scroll callbacks/s. Windows capability subscribersAll production hook-call sites at head, including unchanged files:
Each enabled instance registers one callback in its host-owner bucket. Disabled instances register none. Cleanup removes the exact callback and deletes empty buckets. Hook/status store writes produce 0 capability publications/s; a completed capability load publishes once to that owner’s enabled consumers. The existing reprobe runner is shared by owner, with one shared window-focus listener. Releasing one strip does not stop surviving consumers. I verified the requested base comparison: a returning strip previously remained mounted and retained the shared answer. Reusing cached answers on return preserves that behavior; new mounts retain base’s TTL semantics. Capability publications and parking subscribersThe new publication route reaches all these unchanged consumers:
PTY reverse indexes select affected workspace buckets. A publication for one PTY does not broadcast a parking invalidation to all 1,900 workspaces. Ordinary status writes that change no parking input produce 0 parking notifications; changed capability answers notify their addressed owners. The unchanged bound-PTY store selector has one production owner. It runs on store writes, uses addressed record transitions, and preserves array identity when PTY membership is unchanged; a type-import relocation does not change this behavior. Watchers newly reached through parking
At idle these event-driven watchers receive 0 events/s. Under load, work follows the addressed PTY’s facts, bytes or exit—not W × event rate. Reveal/close/exit disposes registrations; replacement registration prevents duplicate parked byte watchers. Timers and idle wakeups
Base cached false had no timed recovery path. Returning unresolved revived IDs to that same mounted, settled-false state therefore loses no base recovery mechanism. Originally unknown IDs retain their existing recovery path. Regression classes touched
Pre-existing aggregate work remains: Six questions
Residual validation limits: actual renderer CPU, switching frame gaps, xterm disposal, post-GC memory, and adverse-host IPC timings were not measured under the requested read-only restriction. The added tests were inspected only; they cover settled split eligibility and successful revived capability recovery, not fleet-scale timing. |
Perf scan (fresh perf reviewer) on c0a7453Review complete; one P1 blocks this head. FindingsP1 — The returning-strip cache exception survives a host changeIntroduced at windows-terminal-capabilities.ts:243, with the flag latched at use-tab-bar-runtime-model.ts:149.
A reachable sequence is:
For a remote owner, no local re-probe runner repairs this. A previously unavailable shell can therefore remain missing until another consumer explicitly reloads that host. Trigger / population / bound: One owner transition on a previously returned strip; potentially every such strip among 1,900 workspaces, or 19,000 at the growth target. Base performs one deduplicated TTL load for the new owner; head performs zero and can retain stale output indefinitely. This is P1 for a user-visible freshness regression, not a measured CPU regression. Source evidence: Required correction: Tie the exception to the specific owner whose strip was released, and preserve normal TTL loading when that owner changes. Proving check, not executed: Mount a returning strip for host A; retain an expired negative answer for remote host B; change the strip’s owner to B. Assert one deduplicated B load and publication of its current answer. Control: returning to unchanged host A should reuse its answer without a TTL load. Coverage and work accountingCompared Notation: N mounted workspace surfaces; T/G/L tabs, groups, and terminal leaves in an affected workspace; P inventory PTYs; R revived negative-capability IDs; H capability host owners; W root-store publications/second.
The newly reached main capability inspection validates at most 512 IDs and queries provider metadata. The daemon authority check uses protocol support and For a simultaneous cohort, revived recovery sends at most Listener and selector censusRates below are source-derived. Actual W was not measured. Hook status arriving more than once/second does not establish one root-store write per event: accepted updates can be batched, and title updates can add writes.
Pre-existing amplification: Timer accounting
Verified against base: restored IDs answered false had no timer or automatic re-ask. Exhausted revived IDs return to that same parking result and quiet state. The change does not remove base recovery for genuine unknown IDs. Regression classes touched
Nonblocking notes: the 8,192-entry scroll cap can evict an older live strip’s remembered offset at the 10× population. Hold cleanup is opportunistic, so deleted released groups may retain small records until later additions. Neither is claimed as immediate teardown. Six scan questions
The four added test files were inspected, not executed. No runtime speed, memory reduction, or platform-QA result is asserted. The referenced terminal-session-reliability skill was unavailable at the supplied sibling location; terminal correctness controls were traced directly in source. |
Review status for c0a7453Problem: every visited workspace stayed mounted for the session (xterms, listeners, tab-group layout), so renderer memory grew with workspaces visited. User-facing change: none on screen. Hidden workspaces whose terminals are parked release their terminal views and layout, and come back in the same state on return. Reviews on this head
Open: shell-capability reuse on a returning tab strip (perf P1, both sides)
Fixed in the last rounds: an open quick-command dialog's unsaved text kept the layout from being released (data loss); revived capability re-asks are now counted per id; live capability owners are never trimmed. Notes (below the blocker bar)
Verified Restore on a released workspace: the running shell loop kept all 215 lines (ready in 486 ms), and the unsent chat draft was kept. remote-check ( |
…only for the host it returned with
…eep agent detection's observed hosts across a remount
…n't initialise it first
…e's simulator and browser overlays unmounted
…mulator and browser overlays unmounted Replaces the per-store-write tab scan: admission marks its restriction drained when only unbound restored tabs remain, so over-cap restrictions keep base behaviour.
…s restriction drained
…ps write addressed
…rkspace's layout release
…ly on the same host; tidy observed-host and hold lifetimes - Comparing the held owner key keeps a host-changed return on the normal TTL load. - Agent detection resolves its group's observed-host set once per group, not per render. - A capability hold left by a dependency change on a still-mounted strip is dropped when probing turns off.
FindingsNo blocking regression found in The previous different-host capability finding is resolved. The returning strip compares its held owner with its current owner in use-tab-bar-runtime-model.ts:
Nonblocking notes:
Coverage and work boundsEvidence is source inspection and base/head comparison, not runtime measurement. HEAD was verified. No files were edited, and no builds, typechecks or test suites were run. The added test assertions were inspected, not executed. Population notation:
All changed runtime work is in the renderer unless otherwise identified.
The newly reached main-process capability handler validates at most 512 IDs and checks provider metadata. The daemon adapter’s authority check reads protocol support and Listener and selector census at headCounts below include unchanged production consumers of the changed hooks.
For genuine quiescence, subscription callbacks are zero/second. If existing background activity writes the store at Group-state retirement and unannotated writersAt tab-group-scoped-state.ts:25:
Production fallback writers found:
Initial empty state is also unannotated. Normal focus, create, close, move, split, drag-preview, rename, reconciliation, editor-owner and teardown writers use addressed replacements/drafts. Mirror The fallback is a bounded structural-update cost, not a new all-workspace traversal on every hook-status update. Overlay retention against baseFor plans within the four-tab admission limit, base eventually admitted unbound restored tabs and drained the restriction. Head avoids mounting those empty terminals but marks the restriction drained, restoring the same hidden browser/emulator overlay admission. Pruning/widening preserves that mark. For over-cap plans, admission still exits before marking drained. Their hidden overlay restrictions remain as on base. The new gate therefore does not retain additional simulator/browser overlays for those workspaces. Timers and idle wakeups
Base’s startup Regression classes touched
Six questions
Runtime frame latency, retained heap and native host behavior remain unmeasured under the requested read-only scope. No source-proven blocking amplification remains unresolved. |
Review status for 9ed2ec7Problem: every visited workspace stayed mounted for the session (xterms, listeners, tab-group layout), so renderer memory grew with workspaces visited. User-facing change: none on screen. Hidden workspaces whose terminals are parked release their terminal views and layout, and come back in the same state on return. Reviews on the final code (
Fixed since the last status
Mount effects in TabBar / TabGroupPanel, decided one by one
Intended, recorded with reviewers' agreement
Notes (below the blocker bar)
Verified Restore on a released workspace: the running shell loop kept all 213 lines (ready in 494 ms), and the unsent chat draft was kept. An earlier variant that kept the tab-group chrome mounted and released only terminal views kept about a third of the heap and PSS saving, so the layout release stays. |
…he registry doesn't import it (dependency cycle)
|
Findings No must-fix regression found against Confirmed:
Evidence is source inspection and base/head comparison. No files were edited; no builds, typechecks, tests, benchmarks, or app launches were run. Timing, CPU, heap reduction, and rendered restoration were not measured. Coverage and work accounting All 37 runtime files in the requested marker, the five added test files, and the compiler-baseline deletion were inspected. The test assertions were read, not executed. Notation:
The parking safety chain remains intact: settled-spawn status alone does not authorize unmounting. Existing pane coverage, restore-policy, provider capability, capture, portal, measurement and cooldown gates still apply. Listener census and rates Let
Windows capability consumers at head are Agent detection’s non-menu consumers are
Only the tab-bar controller supplies the new persistent observation group. Other consumers retain mount-local behavior. The new surface selector is measurable subscription overhead, but its body does not scale with inventory size. Conversely, released layouts remove their existing per-group subtree subscriptions and DOM observers. No measured net CPU claim is made. Group retirement and writer provenance Retirement’s reference gate and addressed traversal are installed once by the store-creation loop. Registry creation does not install additional subscriptions, and the module no longer imports the store. For one local tab activation, Writers without addressed group provenance are:
Local create, close, focus, move, drop, split, label, reconciliation, rename, teardown and editor-owner migration paths inspected use addressed replacements/drafts. A full-resync fallback enumerates up to three remembered-workspace lists and compares the union’s buckets: at most 5,700 enumerated keys plus 1,900 bucket checks in the stated case; 57,000 plus 19,000 at 10×. Only changed buckets undergo group retirement. This is a bounded note: host mirrors can exercise it on real group changes, but equal groups preserve identity, so ordinary hook-status frames do not trigger it. Timers and recovery comparison The revived retry owner adds the only new timer mechanism.
For 300 revived IDs, the fixed-cohort maximum is eight capability RPCs; for 3,000, 48. A 1,900-ID stress cohort needs at most 32; 19,000 IDs need at most 304. These are transient totals, not recurring rates. Base’s cached false answer has no retry/recovery timer. Head’s exhaustion restores that same false state and deletes retry debt. Originally unknown IDs retain base’s slow recovery path. Explicit refresh remains available, and a later attach can re-ask a settled-false revived ID. No recovery path that base possessed was found removed. An already-armed synchronization timeout can perform a final no-op check after settlement; it cannot sustain periodic wakeups once retry debt is empty. Returning strips and hidden overlays The held-owner comparison compares the saved owner key with the newly resolved owner before enabling reuse. The hook also clears reuse after an owner change. Therefore:
Cache storage can exceed 32 for live subscribers/holds. Holds retire with groups; unused cached answers are pruned/trimmed on subsequent loads/publications. Owner-cache traversal is bounded lifecycle work, not status-write work. Admission’s drained mark lets browser/emulator gates recognize completed warming even when unbound restored tabs remain deferred. Pruning/widening carries the mark; a fresh activation plan gets a fresh identity. Over-cap plans never reach the marking callback. Browser paint retention remains an independent override. The added per-render gate is one WeakSet lookup; no per-write traversal was added. Regression classes touched
Six questions
|
Review status for 2298323Problem: every visited workspace stayed mounted for the session (xterms, listeners, tab-group layout), so renderer memory grew with workspaces visited. User-facing change: none on screen. Hidden workspaces whose terminals are parked release their terminal views and layout, and come back in the same state on return. Reviews on the final code (
Fixed since the last status
Mount effects in TabBar / TabGroupPanel, decided one by one
Intended, recorded with reviewers' agreement
Notes (below the blocker bar)
Verified Restore on a released workspace: the running shell loop kept all 213 lines (ready in 590 ms), and the unsent chat draft was kept. An earlier variant that kept the tab-group chrome mounted and released only terminal views kept about a third of the heap and PSS saving, so the layout release stays. |
|
Findings No must-fix regression found in The previous different-host capability finding is resolved. Same-owner returns reuse the shared answer; different-owner returns use the normal TTL load. The latest commit installs group-state retirement once through the store’s installer list without changing its retirement algorithm. This is a source-based review. No files were edited, and no builds, typechecks, tests, benchmarks, or application runs were performed. Counts below are derived from production code, not measured CPU, latency, or heap results. Coverage and workload Reviewed all 43 changed files, including test assertions and compiler-baseline changes, plus unchanged consumers, publishers, store writers, parking watchers, capability readers, and main-process capability handlers. For pricing:
The newly reached main-process capability handler validates at most 512 IDs and returns metadata. It does not capture scrollback, list every session, read history, or spawn a child process. Local authority ultimately checks adapter capability plus active-session membership ( Subscription, selector, and listener census
Windows-hook census, including unchanged consumers:
Their existing selector cadence remains store/status driven. Only the tab-bar controller supplies the persistent observation group. Hidden acquisition remains gated, and released strips remove their hook instances. Capability-publication census: Group-map writers and retirement pricing The addressed path is verified in The non-addressed/full-resync producers found are:
A resync enumerates remembered workspace keys from three registries: at most The latest installation move preserves those counts and disposal callbacks. Production has one installer invocation; the exported function is not independently idempotent, but no second production caller exists. Timers and idle wakeups
For a simultaneous cohort of Both requested base comparisons hold:
Retention and behavior controls
Regression classes touched
Pre-existing costs retained in this span include Zustand’s selector dispatch per accepted store write, whole-inventory synchronization on membership/retry work, deadline-minimum scans, and conservative full-resync retirement. None becomes a new fleet scan on each hook-status update. Six scan questions
Residual validation gaps are runtime switch-frame latency, actual heap/xterm release, native Windows/SSH timing, and rendered restore behavior. Added test assertions were inspected but not executed. The referenced terminal-session-reliability skill was unavailable in the searched skill roots; relevant binding, capture, coverage and retention code was inspected directly. |
Review status for 2298323Problem: every visited workspace stayed mounted for the session (xterms, listeners, tab-group layout), so renderer memory grew with workspaces visited. User-facing change: none on screen. Hidden workspaces whose terminals are parked release their terminal views and layout, and come back in the same state on return. Reviews on the final code (
Fixed since the last status
Mount effects in TabBar / TabGroupPanel, decided one by one
Intended, recorded with reviewers' agreement
Notes (below the blocker bar)
Verified Restore on a released workspace: the running shell loop kept all 213 lines (ready in 590 ms), and the unsent chat draft was kept. An earlier variant that kept the tab-group chrome mounted and released only terminal views kept about a third of the heap and PSS saving, so the layout release stays. |
…e-surface-release # Conflicts: # src/renderer/src/components/tab-bar/TabBar.tsx
…s its workspace's layout mounted while open
|
Findings No P0/P1 regression found against This is a source-based assessment. No files were edited; no builds, typechecks, test suites, or runtime profiling were run. Counts below are derived from production code, not measured CPU, latency, or heap results. Coverage and work bounds Population notation: W = mounted workspace surfaces, G = open groups, Tᵥ/Lᵥ = tabs/pane bindings in the affected workspace, P = inventoried PTYs, H = capability host owners, S = actual store writes/second. The requested large case uses W = 1,900; growth case W = 19,000. Terminal and host populations are scaled separately.
The added Subscription, selector, and listener census Rates are source-derived. A quiet store has S=0; background status can make S>0 even when the user is idle. Since runtime sampling was prohibited, actual S is not claimed. At S=2 writes/s—a concrete load above one status update/s—the following multiplications apply.
store-observer-installers.ts:14 lists retirement once; Addressed versus resync group writes Ordinary activation uses The non-addressed production funnels are:
For resync, retirement collects at most three registries’ remembered workspace keys—≤5,700 at W=1,900, ≤57,000 at 10×—deduplicates them, then skips unchanged group-array references. Actual changed workspaces visit their saved group entries. Status-only mirror updates preserve group identity through group equality and do not trigger this scan. Timers and idle wakeups
Base’s startup false remains permanently settled, mounted, with no retry. Head reopens only that negative answer after binding and eventually returns an unanswered ID to false, clearing retry metadata. It therefore adds finite recovery work without losing a base recovery route or adding a permanent five-minute retry for those IDs. Windows owner fix and merged condensing windows-terminal-capability-holds.ts:35 compares the held owner with the resolved owner. Same-owner returning strips reuse the shared answer; a different owner follows the normal TTL/in-flight load. New mounts also retain the 30-second TTL behavior. A mounted owner change clears reuse eligibility. The previous owner-mismatch finding is resolved. Both scroll memory and condensing remain in Note, not blocker: the condense sliding-window ref is not preserved across release, so neighboring icons can differ after return. Base also replans when a hidden strip measures zero width; it does not guarantee unchanged neighboring membership across that transition. I found no lost active tab or new persistent work. Visual timing/flicker remains unmeasured. Drained restriction identity uses a WeakSet. Pruning/widening replacements carry the mark; fresh plans do not inherit it. Small plans containing only unbound restored tabs regain browser/emulator overlay eligibility as base did after draining. Over-cap plans never receive this mark, preserving base’s restricted hidden-overlay behavior. Browser paint demand still overrides its mount gate; simulator tabs prevent layout release. Regression classes touched
Six scan questions
|
Review status for aaba360 (main merged)Main merged into the branch as Reviews on the merge
QA: neither the conflict nor the fix touches parking or the release/remount logic, so the soak on |
…ts so memory stays flat (#45956) * perf(terminal): release hidden parked workspace surfaces * perf(terminal): keep chat overlays mounted when releasing a parked workspace * perf(terminal): keep workspaces with plugin editor frames mounted * perf(terminal): release only layouts whose active tabs draw outside them * perf(terminal): derive release eligibility from identity-stable tab selections * chore: drop unrelated lockfile churn * fix(terminal): park restored hidden terminals once every pane has a live PTY * fix(terminal): re-ask snapshot capability when a restored session revives under its id * fix(terminal): keep idle admission from mounting unbound restored tabs that can never park * fix(terminal): keep restored chat-view terminals unparked and drop superseded capability retries * fix(terminal): coalesce revived-session capability re-asks and keep empty split panes mounted * fix(terminal): stop the revived re-ask once its own sessions are answered * fix(tab-bar): keep each group's tab-strip scroll across a released layout * perf(terminal): ask only revived ids once at a time with bounded retries, index settled and release checks, keep strip scroll through hidden prewarm * fix(terminal): keep unanswered revived ids on the inventory's slow re-ask and keep tab-strip offsets until their group closes * fix(terminal): hand unanswered revived ids to the inventory loop and wake it * fix(terminal): settle unanswered revived ids back to their cached answer instead of polling * fix(tab-bar): remember a tab strip scrolled to its start * fix(terminal): clear an id's unknown retry when its revived answer settles * fix(tab-bar): sync strip navigation with a restored offset before its resize pass * perf(terminal): skip backoff for answered capability ids and reuse the live local re-probe on tab-strip remount * docs(terminal): unbound restored tabs now wait until shown * perf(terminal): key release eligibility on tab membership, drop strip offsets of closed groups, cap capability reuse at the re-probe ceiling * refactor(terminal): move released-layout eligibility into its own module * fix(terminal): reuse a recent capability answer only for tab strips returning from a released layout * fix(terminal): a tab strip returning from a released layout reads the shared capability answer, as a retained strip did * fix(terminal): settle restored splits by every layout leaf; returning strips reload after a failed capability probe * perf(terminal): keep a host's shell-capability answer while a released tab strip holds it * perf(terminal): released strips' hosts survive the capability cache cap; holds are scoped to live groups * fix(terminal): keep layouts with an open quick-command editor, count revived re-asks per id, never trim live capability owners * fix(terminal): a returning strip reuses the cached capability answer only for the host it returned with * fix(terminal): dispose released strips' state with their tab group; keep agent detection's observed hosts across a remount * test(terminal): hoist the capability read mock so the store import can't initialise it first * fix(terminal): unbound restored tabs no longer hold a hidden workspace's simulator and browser overlays unmounted * fix(terminal): a drained activation admission stops holding hidden simulator and browser overlays unmounted Replaces the per-store-write tab scan: admission marks its restriction drained when only unbound restored tabs remain, so over-cap restrictions keep base behaviour. * fix(terminal): pruning a closed tab keeps a drained admission's restriction drained * fix(terminal): a targeted background mount keeps a drained admission's restriction drained * fix(terminal): a partial reveal keeps a drained admission's restriction drained * perf(terminal): retire tab-group state only for the workspaces a groups write addressed * fix(terminal): closing a quick-command dialog re-checks its hidden workspace's layout release * fix(terminal): a returning strip reuses its held capability answer only on the same host; tidy observed-host and hold lifetimes - Comparing the held owner key keeps a host-changed return on the normal TTL load. - Agent detection resolves its group's observed-host set once per group, not per render. - A capability hold left by a dependency change on a still-mounted strip is dropped when probing turns off. * chore(terminal): record useDetectedAgents' react-compiler bailouts dropping to 0 * fix(terminal): install tab-group state retirement from the store so the registry doesn't import it (dependency cycle) * fix(terminal): the folded pane-actions quick-command editor also keeps its workspace's layout mounted while open
ELI5
Every workspace you opened stayed fully loaded in the background for the rest of the session, even when you couldn't see it. So the more workspaces you visited, the more memory Orca used. Now a hidden workspace whose terminals are already asleep also puts away its tab bars and layout, and rebuilds them when you come back. Your running commands keep running, and the terminal output, unsent drafts and tab positions are all there when you return.
What Changed
Before: each visited workspace kept its terminal views (an xterm each, with ~270 listeners) and its whole tab-group layout mounted for the session. Terminal parking existed but never applied to restored terminals, so it didn't help.
After: a hidden workspace that has been ordinarily parked releases its terminal views and its tab-group layout. On return (or hover prewarm) the layout remounts from store state and terminals restore from their parking snapshot. PTYs are never touched.
Mechanism:
pendingActivationSpawnis kept as sort metadata after a reattach, and parking read it as "spawn still pending". A tab now counts as settled once every pane has a live PTY (isTerminalActivationSpawnSettled). Manual and automatic parking share the rule. Terminals shown as chat keep their previous behavior.WorktreeSplitSurfaceunmountsTabGroupSplitLayoutand the session drop target only when the workspace is hidden and ordinarily parked, has no browser pages or simulator tabs, and every group's active tab is a terminal, structured chat or room (all drawn outside the layout). An active editor or an empty group's landing picker keeps the layout mounted. Terminal and chat overlays stay mounted, so watchers, bells, titles, exits and chat state are unchanged.Why
Per-workspace renderer state should not grow with how many workspaces you visited in a session. Releasing what is off screen and rebuilding it from store state keeps memory bounded. The alternative was a fixed number of recent workspaces mounted. That still pays for terminals and layouts nobody is looking at, and it duplicates the parking policy that already decides which hidden terminals can sleep safely. This PR reuses that policy, so only workspaces that parking already considers safe are released.
Linked Issue
Internal (app memory: flat renderer as workspaces are visited).
Visual Proof
N/A. Nothing on screen changes; a returning workspace looks the same. Proof is the memory and restore benchmark below.
Testing
Benchmark on the fleet profile on Linux (1,800 worktrees + 100 folders, 1,800 chats, 200 terminals). It visits 150 workspaces one at a time with 2 streamed chat turns each, then runs return probes. Measured after GC. Main is the base
2284cb2; the head build's source tree is identical to the PR head.What still grows here is chat views: on this branch every visited chat stays mounted (150 at the end). The separate chat-view cap (#45916) bounds those. The two together are what make the renderer flat.
Restore checks on a released workspace:
Unit tests:
settled-activation-spawn.test.ts(restored splits park only when every pane is live),terminal-provider-snapshot-capability.test.ts(a revived session becomes parkable),tab-group-scoped-state.test.ts(per-group state is disposed with its group or workspace),windows-terminal-capabilities.test.ts(a released strip's host answer survives cache expiry and the owner cap) andreleased-layout-eligibility.test.ts(an open quick-command dialog keeps its unsaved text). Platforms: Linux end to end. macOS, Windows and SSH/paired hosts by code review of the platform-specific paths: Windows shell capabilities, remote parking capture, paired-runtime gates.Performance
Reduces work: hidden parked workspaces drop their xterms, layout subscriptions and listeners.
A fresh perf scan on the head is in the comments.
Risk
Level: Medium. The riskiest part is restoring a released workspace. If a view that lives inside the layout were wrongly released, a user would see it rebuilt on return and lose its in-view state (for example an editor's scroll). The allowlist keeps editors, browsers, simulators and empty groups mounted. Back out with a plain revert; no saved data or protocol changes.
Visible behavior changes, intended:
Review
Agent skill upstream boundary
Notes
Cross-platform: renderer-only; Windows shell-capability probing keeps its existing owners. Remote/SSH: remote parking keeps its capture and paired-runtime gates. Mobile: unaffected. Folder workspaces: same path as worktrees.