Skip to content

fix(remote): name the dialed endpoint in connection errors and stop suggesting Tailscale for LAN addresses - #22529

Open
mmarabel wants to merge 7 commits into
stablyai:mainfrom
mmarabel:mmarabel/fix-connect-error-endpoint-14210
Open

mmarabel wants to merge 7 commits into
stablyai:mainfrom
mmarabel:mmarabel/fix-connect-error-endpoint-14210

Conversation

@mmarabel

@mmarabel mmarabel commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When Orca cannot reach a paired computer, the error message now tells you which address it tried to reach. If that address is a home or office network address (like 192.168.1.20), the message says so and explains that it only works when your device is on that same network. It no longer tells you to install Tailscale when you are already on Tailscale — and when Tailscale genuinely is the fix, it still gives you the download link.

What Changed

Before. A pairing link carried a local-network address, ws://192.168.1.20:6768. A laptop on the same tailnet but not on that LAN could never reach it. Orca's error said:

Could not connect to the remote Orca runtime. If the server is on another network, connect both devices to Tailscale and pair using its Tailscale address (100.x or a *.ts.net name). See https://tailscale.com/download.

Two things are wrong there. It never says which address failed, so the real cause — an unreachable address baked into the pairing link — is invisible. And it recommends Tailscale to someone whose devices are both already on Tailscale.

After.

Could not connect to the remote Orca runtime at ws://192.168.1.20:6768. That is a local-network address. If this device is not on the server's network it cannot reach it — re-pair with an address it can reach, such as the server's Tailscale address (100.x or a *.ts.net name); see https://tailscale.com/download. Otherwise check that the server is awake and not firewalling the port.

The mechanism. withRemoteRuntimeTailscaleHint in src/shared/remote-runtime-tailscale-hint.ts is the one function every one of these errors passes through — the settings status probe, in-use calls, subscriptions, the Tailscale IPC response wrapper, and the browser client's two connection waiters. It used to make a binary choice: tailnet endpoint → tailnet advice, everything else → "connect both devices to Tailscale". It now does three things instead.

  1. Names the address. It appends at <scheme>://<host> before the trailing period, the same phrasing remoteRuntimeConnectFailureMessage already used on the handshake-timeout path, so the whole error family reads as one message rather than two. It skips the clause when the message already names that address, and the dedupe is a token check, not a substring check, so a message naming ws://a.example.com no longer swallows a real ws://a.example.
  2. Picks the hint by endpoint kind using the existing classifyRemotePairingHostname. Tailnet keeps the tailnet hint; a private LAN address gets the new LAN hint; everything else keeps today's hint.
  3. Sanitizes what it prints. The address goes through the existing display sanitizer, which drops userinfo, path and query, and refuses hosts that could smuggle a verdict token such as terminal_gone. That sanitizer now returns null instead of a placeholder, so when there is nothing safe to print the clause is left out entirely rather than degrading to "(dialed the paired endpoint)". It also decodes IPv4-mapped IPv6 literals, so ws://[::ffff:100.64.0.5]:6768 prints as ws://100.64.0.5:6768 and not the browser's recompressed ws://[::ffff:6440:5]:6768.

Supporting moves: classifyRemotePairingHostname and the display sanitizer now live in src/shared/remote-pairing-endpoint.ts, free of pairing-code parsing (zod, Buffer) so the hint module — which mobile and the browser client both import — can reuse them. The residue that only parses access links was renamed remote-pairing-access-link.ts, and its three classifier consumers import from the endpoint module directly, so there is no compatibility re-export left behind.

