hermes-agent/apps
ethernet 39a93dc633
fix(desktop): follow compression's stored-id rotation to prevent thread reload (#65984)
Auto-compression ends the SessionDB session and forks a continuation,
rotating the stored session id. The gateway emits `session.info` with
the new `stored_session_id`, and the desktop's cache entry was updated
via `ensureSessionState` — but the URL route and `$selectedStoredSessionId`
never followed the rotation.

On the next send, `getRuntimeIdForStoredSession(oldStoredId)` returned
null (the cache entry's `storedSessionId` no longer matched the old id),
so `routedSessionNeedsResume` evaluated true, triggering a full
`session.resume` + REST transcript prefetch — the whole thread reloaded.

Fix: a new `$activeSessionStoredId` atom is set in `ensureSessionState`
when the active session's stored id changes. A `useEffect` in
`use-session-actions` subscribes to it and re-anchors the route +
selection (`setSelectedStoredSessionId` + `navigate(replace: true)`),
and cleans up the stale stored→runtime mapping.

`replace: true` because it's the same conversation — compression is
transparent to the user, so back-button stays correct.
2026-07-16 23:12:55 +00:00
..
bootstrap-installer fmt(js): npm run fix on merge (#65229) 2026-07-15 21:40:56 +00:00
desktop fix(desktop): follow compression's stored-id rotation to prevent thread reload (#65984) 2026-07-16 23:12:55 +00:00
shared fmt(js): npm run fix on merge (#65229) 2026-07-15 21:40:56 +00:00