Browser dev is now single-origin: Vite proxies /api, /ws, /oauth, and
/.well-known to the backend, and dev/dev:web no longer bake
VITE_HTTP_URL/VITE_WS_URL into the bundle. Absolute localhost URLs in the
bundle sent any remote browser to its own machine, which no amount of
external path mapping could fix.
- `dev --share` publishes the web port on the tailnet and logs a pairing
URL already built against that origin
- `dev:pair` mints a pairing URL for a running server, resolving port and
state dir from server-runtime.json
- Ports derive from the worktree path, so each worktree is stable across
restarts; the availability probe is loopback-only so `tailscale serve`
can't push the port
- Web session cookies are port-scoped like desktop's, ending the
cross-instance "Invalid session token signature" loop
- Dev startup pairing tokens last 24h instead of 5m; user-issued links
keep the 5m default
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>