Two defects were found and fixed while taking this over:

  • A regression in the first draft. hintForEndpoint fed the output of a lenient regex host extractor into a classifier written for URL.hostname. The extractor split a bracketed IPv6 literal on its first colon ([fd7a:115c:a1e0::1]:6768 → fd7a), and the classifier read any four-hex-character label as a ULA hextet. The result: a plain hostname like fdab, and a schemeless Tailscale IPv6 endpoint, were both told "that is a local-network address" — the exact misdirection this PR exists to remove. Fixed at both ends: the fallback keeps a bracketed literal whole, and the classifier requires an IPv6 shape before reading a hextet.
  • Copy that asserted an unverifiable cause. The first draft said a LAN address "only works from the server's own network", which is false for anyone reaching 192.168.x.x over a routed VPN, and it dropped the tailscale.com/download link that a user who is not on a tailnet still needs. The claim is now conditional, the link is back, and the most common same-network failure (host asleep or firewalling the port) is named.

Why

The helper is the only choke point that reaches all six call sites with one edit. Pushing the endpoint into the message constructors instead would have missed src/renderer/src/web/web-runtime-connection-waiters.ts, which builds its two strings as inline literals rather than going through remoteRuntimeConnectFailureMessage, and it would have put presentation copy into wire-adjacent producers the CLI and mobile also consume.

For the classifier bug, the alternative was to merge isTailscaleEndpoint and classifyRemotePairingHostname into one function. That is the wrong cut: isTailscaleEndpoint is the authoritative tailnet test used at five mobile call sites, and running it first is what keeps the classifier's fd7a/ts.net blind spots from mattering here. The real duplication was two host extractors with different contracts wired into each other, so the fix narrows what reaches the classifier rather than rewriting it.

Not in scope, deliberately: loopback endpoints still take the generic hint; the classifier's mislabelling of fd7a:… and *.ts.net in the Add Remote Host and Settings UI is a separate change that moves an IP-admission gate in local-network-connection-test.ts; and making Generate Access Link prefer a reachable address is a different fix in a different file.

Linked Issue

Refs #14210 — observation 1 only. This PR does not close #14210 and the issue must stay open. It has four observations, and only the first (the LAN pairing address producing a misleading Tailscale error) is addressed here. Still open after this merges:

  • Observation 2: orca environment rm crashes the client.
  • Observation 3: "Unsupported remote platform" on a version mismatch.
  • Observation 4: orca environment add --name UX.
  • The issue's headline defect — the 101 handshake succeeds but the server logs nothing — is untouched.

Visual Proof

Captured from the real app: a host paired at ws://192.168.1.20:6768 in Settings → Remote Orca Servers, then Connect. The screenshots are the actual error toast, taken over CDP from a background-launched dev build (ORCA_BACKGROUND_LAUNCH=1); the only difference between the two runs is src/shared/remote-runtime-tailscale-hint.ts at main vs. at this branch.

Before — no address, and Tailscale advice for a LAN address:

toast-before.png

After — the address is named, the advice matches the address, and the download link is still there for someone who needs it:

toast-after.png

The same string also renders inline on the server row in that pane.

Testing

Reproduce the screenshots above:

  1. Add a runtime environment whose endpoint is a private LAN address you cannot reach, e.g. ws://192.168.1.20:6768. (The Add Server dialog probes reachability first, so seed it the way the CLI does — addEnvironmentFromPairingCode(userDataPath, { name, pairingCode }) — or use orca environment add --pairing-code.)
  2. Open Settings → Remote Orca Servers and press Connect on that row.
  3. The error toast, and the message on the row itself, should name ws://192.168.1.20:6768, call it a local-network address, and not say "connect both devices to Tailscale".

