hermes-agent/apps/desktop/src/app
Ben 385a508e43 fix(desktop): don't fall back to a dead WS ticket on OAuth re-mint failure
The reconnect and boot paths resolved the WS URL with
`(await getGatewayWsUrl().catch(() => null)) || conn.wsUrl`. For OAuth
gateways the cached conn.wsUrl carries a single-use, ~30s-TTL ticket; the
desktop connection is memoized for the process lifetime, so on reconnect
that ticket is both expired and already consumed. A failed fresh mint
therefore fell back to a guaranteed-dead ticket and surfaced as an opaque
"connection closed", masking the gateway's actionable "session expired,
sign in again" message.

Extract resolveGatewayWsUrl() (with unit tests): in OAuth mode a mint
failure throws a tagged GatewayReauthRequiredError instead of falling back;
token/local modes keep the long-lived-token fallback. Thread that error
through the reconnect path so requestGateway surfaces the reauth message
rather than the generic transport error that triggered the retry.

Co-authored-by: Kenmege <205099287+Kenmege@users.noreply.github.com>
2026-06-04 01:11:34 -07:00
..
agents Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
artifacts refactor(desktop): DRY/elegance pass over PR-touched files 2026-06-04 00:28:57 -05:00
chat feat(desktop): background needs-input indicator, clarify redesign, Cmd+K palette & UI consistency pass (#38631) 2026-06-04 00:47:08 -05:00
command-center refactor(desktop): DRY/elegance pass over PR-touched files 2026-06-04 00:28:57 -05:00
command-palette feat(desktop): dedicated Providers settings + polished Accounts/API-keys UX (#38551) 2026-06-04 03:03:42 -05:00
cron style(desktop): hide search when there's nothing to search 2026-06-03 23:55:04 -05:00
gateway/hooks fix(desktop): don't fall back to a dead WS ticket on OAuth re-mint failure 2026-06-04 01:11:34 -07:00
hooks feat(desktop): global Cmd+K palette + UI consistency overhaul 2026-06-03 23:45:45 -05:00
messaging style(desktop): hide search when there's nothing to search 2026-06-03 23:55:04 -05:00
overlays feat(desktop): dedicated Providers settings + polished Accounts/API-keys UX (#38551) 2026-06-04 03:03:42 -05:00
profiles style(desktop): shared Badge component; tidy profile metadata 2026-06-03 23:49:45 -05:00
right-sidebar feat(desktop): global Cmd+K palette + UI consistency overhaul 2026-06-03 23:45:45 -05:00
session/hooks style(desktop): satisfy lint across PR-touched files 2026-06-04 00:22:17 -05:00
settings fix(desktop): hide gateway auth control until probe resolves the scheme 2026-06-04 01:11:34 -07:00
shell refactor(desktop): DRY/elegance pass over PR-touched files 2026-06-04 00:28:57 -05:00
skills style(desktop): hide search when there's nothing to search 2026-06-03 23:55:04 -05:00
desktop-controller.tsx feat(desktop): dedicated Providers settings + polished Accounts/API-keys UX (#38551) 2026-06-04 03:03:42 -05:00
index.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
layout-constants.ts feat(desktop): global Cmd+K palette + UI consistency overhaul 2026-06-03 23:45:45 -05:00
model-picker-overlay.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
model-visibility-overlay.tsx feat(desktop): inline model picker in the status bar 2026-06-02 19:09:41 -05:00
page-search-shell.tsx style(desktop): hide search when there's nothing to search 2026-06-03 23:55:04 -05:00
routes.ts feat(desktop): global Cmd+K palette + UI consistency overhaul 2026-06-03 23:45:45 -05:00
types.ts feat(desktop): persistent needs-input indicator + icon button consolidation 2026-06-03 21:44:30 -05:00
updates-overlay.tsx feat(desktop): composer/intro polish + shared ErrorState 2026-06-04 00:19:05 -05:00