hermes-agent/ui-tui/src
Brooklyn Nicholson 85e9a23efb feat(tui): HERMES_TUI_FPS=1 shows live fps counter
Adds a corner-overlay FPS readout gated on HERMES_TUI_FPS, fed by
ink's onFrame callback (so it's the REAL render rate, not a timer).
Displays fps, last-frame duration, and total frame count, colored by
threshold (green ≥50, yellow ≥30, red below).

Implementation:
  * lib/fpsStore.ts — nanostore atom updated from a trackFrame()
    sink.  Ring buffer of last 30 frame timestamps; fps = 29/elapsed.
    trackFrame is undefined when SHOW_FPS is off so ink's onFrame
    short-circuits at the optional chain.
  * components/fpsOverlay.tsx — tiny <Text> subscriber; returns null
    when SHOW_FPS is off (React skips the subtree entirely).
  * entry.tsx — composes onFrame from logFrameEvent (dev-perf) and
    trackFrame (fps) so both flags can coexist.  When both are off,
    onFrame is undefined and ink never attaches the handler.
  * appLayout.tsx — mounts the overlay as a flex-shrink=0 right-
    aligned Box below the composer, conditional on SHOW_FPS.

Usage:
  HERMES_TUI_FPS=1 hermes --tui
  # bottom right: "  62.3fps ·   0.8ms · #1234" (green/yellow/red)

Intended as a user-facing diagnostic during the scroll-perf tuning
pass — watch the counter drop while holding PageUp to see where
frames go silent, without having to run scripts/profile-tui.py in a
side terminal.

126 files post-compile with React Compiler; 352 tests still pass.
2026-04-26 17:20:47 -05:00
..
__tests__ feat(tui): port claude-code's wheel accel state machine 2026-04-26 17:16:11 -05:00
app feat(tui): port claude-code's wheel accel state machine 2026-04-26 17:16:11 -05:00
components feat(tui): HERMES_TUI_FPS=1 shows live fps counter 2026-04-26 17:20:47 -05:00
config feat(tui): HERMES_TUI_FPS=1 shows live fps counter 2026-04-26 17:20:47 -05:00
content fix(tui): address Copilot review on editor handoff 2026-04-25 20:34:24 -05:00
domain fix(tui): apply details mode live 2026-04-26 13:34:33 -05:00
hooks feat(tui): archive todos at turn end with incomplete hint 2026-04-26 16:14:58 -05:00
lib feat(tui): HERMES_TUI_FPS=1 shows live fps counter 2026-04-26 17:20:47 -05:00
protocol refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
types feat(tui): port claude-code's wheel accel state machine 2026-04-26 17:16:11 -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 refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
entry.tsx feat(tui): HERMES_TUI_FPS=1 shows live fps counter 2026-04-26 17:20:47 -05:00
gatewayClient.ts fix(tui): address PR #13231 review comments 2026-04-20 19:09:09 -05:00
gatewayTypes.ts fix(tui): stabilize live progress rendering 2026-04-26 15:23:43 -05:00
theme.ts feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00
types.ts feat(tui): collapse completed todo panel on turn end 2026-04-26 16:24:15 -05:00