hermes-agent/apps/desktop/src/store
ethernet 8b1c1dfa1d fix(desktop): review fixes for the agent-side TurnQueue
Review findings on the TurnQueue PR, fixed in one pass:

1. "Send now" on an idle session was a silent no-op: session.queue.promote
   reordered the queue but never drained it, so the promoted entry (and the
   drainNextQueued rescue gesture built on it) just sat there. Promote now
   fires _drain_queued_prompt in a thread when the session is idle, same as
   an idle session.queue.add.

2. A drained entry whose dispatch raised was lost: _drain_queued_prompt
   popped the entry and emitted queue.drained (painting a user turn in the
   client transcript) before _run_prompt_submit. On exception the entry was
   gone and the transcript lied. The drain now requeues the entry at the
   head (same id, so client mirrors stay consistent) via the new
   TurnQueue.requeue_front(), and queue.drained is only emitted after a
   successful dispatch.

3. Multi-line steers never settled: settlePendingSteer split the applied
   text into a line-set, so an entry that itself contained newlines
   (Cmd+Enter on a multi-line draft) matched nothing and pinned a
   "Steering..." row forever. Now matches by whole-entry containment, plus a
   message.complete backstop sweep (a steer can't outlive its turn: applied,
   dropped, or re-queued as the next turn).

4. Speculative surface removed per the contribution rubric: QueuedTurn.mode
   (written, never read), QueuedTurn.attachments (clients resolve
   attachments to @file: refs at enqueue time), enqueue_front() (replaced by
   the requeue_front() that finding 2 actually needs), and the keep_queue
   param on session.interrupt (documented for a promote+interrupt flow that
   actually interrupts via agent.interrupt() directly, so it was dead).

Also: unused sessionId arg dropped from useComposerQueue, the steer-event
lambda no longer shadows the enclosing text parameter, and a rejected
session.queue.add now surfaces an i18n'd error toast instead of silently
no-oping (draft is kept either way).

