hermes-agent/web/src/lib
Austin Pickett a5c1f925b5 fix(web): stop /api/auth/me 401 from triggering a reload loop
In loopback mode the dashboard's identity probe (/api/auth/me) returns
401 by design — AuthWidget swallows it and renders nothing. But the
probe routed through fetchJSON, whose loopback 401 handler treats a 401
as a rotated session token and full-page-reloads to pick up a fresh one.
That reload is guarded by a one-shot sessionStorage flag which every
*successful* request clears, so with auth/me reliably 401ing and the
other dashboard calls (status/config/sessions) reliably succeeding, the
guard never sticks and the page reload-loops indefinitely (the "boot
flash").

Add an allowUnauthorized option to fetchJSON that skips only the loopback
stale-token reload (the 401 still throws so AuthWidget can catch it, and
the gated-mode login_url envelope redirect is unaffected), and use it for
getAuthMe.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 16:58:42 -04:00
..
api.ts fix(web): stop /api/auth/me 401 from triggering a reload loop 2026-05-28 16:58:42 -04:00
dashboard-flags.ts fix: mobile chat in new layout 2026-04-24 12:07:46 -04:00
format.ts feat(web): add context window support to dashboard config 2026-04-13 22:04:35 -07:00
gatewayClient.ts feat(dashboard-auth): SPA WS auth — getWsTicket() + buildWsAuthParam() 2026-05-27 02:12:27 -07:00
nested.ts feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
resolve-page-title.ts fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
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