hermes-agent/ui-tui/packages/hermes-ink/src/ink
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
..
components fix(tui): stabilize live progress rendering 2026-04-26 15:23:43 -05:00
events fix(tui): stabilize live progress rendering 2026-04-26 15:23:43 -05:00
hooks fix(clipboard): report native/tmux success, keep Ctrl+Shift+C on dashboard 2026-04-26 05:46:45 -07:00
layout feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
termio fix(tui): stabilize live progress rendering 2026-04-26 15:23:43 -05:00
Ansi.tsx feat: fix types and add type checking plus lazybundle on launch andddd dev flag 2026-04-11 14:42:28 -05:00
bidi.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
clearTerminal.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
colorize.ts Merge branch 'feat/ink-refactor' of github.com:NousResearch/hermes-agent into feat/ink-refactor 2026-04-11 11:39:19 -05:00
constants.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
cursor.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
devtools.ts feat: fix types and add type checking plus lazybundle on launch andddd dev flag 2026-04-11 14:42:28 -05:00
dom.ts fix(tui): share overlay close controls 2026-04-25 14:17:04 -05:00
focus.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
frame.ts chore: uptick 2026-04-14 19:38:04 -05:00
get-max-width.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
global.d.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
hit-test.ts feat: add scrollbar and fix selection on scroll 2026-04-14 14:34:33 -05:00
ink.tsx fix(tui): stabilize live progress rendering 2026-04-26 15:23:43 -05:00
instances.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
line-width-cache.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
log-update.test.ts chore: uptick 2026-04-23 14:37:27 -05:00
log-update.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
measure-element.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
measure-text.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
node-cache.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
optimizer.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
output.ts chore: uptick 2026-04-14 19:38:04 -05:00
parse-keypress.ts chore: uptick 2026-04-14 19:38:04 -05:00
reconciler.ts feat: fix types and add type checking plus lazybundle on launch andddd dev flag 2026-04-11 14:42:28 -05:00
render-border.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
render-node-to-output.ts perf(tui): instrument scroll fast-path decline reasons 2026-04-26 16:45:53 -05:00
render-to-screen.ts feat: fix types and add type checking plus lazybundle on launch andddd dev flag 2026-04-11 14:42:28 -05:00
renderer.ts chore: uptick 2026-04-14 19:38:04 -05:00
root.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
screen.ts refactor(tui): tighten editor handoff helpers 2026-04-25 20:24:06 -05:00
searchHighlight.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
selection.test.ts fix(tui): clamp copied selection bounds 2026-04-25 15:32:45 -05:00
selection.ts fix(tui): clamp copied selection bounds 2026-04-25 15:32:45 -05:00
squash-text-nodes.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
stringWidth.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
styles.ts fix(tui): blitz closeout — input wrap parity, shift-tab yolo, bottom statusline 2026-04-22 15:27:54 -05:00
supports-hyperlinks.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
tabstops.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
terminal-focus-state.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
terminal-querier.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
terminal.ts fix(tui): support modified enter for multiline input 2026-04-26 13:52:54 -05:00
termio.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
useTerminalNotification.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
warn.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
widest-line.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00
wrap-text.ts refactor(tui): /clean pass on blitz closeout — trim comments, flatten logic 2026-04-22 15:27:54 -05:00
wrapAnsi.ts feat: fork ink and make it work nicely 2026-04-11 11:29:08 -05:00