Skip to content

fix(mobile): label direct paths with the shared Tailscale check - #23039

Merged
Jinwoo-H merged 3 commits into
mainfrom
fix/mobile-shared-tailscale-label
Sep 26, 2026
Merged

Jinwoo-H merged 3 commits into
mainfrom
fix/mobile-shared-tailscale-label

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3

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 (a 100.x address 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: directPathForEndpoint calls the shared isTailscaleEndpoint (src/shared/remote-runtime-tailscale-hint.ts), so both agree: only Tailscale's 100.64.0.0/10 range, .ts.net names and its fd7a:115c:a1e0: IPv6 prefix count as Tailscale.

Also:

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

  • I manually tested these changes locally
  • Automated tests added/updated: mobile-direct-endpoint-probe.test.ts now covers a Tailscale IPv6 address and an out-of-range 100.x address.

On macOS in mobile/: pnpm test (884 files, 9559 passed), pnpm typecheck, pnpm check:tests-typecheck, pnpm lint, oxfmt --check .; root pnpm 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

  • Not applicable

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test pass locally in mobile/

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]>
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 180c3a6a-b2a7-407c-8f24-015355714994

📥 Commits

Reviewing files that changed from the base of the PR and between 2beec29 and efc7b6e.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: da882790-fee4-4e52-8e39-cfaa875488c1

📥 Commits

Reviewing files that changed from the base of the PR and between 02a5594 and 642e1e1.

📒 Files selected for processing (5)
  • mobile/src/transport/mobile-direct-endpoint-probe.test.ts
  • mobile/src/transport/mobile-direct-endpoint-probe.ts
  • mobile/src/transport/mobile-endpoint-supervisor.ts
  • mobile/src/transport/mobile-relay-host-overlay-store.ts
  • mobile/src/transport/mobile-relay-session-establisher.ts
💤 Files with no reviewable changes (1)
  • mobile/src/transport/mobile-relay-session-establisher.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The 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 642e1

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: mobile direct paths now use the shared Tailscale check.
Description check ✅ Passed The description covers the change, rationale, linked issues, lack of visual impact, testing, scope, and checklist. The AI Disclosure and Notes sections are omitted, but the description is otherwise su…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the full single-commit diff (5 files, 642e1e1).

  • Shared Tailscale classification — directPathForEndpoint now calls isTailscaleEndpoint instead of a local .ts.net + broad 100.x.x.x check, so a 100.x address outside 100.64.0.0/10 is labelled lan and a Tailscale IPv6 literal is labelled tailscale.
  • Test coverage — adds the IPv6 (fd7a:115c:a1e0::/48) and out-of-range 100.12.0.2 cases; 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 adoptRelay comment reiterated the setRelayRouting doc in host-store.ts:154-157.
  • Mutation chain typing — overlayMutation is Promise<void> and the tail settles errors via .then(() => {}, () => {}), matching host-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.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit 457a84d into main Sep 26, 2026
24 checks passed
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