Skip to content

fix(desktop): keep gateway recovery available offline - #1154

Merged
nixuuu merged 1 commit into
devfrom
fix/gateway-connection-failure
Nov 23, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/gateway-connection-failure

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 23, 2026

Copy link
Copy Markdown
Member

Change

  • Open Settings while the first gateway sync is pending. The outage screen and connection popover can open the local Desktop connection form.
  • Probe the saved HTTPS address alongside the gateway's advertised routes. An address change for the same paired gateway keeps its certificate pin, device credential, and worker profile across a restart.
  • Verify the entered address against the invitation pin when pairing. A different pin selects a separate worker profile.

Verification

  • Desktop and web typechecks, focused lint and formatting, and git diff --check passed locally.
  • Five focused Desktop tests passed under check:tmp. They cover configuration validation, recovery after changing the address and restarting, and rejecting a pairing route with the wrong pin.
  • Chromium at 1280 px and 390 px exercised an unreachable gateway using the local BFF and a simulated Desktop bridge. The checks covered opening Settings, closing a direct Settings route with Escape, and opening the Desktop connection form from the outage UI.
  • Native macOS Keychain and the affected MacBook connection remain unverified. GitHub CI runs the repository-wide gate.

Copy audit

  • The outage screen and popover add Open desktop settings, matching the startup recovery action. The label identifies the local destination without relying on the status dot.
  • The secure Network access address. Use your existing address when reconnecting. → Use an HTTPS address from Network access on your gateway. The field now explains where to get an alternate address.
  • Pairing and address errors give a recovery action. Chromium checks verified that the recovery button fits in the narrow layout.

Fixes: #68

Open Settings before the first gateway sync and expose desktop connection settings from the outage screen. Probe the saved HTTPS address with the existing Desktop pin and preserve the worker profile across address changes.

Fixes: #68
@nixuuu
nixuuu enabled auto-merge (squash) November 23, 2026 10:57
@nixuuu
nixuuu merged commit e88d0ad into dev Nov 23, 2026
16 checks passed
@nixuuu
nixuuu deleted the fix/gateway-connection-failure branch November 23, 2026 11:06
nixuuu added a commit that referenced this pull request Nov 24, 2026
## Changes

- Show the local Desktop worker and the gateway address saved by the app
in Workers and Desktop settings. Identify workers registered on the
remote gateway separately and label stale worker data during an outage.
- Open the existing local settings window from the outage UI. Put the
saved address first when editing an existing connection. Address changes
retain the paired credential, certificate pin, and worker profile for
the same gateway.
- Keep the worker’s own connection settings in its existing profile.
Offline inspection or reassignment of a worker’s enrollment endpoint
would be a separate feature.

Thanks @marcinniewinski for reporting this.

## Verification

- Verified `cb719e493` locally on Linux. Ran Electron with its renderer
sandbox and an isolated Secret Service keychain. Checked initial
pairing, reachable gateway settings, a cold start with the gateway
unreachable, the prefilled address, native Cancel and Save, reconnection
without a new pairing, and persistence across restart. An unchanged save
closed the chooser without rewriting the configuration.
- Also exercised an outage after a successful connection, startup
recovery for an older unpaired profile, and the Workers and Desktop
screens in local mode with its worker connected.
- Ran the three focused Desktop test files through `check:tmp`. All 10
passed, including the bundled local gateway, PostgreSQL and worker,
remote enrollment, TLS pinning, configuration validation, and restart
durability.
- Built the Linux Desktop runtime. Web typecheck, focused lint and
formatting, and diff checks passed. Windows and macOS were not run
locally. GitHub CI provides the merge gate.

## Copy audit

- **This computer** now describes the local Desktop in remote mode.
**Workers on the remote gateway** labels the gateway’s list, and the
offline copy identifies when that list is stale or has yet to load.
- **Open desktop settings** becomes **Edit gateway address** at remote
recovery entry points. **Desktop gateway address** identifies the
address used by the app. The form explains that an enrolled worker keeps
its connection settings and gives the invitation path for switching
gateways.
- Checked the labels and address layout in Chromium at desktop width and
a 390 px viewport. Actions and status labels use text.

Related: #1154

---------

Co-authored-by: Damian Plewa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant