fix(desktop): separate LAN and Tailscale pairing endpoints - #217
Open
leoisadev1 wants to merge 1 commit into
Open
fix(desktop): separate LAN and Tailscale pairing endpoints#217leoisadev1 wants to merge 1 commit into
leoisadev1 wants to merge 1 commit into
Conversation
When Tailscale is enumerated before Wi-Fi, desktop pairing advertised the tailnet address as both Local network and Tailscale. Automatic LAN discovery now skips tailnet addresses while Tailscale-only machines stay network-accessible. Adapted from pingdotgg#9882. Implemented with Grok 4.6 High in Grok Build via Orca.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR separates automatically discovered LAN and Tailscale pairing endpoints while retaining network-accessible binding on Tailscale-only machines.
Confidence Score: 5/5The PR appears safe to merge; the changed endpoint classification and fallback behavior are internally consistent and covered by targeted tests. No actionable failure was established. Tailscale addresses are excluded only from LAN selection, remain independently advertised, and correctly prevent local-only fallback when tailnet access is available. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Request network-accessible mode] --> B{Explicit host override?}
B -->|Yes| C[Use explicit advertised host]
B -->|No| D{Non-Tailscale LAN IPv4?}
D -->|Yes| E[Advertise LAN endpoint]
D -->|No| F{Tailscale IPv4 present?}
F -->|Yes| G[Remain network-accessible]
G --> H[Advertise Tailscale endpoint separately]
F -->|No| I[Fall back to local-only]
I --> J[Emit bootstrap warning]
Reviews (1): Last reviewed commit: "fix(desktop): separate LAN and Tailscale..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When Tailscale is enumerated before Wi-Fi, desktop pairing advertises the tailnet address as both Local network and Tailscale IP.
Fix
Automatic LAN discovery now skips tailnet addresses. Tailscale-only machines stay network-accessible, and explicit host overrides still win. The bootstrap warning for a missing LAN host only fires when exposure actually fell back to local-only.
Adaptation
Reviewed port of pingdotgg/t3code#9882. Hosted relay was not added.
Scope
This PR is pairing endpoint advertisement only. Cookie isolation is #208. SSH runner ownership is #215. Zed remote open is a separate PR.
Verification
vp test run apps/desktop/src/backend/DesktopServerExposure.test.ts: 10 passed, including Tailscale-first enumeration and Tailscale-only network-accessible hosts.vp run --filter @t3tools/desktop typecheckexited 0.No live bot/group UI changed. Native two-device pairing over LAN and Tailscale was not exercised on this Linux host.
Implemented with Grok 4.6 High in Grok Build via Orca.