hermes-agent/apps/desktop/electron
ethernet 3bed7d4ae7 fix(desktop,install): keep bundled Node ahead of system Node on Windows
Two paths let a pre-existing system Node win over the Hermes-managed one.

The desktop backend spawn built its managed-Node PATH entry as
`<home>/node/bin` only. That is the POSIX layout install.sh produces;
install.ps1 unpacks portable Node straight into `%LOCALAPPDATA%\hermes\node`
with node.exe at the root and no `bin\`. On Windows the entry therefore
pointed at a directory that does not exist, and the backend fell through to
whatever Node was already on PATH.

main.ts already had the correct platform-ordered list, behind a "keep this
in sync with iter_hermes_node_dirs()" comment on a second copy of the rule.
The two copies had drifted. Export the ordering from backend-env.ts and have
main.ts consume it so there is one source of truth on the Node side (the
Electron main process cannot import hermes_constants.py, so a mirror is
unavoidable — but one mirror, not two).

install.ps1 appended the node dir to the persisted User PATH instead of
prepending it. The session PATH was already prepended correctly, so this only
bit later processes: any shell opened after install, and a standalone
hermes-setup.exe run that inherits User PATH rather than a curated env, both
resolved a system Node ahead of the bundled one.

Not a bug, for the record: update.rs's prepend list omits the same Windows
root, but it inherits PATH from the desktop, which supplies the correct
entries — so it is redundant rather than broken, and no installer rebuild is
needed for this fix.

Tests: managed dirs lead with the platform-native layout while always
offering both shapes, empty without a home, and every managed dir outranks
the inherited PATH on darwin and win32. The three existing tests that pinned
`entries[1]` by index asserted the old single-dir shape and now assert the
relationship instead.

install.ps1 has no behavioral test here: CI has no PowerShell host, and
AGENTS.md bans source-reading tests (the neighbouring
test_install_ps1_node_path_for_npm.py predates that rule).
2026-08-01 20:09:35 -04:00
..
active-runtime-state.test.ts fix(desktop): launch a usable active runtime without a bootstrap marker 2026-07-26 16:12:14 -05:00
active-runtime-state.ts fix(desktop): launch a usable active runtime without a bootstrap marker 2026-07-26 16:12:14 -05:00
backend-child.ts
backend-command.test.ts
backend-command.ts
backend-connection-state.test.ts
backend-connection-state.ts
backend-env.test.ts fix(desktop,install): keep bundled Node ahead of system Node on Windows 2026-08-01 20:09:35 -04:00
backend-env.ts fix(desktop,install): keep bundled Node ahead of system Node on Windows 2026-08-01 20:09:35 -04:00
backend-health.test.ts fmt(js): `npm run fix` on merge (#71740) 2026-07-26 04:11:26 +00:00
backend-health.ts fix(desktop): read a readiness-probe 401 by whether it was credentialed 2026-07-25 21:52:26 -05:00
backend-probes.test.ts fix(desktop): raise backend probe timeout and retry on timeout 2026-07-29 13:59:11 +05:30
backend-probes.ts fix(desktop): widen probe-budget fix to sibling boot-path probes 2026-07-29 16:52:53 +05:30
backend-ready.test.ts
backend-ready.ts
backend-start-failure.test.ts fix(desktop): latch a confirmed remote reauth failure so the overlay stays clickable 2026-07-25 21:52:45 -05:00
backend-start-failure.ts fix(desktop): latch a confirmed remote reauth failure so the overlay stays clickable 2026-07-25 21:52:45 -05:00
bootstrap-platform.test.ts
bootstrap-platform.ts
bootstrap-repair-guard.test.ts fix(desktop): break renderer-led reinstall loop on transient backend stalls 2026-07-31 22:33:53 -07:00
bootstrap-repair-guard.ts fmt(js): `npm run fix` on merge (#76404) 2026-08-01 20:45:40 +00:00
bootstrap-runner.test.ts fmt(js): `npm run fix` on merge (#67749) 2026-07-19 23:42:14 +00:00
bootstrap-runner.ts fmt(js): `npm run fix` on merge (#67749) 2026-07-19 23:42:14 +00:00
connection-apply.test.ts style(desktop): satisfy merged eslint/prettier config 2026-07-20 23:01:49 +02:00
connection-apply.ts feat(desktop): add "Connect to existing Hermes" option to first-run onboarding 2026-07-24 12:55:06 -05:00
connection-config.test.ts fix(desktop): reject reserved remote profile names 2026-08-01 14:30:16 -07:00
connection-config.ts fix(desktop): reject reserved remote profile names 2026-08-01 14:30:16 -07:00
crash-forensics.test.ts fix(desktop): record main-process faults in desktop.log 2026-07-27 13:41:59 -05:00
crash-forensics.ts fix(desktop): record main-process faults in desktop.log 2026-07-27 13:41:59 -05:00
dashboard-token.test.ts
dashboard-token.ts
desktop-electron-pin.test.ts
desktop-installation.test.ts style(desktop): satisfy merged eslint/prettier config 2026-07-20 23:01:49 +02:00
desktop-installation.ts style(desktop): satisfy merged eslint/prettier config 2026-07-20 23:01:49 +02:00
desktop-uninstall.test.ts
desktop-uninstall.ts
dev-cdp.test.ts feat(desktop): on by default for dev-server runs 2026-07-27 23:52:33 -05:00
dev-cdp.ts feat(desktop): on by default for dev-server runs 2026-07-27 23:52:33 -05:00
embed-referer.ts
entitlements.mac.inherit.plist build(desktop): declare camera usage for signed macOS builds 2026-07-28 13:40:44 -05:00
entitlements.mac.plist build(desktop): declare camera usage for signed macOS builds 2026-07-28 13:40:44 -05:00
event-dedupe.test.ts fix(desktop): de-dupe cross-window cues so peers don't spam 2026-07-20 18:33:14 -05:00
event-dedupe.ts refactor(desktop): tidy the cross-window deduper 2026-07-20 18:36:05 -05:00
find-git-bash.test.ts style(desktop): apply eslint/prettier conventions to find-git-bash module 2026-07-23 17:59:58 -07:00
find-git-bash.ts style(desktop): apply eslint/prettier conventions to find-git-bash module 2026-07-23 17:59:58 -07:00
find-in-page.test.ts fmt(js): `npm run fix` on merge (#72411) 2026-07-27 02:52:53 +00:00
find-in-page.ts fmt(js): `npm run fix` on merge (#72411) 2026-07-27 02:52:53 +00:00
first-run-setup-gate.test.ts feat(desktop): add "Connect to existing Hermes" option to first-run onboarding 2026-07-24 12:55:06 -05:00
first-run-setup-gate.ts feat(desktop): add "Connect to existing Hermes" option to first-run onboarding 2026-07-24 12:55:06 -05:00
first-run-setup-main-process.test.ts feat(desktop): add "Connect to existing Hermes" option to first-run onboarding 2026-07-24 12:55:06 -05:00
fs-read-dir.test.ts
fs-read-dir.ts
gateway-ws-probe.test.ts
gateway-ws-probe.ts
git-repo-scan.test.ts fmt(js): `npm run fix` on merge (#68681) 2026-07-21 14:28:28 +00:00
git-repo-scan.ts fmt(js): `npm run fix` on merge (#68681) 2026-07-21 14:28:28 +00:00
git-review-ops.test.ts fix(desktop): support spaced Windows Git paths in review 2026-07-19 12:22:23 -07:00
git-review-ops.ts fix(desktop): support spaced Windows Git paths in review 2026-07-19 12:22:23 -07:00
git-root.test.ts
git-root.ts
git-worktree-ops.test.ts
git-worktree-ops.ts
hardening.test.ts fix(desktop): dedicated reader for large remote attachments 2026-07-28 19:20:14 -05:00
hardening.ts fix(desktop): dedicated reader for large remote attachments 2026-07-28 19:20:14 -05:00
link-title-window.test.ts
link-title-window.ts perf(desktop): let the hidden link-title window throttle 2026-07-31 00:38:11 -05:00
main-window-lifecycle.test.ts
main-window-lifecycle.ts
main.ts fix(desktop,install): keep bundled Node ahead of system Node on Windows 2026-08-01 20:09:35 -04:00
native-auth-decisions.test.ts fix(desktop): name the readiness-probe auth and password-gateway guard decisions 2026-07-25 21:52:40 -05:00
native-auth-decisions.ts fix(desktop): name the readiness-probe auth and password-gateway guard decisions 2026-07-25 21:52:40 -05:00
native-oauth-login.test.ts fmt(js): `npm run fix` on merge (#69503) 2026-07-22 16:30:14 +00:00
native-oauth-login.ts fmt(js): `npm run fix` on merge (#69503) 2026-07-22 16:30:14 +00:00
native-oauth.test.ts fmt(js): `npm run fix` on merge (#75517) 2026-07-31 16:22:58 +00:00
native-oauth.ts fix(desktop): restore native OAuth tokens after restart 2026-07-31 10:16:21 -04:00
native-token-store.test.ts fix(desktop): redact gateway credentials from token logs 2026-07-31 10:16:21 -04:00
native-token-store.ts fix(desktop): redact gateway credentials from token logs 2026-07-31 10:16:21 -04:00
oauth-net-request.test.ts
oauth-net-request.ts
power-save.test.ts feat(desktop): keep-computer-awake toggle + System settings section 2026-07-20 11:50:22 -05:00
power-save.ts feat(desktop): keep-computer-awake toggle + System settings section 2026-07-20 11:50:22 -05:00
preload.ts feat(desktop): add notch wake indicator 2026-08-01 14:30:11 -07:00
primary-backend-startup.test.ts feat(desktop): add "Connect to existing Hermes" option to first-run onboarding 2026-07-24 12:55:06 -05:00
primary-backend-startup.ts fmt(js): `npm run fix` on merge (#75582) 2026-07-31 18:54:27 +00:00
primary-connection-rehome.ts feat(desktop): add "Connect to existing Hermes" option to first-run onboarding 2026-07-24 12:55:06 -05:00
profile-delete-routing.test.ts
profile-delete-routing.ts
profile-session-routing.test.ts fix(desktop): preserve OAuth sessions in sidebar 2026-07-27 13:41:56 -05:00
profile-session-routing.ts fix(desktop): preserve OAuth sessions in sidebar 2026-07-27 13:41:56 -05:00
quick-entry.test.ts feat(desktop): quick-entry window — global hotkey capture to any session 2026-07-26 17:48:19 -07:00
quick-entry.ts fmt(js): `npm run fix` on merge (#75582) 2026-07-31 18:54:27 +00:00
quit-guard.test.ts feat(desktop): confirm before quitting with a turn in flight 2026-07-27 15:47:57 -05:00
quit-guard.ts feat(desktop): confirm before quitting with a turn in flight 2026-07-27 15:47:57 -05:00
remote-lifecycle.test.ts style(desktop): satisfy mapped-profile test lint 2026-08-01 14:30:16 -07:00
remote-lifecycle.ts fix(desktop): map SSH profiles to remote profiles 2026-08-01 14:30:16 -07:00
remote-liveness.test.ts fix(desktop): record main-process faults in desktop.log 2026-07-27 13:41:59 -05:00
remote-liveness.ts fix(desktop): retire pooled remote backends whose host went away 2026-07-27 13:41:59 -05:00
session-windows.test.ts perf(desktop): scope background-throttling opt-out to live streaming 2026-07-31 00:38:11 -05:00
session-windows.ts perf(desktop): scope background-throttling opt-out to live streaming 2026-07-31 00:38:11 -05:00
spawn-helper-perms.test.ts fix(desktop): resolve unpacked spawn-helper before chmod (#71171) 2026-07-25 15:19:29 -04:00
spawn-helper-perms.ts fix(desktop): resolve unpacked spawn-helper before chmod (#71171) 2026-07-25 15:19:29 -04:00
ssh-bootstrap-coordinator.test.ts fix(desktop): map SSH profiles to remote profiles 2026-08-01 14:30:16 -07:00
ssh-bootstrap-coordinator.ts fix(desktop): map SSH profiles to remote profiles 2026-08-01 14:30:16 -07:00
ssh-config.test.ts style(desktop): satisfy merged eslint/prettier config 2026-07-20 23:01:49 +02:00
ssh-config.ts style(desktop): satisfy merged eslint/prettier config 2026-07-20 23:01:49 +02:00
ssh-connection.test.ts style(desktop): satisfy merged eslint/prettier config 2026-07-20 23:01:49 +02:00
ssh-connection.ts style(desktop): satisfy merged eslint/prettier config 2026-07-20 23:01:49 +02:00
stream-throttle.test.ts perf(desktop): scope background-throttling opt-out to live streaming 2026-07-31 00:38:11 -05:00
stream-throttle.ts perf(desktop): scope background-throttling opt-out to live streaming 2026-07-31 00:38:11 -05:00
titlebar-overlay-width.test.ts
titlebar-overlay-width.ts
update-count.test.ts
update-count.ts
update-gate.test.ts fix(desktop): gate backend respawns on updateInFlight, not just the update marker (#73822) 2026-07-28 23:53:25 -07:00
update-gate.ts fix(desktop): gate backend respawns on updateInFlight, not just the update marker (#73822) 2026-07-28 23:53:25 -07:00
update-marker.test.ts fix(desktop): refuse a second update hand-off while one is already live 2026-08-01 10:47:45 -07:00
update-marker.ts fix(desktop): refuse a second update hand-off while one is already live 2026-08-01 10:47:45 -07:00
update-rebuild.test.ts
update-rebuild.ts
update-relaunch.test.ts
update-relaunch.ts
update-remote.test.ts
update-remote.ts
updater-process.test.ts fmt(js): `npm run fix` on merge (#76404) 2026-08-01 20:45:40 +00:00
updater-process.ts fix(desktop): make the non-Windows updater bypass an explicit policy 2026-07-31 22:33:53 -07:00
venv-blocker-scan.test.ts fmt(js): `npm run fix` on merge (#73666) 2026-07-28 21:55:38 +00:00
venv-blocker-scan.ts fmt(js): `npm run fix` on merge (#73666) 2026-07-28 21:55:38 +00:00
vscode-marketplace.test.ts
vscode-marketplace.ts
wake-indicator-window.ts feat(desktop): add notch wake indicator 2026-08-01 14:30:11 -07:00
wake-indicator.test.ts fix(desktop): close wake indicator with main window 2026-08-01 14:30:11 -07:00
wake-indicator.ts feat(desktop): add notch wake indicator 2026-08-01 14:30:11 -07:00
window-state.test.ts
window-state.ts
windows-child-options.test.ts
windows-child-options.ts
windows-hermes-path.test.ts
windows-hermes-path.ts
windows-remote-lifecycle.test.ts fix(desktop): map SSH profiles to remote profiles 2026-08-01 14:30:16 -07:00
windows-remote-lifecycle.ts fix(desktop): map SSH profiles to remote profiles 2026-08-01 14:30:16 -07:00
windows-remote-live.test.ts style(desktop): satisfy merged eslint/prettier config 2026-07-20 23:01:49 +02:00
windows-sandbox-fallback.test.ts fix(desktop): harden Windows sandbox fallback against false-positive sandbox loss 2026-07-18 02:26:19 -07:00
windows-sandbox-fallback.ts fix(desktop): harden Windows sandbox fallback against false-positive sandbox loss 2026-07-18 02:26:19 -07:00
windows-system-ca.test.ts
windows-system-ca.ts
windows-user-env.test.ts
windows-user-env.ts
workspace-cwd.test.ts
workspace-cwd.ts
wsl-clipboard-image.test.ts
wsl-clipboard-image.ts
wsl-path-bridge.test.ts
wsl-path-bridge.ts
zoom.test.ts feat(desktop): add notch wake indicator 2026-08-01 14:30:11 -07:00
zoom.ts feat(desktop): add notch wake indicator 2026-08-01 14:30:11 -07:00