hermes-agent/ui-tui/src/app
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
..
slash fix(tui): clear TTS env var on voice off, and add TTS indicator to status bar 2026-05-23 16:21:29 -07:00
createGatewayEventHandler.ts fix(tui): ignore late thinking deltas after completion (#31055) 2026-05-23 13:31:06 -05:00
createSlashHandler.ts fix(goals): make /goal work in TUI and fix gateway verdict delivery (#19209) 2026-05-03 05:49:12 -07:00
delegationStore.ts feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00
gatewayContext.tsx feat: add inline token count etc and fix venv 2026-04-15 10:20:56 -05:00
inputSelectionStore.ts fix(tui): mouse + keyboard text selection in the composer (#16732) 2026-04-27 16:43:48 -07:00
interfaces.ts fix(tui): clear TTS env var on voice off, and add TTS indicator to status bar 2026-05-23 16:21:29 -07:00
overlayStore.ts feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00
scroll.ts fix(tui): refresh scroll height at cached bottom 2026-05-07 05:48:19 -07:00
setupHandoff.ts feat(tui): /model and /setup slash commands with in-place CLI handoff 2026-04-17 10:58:18 -05:00
spawnHistoryStore.ts fix(tui): handle timeout/error subagent statuses in /agents (#26687) 2026-05-15 20:19:02 -05:00
turnController.ts fix(tui): surface verbose tool details (#30225) 2026-05-22 00:16:52 -05:00
turnStore.ts chore(tui): remove dead branch cleanup code 2026-04-26 21:54:24 -05:00
uiStore.ts perf(ui-tui): narrow overlay subscriptions to focused selectors 2026-05-05 13:31:47 -07:00
useComposerState.ts feat(tui): delete queued message while editing with ctrl-x / cancel with esc 2026-04-27 15:24:14 -05:00
useConfigSync.ts feat(tui): mouse_tracking DEC mode presets (salvage of #26681) (#30084) 2026-05-21 20:25:52 -05:00
useInputHandlers.ts fix(tui): allow transcript scroll + Esc during approval/clarify/confirm prompts (#26414) 2026-05-15 21:59:28 -05:00
useLongRunToolCharms.ts chore(tui): clean live progress lint 2026-04-26 15:42:07 -05:00
useMainApp.ts fix(tui): refresh virtual transcript on viewport resize (#31077) 2026-05-23 19:39:53 -05:00
useSessionLifecycle.ts fix(tui): close slash parity gaps with CLI (#20339) 2026-05-05 15:42:39 -05:00
useSubmission.ts fix(tui): always call input.detect_drop for reliable image attachment 2026-04-30 20:25:52 -07:00