hermes-agent/web/src
xxxigm 3bcd0c1b00
fix(dashboard): only open the chat PTY once the chat tab is active (#59551)
* fix(dashboard): only open the chat PTY once the chat tab is active

The dashboard mounts ChatPage persistently (hidden with CSS) on every route
so the embedded chat PTY survives tab switches. But the PTY-connect effect
never checked whether the chat tab was active, so it opened `/api/pty` on
mount for ANY dashboard page. On a source/RPi install that spawns the whole
TUI + agent bootstrap (`Installing TUI dependencies…` → `npm install`) merely
by loading /sessions, /system, etc. — work the user never asked for, and the
trigger behind "dashboard loses custom themes on /chat load".

Gate the connect effect on a sticky activation latch: the PTY is not spawned
until the chat tab has been active at least once, and stays connected across
later tab switches so the persistence UX is preserved.

* test(dashboard): cover chat PTY activation latch

Asserts the invariant behind the fix: activation is sticky. It stays false
while the chat tab has never been active (so the persistently-mounted,
hidden ChatPage never opens /api/pty), flips true when the tab activates,
and stays true after the user navigates away (PTY persistence).
2026-07-18 00:50:13 -04:00
..
components refactor(console): remove hosted-context command blocking from Hermes Console (#66144) 2026-07-17 04:33:34 -07:00
contexts fix(web): remove marketing backdrop stack for lighter dashboard shell 2026-06-29 12:30:24 -07:00
hooks
i18n feat(kanban): modal create-task dialog, editable board project directory, comment workflow hint (#66333) 2026-07-17 07:23:54 -07:00
lib fix(dashboard): only open the chat PTY once the chat tab is active (#59551) 2026-07-18 00:50:13 -04:00
pages fix(dashboard): only open the chat PTY once the chat tab is active (#59551) 2026-07-18 00:50:13 -04:00
plugins fix(web): theme terminal foreground and restore backdrop plugin slot 2026-06-29 12:30:24 -07:00
themes fix(web): theme terminal foreground and restore backdrop plugin slot 2026-06-29 12:30:24 -07:00
App.tsx fix(web): confirm sidebar Update Hermes before running 2026-06-29 12:30:24 -07:00
index.css fix(web): remove marketing backdrop stack for lighter dashboard shell 2026-06-29 12:30:24 -07:00
main.tsx