hermes-agent/ui-tui/src
Brooklyn Nicholson cd7a200e6c perf(tui): instrument scroll fast-path decline reasons
Adds scrollFastPathStats counters to render-node-to-output.ts: captures
every time a ScrollBox's DECSTBM scroll hint is generated, records
whether the fast path took it (blit+shift from prevScreen) or declined,
and why. Exposed through hermes-ink's public exports and snapshotted on
every FrameEvent so the profiler harness can correlate decline reasons
with the actual patch/renderer cost per frame.

This is pure observation — no behaviour change. Preparing for the
virtual-history rewrite: the hypothesis was that our topSpacer/
bottomSpacer scheme disqualifies every scroll via heightDelta
mismatch, but the data shows the fast path is actually taken on most
scrolls (19/23 over a 6s PageUp hold through 1100 messages) — the
remaining steady-state renderer cost is Yoga tree traversal, not
the per-frame full redraw I initially suspected.

Declines that do happen correlate with React commits that changed the
mounted range mid-scroll (heightDelta=±3 to ±35). Those are the rarer
cases the virtualization rewrite still needs to address.

No test diffs — instrumentation-only.  Build verified: `tsc --noEmit`
plus the full `npm run build` compiler post-pass pass cleanly.
2026-04-26 16:45:53 -05:00
..
__tests__ feat(tui): anchor todo panel above streaming output 2026-04-26 16:26:50 -05:00
app feat(tui): anchor todo panel above streaming output 2026-04-26 16:26:50 -05:00
components feat(tui): anchor todo panel above streaming output 2026-04-26 16:26:50 -05:00
config fix(tui): stabilize live progress rendering 2026-04-26 15:23:43 -05:00
content fix(tui): address Copilot review on editor handoff 2026-04-25 20:34:24 -05:00
domain fix(tui): apply details mode live 2026-04-26 13:34:33 -05:00
hooks feat(tui): archive todos at turn end with incomplete hint 2026-04-26 16:14:58 -05:00
lib perf(tui): instrument scroll fast-path decline reasons 2026-04-26 16:45:53 -05:00
protocol refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
types perf(tui): instrument scroll fast-path decline reasons 2026-04-26 16:45:53 -05:00
app.tsx fix(tui): apply ui-tui fix pass and restore type-check 2026-04-25 14:08:54 -05:00
banner.ts refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
entry.tsx perf(tui): full-pipeline instrumentation + profiling harness 2026-04-26 16:36:25 -05:00
gatewayClient.ts fix(tui): address PR #13231 review comments 2026-04-20 19:09:09 -05:00
gatewayTypes.ts fix(tui): stabilize live progress rendering 2026-04-26 15:23:43 -05:00
theme.ts feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00
types.ts feat(tui): collapse completed todo panel on turn end 2026-04-26 16:24:15 -05:00