hermes-agent/ui-tui/src/components
ethernet d6c76cfbfa test(tui): extract cursor-layout + fast-echo helpers for real unit tests
textInputCursorSourceOfTruth.test.ts read textInput.tsx as text and
regexed it to check that cursorLayout() is called with curRef.current
(not the stale cur React state), and that the fast-echo backspace/append
stdout writes are paired with noteCursorAdvance calls.

Extract three pure functions from textInput.tsx:
- resolveCursorLayout(display, cur, curRefCurrent, columns): wraps
  cursorLayout(display, curRefCurrent, columns), making the
  curRef.current-over-cur choice a directly testable pure call instead of
  a regex match on the render-site call expression.
- fastBackspaceEffect(current, cursor) / fastAppendEffect(current, cursor,
  text): return a single object bundling {newValue, newCursor, write,
  advanceDelta} for each fast-echo path. Bundling the stdout write and the
  noteCursorAdvance delta into one return value makes the pairing
  impossible to silently drift apart (a caller can't get  without
  ), instead of relying on the two call sites appearing near
  each other in source text.

textInput.tsx's render site and backspace/append handlers now call these
helpers directly, preserving exact existing behavior (the same '\b \b'
write sequence, noteCursorAdvance(-1)/noteCursorAdvance(text.length) calls).

textInputCursorSourceOfTruth.test.ts imports and calls the three pure
functions directly with a deliberately stale cur vs a fresh curRefCurrent
to reconstruct the exact regression scenario, and asserts the bundled
effect objects -- no readFileSync, no regex against textInput.tsx's
source text. Full ui-tui suite (107 files, 1117 tests) still green.
2026-07-13 17:22:17 -04:00
..
activeSessionSwitcher.tsx fix(tui): preserve picker session scope across all paths 2026-07-11 08:39:17 -07:00
agentsOverlay.tsx feat(journey): CLI + TUI learning timeline (/journey) 2026-06-30 04:44:58 -05:00
appChrome.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
appLayout.tsx Merge pull request #55865 from NousResearch/bb/pet-pane-layout 2026-06-30 15:46:41 -05:00
appOverlays.tsx fix(tui): support model picker refresh 2026-07-06 13:08:50 -07:00
billingOverlay.tsx feat(billing): /billing terminal billing — interactive TUI + CLI client (#45449) 2026-06-19 01:53:32 +05:30
branding.tsx feat(install): warn pip/Homebrew installs are unsupported (CLI, TUI, desktop) (#57225) 2026-07-07 21:13:19 -07:00
fpsOverlay.tsx
…
helpHint.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
journey.tsx feat(journey): edit/delete in TUI overlay and desktop star map 2026-06-30 15:07:24 -05:00
markdown.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
maskedPrompt.tsx
…
messageLine.tsx fix(tui): clear selection on right-click copy + group transcript blocks 2026-06-02 22:03:38 -05:00
modelPicker.tsx fix: limit desktop model pickers to explicit providers 2026-07-07 15:12:54 -07:00
overlayControls.tsx
…
overlayScrollbar.tsx feat(journey): CLI + TUI learning timeline (/journey) 2026-06-30 04:44:58 -05:00
petPicker.tsx feat(pets): TUI pet pane, picker + gateway RPCs 2026-06-20 14:18:36 -05:00
petSprite.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
pluginsHub.tsx feat(tui): interactive Plugins Hub overlay for enable/disable 2026-06-09 10:50:13 -07:00
prompts.tsx fix(approval): scope smart deny owner overrides to one operation 2026-07-13 04:31:55 -07:00
queuedMessages.tsx
…
skillsHub.tsx
…
streamingAssistant.tsx fix(tui): clear selection on right-click copy + group transcript blocks 2026-06-02 22:03:38 -05:00
streamingMarkdown.tsx fix(tui): width-aware markdown table rendering with vertical fallback (#26195) 2026-05-15 20:25:56 -05:00
textInput.tsx test(tui): extract cursor-layout + fast-echo helpers for real unit tests 2026-07-13 17:22:17 -04:00
themed.tsx
…
thinking.tsx fix: stop reporting cache-hit rate and cost across all UI surfaces (#52717) 2026-06-25 15:21:22 -07:00
todoPanel.tsx
…