hermes-agent/apps/desktop/electron
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
..
backend-env.cjs fix(desktop): keep profile homes out of bootstrap (#46073) 2026-06-14 03:08:52 -07:00
backend-env.test.cjs fix(desktop): keep profile homes out of bootstrap (#46073) 2026-06-14 03:08:52 -07:00
backend-probes.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
backend-probes.test.cjs chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
backend-ready.cjs fix(desktop): make cold-start port-announcement deadline tolerant 2026-06-21 12:29:18 -07:00
backend-ready.test.cjs fix(desktop): make cold-start port-announcement deadline tolerant 2026-06-21 12:29:18 -07:00
bootstrap-platform.cjs chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
bootstrap-platform.test.cjs chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
bootstrap-runner.cjs fix(desktop): hide Windows console children launched by GUI 2026-06-10 03:04:54 -07:00
bootstrap-runner.test.cjs fix(desktop): bootstrap falls back to installed agent install.sh on GitHub 404 2026-06-07 03:46:12 -07:00
connection-config.cjs fix(desktop): route global remote profile REST calls (#47011) 2026-06-15 23:24:55 -05:00
connection-config.test.cjs fix(desktop): route global remote profile REST calls (#47011) 2026-06-15 23:24:55 -05:00
dashboard-token.cjs refactor(desktop): use native fetch in dashboard-token 2026-06-11 18:41:16 -05:00
dashboard-token.test.cjs refactor(desktop): fold served-token adoption + foreign-backend refusal into one helper 2026-06-11 18:33:05 -05:00
desktop-uninstall.cjs feat: uninstall the Chat GUI without removing the agent (CLI + desktop UI) (#40355) 2026-06-06 18:22:38 -07:00
desktop-uninstall.test.cjs feat: uninstall the Chat GUI without removing the agent (CLI + desktop UI) (#40355) 2026-06-06 18:22:38 -07:00
entitlements.mac.inherit.plist fix(desktop): inherit microphone entitlement for macOS helpers 2026-06-03 07:32:00 +07:00
entitlements.mac.plist Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
fs-read-dir.cjs fix(desktop): Harden local file tree paths (#43618) 2026-06-11 10:05:59 -04:00
fs-read-dir.test.cjs fix(desktop): Harden local file tree paths (#43618) 2026-06-11 10:05:59 -04:00
gateway-ws-probe.cjs test(desktop): add injectable gateway WebSocket probe + unit tests 2026-06-04 19:49:06 -07:00
gateway-ws-probe.test.cjs test(desktop): add injectable gateway WebSocket probe + unit tests 2026-06-04 19:49:06 -07:00
git-root.cjs fix(desktop): Harden local file tree paths (#43618) 2026-06-11 10:05:59 -04:00
git-root.test.cjs fix(desktop): Harden local file tree paths (#43618) 2026-06-11 10:05:59 -04:00
git-worktrees.cjs feat(desktop): worktree-aware sidebar grouping + composer/sidebar UX fixes 2026-06-12 18:18:39 -05:00
hardening.cjs feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
hardening.test.cjs feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
link-title-window.cjs fix(desktop): mute hidden link-title window so historical links don't autoplay audio 2026-06-20 14:53:05 +05:30
link-title-window.test.cjs test(desktop): cover link-title window audio muting 2026-06-20 14:53:05 +05:30
main.cjs fix(desktop): relaunch on Linux after in-app update instead of hanging (#45205) 2026-06-21 17:04:52 -07:00
oauth-net-request.cjs fix(desktop): avoid restricted oauth request header 2026-06-05 18:04:45 -07:00
oauth-net-request.test.cjs fix(desktop): avoid restricted oauth request header 2026-06-05 18:04:45 -07:00
preload.cjs feat(desktop): notify renderer when GPU acceleration is disabled due to remote display 2026-06-19 16:59:47 -07:00
session-windows.cjs fix(desktop): keep streaming painting in unfocused secondary chat windows (#47919) 2026-06-17 14:40:13 -04:00
session-windows.test.cjs fix(desktop): keep streaming painting in unfocused secondary chat windows (#47919) 2026-06-17 14:40:13 -04:00
update-marker.cjs fix(desktop/windows): stop in-app update from cascading into a backend restart loop (#50381) 2026-06-21 13:10:32 -07:00
update-marker.test.cjs fix(desktop/windows): stop in-app update from cascading into a backend restart loop (#50381) 2026-06-21 13:10:32 -07:00
update-rebuild.cjs fix(desktop): retry the self-update rebuild once so the app relaunches (#48122) 2026-06-17 19:33:27 -05:00
update-rebuild.test.cjs fix(desktop): retry the self-update rebuild once so the app relaunches (#48122) 2026-06-17 19:33:27 -05:00
update-relaunch.cjs fix(desktop): relaunch on Linux after in-app update instead of hanging (#45205) 2026-06-21 17:04:52 -07:00
update-relaunch.test.cjs fix(desktop): relaunch on Linux after in-app update instead of hanging (#45205) 2026-06-21 17:04:52 -07:00
update-remote.cjs test(desktop): cover official-SSH remote detection for passive updates 2026-06-11 12:53:19 +05:30
update-remote.test.cjs test(desktop): cover official-SSH remote detection for passive updates 2026-06-11 12:53:19 +05:30
vscode-marketplace.cjs feat(desktop): install any VS Code theme from the Marketplace 2026-06-09 23:06:44 -05:00
vscode-marketplace.test.cjs feat(desktop): install any VS Code theme from the Marketplace 2026-06-09 23:06:44 -05:00
windows-child-process.test.cjs fix(desktop): hand off Windows bootstrap recovery (#45594) 2026-06-13 05:54:32 -07:00
windows-user-env.cjs fix(desktop): read HERMES_HOME from the Windows registry when env is stale (#46772) 2026-06-15 15:16:55 -05:00
windows-user-env.test.cjs fix(desktop): read HERMES_HOME from the Windows registry when env is stale (#46772) 2026-06-15 15:16:55 -05:00
workspace-cwd.cjs fix(desktop): honor default project directory for new sessions (#43234) 2026-06-09 23:28:59 -05:00
workspace-cwd.test.cjs fix(desktop): honor default project directory for new sessions (#43234) 2026-06-09 23:28:59 -05:00