hermes-agent/apps
Ben 7e1e9d62c4 feat(desktop): persist the selected Hermes Cloud org + instance; restore on reopen
Settings → Gateway remembered 'cloud' mode but not WHICH org/instance, so
reopening dropped multi-org users back to the org picker, hiding the connected
agent (reported live).

- Persist a cloudOrg on the saved cloud connection (rides the remote block:
  coerce reads input.cloudOrg / inherits saved; buildRemoteBlock + profile
  sanitizer carry it; sanitize echoes it back as config.cloudOrg). Only for
  mode:'cloud'; plain remote is unchanged. The instance was already persisted as
  remoteUrl (the dashboardUrl).
- discoverCloudAgents now returns the org NAS echoes in the response
  (trimCloudOrg), and the renderer records cloudOrg AUTHORITATIVELY from
  result.org — so it's set even on single-membership auto-resolve where no
  picker ran (the exact case that left the org unpersisted). Requires NAS #550
  (echo resolved org in /api/agents); before that deploys, falls back to the
  requested org.
- On open, the cloud-status effect seeds cloudOrg from the persisted
  config.cloudOrg and discovers scoped to it, so Settings reopens straight into
  that org's agent list instead of the picker.
- connectCloudAgent passes cloudOrg when saving so the choice sticks.
- The connected instance is highlighted (primary tint + ring) and shows a
  'Connected' pill instead of a Connect button (compares saved remoteUrl to each
  agent's dashboardUrl, normalized).

tsc + eslint clean; 57 node --test + 16 vitest pass. Connected-pill verified live;
org-restore pending NAS #550 deploy for the authoritative echo.

cloud-auto-discovery Phase 3/4 follow-up.
2026-07-01 12:46:01 +10:00
..
bootstrap-installer fix(desktop/windows): stop in-app update from cascading into a backend restart loop (#50381) 2026-06-21 13:10:32 -07:00
desktop feat(desktop): persist the selected Hermes Cloud org + instance; restore on reopen 2026-07-01 12:46:01 +10:00
shared style(shared): apply workspace formatter to websocket helpers 2026-06-28 21:30:43 -05:00