hermes-agent/ui-tui/src/__tests__
Brooklyn Nicholson 5b0741e986 refactor(tui): consolidate agents overlay — share duration/root helpers via lib
Pull duplicated rules into ui-tui/src/lib/subagentTree so the live overlay,
disk snapshot label, and diff pane all speak one dialect:

- export fmtDuration(seconds) — was a private helper in subagentTree;
  agentsOverlay's local secLabel/fmtDur/fmtElapsedLabel now wrap the same
  core (with UI-only empty-string policy).
- export topLevelSubagents(items) — matches buildSubagentTree's orphan
  semantics (no parent OR parent not in snapshot). Replaces three hand-
  rolled copies across createGatewayEventHandler (disk label), agentsOverlay
  DiffPane, and prior inline filters.

Also collapse agentsOverlay boilerplate:
- replace IIFE title + inner `delta` helper with straight expressions;
- introduce module-level diffMetricLine for replay-diff rows;
- tighten OverlayScrollbar (single thumbColor expression, vBar/thumbBody).

Adds unit coverage for the new exports (fmtDuration + topLevelSubagents).
No behaviour change; 221 tests pass.
2026-04-22 12:10:21 -05:00
..
asCommandDispatch.test.ts fix(tui): slash.exec _pending_input commands, tool ANSI, terminal title 2026-04-18 09:30:48 -07:00
clipboard.test.ts fix(tui): raise picker selection contrast with inverse + bold 2026-04-21 14:31:21 -05:00
constants.test.ts refactor(tui): store-driven turn state + slash registry + module split 2026-04-16 12:34:45 -05:00
createGatewayEventHandler.test.ts fix(tui): demote gateway log-noise from Activity to info tone 2026-04-21 20:57:40 -07:00
createSlashHandler.test.ts fix(tui): /history shows the TUI's own transcript, scrollable 2026-04-21 18:33:27 -05:00
emoji.test.ts fix(tui): inject VS16 so text-default emoji render as color glyphs 2026-04-21 15:52:39 -05:00
markdown.test.ts fix(tui): don't swallow Kimi/Qwen ~! ~? kaomoji as subscript spans 2026-04-21 17:34:48 -05:00
messages.test.ts chore: fmt 2026-04-08 22:02:38 -05:00
osc52.test.ts fix(tui): raise picker selection contrast with inverse + bold 2026-04-21 14:31:21 -05:00
paths.test.ts feat(tui): append git branch to cwd label in status bar 2026-04-18 17:17:05 -05:00
platform.test.ts fix(tui): raise picker selection contrast with inverse + bold 2026-04-21 14:31:21 -05:00
providers.test.ts chore(tui): /clean pass — inline one-off locals, tighten ConfirmPrompt 2026-04-19 07:55:38 -05:00
reasoning.test.ts fix(tui): strip <think>…</think> tags from assistant content and route to reasoning panel 2026-04-18 14:46:38 -05:00
rpc.test.ts fix(ui-tui): surface RPC errors and guard invalid gateway responses 2026-04-13 14:17:52 -05:00
subagentTree.test.ts refactor(tui): consolidate agents overlay — share duration/root helpers via lib 2026-04-22 12:10:21 -05:00
syntax.test.ts feat(tui): per-language syntax highlighting in markdown code fences 2026-04-18 09:48:38 -05:00
terminalParity.test.ts fix(tui): raise picker selection contrast with inverse + bold 2026-04-21 14:31:21 -05:00
terminalSetup.test.ts fix(tui): raise picker selection contrast with inverse + bold 2026-04-21 14:31:21 -05:00
text.test.ts Rename test variables 2026-04-21 16:00:34 -03:00
textInputLineNav.test.ts fix(tui): up-arrow inside a multi-line buffer moves cursor, not history 2026-04-21 18:31:35 -05:00
theme.test.ts fix(tui): route update-behind banner through theme + auto-detect light terminals (#11300) 2026-04-20 11:12:13 -05:00
useComposerState.test.ts fix(tui): raise picker selection contrast with inverse + bold 2026-04-21 14:31:21 -05:00
useConfigSync.test.ts feat(tui): read display.streaming / show_reasoning / show_cost / inline_diffs from config 2026-04-18 09:42:57 -05:00