hermes-agent/apps/desktop/src/store
Austin Pickett 33d71d687f
fix(desktop): preserve new-chat selector choices (#67729)
Salvaged and rebased from #66354 by @UnathiCodex onto current main.

Fixes a fresh-chat race in Hermes Desktop where a model, reasoning-effort,
or Fast selection made before the first Send could be replaced by an
in-flight profile refresh, or read only after the profile handshake
yielded. Send is now the linearization point: the visible selector state is
snapshotted before awaiting profile readiness, and intent-generation guards
make older config/model responses stand down after a picker/toggle action.
Adds the contract-v4 session-create wire contract for explicit Fast=false.

Conflict resolution vs the original branch (use-model-controls.ts / .test.tsx):
combined main's catalog-aware keepManualPick() sticky-pick logic with the
PR's profileRefreshEpoch + composerSelectionGeneration staleness guards so
both a removed-from-catalog reseed and the in-flight-picker race are handled.

Verified on current main: apps/desktop tsc --noEmit clean; 80 affected
UI/store tests pass (use-model-controls, use-hermes-config,
use-session-actions, model-edit-submenu, model-presets, updates).

Co-authored-by: UnathiCodex <theunathi@gmail.com>
2026-07-19 19:31:34 -04:00
..
activity.ts
…
approval-mode.test.ts fmt(js): `npm run fix` on merge (#65912) 2026-07-16 19:57:39 +00:00
approval-mode.ts fmt(js): `npm run fix` on merge (#65229) 2026-07-15 21:40:56 +00:00
backdrop.ts refactor(desktop): trim backdrop store to match tool-view style 2026-07-14 16:59:57 -04:00
background-delegation.test.ts
…
background-delegation.ts
…
boot.ts
…
clarify.test.ts
…
clarify.ts feat(desktop): store + lib — layout/preview/session atoms, escape-layers, keybind helpers 2026-07-13 17:57:54 -04:00
coding-status.test.ts fix(desktop): serialize git status refreshes (#65341) 2026-07-16 15:05:14 -04:00
coding-status.ts fix(desktop): serialize git status refreshes (#65341) 2026-07-16 15:05:14 -04:00
command-palette.ts
…
compaction.test.ts
…
compaction.ts
…
completion-sound.ts
…
composer-input-history.test.ts
…
composer-input-history.ts
…
composer-popout.ts
…
composer-queue.test.ts
…
composer-queue.ts
…
composer-status.test.ts
…
composer-status.ts fmt(js): `npm run fix` on merge (#65229) 2026-07-15 21:40:56 +00:00
composer.test.ts
…
composer.ts fmt(js): `npm run fix` on merge (#65229) 2026-07-15 21:40:56 +00:00
cron.ts
…
embed-consent.ts
…
file-actions.ts
…
gateway-switch.test.ts perf(desktop): scope tool-diff subscriptions + narrow profile query invalidation 2026-07-18 19:15:57 -04:00
gateway-switch.ts perf(desktop): scope tool-diff subscriptions + narrow profile query invalidation 2026-07-18 19:15:57 -04:00
gateway.ts perf(desktop): pre-warm opens the gateway socket too, not just the spawn 2026-07-17 13:11:05 -04:00
haptics.ts
…
hub-actions.ts fix(desktop,gateway,mcp): post-merge — CI contract, review corrections, hub search 2026-07-03 15:22:43 -05:00
keybinds.ts feat(desktop): button tooltip keybind hints + keybinds settings tab + unified worktree dialog (#65204) 2026-07-16 18:26:21 -04:00
layout.ts feat(desktop): store + lib — layout/preview/session atoms, escape-layers, keybind helpers 2026-07-13 17:57:54 -04:00
model-presets.test.ts fix(desktop): preserve new-chat selector choices (#67729) 2026-07-19 19:31:34 -04:00
model-presets.ts fix(desktop): preserve new-chat selector choices (#67729) 2026-07-19 19:31:34 -04:00
model-visibility.test.ts
…
model-visibility.ts
…
native-notifications.test.ts
…
native-notifications.ts
…
notifications.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
onboarding.test.ts test(desktop): fix a handful of broken tests 2026-07-13 17:22:17 -04:00
onboarding.ts fix: limit desktop model pickers to explicit providers 2026-07-07 15:12:54 -07:00
panes.test.ts test(desktop): fix a handful of broken tests 2026-07-13 17:22:17 -04:00
panes.ts feat(desktop): store + lib — layout/preview/session atoms, escape-layers, keybind helpers 2026-07-13 17:57:54 -04:00
pet-gallery.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
pet-generate.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
pet-overlay.ts fmt(js): `npm run fix` on merge (#65229) 2026-07-15 21:40:56 +00:00
pet.test.ts
…
pet.ts feat(desktop): TikTok-style vibe hearts on a reusable particle system 2026-07-10 05:42:14 -05:00
preview-edit.ts
…
preview-status.test.ts
…
preview-status.ts
…
preview.test.ts test(desktop): fix session preview registry tests fails 2026-07-13 17:22:17 -04:00
preview.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
profile.test.ts perf(desktop): scope tool-diff subscriptions + narrow profile query invalidation 2026-07-18 19:15:57 -04:00
profile.ts perf(desktop): scope tool-diff subscriptions + narrow profile query invalidation 2026-07-18 19:15:57 -04:00
projects.test.ts fmt(js): `npm run fix` on merge (#67284) 2026-07-19 03:21:18 +00:00
projects.ts feat(desktop): let inherited projects set color and icon 2026-07-19 07:33:26 -04:00
prompts.test.ts
…
prompts.ts fmt(js): `npm run fix` on merge (#65229) 2026-07-15 21:40:56 +00:00
review.test.ts fmt(js): `npm run fix` on merge (#66460) 2026-07-17 18:53:03 +00:00
review.ts fix(desktop): don't auto-expand user-collapsed side on reactive unhide (#65375) 2026-07-18 23:49:37 -04:00
route-tiles.ts feat(desktop): store + lib — layout/preview/session atoms, escape-layers, keybind helpers 2026-07-13 17:57:54 -04:00
session-color.test.ts feat(desktop): per-session color override (#66565 layer 2) (#67681) 2026-07-19 16:05:16 -05:00
session-color.ts feat(desktop): per-session color override (#66565 layer 2) (#67681) 2026-07-19 16:05:16 -05:00
session-states.ts fix(desktop): prevent session rotation from stealing focus (#67118) 2026-07-19 00:00:40 -04:00
session-switcher.test.ts
…
session-switcher.ts
…
session-sync.ts
…
session-watchdog.test.ts refactor(desktop): derive working/attention session sets from $sessionStates 2026-07-17 14:33:38 -04:00
session.test.ts refactor(desktop): derive working/attention session sets from $sessionStates 2026-07-17 14:33:38 -04:00
session.ts fix(desktop): preserve new-chat selector choices (#67729) 2026-07-19 19:31:34 -04:00
sidebar-collapse-persistence.test.ts fix(desktop): layout reset reopens collapsed sidebars 2026-07-15 03:30:25 -04:00
starmap.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
subagents.test.ts
…
subagents.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
system-actions.ts
…
thread-scroll.ts
…
todos.test.ts fix(desktop): clear stale active todos on turn end AND on rehydration 2026-07-02 21:22:45 -05:00
todos.ts fix(desktop): clear stale active todos on turn end AND on rehydration 2026-07-02 21:22:45 -05:00
tool-diffs.test.ts perf(desktop): scope tool-diff subscriptions + narrow profile query invalidation 2026-07-18 19:15:57 -04:00
tool-diffs.ts perf(desktop): scope tool-diff subscriptions + narrow profile query invalidation 2026-07-18 19:15:57 -04:00
tool-dismiss.ts
…
tool-view.ts
…
translucency.ts
…
updates.test.ts fix(desktop): preserve new-chat selector choices (#67729) 2026-07-19 19:31:34 -04:00
updates.ts fix(desktop): preserve new-chat selector choices (#67729) 2026-07-19 19:31:34 -04:00
voice-playback.ts
…
voice-prefs.ts
…
windows.test.ts
…
windows.ts feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
workspace-events.ts
…
zoom.ts feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00