hermes-agent/apps/desktop/src/app
theone139344 062d261955 fix(desktop): prevent cross-session leak in background queue drain
A background queue drain (fromQueue: true) whose runtime binding was
reaped by the gateway fires with sessionId=null. The expression

  options?.sessionId ?? activeSessionIdRef.current

falls back to whichever runtime id the foreground happens to hold,
landing the queued prompt in the session the user is currently viewing
instead of the session that owns the queue entry — a cross-session
message leak.

Guard the fallback: only inherit the foreground runtime when the drain
targets the current view (no storedSessionId, or it matches the
foreground). A background drain (storedSessionId differs) is left with
sessionId=null so the existing session.resume path rebinds the correct
runtime before prompt.submit fires.

Includes a regression test: "a fromQueue drain with null runtime id
does NOT land in the foreground session (cross-session leak guard)".
All 53 existing tests pass.
2026-07-24 23:22:04 -07:00
..
agents refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
artifacts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
chat test(desktop): cover hidden-tab resolution for drops, focus, and timeline 2026-07-25 00:09:30 -05:00
command-center feat(desktop): button tooltip keybind hints + keybinds settings tab + unified worktree dialog (#65204) 2026-07-16 18:26:21 -04:00
command-palette Reapply "Merge pull request #30179 from NousResearch/feat/iron-proxy" 2026-07-24 09:49:00 -07:00
contrib feat(desktop): add Webhooks page for subscription CRUD (#69687) 2026-07-24 14:06:10 -04:00
cron refactor(desktop): fold cron Blueprints into the New Job dialog 2026-07-24 19:16:45 -05:00
gateway/hooks fmt(js): npm run fix on merge (#70291) 2026-07-23 20:23:02 +00:00
hooks feat(desktop): shift next tab into main on ⌘W + always-shown new-session tab 2026-07-22 22:18:33 -05:00
learning refactor(desktop): localize settled TODO(i18n) literals (#57924) 2026-07-03 20:43:50 +00:00
messaging fix(desktop): wrap missing sidebar icon-button tooltips (#67500) 2026-07-21 15:05:56 -04:00
overlays fix(desktop): unify overlay-pane padding and add primary PanelAction 2026-07-24 19:16:45 -05:00
pet-generate style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
pet-overlay feat(desktop): TikTok-style vibe hearts on a reusable particle system 2026-07-10 05:42:14 -05:00
profiles refactor(desktop): add shared Field form-dialog primitive 2026-07-24 19:16:45 -05:00
right-sidebar fix(desktop): auto-expand a lane when starting a session in it, and stabilize sidebar collapse state 2026-07-22 22:43:55 -05:00
session fix(desktop): prevent cross-session leak in background queue drain 2026-07-24 23:22:04 -07:00
settings fix(desktop): persist the whole discovered model list when saving an endpoint 2026-07-24 21:12:36 -05:00
shell feat(desktop): add Webhooks page for subscription CRUD (#69687) 2026-07-24 14:06:10 -04:00
skills feat(desktop): five Capabilities-tab UX fixes from live testing — hints, vision link, web split, key deep-links (#67482) 2026-07-19 05:45:01 -07:00
starmap 🐛 fix(desktop): restore tooltip-wrapped trigger behavior 2026-07-18 23:52:42 -04:00
webhooks refactor(desktop): webhooks create form uses shared Field; drop status pill 2026-07-24 19:16:45 -05:00
floating-hud.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
index.tsx feat(desktop): routes, nav, and command palette as contributions 2026-07-13 17:57:54 -04:00
layout-constants.ts feat(desktop): cap overlay inner-page width at 75rem 2026-07-02 20:40:57 -05:00
master-detail.tsx feat(desktop): button tooltip keybind hints + keybinds settings tab + unified worktree dialog (#65204) 2026-07-16 18:26:21 -04:00
model-picker-overlay.tsx fix(desktop): scope model options by profile (#62795) 2026-07-22 09:40:50 -04:00
model-visibility-overlay.tsx fix(desktop): scope model options by profile (#62795) 2026-07-22 09:40:50 -04:00
page-search-shell.tsx fix(desktop,gateway,mcp): post-merge — CI contract, review corrections, hub search 2026-07-03 15:22:43 -05:00
routes.test.ts fix(desktop): close cross-session leak windows in composer + session refs (#59305) 2026-07-24 16:04:12 -07:00
routes.ts fix(desktop): close cross-session leak windows in composer + session refs (#59305) 2026-07-24 16:04:12 -07:00
session-picker-overlay.tsx desktop: registry-driven slash commands + first-class /resume & /handoff (#42351) 2026-06-11 01:49:24 +00:00
session-switcher.tsx refactor(desktop): derive working/attention session sets from $sessionStates 2026-07-17 14:33:38 -04:00
types.ts fix(desktop): salvage /compress cluster — session.compress RPC + dedicated RPC routing (#68229) 2026-07-22 16:40:06 -04:00
updates-overlay.tsx fmt(js): npm run fix on merge (#69805) 2026-07-23 03:32:32 +00:00