Skip to content

fix(web): pairing links never use the desktop app's t3code:// address - #38442

Merged
juliusmarminge merged 1 commit into
mainfrom
factory/issue-38438
Nov 18, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
factory/issue-38438

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Nothing needed changing this round. On #38442 at 09b8879, all 40 checks passed, Macroscope approved (no line comments), and CodeRabbit reported no actionable comments. The fix is unchanged: resolveCurrentOriginPairingUrl returns null for non-http(s) or loopback origins, so the packaged desktop app (t3code://app) with no network endpoint shows the pairing code only. It no longer offers an unusable t3code://app/pair link or QR code. I stopped watching the PR.

Fixes #38438

Reproduction on main

Commit 2216ffe (origin/main). Built the production desktop app (vp run build:desktop) and ran apps/desktop/dist-electron/main.cjs under headless-desktop (Xvfb) with a fresh T3CODE_HOME, so the renderer loaded from t3code://app/ as in the packaged app. Network access off, Tailscale HTTPS not enabled (the reporter's setup). Drove the window over CDP with Playwright: opened Settings → Sharing & access, clicked '+ Create link', then 'Create link' in the dialog. The new pairing-link row showed t3code://app/pair#token=<code> with a 'Copy link' button and a QR code for that same URL. Neither the link nor the QR code can be opened from another device. The Version row showed the real server address as http://127.0.0.1:3774/.

Evidence

Open Settings → Sharing & access with Network access off and Tailscale HTTPS unavailable. Click + Create link, then Create link with default permissions. Inspect the row and use its copy control.

Environment on both sides: production Electron desktop under Linux/Xvfb, t3code://app/ renderer, fresh isolated app state, 1280×900, dark theme. Machine labels and credentials are redacted; the QR is blurred for privacy.

Before After
2216ffe006 09b88799d8
Before: app-internal URL and QR panel After: pairing code only
Displays and copies t3code://app/pair#token=…; offers a QR panel. Offers Copy code; copies a pairing code, with no URL or QR panel.
Before recording After recording

Reproduction driver · Conditions and clipboard observations

Tests

No new local runs this round; no code changed. CI on 09b8879: all 40 checks passed. The previous round ran ConnectionsSettings.logic.test.ts (30 passed) and vp run check:changed (all passed).

Not in this change

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 18, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 09b8879

Macroscope's review found this PR approvable — Pairing links now exclude desktop-only and loopback origins while preserving advertised endpoint links and pairing-code fallback. The change is limited to link presentation and does not alter authorization or credential issuance.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pairing URL resolver now rejects non-HTTP(S) and loopback origins. When no endpoint URL is available, settings use the resolved current-origin pairing URL if the page is served by an environment.

Changes: Pairing URL selection

Layer / File(s) Summary
Resolve and test current-origin pairing URLs
apps/web/src/components/settings/ConnectionsSettings.logic.ts, apps/web/src/components/settings/ConnectionsSettings.logic.test.ts
resolveCurrentOriginPairingUrl accepts an optional current URL and returns null for non-HTTP(S) protocols and loopback hosts. Tests cover these cases and verify pairing URLs for HTTPS and LAN HTTP origins.
Use the resolved URL in settings
apps/web/src/components/settings/AuthorizedClientsSettings.tsx
When no endpoint URL is available, the fallback uses the current-origin pairing URL if the page is served by an environment.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: shivamhwp, t3dotgg

Merge Risk: Minimal · up to 09b88

