mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-23 16:36:23 +00:00
Answering the review question on the PR table — why a hovered-cold switch still showed ~440ms click → WS open: getConnection-only pre-warming left the WS connect chain to the click, and its microtask continuation can only run after the click's fresh-draft React flush (unmounting a large open transcript costs ~300-400ms of render work), so the socket didn't even START connecting until the flush finished. Add openGatewayForProfile: the same spawn + connect chain as a real switch, minus activation — so the hover leaves the profile's socket fully OPEN and the click's ensureGatewayForProfile just activates it (no ws:new after the click at all; measured ws open at hover+136ms on a warm backend). No scheduleReconnect on failure: a hover is speculative, so a dead backend must not start a background retry loop — the real switch owns retry and error UX. Pruning semantics are unchanged: a hover-opened socket for an idle profile is dropped by the next pruneSecondaryGateways recompute, which just returns the click to the previous behavior. Tests updated: pre-warm asserts openGatewayForProfile is called and that activation (ensureGatewayForProfile) is NOT. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||