Files
hermes-agent/apps
Teknium d354af5e12 feat(desktop): unified Sessions list shows every connected gateway's chats (#88880)
The global SESSIONS sidebar only aggregated local profiles and v1 per-profile
remote overrides. Sessions living on v2 registry connections (remote/cloud/ssh
gateways) never appeared — the remote API returned the rows, but the renderer's
Sessions component received an empty array (#88880).

- electron/profile-session-routing.ts: fetchRegistrySessionRows reads each
  CONNECTED registry gateway's session list (ssh backends natively, shared
  remote/cloud hosts via one cross-profile aggregate with a legacy flat-list
  fallback), tagging rows with connection_id + owning profile.
  spliceRegistrySessionRows dedupes them into the unified list and extends
  per-profile totals. Reads never pass include_hidden, so Bot Mode's hidden
  canonical chats stay OUT of the global list, same as local sessions.
- electron/main.ts: mergeRemoteProfileSessions splices registry rows; the
  /api/profiles/sessions[+/sidebar] intercepts also fire when registry
  gateways are pooled (previously only v1 remote overrides). Only
  already-pooled backends are read — a sidebar refresh never dials or spawns
  a backend (the roster-respawn trap), and a dead gateway contributes nothing.
- types/hermes.ts + use-session-actions: SessionInfo carries connection_id;
  resuming a registry-owned row activates its connection-scoped gateway
  (ensureGatewayAgent) instead of a same-named local profile.
- store/gateway.ts: ensureActiveGatewayOpen rides out an in-flight secondary
  activation (bounded 8s) instead of failing instantly — the Sessions "+"
  during remote wake no longer errors "Hermes gateway is not connected".

Tests: 5 new registry-source/splice unit tests (tagging, shared-host
aggregate + legacy fallback, dead-gateway isolation, hidden-flag contract,
dedupe/totals) and a sabotage-verified activation-wait regression test.
2026-08-18 14:27:15 -07:00
..