Pairing links are no longer generated from unusable page URLs such as t3code://app. Those cases now show the code-only display instead. The change is small and well tested, and carries minimal merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: pairing links no longer use the desktop app's t3code:// address. It follows the conventional commit format with a clear scope and fix type, and it matches the summary,…
Linked Issues check Passed Directly linked issue #38438 asks that Settings > Sharing & access > + Create link stop generating broken pairing URLs such as t3code://app/pair#token=.... The only stated expectation is "not broken u…
Out of Scope Changes check Passed All changes relate to the fix for #38438. The helper resolveCurrentOriginPairingUrl gains an optional currentHref parameter and the protocol and loopback check. The loopback check now imports isLoopba…
Description check Passed The description gives a clear problem-to-fix narrative and it is detailed. It names the issue (#38438), the change (resolveCurrentOriginPairingUrl returns null for non-http(s) or loopback origins), an…
Full details: Title check

Explanation

The title names the main change: pairing links no longer use the desktop app's t3code:// address. It follows the conventional commit format with a clear scope and fix type, and it matches the summary, the objectives and the linked issue.

Full details: Linked Issues check

Explanation

Directly linked issue #38438 asks that Settings > Sharing & access > + Create link stop generating broken pairing URLs such as t3code://app/pair#token=.... The only stated expectation is "not broken urls". At the reviewed head, resolveCurrentOriginPairingUrl (ConnectionsSettings.logic.ts) returns null when the URL protocol is not http: or https:, or when the hostname is loopback. The component (AuthorizedClientsSettings.tsx) uses that result only when servedByEnvironment is true. For the t3code://app renderer the helper returns null, so the row falls through to the existing code-only display and no broken link is produced. Advertised-endpoint and desktop-endpoint links are unchanged. A table test in ConnectionsSettings.logic.test.ts covers t3code://, loopback, localhost, https and LAN cases. The issue reporter's underlying wish to share through their Tailscale Serve address is not implemented here; the PR description states that this is deferred to PR #33559. That deferral does not change the stated expected behavior of the issue. Evidence is based on source blobs at head and the PR description. The whole-PR diff tool was unavailable, so the test run and the real-app reproduction were not independently verified.

Full details: Out of Scope Changes check

Explanation

All changes relate to the fix for #38438. The helper resolveCurrentOriginPairingUrl gains an optional currentHref parameter and the protocol and loopback check. The loopback check now imports isLoopbackHostname from ~/environments/primary, and the component's own loopback check is removed. The component change is limited to the shareablePairingUrl selection for servedByEnvironment pages. The test file adds cases for the new helper behavior. No unrelated files or behavior changes were identified in the summarized changes. The whole-PR diff could not be read, so this verdict relies on the summary and the two file blobs read at head.

Full details: Description check

Explanation

The description gives a clear problem-to-fix narrative and it is detailed. It names the issue (#38438), the change (resolveCurrentOriginPairingUrl returns null for non-http(s) or loopback origins), and the scope (Electron packaged app with no network endpoint). It has before/after evidence, reproduction steps, and a verification section. It does not follow the repository template headings (Problem, Change, Scope, Verification). The Problem and Change content is present but spread across unlabeled paragraphs. The Scope section does not say why the change is a bug fix rather than a feature, and it does not state that the PR is a bug fix. The Verification section reports CI results and prior local test runs, but it says no new local runs happened this round. The template asks for a conventional commit title, and the description does not include one. Its claim 'Nothing needed changing this round' and the 'I stopped watching the PR' note are process chatter that does not belong in the description. Overall the content is mostly complete, so the check passes, but the template structure is not followed.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2216ffe and 09b8879.

Files selected for processing: 3

  • apps/web/src/components/settings/AuthorizedClientsSettings.tsx
  • apps/web/src/components/settings/ConnectionsSettings.logic.test.ts
  • apps/web/src/components/settings/ConnectionsSettings.logic.ts

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

@juliusmarminge
juliusmarminge merged commit c488253 into main Nov 18, 2026
41 checks passed
@juliusmarminge
juliusmarminge deleted the factory/issue-38438 branch November 18, 2026 05:12
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 18, 2026
**v0.1.11-nightly.20261118.4877** · 24 changes from 13 contributors

- **Paused tasks.** Running a paused one-time task manually no longer deletes it.
- **Claude subagent results.** Resumed Claude subagents retain their earlier results instead of replacing them.

### Plus 20 more bug fixes.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(server): agents read a Linear issue once when given its link by @StiensWout in pingdotgg/t3code#38425
* fix(server): All issues pages skip the signed-in account read by @StiensWout in pingdotgg/t3code#38431
* fix(server): recover JSON-stringified delegate targets by @MINIlaolao in pingdotgg/t3code#38436
* fix(mobile): retrying an issue filter only reloads repositories that failed by @StiensWout in pingdotgg/t3code#38423
* fix(web): pairing links never use the desktop app's t3code:// address by @juliusmarminge in pingdotgg/t3code#38442
* chore: vouch mvanhorn by @t3dotgg in pingdotgg/t3code#38455
* docs: vouched contributors can open small feature PRs by @t3dotgg in pingdotgg/t3code#38456
* fix(server): preview pages loaded through a service worker identify as Chrome, not HeadlessChrome by @Sean-R-Wilson in pingdotgg/t3code#38445
* fix(web): switching back to a thread no longer jumps through its HTML renders by @pouyarezvani in pingdotgg/t3code#38458
* fix(mobile): A document whose upload failed can be retried in the composer by @mwolson in pingdotgg/t3code#38443
* fix(server): running a paused one-time task by hand no longer deletes it by @juliusmarminge in pingdotgg/t3code#38463
* fix(server): codex text generation identifies as T3 Code by @juliusmarminge in pingdotgg/t3code#38464
* fix(server): review diff previews reuse the cached repository layout by @amv146 in pingdotgg/t3code#38451
* fix(web): Paste as Text pastes text when the clipboard also holds an image by @juliusmarminge in pingdotgg/t3code#38475
* fix(web): opening a file in the preview browser shows its current contents by @juliusmarminge in pingdotgg/t3code#38470
* fix(github): page closing pull requests past the first twenty on issues by @StiensWout in pingdotgg/t3code#38487
* fix(web): older comments no longer reappear after refreshing an issue by @StiensWout in pingdotgg/t3code#38489
* fix(web): typing into a simulator no longer answers a waiting question by @ipanasenko in pingdotgg/t3code#38476
* fix(server): keep-awake logs a hold only once acquired and reports why the inhibitor failed by @juliusmarminge in pingdotgg/t3code#38505
* fix(server): write the Windows service task as UTF-16LE so non-ASCII paths survive by @juliusmarminge in pingdotgg/t3code#38494
* fix(muse): failed Muse text generation explains Muse's error category by @saphid in pingdotgg/t3code#29861
* fix(server): imported Claude threads show prompts, not Claude Code markup by @dominikzabcik in pingdotgg/t3code#33403
* fix(server): a resumed Claude subagent keeps its earlier result by @ahalekelly in pingdotgg/t3code#34663
* fix(server): a preview navigation request issued before its frame exists no longer crashes the server by @Isaac-b-ux in pingdotgg/t3code#30946

## New Contributors
* @Sean-R-Wilson made their first contribution in pingdotgg/t3code#38445

**Full Changelog**: pingdotgg/t3code@v0.1.11-nightly.20261118.4864...v0.1.11-nightly.20261118.4877

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.11-nightly.20261118.4877
AIdoesmyjob pushed a commit to AIdoesmyjob/t3code that referenced this pull request Nov 18, 2026
vedprakash2302 added a commit to vedprakash2302/Cody that referenced this pull request Nov 19, 2026
- SessionStore: upstream's DPoP pairing renewal (pingdotgg#37980) and Cody's bearer renewal both stay. awaitInvalidation runs upstream's row re-read first, then Cody's renewBearerSession; Cody keeps setExpiresAt because upstream's extend refuses an expired row.
- Superseded: Cody's resolveOriginPairingUrl, replaced by upstream's resolveCurrentOriginPairingUrl (pingdotgg#38442); its test table gains a cody://app row.
- Adapted: resume prompt (pingdotgg#38847) goes inside side chat rules through withResumeRequest, since the rules made upstream's empty-text check miss.
- Adapted: useSideChat.open takes upstream's SideChatMessage (pingdotgg#38350) plus Cody's fromRunId.
- ProviderTurnControlService keeps codySteerText beside upstream's MCP app context (pingdotgg#38554); the wiring test mock gains McpAppModelContext.layerEmpty.
- BrowserSession: Windows sign-in install kept ahead of upstream's per-origin permission decisions (pingdotgg#37866).
- Muse fixtures: upstream's new instructions (pingdotgg#38356) with Cody's final_answer block; context budget re-measured (6408, 7802).
- Sync notes updated in the personal-fork skill.
rynfar added a commit to rynfar/t3code that referenced this pull request Nov 19, 2026
…ostics, and SSH fixes (#448)

* feat(native): port DPoP pairing renewal, relay:configure scope, diagnostics, and SSH fixes

Port upstream connection, pairing, sharing, diagnostics, and SSH fixes for #440:
- Direct DPoP P-256 ES256 device-key pairing, proof signing, credential storage, and automatic token renewal with Bearer fallback (`pingdotgg#37980`, `pingdotgg#37990`)
- Peer-link pairing code `purpose: "peer-link"` binding/validation and `t3code://` exclusion from generated pairing links (`pingdotgg#37825`, `pingdotgg#38442`)
- `relay:configure` scope enforcement, sensitive-scope warnings, and remote client relay linking (`pingdotgg#37823`, `pingdotgg#38892`)
- Expired-session re-pair prompt with trace ID, refused-route surfacing, permission-update toast withdrawal on environment removal, and untargeted SSH onboarding conflict guard (`pingdotgg#38041`, `pingdotgg#33199`, `pingdotgg#38980`, `pingdotgg#37818`)
- SSH release mirror override, boot-service owner wait, host `t3` + login-shell wrapper, no-downgrade guard, UTF-8 byte-level wildcard/Include matching & sorting, literal home paths, stdin-redirected sha256 verification, and dangling ~/.t3 symlink handling (`pingdotgg#31396`, `pingdotgg#36672`, `pingdotgg#35268`, `pingdotgg#29428`, `pingdotgg#37840`, `pingdotgg#38184`, `pingdotgg#38208`, `pingdotgg#33288`, `pingdotgg#37150`, `pingdotgg#39184`)
- Mark CN-PAIR, CN-SESSION, CN-STATUS, CN-SSH, ST-SHARING done in apps/native/parity/LEDGER.md

* fix(native): add DPoP WS/HTTP proofs, route-resilient lookup, and update peer-link test

Address review findings on #448:
- Attach `dpop=<proof>` query param (`GET`, `http(s)://<host><pathname>`, `ath = sha256(wsTicket)`) in `auth::socket_url` for DPoP-paired hosts (`pingdotgg#37990`)
- Add shared `auth::send_authed_request` (DPoP + proof + 401 token renewal retry, Bearer fallback) and switch `history.rs`, `pull_requests.rs`, `preview_stream.rs`, and `voice.rs` HTTP callers off `.bearer_auth`
- Key/resolve DPoP credentials across multi-route fallback, token renewals, and SSH/local port relocations via `seed_token`/`previous_access_token` matching and `SavedEnvironments::relocate` migration
- Update `settings::environments::tests::link_dialog_reuses_link_machine_select_and_auto_mints_via_peer_pairing_code` mock and assertion for `purpose: "peer-link"` + `access`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Sharing & Access -> Create link generates useless urls

1 participant