hermes-agent/apps/desktop/src/store
Carl e5e2583635 fix(desktop): relaunch on Linux after in-app update instead of hanging (#45205)
On a Linux source install the in-app updater ran the full backend update +
desktop rebuild successfully but never restarted the app — it hung forever on
the applying overlay with no close button. Two causes:

- applyUpdatesPosixInApp() only handled the macOS .app bundle swap;
  runningAppBundle() is null off macOS, so Linux fell through to
  { ok: true, backendUpdated: true } without ever relaunching.
- The renderer store had no terminal state for that result shape, so
  $updateApply stayed { applying: true } and the overlay's close button
  (hidden while applying) never appeared.

Fix (new electron/update-relaunch.cjs, pure + unit-tested):
- Decide the Linux outcome from whether the *running* binary is the one we
  just rebuilt (execPath under release/<plat>-unpacked, path-segment-aware so
  linux-unpacked-evil can't masquerade) and whether its chrome-sandbox helper
  is launchable (root:root + setuid, or an --no-sandbox / ELECTRON_DISABLE_SANDBOX
  opt-out):
    relaunch — detached watcher waits for this PID to exit (graceful, then
      SIGKILL), self-deletes, and re-execs the rebuilt binary with the original
      launch context (filtered args + HERMES_*/sandbox env + cwd) restored.
    guiSkew  — AppImage/.deb/.rpm/dev: backend updated but this GUI package was
      NOT changed; surface an honest closeable 'reinstall the desktop app'
      terminal state instead of lying that it loads next launch (#37541 skew).
    manual   — rebuilt binary but sandbox helper not launchable: keep the
      working window, don't quit into a dead app.
- store/updates.ts lands a terminal, closeable state for EVERY resolved apply
  outcome (handedOff / guiSkew / manualRestart / updated-not-relaunched / error)
  so the hang is impossible regardless of platform or result.
- New DesktopUpdateStage values (update/rebuild/done/guiSkew) + GuiSkewView so
  progress reads correctly and the skew state is closeable. i18n in all four
  locales (en/ja/zh/zh-hant) in parity.
- electron/update-relaunch.test.cjs (16 tests) + store outcome tests.

Salvaged from #45205 onto current main. Linux quit dwell uses the shared
UPDATE_HANDOFF_DWELL_MS (2.5s) from #50448 for consistency. Four-locale i18n
parity, AUTHOR_MAP entry, and the test wiring added on top.

Closes #45205.
2026-06-21 17:04:52 -07:00
..
activity.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -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 fix(desktop): surface background-session clarify prompts instead of hanging 2026-06-03 21:07:33 -05:00
command-palette.ts feat(desktop): global Cmd+K palette + UI consistency overhaul 2026-06-03 23:45:45 -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 feat(desktop): arrow up/down to navigate previous user messages 2026-06-05 20:32:29 -05:00
composer-input-history.ts feat(desktop): integrate arrow history with the message queue 2026-06-05 20:33:53 -05:00
composer-popout.ts fix(desktop): clamp composer peel-off under cursor 2026-06-21 18:52:01 -05:00
composer-queue.test.ts fix(desktop): stop stranding queued prompts across backend bounces 2026-06-13 00:20:51 -05:00
composer-queue.ts fix(desktop): stop stranding queued prompts across backend bounces 2026-06-13 00:20:51 -05:00
composer-status.test.ts feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
composer-status.ts feat(desktop): native OS notifications with per-type toggles 2026-06-14 00:31:03 -05:00
composer.test.ts feat(desktop): strict per-thread drafts on decoupled composer 2026-06-11 00:01:06 -05:00
composer.ts feat(desktop): strict per-thread drafts on decoupled composer 2026-06-11 00:01:06 -05:00
cron.ts fix(desktop): cron overlay mutations sync the sidebar instantly 2026-06-06 16:47:46 -05:00
gateway.ts feat(desktop): concurrent multi-profile gateway sockets 2026-06-04 20:44:19 -05:00
haptics.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
keybinds.ts feat(desktop): Mac-style session switcher (^Tab / ^⇧Tab / ^1-9) (#43111) 2026-06-09 20:12:46 -05:00
layout.ts fix(desktop): keep recents sorted unless manually reordered (#45404) 2026-06-13 00:38:10 -05: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 test(desktop): harden model-visibility toggle + dedupe default expansion 2026-06-21 15:46:58 +05:30
model-visibility.ts test(desktop): harden model-visibility toggle + dedupe default expansion 2026-06-21 15:46:58 +05:30
native-notifications.test.ts feat(desktop): native OS notifications with per-type toggles 2026-06-14 00:31:03 -05:00
native-notifications.ts feat(desktop): native OS notifications with per-type toggles 2026-06-14 00:31:03 -05:00
notifications.ts feat(desktop): persist i18n language in config 2026-06-05 10:32:26 -07:00
onboarding.test.ts fix(desktop): collect + persist API key for custom OpenAI endpoints (#43896) 2026-06-12 00:03:55 +00:00
onboarding.ts fix(desktop): collect + persist API key for custom OpenAI endpoints (#43896) 2026-06-12 00:03:55 +00:00
panes.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
panes.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
preview.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
preview.ts fix(desktop): stage dropped files into the remote session workspace 2026-06-09 16:50:08 -05:00
profile.test.ts test(desktop): cover $connection resync on profile switch 2026-06-15 07:11:02 -07:00
profile.ts fix(desktop): sync $connection on profile switch so remote profiles attach images as bytes 2026-06-15 07:11:02 -07:00
prompts.test.ts fix(approval): carry allow_permanent to TUI + desktop approval prompts 2026-06-11 18:23:59 -05:00
prompts.ts fix: show desktop approval fallback (#46548) 2026-06-21 18:57:18 -05: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 feat(desktop): Mac-style session switcher (^Tab / ^⇧Tab / ^1-9) (#43111) 2026-06-09 20:12:46 -05:00
session-sync.ts fix(desktop): sync new sessions across windows 2026-06-15 20:59:57 -05:00
session.test.ts fix(desktop): scope remote workspace defaults 2026-06-11 09:41:35 -07:00
session.ts fix(desktop): recover stranded session windows when resume fails (#47655) 2026-06-17 17:33:53 -04:00
subagents.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
subagents.ts feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -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 feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
todos.ts feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -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 fix(desktop): relaunch on Linux after in-app update instead of hanging (#45205) 2026-06-21 17:04:52 -07:00
updates.ts fix(desktop): relaunch on Linux after in-app update instead of hanging (#45205) 2026-06-21 17:04:52 -07:00
voice-playback.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -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): open new sessions in compact windows 2026-06-15 20:59:57 -05:00