hermes-agent/apps
ethernet 659d1123c4
fix(desktop): model picker reverts in existing threads (#65777)
selectModel in use-model-controls captured activeSessionId as a closure
prop, but the actions bag in wiring.tsx mutates in place to keep a stable
identity for memoized surfaces. The modelMenuContent useMemo captures
selectModel once when the gateway first opens (before any session is
active) and never re-evaluates, so clicking a model in an existing thread
goes through a stale closure with activeSessionId=null — the pick is
treated as UI-only, config.set is never sent, and the next session.info
event clobbers the optimistic update back to the session's real model.

Drop the activeSessionId prop entirely. All three callbacks now read
$activeSessionId.get() live from the store, matching the pattern
refreshCurrentModel already followed. This is the correct contract for
the actions bag's in-place mutation: callbacks read live state from the
store, not from captured props.
2026-07-16 16:17:41 +00:00
..
bootstrap-installer fmt(js): npm run fix on merge (#65229) 2026-07-15 21:40:56 +00:00
desktop fix(desktop): model picker reverts in existing threads (#65777) 2026-07-16 16:17:41 +00:00
shared fmt(js): npm run fix on merge (#65229) 2026-07-15 21:40:56 +00:00