cwdOf() resolves the session cwd for all twelve /sidebar routes. On a
detached session every call runs one host observation — the whole log read
plus decode — and the host's cold cache only helps AFTER a read completes,
so a session-switch burst decoded the same multi-MB log N times in parallel
(0.28.0: 39 MB × 44 requests ≈ 1.7 GB, OOM). Concurrent asks for the same
session + client cwd hint now share ONE resolution; there is no TTL (the
host already caches completed cold reads by persistence revision), and the
hint stays in the key so different fallbacks never leak across each other.
tests/smoke.spec.ts pins 12 concurrent calls → 1 observeSession (red before
this change: expected 12 to be 1) and the per-hint key. The dock-fallback
reserve test now clears localStorage per case — a previous case persisted
bottomOpen and made the new click toggle it closed.
A tab body keys memos and effects off `scope` (the diff pane resolves its
media/html routes from it, the editor restores its preview scroll, the side
chat rebuilds its prose-rewrite cache), but the tab cell built
`{ sessionId, cwd }` fresh on every render. Every such dependency therefore
looked changed whenever the cell re-rendered — which the memo comparator
allows exactly when a COMPARED field moves: `expanded` on a directory toggle,
plus `revealed`, `localeRevision`, `tabsVersion`. The diff preview then
re-ran its whole-document rewrite and its content tab re-issued a whole-file
`fs.read`, flashing its loading row.
`useSessionScope` is now the one place a scope for a component tree is built;
the tab cell, the diff tab, the native tab adapter, and the shell's badge /
rightActions / `+` menu / lifecycle-callback seams all use it. Those last
ones are documented external plug-in surfaces, so a plug-in memoizing on
`scope` stops churning on every unrelated re-render too.
Stabilizing the object removes the only path the diff pane's `content` tab
had to re-read after the file changed on disk, so the header's refresh button
now drives it explicitly (the pane owns the gesture; the loader no longer
leaks its internal counter).
Seven comments asserted that the scope object's identity churns on every
render; that premise is gone, so the ones that still apply say what they
actually guard.
The header toggle bailed out whenever the host's right sidebar was expanded,
so opening that panel first left the bottom workbench unreachable until it was
collapsed again. The session header's utilities seat and the panel's own
Split / Fullscreen / Collapse cluster sit in two different columns, so they
never overlap.
The blank-session fixed fallback keeps its guard: that entry anchors to the
left of the panel controls and would cover panel content while expanded.
tests/bottom-toggle.spec.tsx pins both behaviours.
Background pans, the floating-window title drag and the anchored-popover drag committed on every pointermove, so a high-report-rate mouse re-rendered the tasks canvas at event cadence. Compose the latest position in a ref and commit it through the existing frame batcher; release and cancel flush synchronously. Click suppression still updates per event.
Regression: same-frame 100-move burst commits drop 98 -> 1; full suite 2720 passed.
Replace a failed present card with the generic failed tool row; keep one event-authoritative card whichever of the call and its delivered event lands first.
Use the host's real border token for the delivery card; include the visible description in the file button's accessible name and resolve its title path.
Handle CommonMark angle-delimited image destinations and preserve titles; add transcript, prose-rewrite, and DOM regression tests.
Update the change spec with review-driven acceptance commands, status, and evidence.
Cache markdown label objects by value so MarkdownText's memo survives parent re-renders; pass streaming for unsettled assistant rows.
Rewrite local image destinations in Side Chat prose against the session cwd through the existing /sidebar/file media route.
Map present tool calls and deliverables/presented events to a compact delivery card with thumbnails and the plugin's file-open path.
Add the change spec, exploration notes, and regression tests.
Reset per-gesture travel before node guards so a preceding background pan cannot suppress the next card click. Index and iteratively lay out graph topology, memoize agent card contents, and project complete settled branches under independent existing-settings preferences.
Keep unknown real workflow catalogs and explicitly opened descendant paths visible. Add regression coverage and real rc.1 browser/baseline validation evidence.
A model switch after the last compaction replaces the protected system
prompt with a system/message whose seq sits after the cut but whose
surface slot is the head before the checkpoint. The builder refused that
shape, so every such sidechat copied the parent log in full.
Resolve the single-node replacement chain to its pre-cut anchor using the
checkpoint's recorded shadowed set (not its declared numeric range, which
misclassifies keep-window replacements), carry the latest replacement in
the head slot with the anchor's turn/step scaffolding, and consume the
chain so the keep window and tail never re-emit it. Range replacements,
targets the checkpoint removed, non-system nodes, and broken or forward
chains still fall back to the verbatim copy.
Tests cover a single switch, a two-switch chain, a multi-hop chain whose
intermediate sits inside the declared range but not in the shadowed set,
and a valid range fallback. The trim fixtures fall back on the old code.
Real parent logs now trim (6036->187, 8329->2479, 16458->4359, ...) with
surface equivalence and Session.create acceptance; the previous
35992->3456 trim is unchanged.
Saving re-seats the native tab body (the chip's dirty mark clears, the change
gutter refreshes), and a scroller that is detached from the document comes back
with `scrollTop` 0 — scroll position is carried neither by React state nor by
the DOM node, so the edit surface needed its own memory. The preview already
kept one for the same reason (its save-then-reload collapses the container);
the editor relied on the view never being re-seated, which saving breaks.
Mirror the preview's pattern for the CodeMirror scroller:
- record the position on the scroller's scroll event, keyed per session + path,
with a guard so the restore's own write is not recorded as the user's;
- restore on the save edges (`saving → saved`, the change-gutter refresh, the
mode gate), and after every reveal re-measure moved from #890's family;
- skip when the document fits (no meaningful position) or when the position did
not change.
On top of the upstream `dev` line that already carries #859 and #890.
dev already caps stdout bytes (GIT_OUTPUT_MAX_BYTES) and NUL fields, but
three gaps remain, all proven by the 2026-10-13 host crashes (twice:
RangeError: Invalid string length at the stdout accumulator, a junction-
forest workspace driving 'git status -uall' to gigabytes):
1. no latch after a byte-cap reject — later chunks kept ACCUMULATING on
the retained strings. On Windows spawn('git') resolves to the cmd
shim, whose grandchild survives child.kill() and keeps feeding the
dead accumulator (measured: the orphan outlived kill() by 20+s). The
fieldCapped guard covered only the row cap; the byte cap had none.
2. kill() reaches only the wrapper — the orphaned grandchild needs its
pipes destroyed (EPIPE) to actually stop. killTree() destroys both
streams and is now used by every kill path (timeout, byte cap, field
cap).
3. stderr was uncapped — a command whose DIAGNOSTICS stream past the
budget is as able to kill the host via string length as its answer;
stderr now shares the same maxBytes budget.
Worst case in a pathological workspace is now one failed SCM refresh,
never a dead host.