Automated, all run locally and green:

  • src/shared/remote-runtime-tailscale-hint.test.ts — 22 cases, including the LAN exact string, the four-hex hostname (ws://fdab:6768), the bare and bracketed Tailscale IPv6 endpoints, the IPv4-mapped literal's rendered address, the prefix-host dedupe trap, and the unsafe host emitting no address clause.
  • src/shared/remote-pairing-endpoint.test.ts — new; the classification table (with the hostname-that-looks-like-a-ULA rows) and the display sanitizer.
  • src/main/ipc/runtime-environment-transport-routing-tailscale-hint.test.ts — a real LAN endpoint now goes through the actual WebSocket failure path. The suite previously named three fixtures lan-host while seeding all of them with loopback, so the LAN branch had no end-to-end coverage; those fixtures are renamed loopback-host.
  • src/shared/remote-runtime-connect-bound.test.ts — the LAN endpoint that had been retargeted to a public host is back as a sibling assertion on the wrapped path.
  • Also green: the transport-error agreement corpus, the subscription connect-bound suite, the outage-toast suite, and AddRemoteHostFields.
  • pnpm tc (node, web, cli) and pnpm run check:code-quality:changed pass.

Each new assertion was verified to fail with its production change reverted.

Platforms: exercised on macOS (the screenshots above). The change is platform-independent string handling; the author tested the original on Linux. Not exercised on Windows.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

AI Disclosure

Original change written with Claude Opus 5.5 in the pi coding agent by the author. Taken over and extended by @nwparker with Claude Opus 5.

Review

  • Sentence shape. The address goes before the trailing period (…runtime at ws://…​.). The substrings error classification keys on (could not connect to the remote orca runtime, remote orca runtime closed the connection, timed out …) are untouched, and no production code exact-matches the hinted text. The helper is still idempotent.
  • Loopback keeps the existing "connect both devices to Tailscale" hint, to keep this PR narrow. It is arguably wrong there too; that is a follow-up.
  • Rename. remote-pairing-address.ts → remote-pairing-access-link.ts is mechanical: it now holds only parseHostAccessLink and its result types. Its test file split accordingly.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Security. The address shown is the sanitized form, scheme and host only. The sanitizer still refuses any host outside [a-z0-9.-] / a bracketed IP literal, which is what stops a pasted endpoint from smuggling a token such as terminal_gone into a message other consumers substring-match.
  • SSH / remote. Client-side text only. No wire change, nothing the host publishes changes, so mixed client and server versions are unaffected. Loss of contact still reads as unverifiable; nothing here implies remote work stopped.
  • Mobile is unaffected, and a reviewer does not need to check. Mobile imports only isTailscaleEndpoint from this module, whose signature and behaviour are unchanged. Its own copy paths (mobile/src/transport/connection-health.ts:108, mobile/src/diagnostics/host-reachability.ts:66) branch on isTailscaleEndpoint alone and emit no Tailscale advice for a non-tailnet endpoint, so they never had the defect this PR fixes and were left alone. Mobile pulls in no new dependency: the hint module already imported from remote-pairing-endpoint, whose only import is the pure tailnet-address.ts.
  • Cross-platform. Pure string handling, no paths, no shell, no platform branches.
  • Performance. One extra new URL parse on an error path.
  • Backwards compatibility. The only behaviour change visible to other code is the classifier no longer calling a four-hex-character hostname a private IPv6. Its production consumers (runtime-environment-store.ts, main/ipc/mobile.ts, local-network-connection-test.ts, parseHostAccessLink) all pass a real URL.hostname, and local-network-connection-test.ts already gates on isIP() before using the lan verdict, so none of them change.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • 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, and pnpm build pass (or CI will cover; local preferred)

…uggesting Tailscale for LAN addresses

Unreachable-runtime errors now append the sanitized endpoint that was dialed,
and a private LAN endpoint gets a hint to re-pair with a reachable address
instead of "connect both devices to Tailscale". Moves
classifyRemotePairingHostname and endpointForDisplay unchanged into
remote-pairing-endpoint.ts so the hint module can reuse both without pulling
in pairing-code parsing.

Refs stablyai#14210
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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

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: bb62899e-c6fb-4945-8763-d8c80b43b816
📥 Commits

Reviewing files that changed from the base of the PR and between 13b567a and f6b4b30.

📒 Files selected for processing (3)
  • src/main/ipc/runtime-environment-transport-routing-tailscale-hint.test.ts
  • src/shared/remote-runtime-tailscale-hint.test.ts
  • src/shared/remote-runtime-tailscale-hint.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/main/ipc/runtime-environment-transport-routing-tailscale-hint.test.ts
  • src/shared/remote-runtime-tailscale-hint.ts
  • src/shared/remote-runtime-tailscale-hint.test.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 change moves hostname classification and endpoint display helpers into remote-pairing-endpoint and updates parser and caller imports. Remote runtime failure messages now include safe endpoint text when needed, avoid repeating an endpoint already named in the message, and provide conditional LAN guidance. Tests cover hostname classification, endpoint formatting, hint selection, and connection failures.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to f6b4b

The change improves remote connection error messages so they name the endpoint that was dialed and give guidance suited to its type. No concrete merge-blocking risk was identified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 13b56

The new guidance names the dialed address without showing credentials or link contents, and the reviewed paths do not grant new connection authority. Coverage is incomplete, so this is not a finding of zero risk.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The reviewed propagation affects guidance returned to paired runtime clients, not the authority used to select a pairing endpoint or send a runtime request.

Trust Boundaries and Controls

  • observed — A paired endpoint is filtered before it is added to an error message; an unparseable endpoint or a host outside the display allowlist is not appended. The helper leaves messages outside the unreachable-error family unchanged.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning #14210 observation 1 is addressed: withRemoteRuntimeTailscaleHint displays a sanitized endpoint and gives LAN-specific guidance, with a LAN status-probe test. However, the directly linked issue's pr… Resolve the app-layer timeout reported in #14210 so a successful WebSocket handshake leads to a usable remote runtime. Add automated coverage for the reported connection path.
Docstring Coverage ⚠️ Warning Docstring coverage is 26.32% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 21 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: connection errors name the dialed endpoint and avoid inappropriate Tailscale advice for LAN addresses.
Description check ✅ Passed The description covers the required sections with a clear explanation, linked issue context, visual proof, testing details, AI disclosure, review notes, and completed checklist.
Out of Scope Changes check ✅ Passed The endpoint classifier and display-sanitizer move, access-link module rename, and related tests support #14210 observation 1. The import updates follow those refactors. The reviewed changes show no u…
Full details: Linked Issues check

Explanation

#14210 observation 1 is addressed: withRemoteRuntimeTailscaleHint displays a sanitized endpoint and gives LAN-specific guidance, with a LAN status-probe test. However, the directly linked issue's primary requirement is that the remote runtime connects after a successful WebSocket handshake. This PR changes error presentation, not the connection or handshake handling, and the PR description confirms that the reported app-layer timeout remains untouched.

  • Fix all pre-merge checks with AI

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.

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 39353237-421f-4d40-9d2b-0d3a563f066f

📥 Commits

Reviewing files that changed from the base of the PR and between 1116c54 and 8fd0f5d.

📒 Files selected for processing (6)
  • src/shared/remote-pairing-address.ts
  • src/shared/remote-pairing-endpoint.ts
  • src/shared/remote-runtime-connect-bound.test.ts
  • src/shared/remote-runtime-connect-bound.ts
  • src/shared/remote-runtime-tailscale-hint.test.ts
  • src/shared/remote-runtime-tailscale-hint.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@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

Reviewed the complete diff of #22529 (6 files, 1 commit) against main.

  • New dependency-free module — classifyRemotePairingHostname, getEmbeddedIPv4Address, and endpointForDisplay moved unchanged into src/shared/remote-pairing-endpoint.ts; remote-pairing-address.ts re-exports the classifier so its existing callers are untouched.
  • Dialed endpoint in the message — withDialedEndpoint appends (dialed <scheme>://<host>) through the existing endpointForDisplay sanitizer, skips when the message already names that string, and preserves the trailing period and the recoverable Could not connect to the remote Orca runtime phrase.
  • Endpoint-kind hint — hintForEndpoint keeps the tailnet hint for Tailscale addresses and adds a LAN_ENDPOINT_HINT for private LAN addresses that no longer recommends installing Tailscale; public/loopback/custom keep the existing hint.
  • Tests — new cases in remote-runtime-tailscale-hint.test.ts (LAN, tailnet, sanitized/unsafe hosts, idempotence, no-duplicate endpoint, pass-through); remote-runtime-connect-bound.test.ts moves its gate test off a LAN endpoint so it still asserts the Tailscale remedy.

Verified locally: the 7 touched/related suites (68 tests) plus the renderer outage suite pass, and pnpm tc:node / pnpm tc:web are clean.

ℹ️ Loopback pairing endpoints still recommend Tailscale

A ws://127.0.0.1:…/localhost pairing address can no more be reached from another device than a LAN address, yet it still takes OTHER_NETWORK_HINT ("connect both devices to Tailscale…"). The classifier wired in here already returns loopback, so folding it into the new branch is a one-condition change if you want it covered later. Flagging only — the scoping note in the PR body is clear.

Technical details
# Loopback endpoints take the Tailscale hint

## Affected sites
- src/shared/remote-runtime-tailscale-hint.ts:117 — `classifyRemotePairingHostname(host) === 'lan'` is the only kind routed to `LAN_ENDPOINT_HINT`; `loopback` falls through to `OTHER_NETWORK_HINT`.

## Required outcome
- None required for this PR (explicitly out of scope). If extended: a loopback pairing endpoint should also get the "only works from the server's own network" guidance rather than "install Tailscale".

## Open questions for the human
- Is loopback intentionally deferred, or worth folding into the same branch (the `loopback` kind is already available from the reused classifier)?

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

@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

Re-reviewed #22529 at c198f02, covering the one commit pushed since the prior pullfrog review (8fd0f5d).

  • IPv4-mapped IPv6 tailnet endpoints — hintForEndpoint now also consults classifyRemotePairingHostname and routes a tailscale kind to the tailnet hint. isTailscaleEndpoint alone misses IPv4-mapped literals such as ws://[::ffff:100.64.0.5]:6768, because WHATWG URL normalizes the host to ::ffff:6440:5 — which neither IPV4_LITERAL_RE nor TAILSCALE_IPV6_RE recognizes — while getEmbeddedIPv4Address decodes it back to 100.64.0.5.
  • Test — a case pinning that endpoint to the tailnet hint and asserting the Tailscale download hint is absent.

I verified the normalization path directly (new URL('ws://[::ffff:100.64.0.5]:6768').hostname === '[::ffff:6440:5]') and that the new case would fail without the classifier branch. The 6 related suites (68 tests) and pnpm tc:node are green.

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

The hint fed `extractHost`'s lenient non-URL fallback into
`classifyRemotePairingHostname`, which was written for `URL.hostname`. The
fallback split a bracketed IPv6 literal on its first colon, so
`[fd7a:115c:a1e0::1]:6768` arrived as `fd7a`, and the classifier read any
four-hex-character label as a ULA hextet. A plain host (`fdab`) and a bare
Tailscale IPv6 endpoint both came out as 'lan'.

Keep the bracketed literal whole in the fallback, and require an IPv6 shape
before reading a hextet.
…t all

Three things the error family got wrong once it started naming the endpoint:

- Two renderings of the same fact. The handshake-timeout message already said
  `at <endpoint>`; the hint appended `(dialed <endpoint>)`. Settle on `at`,
  and replace the substring dedupe (which would suppress `ws://a.example`
  inside a message naming `ws://a.example.com`) with a check that the
  following character cannot extend the host or its port.
- A host that fails the display gate produced the zero-information clause
  "(dialed the paired endpoint)". `displayableEndpoint` now returns null and
  the clause is dropped; `endpointForDisplay` keeps the noun for the one
  sentence that needs a subject there.
- `ws://[::ffff:100.64.0.5]:6768` displayed as `ws://[::ffff:6440:5]:6768`,
  because WHATWG URL recompresses the literal. Decode it with the
  `getEmbeddedIPv4Address` the classifier already uses.

Also make the LAN hint honest: it asserted "only works from the server's own
network", which is false over a routed VPN, and it dropped the
tailscale.com/download pointer a user who is not on a tailnet still needs. It
now states the condition, keeps the link, and names the usual same-network
cause (host asleep or firewalling the port). Its opening subject is chosen
from whether an address was actually printed, so "That" never dangles.
The suite named three environments `lan-host` but seeded every one of them
with `ws://127.0.0.1:9`, so the LAN branch was never reached through the
actual WebSocket failure path and all four cases still asserted the generic
hint. Rename those fixtures to `loopback-host` and add a genuine private
address, so a call site that stops passing the endpoint, or a wrapper that
re-mangles the message, now fails here.
`remote-pairing-address.ts` and `remote-pairing-endpoint.ts` were
near-synonyms with no discoverable boundary. The residue holds only
`parseHostAccessLink` and its result types, so call it
`remote-pairing-access-link.ts`; the classifier's three importers now take it
from `remote-pairing-endpoint` directly, which removes the compat re-export,
and the classification cases move to that module's own suite.
@nwparker

Copy link
Copy Markdown
Contributor

Heads up @mmarabel — @nwparker has taken this over and pushed four commits on top of yours (no force-push, your commits are untouched). Thanks for the original fix; the shape was right, and the choke point you picked was the correct one.

What changed on top:

  1. fix(remote): classify only a host the endpoint parser really extracted — a regression the draft introduced. hintForEndpoint passed the output of extractHost's lenient regex fallback into classifyRemotePairingHostname, which expects a URL.hostname. The fallback split a bracketed IPv6 literal on its first colon ([fd7a:115c:a1e0::1]:6768 → fd7a), and the classifier treated any four-hex-character label as a ULA hextet. So ws://fdab:6768 and a schemeless Tailscale IPv6 endpoint both got "that is a local-network address" — the exact misdirection this PR removes, newly created on a path the draft did not cover. Fixed at both ends, with hint-level cases pinning all three shapes.
  2. fix(remote): name the dialed endpoint once, in one phrasing, or not at all — settles on at <endpoint> (matching the handshake-timeout message) instead of a second (dialed …) form; replaces the substring dedupe, which would have suppressed ws://a.example inside a message naming ws://a.example.com; drops the clause entirely when the host fails the display gate instead of printing "(dialed the paired endpoint)"; decodes IPv4-mapped IPv6 so ws://[::ffff:100.64.0.5]:6768 no longer renders as ws://[::ffff:6440:5]:6768. Also softens the LAN copy: "only works from the server's own network" is false over a routed VPN, and the tailscale.com/download link is back for a user who is not on a tailnet at all.
  3. test(remote): exercise the LAN hint through the real transport — the wiring suite named three fixtures lan-host but seeded all of them with ws://127.0.0.1:9, so the new branch had zero end-to-end coverage. Added a real private address and renamed the loopback fixtures.
  4. refactor(remote): name the access-link module for what it parses — remote-pairing-address.ts → remote-pairing-access-link.ts, with the classifier's consumers importing from remote-pairing-endpoint directly so the compat re-export goes away.

The PR body is rewritten with before/after screenshots of the real toast, and it now states explicitly that this does not close #14210 (observations 2–4 and the headline handshake defect remain). Fork CI is approved and running.

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 495bd6db-59a6-4b8e-ab83-0ca18bc4b0ee

📥 Commits

Reviewing files that changed from the base of the PR and between c198f02 and 13b567a.

📒 Files selected for processing (19)
  • src/main/ipc/local-network-connection-test.ts
  • src/main/ipc/mobile.ts
  • src/main/ipc/runtime-environment-pairing-verification.ts
  • src/main/ipc/runtime-environment-transport-routing-tailscale-hint.test.ts
  • src/renderer/src/components/settings/RuntimeHostAccessForm.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostDialog.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostFields.test.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostFields.tsx
  • src/renderer/src/components/sidebar/AddRemoteHostServerFormPanel.tsx
  • src/renderer/src/lib/remote-pairing-copy.ts
  • src/renderer/src/web/preload-api/web-runtime-environments-api.ts
  • src/shared/remote-pairing-access-link.test.ts
  • src/shared/remote-pairing-access-link.ts
  • src/shared/remote-pairing-endpoint.test.ts
  • src/shared/remote-pairing-endpoint.ts
  • src/shared/remote-runtime-connect-bound.test.ts
  • src/shared/remote-runtime-tailscale-hint.test.ts
  • src/shared/remote-runtime-tailscale-hint.ts
  • src/shared/runtime-environment-store.ts
💤 Files with no reviewable changes (1)
  • src/shared/remote-pairing-access-link.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@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

Re-reviewed #22529 at 13b567a, covering the four commits pushed since the prior pullfrog review (c198f02).

  • Module split — remote-pairing-address.ts is now remote-pairing-access-link.ts (access-link parsing and its result types only); the hostname classifier, embedded-IPv4 decoder, and display sanitizer moved into the new dependency-free remote-pairing-endpoint.ts.
  • One endpoint phrasing — the hint now appends at <scheme>://<host> (matching the connect-bound timeout path) instead of (dialed …), and namesEndpoint replaces the substring dedupe with a token-boundary check so a host that merely prefixes another (ws://a.example vs ws://a.example.com) is no longer swallowed.
  • Sanitizer returns null — displayableEndpoint omits the address clause entirely when the host is unsafe or unparseable instead of printing a placeholder, and decodes IPv4-mapped IPv6 literals to the dotted quad the user pasted.
  • Conditional LAN hint — the LAN copy states the condition rather than asserting an unverifiable cause, names its own subject (The paired address…) when no address is shown, and keeps the Tailscale download link.
  • IPv6 hardening — bracketed literals stay whole during schemeless host extraction, and the ULA/link-local classifier requires an IPv6 shape so a four-hex hostname like fdab is no longer reported as local-only.
  • End-to-end coverage — the transport-routing suite now seeds a real LAN address and asserts the LAN hint through the actual WebSocket failure path; fixtures previously named lan-host while using loopback are renamed loopback-host.

Verified locally: 9 related suites (77 tests) pass, including the new transport integration case; pnpm tc:node, pnpm tc:web, pnpm tc:cli, and pnpm run check:code-quality:changed are clean.

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

@nwparker nwparker 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.

Approved to run CI. Taken over and reworked by @nwparker; findings addressed and independently re-verified.

@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

Re-reviewed #22529 at f6b4b30, covering the one commit pushed since the prior pullfrog review (13b567a).

  • Route-aware LAN guidance — LAN_ENDPOINT_HINT_BODY now conditions re-pairing on the client having no route to the dialed address (If this device has no route to that address, re-pair … If a route exists, check that the server is awake and not firewalling the port), replacing the earlier "not on the server's network" assertion that a routed VPN makes false. The rationale comment states the routing caveat.
  • Test coverage — the exact-string LAN case, the conditional-hint case, and the transport-routing integration case all assert the new phrasing and reject the old ("not on the server's network", "cannot reach it"), so a revert of the copy fails.

Verified locally: src/shared/remote-runtime-tailscale-hint.test.ts (22 tests) and src/main/ipc/runtime-environment-transport-routing-tailscale-hint.test.ts (5 tests) pass.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

This branch has not been deployed

No deployments
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.

[Bug]: Remote Orca Server on same tailnet times out at app layer though WebSocket handshake succeeds

2 participants