Repository navigation
Closed
Labels
ready-for-agentFully specified, ready for an AFK agent
Description
Parent
Spec: #1 — Exposure as a set of listen interfaces (bind-hosts lane).
What to build
The desktop's exposure becomes a selection end to end, with no new UI yet.
- Exposure state and the set-exposure IPC gain
listenInterfaces. The legacymoderemains in state as a derived field (local-onlyiff exactly {loopback}). The legacy set-mode input is still accepted and mapped to presets, so untouched upstream consumers keep working. - Persisted desktop settings gain a
listenInterfaceskey with one-way migration from the legacy key (network-accessible→lanpreset;local-only→ {loopback}) and dual write of the derived legacy value so an upstream build reads something sane after a downgrade. - The bootstrap envelope carries the selection — never a pre-resolved IP and never a wildcard. The server resolves.
- Any change to the selection (set inequality on kinds or addresses) requires a full relaunch; there is no hot rebind.
- Tailscale Serve is available only when
tailnetis selected; deselecting it disables Serve, mirroring today's local-only behaviour. - Advertised endpoints derive from the selection: loopback always; tailnet IP (and the MagicDNS HTTPS endpoint when Serve is on) only when
tailnetis selected and resolved; one LAN endpoint per resolved LAN address only whenlanis selected; one endpoint per explicit address. The existing manual endpoint flow is unchanged. - State carries resolved addresses and warnings, computed through the shared resolver for display; the server stays authoritative.
Demo: the existing switch turned on → the backend relaunches with the lan preset. A {loopback, tailnet} selection set via IPC (devtools) → relaunch, only the tailnet endpoint advertised, a LAN client refused. An upgraded settings file migrates without changing exposure.
Interim: until the multi-bind ticket lands, the lan preset binds first-address-plus-warning. Acceptable; note it in the PR.
Acceptance criteria
- Desktop exposure layer tests (existing harness with mocked interfaces, Tailscale spawner, settings dir): migration from the legacy key, persistence round-trip, dual write, relaunch required on set change and not otherwise, Serve gating on
tailnet, endpoints per selection (no LAN endpoint withoutlan, no tailnet endpoint withouttailnet, explicit addresses advertised). - Legacy set-mode IPC still works and maps to presets; the derived
modein state is correct for every selection. - The bootstrap envelope carries the selection; the server parses it; the desktop never sends a resolved IP or a wildcard.
- State exposes resolved addresses and warnings; the desktop network-access atom exposes selection, preset, resolved addresses, and warnings, and its existing test is updated and green (no UI changes).
- Mobile untouched; the contracts change is purely additive.
- New logic in fork-only modules; upstream files receive thin call-site edits only.
Blocked by
t3 serve --host tailnetbinds the tailnet address only #5 —t3 serve --host tailnetbinds the tailnet address only
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, ready for an AFK agent
Activity
t3 serve --host tailnetbinds the tailnet address only #5Merge pull request #14 from Khang5687/feat/desktop-selection
Khang5687 commentedon Sep 16, 2026
Merged into fork-main via #14. Server-side duplicate fallback filed as #15.