hermes-agent/apps/desktop/electron
Brooklyn Nicholson 97a8034dfd refactor(desktop): resolve profile backend routing from one table
Three helpers each re-derived part of the same decision: which backend
serves profile P, and does its REST path need a `?profile=` scope.
profileUsesPrimaryBackend answered the first half, pathWithGlobalRemoteProfile
answered the second, and ensureBackend re-checked globalRemoteActive() around
both. Splitting one table across three predicates is how the global-remote
case ended up registering reapable pool entries for a backend it never owned.

resolveProfileBackendRoute() states the four routes in one place and returns
the backend, the descriptor scope, and whether the path needs a query
parameter. The call sites read the answer instead of recomputing it.

One behavior change falls out: `hermes:api` now passes the primary profile
through, so the primary no longer sends itself a redundant `?profile=<self>`
on a global remote that already serves it.
2026-07-27 13:44:11 -05:00
..
active-runtime-state.test.ts
…
active-runtime-state.ts
…
backend-child.ts
…
backend-command.test.ts
…
backend-command.ts
…
backend-connection-state.test.ts
…
backend-connection-state.ts
…
backend-env.test.ts
…
backend-env.ts
…
backend-health.test.ts
…
backend-health.ts
…
backend-probes.test.ts
…
backend-probes.ts
…
backend-ready.test.ts
…
backend-ready.ts
…
backend-start-failure.test.ts
…
backend-start-failure.ts
…
bootstrap-platform.test.ts
…
bootstrap-platform.ts
…
bootstrap-runner.test.ts
…
bootstrap-runner.ts
…
connection-apply.test.ts
…
connection-apply.ts
…
connection-config.test.ts refactor(desktop): resolve profile backend routing from one table 2026-07-27 13:44:11 -05:00
connection-config.ts refactor(desktop): resolve profile backend routing from one table 2026-07-27 13:44:11 -05: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
…
desktop-installation.ts
…
desktop-uninstall.test.ts
…
desktop-uninstall.ts
…
embed-referer.ts
…
entitlements.mac.inherit.plist
…
entitlements.mac.plist
…
event-dedupe.test.ts
…
event-dedupe.ts
…
find-git-bash.test.ts
…
find-git-bash.ts
…
find-in-page.test.ts
…
find-in-page.ts
…
first-run-setup-gate.test.ts
…
first-run-setup-gate.ts
…
first-run-setup-main-process.test.ts
…
fs-read-dir.test.ts
…
fs-read-dir.ts
…
gateway-ws-probe.test.ts
…
gateway-ws-probe.ts
…
git-repo-scan.test.ts
…
git-repo-scan.ts
…
git-review-ops.test.ts
…
git-review-ops.ts
…
git-root.test.ts
…
git-root.ts
…
git-worktree-ops.test.ts
…
git-worktree-ops.ts
…
hardening.test.ts
…
hardening.ts
…
link-title-window.test.ts
…
link-title-window.ts
…
main-window-lifecycle.test.ts
…
main-window-lifecycle.ts
…
main.ts refactor(desktop): resolve profile backend routing from one table 2026-07-27 13:44:11 -05:00
native-auth-decisions.test.ts
…
native-auth-decisions.ts
…
native-oauth-login.test.ts
…
native-oauth-login.ts
…
native-oauth.test.ts
…
native-oauth.ts
…
oauth-net-request.test.ts
…
oauth-net-request.ts
…
power-save.test.ts
…
power-save.ts
…
preload.ts
…
primary-backend-startup.test.ts
…
primary-backend-startup.ts
…
primary-connection-rehome.ts
…
profile-delete-routing.test.ts
…
profile-delete-routing.ts
…
profile-session-routing.test.ts
…
profile-session-routing.ts
…
quick-entry.test.ts
…
quick-entry.ts
…
remote-lifecycle.test.ts
…
remote-lifecycle.ts
…
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
…
session-windows.ts
…
spawn-helper-perms.test.ts
…
spawn-helper-perms.ts
…
ssh-bootstrap-coordinator.test.ts
…
ssh-bootstrap-coordinator.ts
…
ssh-config.test.ts
…
ssh-config.ts
…
ssh-connection.test.ts
…
ssh-connection.ts
…
titlebar-overlay-width.test.ts
…
titlebar-overlay-width.ts
…
update-count.test.ts
…
update-count.ts
…
update-marker.test.ts
…
update-marker.ts
…
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
…
updater-process.ts
…
vscode-marketplace.test.ts
…
vscode-marketplace.ts
…
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
…
windows-remote-lifecycle.ts
…
windows-remote-live.test.ts
…
windows-sandbox-fallback.test.ts
…
windows-sandbox-fallback.ts
…
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
…
zoom.ts
…