hermes-agent/web/src/lib
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
..
api.test.ts fix(dashboard): support mobile OAuth login 2026-07-09 12:21:16 +05:30
api.ts fix(mcp): complete OAuth through hosted dashboards 2026-07-17 04:50:47 -07:00
chat-activation.test.ts fix(dashboard): only open the chat PTY once the chat tab is active (#59551) 2026-07-18 00:50:13 -04:00
chat-activation.ts fix(dashboard): only open the chat PTY once the chat tab is active (#59551) 2026-07-18 00:50:13 -04:00
chat-sidebar-session-params.test.ts test: port JS/package.json invariant tests from Python to vitest 2026-07-15 17:24:12 -04:00
chat-title.test.ts fix dashboard chat session titles 2026-06-21 22:44:02 -07:00
chat-title.ts fix dashboard chat session titles 2026-06-21 22:44:02 -07:00
chatImagePaste.test.ts fix(web): paste/drop images into dashboard Chat via HERMES_HOME/images 2026-07-10 02:20:04 -05:00
chatImagePaste.ts fix(web): paste/drop images into dashboard Chat via HERMES_HOME/images 2026-07-10 02:20:04 -05:00
clipboard.test.ts fix(dashboard): support mobile OAuth login 2026-07-09 12:21:16 +05:30
clipboard.ts fix(dashboard): support mobile OAuth login 2026-07-09 12:21:16 +05:30
cron-job.test.ts feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
cron-job.ts refactor(dashboard): tighten cron-job form helpers 2026-06-27 03:20:32 -07:00
dashboard-flags.ts feat(dashboard): always enable embedded chat; remove dashboard --tui flag 2026-06-04 03:03:35 -07:00
format.ts feat(web): add context window support to dashboard config 2026-04-13 22:04:35 -07:00
fuzzy.ts feat: fuzzy search for the model picker (WebUI + TUI) 2026-06-01 16:58:58 -07:00
gatewayClient.ts fix(docker): include apps/shared in dashboard image build 2026-06-28 21:43:56 -05:00
mcp-dashboard-oauth.test.ts fix(mcp): close hosted OAuth lifecycle gaps 2026-07-17 04:50:47 -07:00
mcp-dashboard-oauth.ts fix(mcp): close hosted OAuth lifecycle gaps 2026-07-17 04:50:47 -07:00
mcp-server-create.test.ts fix(dashboard): add MCP auth to profile builder (#65163) 2026-07-16 02:05:04 +05:30
mcp-server-create.ts fix(dashboard): add MCP auth to profile builder (#65163) 2026-07-16 02:05:04 +05:30
nested.ts feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
pty-mobile-input.test.ts fix(dashboard): harden PTY reconnect race, wedged-connect recovery, IME guard 2026-07-09 13:50:17 +05:30
pty-mobile-input.ts fix(web): resolve all eslint errors, downgrade react-hooks v7 to warnings 2026-07-16 01:42:02 +05:30
pty-reconnect.test.ts fix(dashboard): harden PTY reconnect race, wedged-connect recovery, IME guard 2026-07-09 13:50:17 +05:30
pty-reconnect.ts fix(dashboard): harden PTY reconnect race, wedged-connect recovery, IME guard 2026-07-09 13:50:17 +05:30
reasoning-effort.test.ts feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
reasoning-effort.ts feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
resolve-page-title.ts fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
schedule.test.ts feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
schedule.ts feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
session-import.test.ts feat(dashboard): add session import flow 2026-07-13 15:41:00 +05:30
session-import.ts feat(dashboard): add session import flow 2026-07-13 15:41:00 +05:30
session-refresh.test.ts fix(dashboard): refresh Sessions list in real time when new sessions are created 2026-06-19 17:26:11 +05:30
session-refresh.ts fix(dashboard): refresh Sessions list in real time when new sessions are created 2026-06-19 17:26:11 +05:30
slashExec.ts feat(web): add /api/pty WebSocket bridge to embed TUI in dashboard 2026-04-24 10:51:49 -04:00
utils.ts refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00