hermes-agent/apps/desktop/src/lib
brooklyn! 0cbcc75935
fix(desktop): reliable composer message queue (#40221)
* fix(desktop): make composer message queue reliable

The queue felt 'dumb' because of three real bugs:

1. Drained-after-interrupt sends went silent. cancelRun sets
   interrupted:true and nothing reset it; submitPromptText's optimistic
   seed preserved it, and the message stream drops every delta while
   interrupted. So Send-now-while-busy and any interrupt+drain submitted
   the next turn into a muted session. Fix: a fresh submit is a new turn —
   seed interrupted:false.

2. Back-to-back queue drains stalled. The drain fires on the busy->false
   settle edge, but busyRef (synced from the busy store by a separate
   effect) can still read true on that same edge, so the drained send hit
   the busy guard, returned false, and the entry was never removed. Fix:
   fromQueue sends bypass the busyRef guard (the queue drain lock
   serializes them); the user path keeps the guard.

3. Double-enter-to-interrupt killed single non-queue turns. The hidden
   450ms timer meant a natural double-tap after sending stopped the agent.
   Fix: empty Enter while busy is a no-op; interrupting is explicit —
   Stop button or Esc.

Also: clean stop (no [interrupted] marker), Send-now works while busy
(promote + interrupt + auto-drain), settle on the interrupted completion
path. Adds regression tests and unblocks the prompt-actions suite by
completing its stale @/hermes mock.

* fix(desktop): float the queue panel as an overlay so the chat doesn't resize

The queue list rendered in-flow inside the composer root, so its height
fed --composer-measured-height (the composer rect drives the thread's
bottom padding + last-message clearance). Queuing a message grew that
rect and the whole chat visibly resized.

Anchor the panel out of flow above the composer (absolute bottom-full,
capped at 40vh with internal scroll). It no longer contributes to the
measured height, so the thread layout stays put and the list overlays the
(already faded) chat. Still collapsible via the panel's own
disclosure header.

* fix(desktop): queue panel collapsed by default + shared border with composer

- Default the queue disclosure to collapsed (compact 'N queued' pill)
  instead of expanded.
- Drop the gap and merge the panel into the composer: square bottom
  corners, no bottom border/radius, and overlap down by the Root's pt-2
  (-mb-2) so the panel's borderless bottom lands on the composer surface's
  top border — one continuous bordered shape.

* style(desktop): tighten queue panel padding

* style(desktop): trim queue-ux comments to house style

* style(desktop): drop 'Cursor' references from comments
2026-06-05 20:21:41 -05:00
..
ansi.test.ts fix(desktop): triage batch of GUI quality-of-life fixes (#37536) 2026-06-02 16:33:22 -04:00
ansi.ts chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
chat-messages.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
chat-messages.ts fix(desktop): render approval/sudo/secret prompts so tools stop silently timing out (#38578) 2026-06-04 01:53:51 +00:00
chat-runtime.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
chat-runtime.ts fix(desktop): reliable composer message queue (#40221) 2026-06-05 20:21:41 -05:00
clipboard.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
commit-changelog.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
commit-changelog.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
desktop-slash-commands.test.ts Add /version slash command across CLI, gateway, TUI, and desktop. 2026-06-05 18:05:05 -07:00
desktop-slash-commands.ts Add /version slash command across CLI, gateway, TUI, and desktop. 2026-06-05 18:05:05 -07:00
embedded-images.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
embedded-images.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
external-link.test.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
external-link.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
gateway-events.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
gateway-ws-url.test.ts fix(desktop): don't fall back to a dead WS ticket on OAuth re-mint failure 2026-06-04 01:11:34 -07:00
gateway-ws-url.ts feat(desktop): per-session profile switching + cross-profile sessions 2026-06-04 16:35:34 -05:00
haptics.ts feat(desktop): drag sessions into chat as @session links + spawn loader 2026-06-04 19:41:51 -05:00
icons.ts desktop: OAuth-aware remote gateway connection 2026-06-04 01:11:34 -07:00
incremental-external-store-runtime.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
katex-memo.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
local-preview.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
markdown-code.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
markdown-code.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
markdown-preprocess.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
media.ts feat(desktop): session hygiene, archive, media streaming + connecting overlay (#37099) 2026-06-01 20:41:34 -05:00
model-status-label.test.ts feat(desktop): inline model picker in the status bar 2026-06-02 19:09:41 -05:00
model-status-label.ts feat(desktop): inline model picker in the status bar 2026-06-02 19:09:41 -05:00
mutable-ref.ts chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
preview-targets.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
preview-targets.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-color.ts feat(desktop): long-press a rail profile to pick its color 2026-06-04 20:12:37 -05:00
provider-setup-errors.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
provider-setup-errors.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
query-client.ts feat(desktop): per-session profile switching + cross-profile sessions 2026-06-04 16:35:34 -05:00
runtime-readiness.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
runtime-readiness.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
session-export.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
session-search.test.ts feat(desktop): search sessions by id 2026-06-04 07:49:34 -07:00
session-search.ts feat(desktop): search sessions by id 2026-06-04 07:49:34 -07:00
speech-text.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
statusbar.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
storage.ts feat(desktop): long-press a rail profile to pick its color 2026-06-04 20:12:37 -05:00
todos.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
todos.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
tool-result-summary.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
tool-result-summary.ts fix(desktop): triage batch of GUI quality-of-life fixes (#37536) 2026-06-02 16:33:22 -04:00
use-enter-animation.ts fix(desktop): prevent IME Enter from splitting messages and viewport resize from disarming scroll anchor (#38333) 2026-06-03 20:14:52 +00:00
utils.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
voice-playback.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
yolo-session.ts chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00