hermes-agent/ui-tui/src
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
..
__tests__ refactor(tui): consolidate agents overlay — share duration/root helpers via lib 2026-04-22 12:10:21 -05:00
app refactor(tui): consolidate agents overlay — share duration/root helpers via lib 2026-04-22 12:10:21 -05:00
components refactor(tui): consolidate agents overlay — share duration/root helpers via lib 2026-04-22 12:10:21 -05:00
config chore(tui): /clean pass — inline one-off locals, tighten ConfirmPrompt 2026-04-19 07:55:38 -05:00
content fix(tui): preserve prior segment output on Ctrl+C interrupt 2026-04-21 14:48:50 -05:00
domain fix(tui): improve macOS paste and shortcut parity 2026-04-21 08:00:00 -07:00
hooks fix(tui): address PR #13231 review comments 2026-04-20 19:09:09 -05:00
lib refactor(tui): consolidate agents overlay — share duration/root helpers via lib 2026-04-22 12:10:21 -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): improve macOS paste and shortcut parity 2026-04-21 08:00:00 -07:00
app.tsx refactor(tui): store-driven turn state + slash registry + module split 2026-04-16 12:34:45 -05:00
banner.ts refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
bootBanner.ts chore: fmt 2026-04-16 21:09:50 -05:00
entry.tsx refactor(tui): /clean pass on memory + resize helpers 2026-04-20 18:58:44 -05:00
gatewayClient.ts fix(tui): address PR #13231 review comments 2026-04-20 19:09:09 -05:00
gatewayTypes.ts feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00
theme.ts feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00
types.ts feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00