mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-24 10:52:21 +00:00
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.
|
||
|---|---|---|
| .. | ||
| activity.ts | ||
| boot.ts | ||
| clarify.test.ts | ||
| clarify.ts | ||
| command-palette.ts | ||
| compaction.test.ts | ||
| compaction.ts | ||
| completion-sound.ts | ||
| composer-input-history.test.ts | ||
| composer-input-history.ts | ||
| composer-popout.ts | ||
| composer-queue.test.ts | ||
| composer-queue.ts | ||
| composer-status.test.ts | ||
| composer-status.ts | ||
| composer.test.ts | ||
| composer.ts | ||
| cron.ts | ||
| gateway.ts | ||
| haptics.ts | ||
| keybinds.ts | ||
| layout.ts | ||
| model-presets.test.ts | ||
| model-presets.ts | ||
| model-visibility.test.ts | ||
| model-visibility.ts | ||
| native-notifications.test.ts | ||
| native-notifications.ts | ||
| notifications.ts | ||
| onboarding.test.ts | ||
| onboarding.ts | ||
| panes.test.ts | ||
| panes.ts | ||
| preview.test.ts | ||
| preview.ts | ||
| profile.test.ts | ||
| profile.ts | ||
| prompts.test.ts | ||
| prompts.ts | ||
| session-switcher.test.ts | ||
| session-switcher.ts | ||
| session-sync.ts | ||
| session.test.ts | ||
| session.ts | ||
| subagents.test.ts | ||
| subagents.ts | ||
| system-actions.ts | ||
| thread-scroll.ts | ||
| todos.test.ts | ||
| todos.ts | ||
| tool-diffs.ts | ||
| tool-dismiss.ts | ||
| tool-view.ts | ||
| translucency.ts | ||
| updates.test.ts | ||
| updates.ts | ||
| voice-playback.ts | ||
| windows.test.ts | ||
| windows.ts | ||