Files
hermes-agent/apps/desktop/electron
teknium1 3326147075 fix(desktop): name each bot from its own backend; saves never publish cached fields
Two machines with a profile named `default` (local "Agent B", VPS "Agent A")
showed the VPS bot as "Agent B", told it so in group prompts, and the next
save on that row wrote `title: Agent B` into the VPS profile.yaml, from
where every relay roster republished it.

Root causes, all on the Desktop side:

- Write path: `saveBotMeta` sent the whole local cache entry as the
  server's `hermes-bots` namespace. Any field the cache held and the server
  did not (a restored or legacy name-keyed record) became that bot's server
  truth. A save now reads the bot's namespace from its own backend, writes
  that plus the save's own patch, and uses the existing per-key CAS
  (`ui_meta_expected_revisions`), re-reading on conflict.
- Read path, thin rows: Electron's enumeration read `profile.title` from
  `/api/profiles`, which has always named it `bot_title`, so bots on a
  non-active connection never carried their backend's title, and
  `mergeServerMeta` only ran over the active source's rows. Electron now
  maps `bot_title` (empty string included), and reconciliation runs over
  every live row: the name is whatever the bot's backend reports, and a
  local title it does not carry is dropped.
- Read path, bare keys: `botFriendlyNames` read `meta[bot.name]` for any
  non-remote row and `groupSpeakerLabel` fell back to `meta[profile]`, so a
  scoped `default` row picked up the bare-key title another machine's
  `default` wrote in single-source days. Both now read the row's own key;
  the bare legacy rung applies only to unscoped rosters. Mention completion
  goes through `botRosterMeta` too.
- A remote `default` with a real `display_name` no longer trades it for the
  connection label.
2026-10-03 01:08:52 -07:00
..
2026-09-21 18:19:03 -04:00
2026-09-21 18:19:03 -04:00
2026-09-21 18:19:03 -04:00
2026-09-21 18:19:03 -04:00