mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-12 13:52:15 +00:00
Adversarial-review follow-up to the S2 slice. The S1 rule froze ALL window recomputes while renderer.getSelection()?.isActive — but a finished mouse selection persists by design (boundary/renderer.ts keeps the highlight so Ctrl+C can re-copy), so a long streaming turn behind a lingering highlight ballooned the mounted set exactly like pre-windowing (and permanently ratcheted the Yoga-WASM high-water). Refinement: - full freeze only while selection.isDragging (the native walk touches the live tree on every drag update — destroying a row mid-walk corrupts the highlight; unchanged from S1 where it matters), - a finished highlight instead PINS the rows containing selection.selectedRenderables (parent-climb to the row wrapper via a WeakMap) as neverWindow — the highlight and a later Ctrl+C copy stay byte-exact while everything else keeps windowing, - an active highlight counts as activity (no idle measure churn under it). Test (headless mock-mouse drag): finished selection persists (isActive, !isDragging) → 300-row burst keeps peakMounted < 120 AND getSelectedText() returns the identical text afterward, the selected rows having been pinned while long scrolled past the margin. Verified on this build: gate digest otui-capped d5e9558583159eac… (2/2), mem2000 otui-capped windowing-ON vmhwm 312MB (target ≤ 350), scroll2000 otui-capped p50 2.0ms / p99 6.0ms (gate ≤ 17ms). check exit 0 (648 tests). Review verdicts on the remaining findings (verified against core source): - "scrollTop compensation race": rejected — scrollTop is an imperative scrollbar property (no signal staleness); records fire in document order, each compensation immediately visible to the next. - "heights map leak on /new": rejected — the countChanged cleanup prunes every per-key map against the live key set (test-verified). - remount-in-viewport estimate shift: only reachable when one frame jumps past the margin (> 1 viewport); the design's accepted "remounted for view" path — documented in the header. - expanded tool/reasoning re-collapse on far-remount: S1-accepted, deferred (component-local state; out of S2 file ownership). |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| .gitignore | ||
| .prettierrc | ||
| eslint.config.mjs | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||