Skip to content

fix(host): say when Ace Helper needs a restart to use Tailscale - #555

Merged
iamnbutler merged 2 commits into
mainfrom
tailscale-later
Oct 22, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
tailscale-later

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Addresses gap g4 from the onboarding map: Tailscale and identity are read once. Refs #539 (does not close it: the host still needs a restart, but now says so).

The host reads its tailnet and owner login once at startup (catalog.ts), and everything tailnet-facing follows from that read in serve(): the team listeners bound to the tailnet address, the HTTPS certificate, the peer watch, the directory entry and lobby presence, and catalog.user, which decides who the local owner is for every access check. A live re-read would mean rebinding listeners and changing the owner of a running host, which is far from a small change. So this PR makes the UI and the failure tell the truth instead:

  • diagnostics compares the running tailnet with the one the host started on and sets tailscale.restart when they differ (Tailscale came on later, or the tailnet changed).
  • Settings → Team's Tailscale row then reads Restart needed, explains that Ace Helper started before this tailnet was connected, and offers a Restart button (the desktop's existing helper restart).
  • Creating a channel without a tailnet now says Restart Ace Helper: it started before Tailscale was running. (or Restart ace serve for a command-line host) when Tailscale is running now, instead of Start Tailscale first.

Smoke-tested with a source host (ace serve --port 4411 --loopback, isolated ACE_HOME/ACE_CONFIG_HOME/keychain service) and a tailscale shim first on PATH that reports Stopped until a flag file exists, then defers to the real CLI:

  • before: diagnostics offline, create fails with "Start Tailscale first";
  • after the flag: diagnostics running with restart: true, create fails with "Restart ace serve: …";
  • after restarting the host: no restart flag, create succeeds.

Not verified: the Settings → Team row and its Restart button were not exercised in the desktop app (types and lint pass); real Tailscale was never toggled.

Built in Ace

No. Claude Code worked on this outside Ace, in a lane, because the user was away and it ran unattended from a terminal session; no Ace channel was driving it. Tracked under dogfooding #5.

The host reads its tailnet once at startup; its tailnet listeners, peer
watch, directory entry, and owner login all follow from that read, so a
live re-read would mean rebinding them. Instead, diagnostics flag a
running tailnet the host did not start on, Settings → Team shows
"Restart needed" with a Restart button, and channel creation says to
restart instead of to start Tailscale.

Refs #539
@iamnbutler
iamnbutler merged commit 10a6db7 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the tailscale-later branch October 22, 2026 00:07
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