hermes-agent/apps/desktop/src/app
Brooklyn Nicholson 3045d54547 fix(desktop): route remote-profile session mutations + fix unified-list pagination
Follow-up to the read-routing fix: make remote-profile sessions fully
first-class, not just resumable.

Mutations (rename/archive/delete) went through the same hermes:api handler but
never carried the owning profile, so they hit the local primary's state.db --
which has no row for a remote session. Deleting/archiving/renaming a remote
session silently no-op'd or 404'd, and the row reappeared on next refresh.

- hermes.ts: setSessionArchived/deleteSession/renameSession take the owning
  profile and pass it as request.profile so Electron routes to that profile's
  backend (matching the read path). Callers now forward session.profile.
- main.cjs: generalize the intercept (read -> request) to also reroute
  DELETE/PATCH on /api/sessions/{id} for remote profiles, stripping the profile
  param (the remote serves its own state.db; no cross-profile semantics there).
- web_server.py: DELETE /api/sessions/{id} gains a profile param for parity with
  GET/PATCH (local cross-profile delete).

Also fix the unified-list merge: it concatenated each remote's page onto the
primary's without re-windowing, so a limit=N request could return up to
N*(1+remotes) rows and report the primary's (stale) total. Now it over-fetches
limit+offset from each remote (from offset 0), re-sorts by recency, re-windows
to the page, and recomputes total/profile_totals from the remote counts.

Verified live against a remote backend: rename/archive/delete mutate the remote
db; page 1 windows to limit, profile_totals reflect remote counts, page 2 has no
overlap with page 1. tsc -b clean; connection-config tests pass.
2026-06-05 10:08:26 -05:00
..
agents Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
artifacts feat(desktop): per-session profile switching + cross-profile sessions 2026-06-04 16:35:34 -05:00
chat feat(desktop): per-profile "+" to start a session in the all-profiles view 2026-06-04 20:44:22 -05:00
command-center Merge origin/main into bb/desktop-profile-support 2026-06-04 20:17:07 -05:00
command-palette feat(desktop): polish credentials settings and messaging env routing (#39217) 2026-06-04 14:01:15 -04:00
cron Merge origin/main into bb/desktop-profile-support 2026-06-04 20:17:07 -05:00
gateway/hooks feat(desktop): concurrent multi-profile gateway sockets 2026-06-04 20:44:19 -05:00
hooks feat(desktop): global Cmd+K palette + UI consistency overhaul 2026-06-03 23:45:45 -05:00
messaging Merge origin/main into bb/desktop-profile-support 2026-06-04 20:17:07 -05:00
overlays feat(desktop): dedicated Providers settings + polished Accounts/API-keys UX (#38551) 2026-06-04 03:03:42 -05:00
profiles fix(desktop): deleting the active profile reliably falls back to default 2026-06-04 19:49:11 -05:00
right-sidebar feat(desktop): per-session profile switching + cross-profile sessions 2026-06-04 16:35:34 -05:00
session/hooks fix(desktop): route remote-profile session mutations + fix unified-list pagination 2026-06-05 10:08:26 -05:00
settings fix(desktop): route remote-profile session mutations + fix unified-list pagination 2026-06-05 10:08:26 -05:00
shell feat(desktop): per-session profile switching + cross-profile sessions 2026-06-04 16:35:34 -05:00
skills feat(desktop): polish credentials settings and messaging env routing (#39217) 2026-06-04 14:01:15 -04:00
desktop-controller.tsx fix(desktop): heal stale runtime-id cache + model on profile switch (#39819) 2026-06-05 12:52:44 +00: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 chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
routes.ts chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
types.ts fix(desktop): rename session via session.title RPC so /title works (#39410) 2026-06-04 19:32:24 -05:00
updates-overlay.tsx chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00