Repository navigation
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
An expired login on the saved primary gateway can put “Hermes couldn't start” over the entire Desktop window even after the user has selected a healthy local gateway. The local backend still answers requests, but the overlay prevents opening Settings or using the foreground workspace.
This change keeps post-startup authentication recovery attached to the affected primary. An already-open healthy secondary remains usable; returning to the affected primary still shows its sign-in recovery. Genuine initial-startup failures are unchanged.
Why it matters / suggested P2: this is failure isolation for supported multi-gateway use, not a cosmetic error-message change. Recovering the expired primary login is the existing escape; it should not be a prerequisite for using another working gateway.
Related Issue
Related to #90149. #105139 and #102673 address connection switching/readiness and profile caches; neither changes these boot-error presentation paths. This PR is independently mergeable and does not replace those contributions.
Type of Change
Changes Made
apps/desktop/src/app/gateway/hooks/use-gateway-boot.ts: scope reconnect errors, progress events and delayed boot snapshots; preserve/restore primary recovery when foreground ownership changes.apps/desktop/src/app/gateway/hooks/use-gateway-boot.test.tsx: reproduce the blocked healthy-secondary case and retain ordinary-outage/primary-recovery controls.How to Test
Run against head
a8e46c6358bd4d34bcc61ee35908c49cbe8dc6a7:cd apps/desktop npx --no-install vitest run src/app/gateway/hooks/use-gateway-boot.test.tsx src/components/boot-failure-reauth.test.ts npm run typecheckPublished-head focused verification: 72 tests / 2 files passed, plus all three Desktop TypeScript projects.
Additional isolated Electron evidence used the real renderer, preload, IPC, managed-local spawning and backend requests with a synthetic remote-auth facade: baseline 401 and 403 cases each failed the shell/Settings assertions while local ping succeeded; the unchanged reviewed fix passed 7/7 checks in each case. Refusal and blackhole controls passed 17/17 each. The named checks cover: boot and hidden-window isolation; observing the actual ticket rejection; a successful managed-local ping; no foreground-blocking overlay; opening local Settings; and clean hidden-window completion. This is not a claim of testing the real hosted Cloud/OAuth service.
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/A (inline behavior comments updated; no new setup required)cli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
The regressions above were run against the baseline and the reviewed fix.
git diff --checkand the public-data/secret scan passed. Independent code review and isolated UI review were completed before publication. Private workspace screenshots are intentionally omitted; no user data or configuration is included.No new dependencies, configuration keys or model-tool schemas. No Python source changes; the full Python suite was not run and its checklist item remains unchecked. macOS was executed; Windows/Linux were considered but not run locally. Live CI results are available in the PR checks rather than frozen here.