fix(client): stop blaming DNS when only the T3 Connect WebSocket fails #14531
main fromrefs/pull/14531/head·opened View on GitHubProblem#
On iOS with Wi-Fi Assist (Connectivity Assist on iOS 27) on, every T3 Connect environment loops on "did not respond during connection setup. Your DNS or firewall may be blocking T3 Connect. Try another network, such as a phone hotspot." The credential, ticket, and descriptor requests all succeed; only the WebSocket never reaches the host. The hint blames DNS, a firewall, or the host, and the hotspot suggestion points at the cellular path Assist already used.
Fixes #14264
Change#
When a relay setup timeout happens after the ticket and descriptor succeeded, the supervisor now says the environment "did not finish connection setup after T3 Connect accepted the request" and suggests Wi-Fi Assist, a VPN, or a content filter blocking the WebSocket. Timeouts before that point keep the DNS/firewall hint. WebSocket failures in the RPC session use the same WebSocket hint. The hint follows the prepared route, including T3 Connect fallback after a direct route fails. Prepared direct connections keep the direct timeout message. The shared client runtime covers web, desktop, and mobile.
Scope and approval#
Replaces #14508, which was closed for missing UI verification. Julius triaged the issue and described this copy change: https://github.com/pingdotgg/t3code/issues/14264#issuecomment-5891785932
Verification#
- Added a supervisor test where a relay connection stalls after preparing. On
mainit fails and shows the exact message from the issue. With this change it passes. - After merging current main: focused supervisor and RPC session tests passed, 82 tests. Includes relay fallback and prepared direct-route timeout coverage. Used the worktree-local Vite+ runner.
- Client-runtime package typecheck, targeted lint, and formatting passed.
- UI check in the web client (Settings > Connections, isolated headless Chrome profile, dev server on a worktree-local
.t3). A temporary, uncommitted harness registered a T3 Connect environment named "Paul's Mac Mini" and made the relay broker return a prepared connection whose socket points at a blackholed address (ws://10.255.255.1/ws). That matches the issue: the HTTP steps succeed and the WebSocket never opens. Screenshots hover the row to show the full message.
Before (main): the issue's exact DNS/firewall/hotspot message.

After: the message no longer blames DNS or suggests a hotspot. It names Wi-Fi Assist, a VPN, or a content filter.

- Not checked: a real iPhone with Wi-Fi Assist. Mobile renders the same shared
client-runtimemessage.
Created with Claude Opus 5.5 in Claude Code (T3 Code). Merge maintenance by GPT-6-Astra via the Codex harness in T3 Code.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
-
⚙️ Run configuration
-
-
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
d72bc54e-cf4f-4336-b6d7-1c10a052f6c7
-
📥 Commits
-
-
Reviewing files that changed from the base of the PR and between 0cf482b08bca0249ec94fbcbd0eb04fff28d9b3d and 07b5fc48b1eb3e735730508176ee401597b6b4fc.
-
📒 Files selected for processing (5)
-
-
packages/client-runtime/src/connection/supervisor.test.tspackages/client-runtime/src/connection/supervisor.tspackages/client-runtime/src/errors/network.tspackages/client-runtime/src/rpc/session.test.tspackages/client-runtime/src/rpc/session.ts
-
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
-
📝 Walkthrough
-
📝 Walkthrough
-
Walkthrough#
Relay setup timeouts now report details based on target type and setup progress. Relay socket errors use a WebSocket blocking hint that names possible causes, including Wi-Fi Assist, VPNs, and content filters.
Changes#
Relay connection diagnostics
Layer / File(s) Summary Setup timeout detail selection
packages/client-runtime/src/errors/network.ts,packages/client-runtime/src/connection/supervisor.ts,packages/client-runtime/src/connection/supervisor.test.tsAdds a WebSocket blocking hint. Relay timeouts use it after preparation completes and use the network blocking hint before then. Non-relay timeouts use the generic detail. The supervisor test covers the prepared-relay timeout. RPC relay socket error details
packages/client-runtime/src/rpc/session.ts,packages/client-runtime/src/rpc/session.test.tsRelay RPC error mapping and connection failure details use the WebSocket blocking hint. The timeout test expects the hint for relay connections; direct-connection messages remain without a hint. Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
t3dotgg
-
Merge Risk: ⚪ Minimal · up to
07b5fRelay setup and socket failures now receive stage-appropriate guidance, while non-socket RPC errors do not receive the WebSocket diagnosis. No actionable merge risk is established.
Pre-merge checks |
5-
✅ Passed checks (5 passed)
-
Check name Status Explanation Linked Issues check Issue [ #14264] requires the app to identify Connectivity Assist as a possible cause when ticket and descriptor requests succeed but the relay WebSocket does not complete. The PR adds `WEBSOCKET_BLOCKI…Out of Scope Changes check The reviewed changes are limited to shared client-runtime error text, timeout classification, and tests for relay supervisor and RPC WebSocket failures. These changes directly support issue [ #14264]. …Docstring Coverage No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 5… Title check The title clearly and concisely identifies the main change: correcting timeout messaging when the T3 Connect WebSocket fails. Description check The description covers the problem, implemented change, scope and approval, focused verification, UI evidence, and the untested real-device scenario.
-
✨ Finishing Touches
-
-
🧪 Generate unit tests (beta)
-
-
- Create a new PR
-
-
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Autopilot is currently an internal CodeRabbit preview.
Comment `@coderabbitai help` to get the list of available commands.-
juliusmarminge added labelsmacroscope-review
- @@ -714,3 +711,6 @@714711 } satisfies AttemptOutcome;715712 }716713 if (establishment._tag === "TimedOut") {714+ const preparedConnection = yield* SubscriptionRef.get(prepared);715+ const detail =716+ Option.isSome(preparedConnection) &&
🟡 Medium
connection/supervisor.ts:716A timeout while a later route is stalled can report that T3 Connect accepted the request even though only an earlier route reached preparation.
connectOverRoutesleavespreparedset to that earlier route, so this branch misclassifies the timeout (and can likewise suppress the DNS hint); clear or track preparation per route before classifying it.🤖 Copy this AI Prompt to have your agent fix this:
In file @packages/client-runtime/src/connection/supervisor.ts around line 716: A timeout while a later route is stalled can report that T3 Connect accepted the request even though only an earlier route reached preparation. `connectOverRoutes` leaves `prepared` set to that earlier route, so this branch misclassifies the timeout (and can likewise suppress the DNS hint); clear or track preparation per route before classifying it. Note
Written by
gpt-6.1-solon behalf of MariaThanks for investigating the T3 Connect failure. This PR changes the connection-error copy and selects different hints after route preparation, but does not repair the failed connection. Right now we are only taking focused bug fixes from outside contributors because of our limited review capacity, as explained in Read this first. Please preserve the reproduction in issue #14264 and propose a contained fix for the connection failure for reconsideration.
maria-rcks closed this
Sign in to join this conversation.
Approvability#
Verdict: Would Approve
Macroscope's review found this PR approvable — This is a focused client-runtime bug fix that only refines relay timeout and WebSocket diagnostics, preserves direct-route behavior, and adds targeted coverage. A remaining route-state edge case can misclassify some fallback timeouts, which is captured by the repository’s blocking correctness finding.
Not approved because:
- 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in [Settings](https://app.macroscope.com/pingdotgg/settings#Repos). You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).