Repository navigation
fix(mobile): label direct paths with the shared Tailscale check - #23039
Conversation
directPathForEndpoint hand-rolled Tailscale detection that called any 100.x address a tailnet and missed Tailscale IPv6, so the same endpoint could be labelled differently from the direct connection log. It now uses the shared isTailscaleEndpoint. Also: a stale no-relay comment, a duplicate routing doc line, and the overlay chain settling to Promise<void>. Co-authored-by: mmarabel <[email protected]> Co-authored-by: Neil <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe direct endpoint probe now uses the shared Tailscale endpoint classifier. Its test covers a tailnet IPv6 address and an IPv4 address classified as LAN. The relay host overlay mutation queue now advances on both fulfillment and rejection. Two transport comments are revised or removed. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The endpoint classifications and mutation-queue behavior are consistent across the inspected paths. No actionable merge-blocking risk is established; the change is ready to merge subject to normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run reviewed the full single-commit diff (5 files, 642e1e1).
- Shared Tailscale classification —
directPathForEndpointnow callsisTailscaleEndpointinstead of a local.ts.net+ broad100.x.x.xcheck, so a100.xaddress outside100.64.0.0/10is labelledlanand a Tailscale IPv6 literal is labelledtailscale. - Test coverage — adds the IPv6 (
fd7a:115c:a1e0::/48) and out-of-range100.12.0.2cases; both would fail against the old local check, so the test pins the behavior rather than restating it. - Stale comment removed — supervisor comment no longer references the "no-relay" guard that #22956 deleted.
- Duplicate comment removed — the
adoptRelaycomment reiterated thesetRelayRoutingdoc inhost-store.ts:154-157. - Mutation chain typing —
overlayMutationisPromise<void>and the tail settles errors via.then(() => {}, () => {}), matchinghost-list-mutation-queue.ts.
The narrowing is contained: tailscale vs lan only reaches the two label helpers (mobile-connection-path-label.ts:7, connection-diagnostics-analysis.ts:278); all behavioral path checks compare against relay. It also brings the direct-path label in line with the diagnostics module, which already used the shared helper.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
After #22956, the mobile app decided whether a direct connection was "Tailscale" or "LAN" with its own small check, while the connection log used the shared one. The two disagreed on some addresses. This makes both use the shared check, plus a few tidy-ups the final review of #22956 asked for.
What Changed
Before: a direct address like
ws://100.12.0.2(a100.xaddress outside Tailscale's range) was labelled Tailscale by the connection, but LAN by the direct-connection log. A Tailscale IPv6 address was labelled LAN.After:
directPathForEndpointcalls the sharedisTailscaleEndpoint(src/shared/remote-runtime-tailscale-hint.ts), so both agree: only Tailscale's100.64.0.0/10range,.ts.netnames and itsfd7a:115c:a1e0:IPv6 prefix count as Tailscale.Also:
setRelayRoutingdoc is gone.Promise<void>.Why
Follow-up to #22956, from its final elegance review, which landed before these were pushed. Reusing the shared helper removes a duplicate that had already drifted.
Linked Issue
Follow-up to #22956 (#20141).
Visual Proof
N/A: this changes a path label used for logging and connection bookkeeping, plus comments. There is no visible UI change.
Testing
mobile-direct-endpoint-probe.test.tsnow covers a Tailscale IPv6 address and an out-of-range100.xaddress.On macOS in
mobile/:pnpm test(884 files, 9559 passed),pnpm typecheck,pnpm check:tests-typecheck,pnpm lint,oxfmt --check .; rootpnpm run check:code-quality:changed. RPC recording suites replay green with no re-record.Review
Mobile only. No wire, storage or desktop change.
Agent skill upstream boundary
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm testpass locally inmobile/