hermes-agent/apps
theone139344 8879b9e9b2 fix(desktop): keep queued drains out of the foreground session on session switch
A queue drain pairs two identifiers from different clocks: the queue key
(flips with the route) and the explicit runtime id (lags a resume behind).
Mid-switch the composer can fire a drain with storedSessionId=B but
sessionId=A-runtime, and prompt.submit then lands B's queued prompt — and
its whole answer turn — inside session A.

Make the central runtime binding authoritative for queued sends: when the
explicit runtime id no longer matches the binding recorded for the target
stored session, adopt the binding (or drop to the stored-id resume path
when none exists yet). The identity pair (storedSessionId === sessionId)
is the fresh-chat fallback and stays untouched.

Tests: re-home-via-resume and rebind-to-central-runtime; existing
background-drain and sleep/wake cases declare central bindings explicitly.
Null-fallback guard already on main; this PR is the remaining half.
2026-07-29 00:03:52 -05:00
..
bootstrap-installer fix(installer): stamp the bootstrap-complete marker from the Rust installer 2026-07-26 16:02:13 -05:00
desktop fix(desktop): keep queued drains out of the foreground session on session switch 2026-07-29 00:03:52 -05:00
shared refactor: drop the shared subpath export, keeping package.json untouched 2026-07-28 03:54:49 -05:00