Tests: idle-promote drains immediately, failed dispatch requeues at head
without emitting queue.drained, interrupt clears the queue, multi-line
steer settles. 16 gateway tests pass; desktop tsc/eslint/vitest clean.
2026-07-15 17:54:21 -04:00
..
activity.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
approval-mode.test.ts feat(desktop): add profile-aware approval mode control 2026-07-13 03:00:43 -07:00
approval-mode.ts feat(desktop): add profile-aware approval mode control 2026-07-13 03:00:43 -07: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 feat(desktop): add $backgroundResume store for parked delegate_task 2026-06-25 19:57:45 -05:00
background-delegation.ts feat(desktop): add $backgroundResume store for parked delegate_task 2026-06-25 19:57:45 -05:00
boot.ts feat(desktop): persist i18n language in config 2026-06-05 10:32:26 -07:00
clarify.test.ts fix(desktop): surface background-session clarify prompts instead of hanging 2026-06-03 21:07:33 -05:00
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 feat(desktop): add project and coding stores 2026-06-25 16:40:27 -05:00
coding-status.ts feat(desktop): make the git cockpit work over a remote gateway 2026-06-28 14:26:09 -05:00
command-palette.ts feat(desktop): floating pet, pop-out overlay + Cmd+K picker 2026-06-20 14:18:40 -05:00
compaction.test.ts fix(desktop): polish compaction indicator and preserve scrollback 2026-06-14 02:48:48 -05:00
compaction.ts fix(desktop): polish compaction indicator and preserve scrollback 2026-06-14 02:48:48 -05:00
completion-sound.ts feat(desktop): add curated completion cue for agent turn completion (#42480) 2026-06-14 00:21:40 -05:00
composer-input-history.test.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer-input-history.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer-popout.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer-queue.test.ts fix(desktop): review fixes for the agent-side TurnQueue 2026-07-15 17:54:21 -04:00
composer-queue.ts fix(desktop): review fixes for the agent-side TurnQueue 2026-07-15 17:54:21 -04:00
composer-status.test.ts feat(desktop): keep active sessions aligned with cwd 2026-06-25 16:40:27 -05:00
composer-status.ts feat(desktop): keep active sessions aligned with cwd 2026-06-25 16:40:27 -05:00
composer.test.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer.ts feat(desktop): store + lib — layout/preview/session atoms, escape-layers, keybind helpers 2026-07-13 17:57:54 -04:00
cron.ts fix(desktop): cron overlay mutations sync the sidebar instantly 2026-06-06 16:47:46 -05:00
embed-consent.ts feat(desktop): consent gate for inline embeds (per-embed / per-service) 2026-06-26 13:35:01 -05:00
file-actions.ts feat(desktop): add Codex-style review pane 2026-06-25 16:40:27 -05:00
gateway-switch.test.ts chore(desktop): drop the dev-only "soft switch" preview from gateway settings 2026-07-12 03:34:57 -04:00
gateway-switch.ts feat(desktop): green unread dot for background-finished sessions 2026-07-15 13:51:41 -04:00
gateway.ts feat(desktop): add profile-aware approval mode control 2026-07-13 03:00:43 -07:00
haptics.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
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): store + lib — layout/preview/session atoms, escape-layers, keybind helpers 2026-07-13 17:57:54 -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 feat(desktop): per-model effort/fast presets in the picker 2026-06-16 00:08:20 -05:00
model-presets.ts feat(desktop): per-model effort/fast presets in the picker 2026-06-16 00:08:20 -05:00
model-visibility.test.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
model-visibility.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
native-notifications.test.ts feat(pets): quality-first OpenRouter model chain + stronger atlas gates + global pet-gen notifications 2026-06-24 23:11:21 -05:00
native-notifications.ts feat(pets): quality-first OpenRouter model chain + stronger atlas gates + global pet-gen notifications 2026-06-24 23:11:21 -05:00
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 feat(desktop): TikTok-style vibe hearts on a reusable particle system 2026-07-10 05:42:14 -05:00
pet.test.ts feat(desktop): add pet roam + motion/direction store signals 2026-06-29 14:26:02 -05:00
pet.ts feat(desktop): TikTok-style vibe hearts on a reusable particle system 2026-07-10 05:42:14 -05:00
preview-edit.ts feat(desktop): in-app spot editor for the file preview pane 2026-06-25 19:50:25 -05:00
preview-status.test.ts feat(desktop): detect tool previews into composer status stack 2026-06-22 19:22:11 -05:00
preview-status.ts feat(desktop): detect tool previews into composer status stack 2026-06-22 19:22:11 -05:00
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 fix(desktop): refresh profile rail after deletion (#49289) 2026-07-02 15:18:49 -05:00
profile.ts fix(desktop): extend startup long-timeout to the whole boot data burst 2026-07-02 19:36:43 -05:00
projects.test.ts test(desktop): cover projects RPC capability probing 2026-06-30 21:23:38 +07:00
projects.ts feat(desktop): store + lib — layout/preview/session atoms, escape-layers, keybind helpers 2026-07-13 17:57:54 -04:00
prompts.test.ts fix(desktop): treat a pending prompt as paused-on-you, not working 2026-06-26 03:55:34 -05:00
prompts.ts feat(desktop): store + lib — layout/preview/session atoms, escape-layers, keybind helpers 2026-07-13 17:57:54 -04:00
review.ts feat(desktop): make the git cockpit work over a remote gateway 2026-06-28 14:26:09 -05: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-states.ts fix(desktop): session-tab drag, focus sync, and pop-out isolation 2026-07-15 03:13:33 -04:00
session-switcher.test.ts feat(desktop): Mac-style session switcher (^Tab / ^⇧Tab / ^1-9) (#43111) 2026-06-09 20:12:46 -05:00
session-switcher.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
session-sync.ts fix(desktop): sync new sessions across windows 2026-06-15 20:59:57 -05:00
session-watchdog.test.ts fix(desktop): let the session watchdog heal a stuck "looping" turn 2026-06-24 18:36:17 -05:00
session.test.ts feat(desktop): green unread dot for background-finished sessions 2026-07-15 13:51:41 -04:00
session.ts feat(desktop): green unread dot for background-finished sessions 2026-07-15 13:51:41 -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 fix(desktop): make Agents indicator match the Spawn-tree panel 2026-06-24 18:16:14 -05:00
subagents.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
system-actions.ts feat(desktop): restart the gateway from Cmd+K, with statusbar spinner feedback 2026-06-19 10:02:54 -05:00
thread-scroll.ts fix(desktop): rebuild thread autoscroll on use-stick-to-bottom 2026-06-13 01:57:30 -05:00
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.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
tool-dismiss.ts fix(desktop): persist tool-row dismissal across virtualization; keep caret hittable 2026-06-12 17:34:48 -05:00
tool-view.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
translucency.ts feat(desktop): window translucency slider in Appearance settings (#45086) 2026-06-12 12:02:38 -05:00
updates.test.ts feat(desktop): add profile-aware approval mode control 2026-07-13 03:00:43 -07:00
updates.ts feat(desktop): add profile-aware approval mode control 2026-07-13 03:00:43 -07:00
voice-playback.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
voice-prefs.ts feat(desktop): mirror voice.auto_tts into an $autoSpeakReplies store 2026-06-29 15:22:37 -05:00
windows.test.ts feat(desktop): open new sessions in compact windows 2026-06-15 20:59:57 -05:00
windows.ts feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
workspace-events.ts feat(desktop): add project and coding stores 2026-06-25 16:40:27 -05:00
zoom.ts feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00