hermes-agent/ui-tui/src
brooklyn! f63ef74eaf
fix(tui): refresh virtual transcript on viewport resize (#31077)
* fix(tui): refresh virtual transcript on viewport resize

Notify scroll subscribers when ScrollBox viewport bounds change and key virtual-history updates on viewport height so resize/keyboard changes remount the tail rows instead of leaving stale spacers visible.

* test(tui): isolate viewport-height remount regression

Keep the resize delta below the virtual history scroll quantum so the regression test specifically depends on viewport height entering the snapshot key.

* test(tui): clarify virtual history resize snapshot

Update the resize regression and comments so the test specifically guards viewport-height changes in the virtual-history snapshot key.

* docs(tui): clarify scrollbox subscription signals

Document that ScrollBox subscribers are notified for renderer-computed viewport and content bound changes, not only imperative scrolls.

* fix(tui): recompute virtual tail after width resize

Avoid preserving a frozen virtual transcript range when wrapped rows shrink enough that the old tail window no longer covers the viewport.

* fix(tui): preserve transcript tail across resizes

Wraps + heights are column-dependent, so a width change must remeasure
every row and the renderer must repaint the full viewport.

- Key virtualRows on cols so React remounts wrapped rows on resize.
- Snap back to bottom after sticky-mode resize once React rerenders.
- Reserve a scrollbar + gap column in transcriptBodyWidth (non-termux).
- Full repaint on any viewport height change (was: shrink-only).
- ScrollBox scrollHeight uses deepest child bottom so sticky-bottom
  math can reach the real final rendered row after reflow.
- DECSTBM fast-path now requires full container rect match.

* feat(tui): responsive banner tiers

Terminals can't scale glyphs, so the banner now picks a layout per
column width instead of always rendering the full 101-col logo:

- Wide (>= logo width): full ASCII logo + tagline.
- Mid (>= 58 cols): centered rule banner that expands with viewport.
- Narrow (>= 34 cols): brand line + tagline, both width-aware.
- < 34 cols: hidden.

SessionPanel surfaces model/cwd/sid inline when the hero column is
hidden, so narrow layouts don't lose that info. Logo width constants
derive from the art itself.

* fix(tui): re-check sticky inside resize debounce + document remount

Addresses Copilot review on PR #31077:

- onResize now re-checks isSticky() inside the 100ms timer so manual
  scrolls during the debounce window don't get snapped back to tail.
- Comment on the virtualRows cols-keying calls out the deliberate
  trade-off: per-row local state (e.g. systemOpen) resets on resize so
  yoga can remeasure off live geometry. The hook's scale-by-ratio path
  is too approximate for mixed markdown widths.
2026-05-23 19:39:53 -05:00
..
__tests__ fix(tui): preserve transcript tail across resizes 2026-05-23 17:37:42 -05:00
app fix(tui): refresh virtual transcript on viewport resize (#31077) 2026-05-23 19:39:53 -05:00
components feat(tui): responsive banner tiers 2026-05-23 17:37:51 -05:00
config feat(tui): mouse_tracking DEC mode presets (salvage of #26681) (#30084) 2026-05-21 20:25:52 -05:00
content fix(tui): copilot review on #16707 — naming, label consistency, esc priority 2026-04-27 15:37:54 -05:00
domain fix(tui): stabilize sticky prompt tracking 2026-04-28 22:10:40 -05:00
hooks fix(tui): recompute virtual tail after width resize 2026-05-23 14:49:26 -05:00
lib fix(tui): preserve transcript tail across resizes 2026-05-23 17:37:42 -05:00
protocol refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
types fix(tui): keep Ink displayCursor in sync with fast-echo writes so cursor stops drifting (#26717) 2026-05-16 00:28:12 -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 feat(tui): responsive banner tiers 2026-05-23 17:37:51 -05:00
entry.tsx fix(tui): log parent gateway lifecycle exits (#31051) 2026-05-23 13:28:40 -05:00
gatewayClient.ts fix(tui): log parent gateway lifecycle exits (#31051) 2026-05-23 13:28:40 -05:00
gatewayTypes.ts fix(tui): surface verbose tool details (#30225) 2026-05-22 00:16:52 -05:00
theme.ts fix(tui): honor skin highlight colors (#20895) 2026-05-06 14:01:56 -07:00
types.ts fix(tui): surface verbose tool details (#30225) 2026-05-22 00:16:52 -05:00