Skip to content

fix(client): stop blaming DNS when only the T3 Connect WebSocket fails - #14531

Closed
Gigioxx wants to merge 3 commits into
pingdotgg:mainfrom
Gigioxx:fix/relay-websocket-timeout-hint
Closed

Gigioxx wants to merge 3 commits into
pingdotgg:mainfrom
Gigioxx:fix/relay-websocket-timeout-hint

Conversation

@Gigioxx

@Gigioxx Gigioxx commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

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: #14264 (comment)

Verification

  • Added a supervisor test where a relay connection stalls after preparing. On main it 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.

before

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

after

  • Not checked: a real iPhone with Wi-Fi Assist. Mobile renders the same shared client-runtime message.

Created with Claude Opus 5.5 in Claude Code (T3 Code). Merge maintenance by GPT-6-Astra via the Codex harness in T3 Code.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 1, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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. You can add or adjust custom eligibility rules. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 0cf482b and 07b5fc4.



📒 Files selected for processing (5)
  • packages/client-runtime/src/connection/supervisor.test.ts
  • packages/client-runtime/src/connection/supervisor.ts
  • packages/client-runtime/src/errors/network.ts
  • packages/client-runtime/src/rpc/session.test.ts
  • packages/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.ts
Adds 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.ts
Relay 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 07b5f

Relay 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 | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check Passed 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 Passed 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 Passed 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 Passed The title clearly and concisely identifies the main change: correcting timeout messaging when the T3 Connect WebSocket fails.
Description check Passed 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 juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 2, 2026 — with ChatGPT Codex Connector
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 2, 2026 05:34

Dismissing prior approval to re-evaluate 07b5fc4

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 2, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 12, 2026 02:30

Dismissing prior approval to re-evaluate 4e701ad

if (establishment._tag === "TimedOut") {
const preparedConnection = yield* SubscriptionRef.get(prepared);
const detail =
Option.isSome(preparedConnection) &&

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.

🟡 Medium connection/supervisor.ts: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.

🤖 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.

@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Thanks 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 maria-rcks closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: iOS app loops on "Failed to connect" over T3 Connect when iOS Wi-Fi "Connectivity Assist" is on

3 participants