Skip to content

Add custom coordination server support#83

Open
dantraynor wants to merge 4 commits into
mainfrom
issue-79
Open

Add custom coordination server support#83
dantraynor wants to merge 4 commits into
mainfrom
issue-79

Conversation

@dantraynor

@dantraynor dantraynor commented May 29, 2026

Copy link
Copy Markdown
Owner

What

Adds custom coordination server URL support across the native host, background state, and popup UI, and bumps the extension/helper version to 0.2.0.

Why

Closes #79

How to Test

  • go test ./...
  • pnpm typecheck
  • pnpm test
  • pnpm e2e:chrome -- --suite=full --grep="needs update on host version mismatch"

Checklist

  • Tested in Chrome
  • Tested in Firefox
  • Updated README if needed

# Conflicts:
#	docs/DOCUMENTATION.md
#	packages/extension/package.json
#	packages/shared/package.json
#	packages/shared/src/background/background.test.ts
#	packages/shared/src/constants.ts
#	packages/shared/src/popup/views/connected.ts
#	scripts/e2e/fixtures.mjs
#	scripts/e2e/native-host.mjs
#	scripts/e2e/scenarios/connected-dashboard.mjs
@dantraynor dantraynor marked this pull request as ready for review May 29, 2026 04:38
Follow-up fixes to the custom coordination server feature.

Native host:
- Reword the failed-switch rollback message to reflect that logout
  already signed the node out and a new login is required.
- Clear the old tailnet's exit-node prefs when switching servers so a
  now-invalid ExitNodeID isn't carried onto the new server.
- Reset cached prefs on the double-failure rollback paths.
- Keep IPv6 brackets in control-URL compare keys (net.JoinHostPort).
- Validate the control URL at the host boundary.

Extension:
- Accept http:// coordination URLs (HTTP Headscale), matching the host.
- Preserve unsaved input across status updates via a dirty flag.
- Patch the Admin Console footer link in place instead of re-rendering.
- Keep waiting for a fresh login URL instead of opening a stale one.
- Allow reverting to the default server when the helper lacks support.
- Validate the control URL at the background boundary.
- Single-source the default-origin list shared across modules.
- Clear the cached login URL and saved exit node on a server switch so
  an immediate re-login or post-restart restore can't reuse old data.
- Consolidate the coordination editor wiring across the connected,
  needs-login, and disconnected views into one focus-preserving helper.

Add Go and TypeScript tests for the new behavior.
Three correctness fixes for switching to a custom coordination server:

- controlServerChanged now mirrors the host's compare key (scheme+host
  lowercased, path/query preserved) so a same-origin path-only switch is
  detected as a real change instead of looking unchanged.
- Drop the saved exit node reactively, only once a status update confirms
  the host committed the new server, so a rolled-back switch no longer
  loses it. The optimistic browseToURL clear stays.
- Narrow the pending-login "stay pending" branch to stale default-origin
  URLs only; a genuinely-invalid custom login URL now surfaces an error
  toast instead of spinning silently until the timeout.
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.

Custom coordination server (Headscale) support

1 participant