GeezerVison is showing github.com — feat(vscode): pair with pairing URL by bulgadev · Pull Request #237 · patroza/t3code
Conversation
Child PR of the VS Code overlay (#175), per the client-overlay workflow.
What
Adds a "T3 Code: Pair with Server…" command (t3Code.pair) that accepts a full pairing URL (http://host:port/pair#token=…) or a bare pairing token, exchanges it for a bearer access token via the OAuth token-exchange endpoint (bootstrapRemoteBearerSession), and stores it in SecretStorage under the existing t3Code.serverBearerToken key — so ensureConnected picks it up as the bearer tier with no other wiring changes.
Removes the need to hand-exchange tokens with curl before using Set Server Bearer Token.
Changes (all in apps/vscode/)
src/pairing.ts — pure classifyPairingInput (URL vs bare token) + describeTokenExpiry helpers; no vscode import
src/pairing.test.ts — unit tests, including composed cases against the real resolveRemotePairingTarget
src/t3Client.ts — exchangePairingCredential(httpBaseUrl, credential) beside connectWithBootstrap (exchange only, no connect)
src/extension.ts — command registration; reuses readDesktopServerUrl/serverCandidates for the bare-token fallback host
package.json — command + activation event
Pairing links are single-use with a 5-minute TTL, so the exchanged access token (30-day TTL) is what gets persisted; on expiry the user re-pairs.
Local gate (green)
pnpm --filter t3-code test — 40 tests, 11 files
pnpm exec vp check — clean
ELECTRON_SKIP_BINARY_DOWNLOAD=1 pnpm exec vp run -r --cache --log labeled typecheck — clean
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add custom "Open with" applications
Source: https://github.com/tim-smart/t3code/pull/4
Source head: 8c4bdfbc5b57f6b600233244d330f9efa41dc498
Source commits: 08e1a4fb949585c3c441d6d00455fe904f72cd7b,cd43a401c6c148f1fe26cff72104ac527ea189f3,a8370e7502c552ebb064436e42e1c00f86f0946b,8c4bdfbc5b57f6b600233244d330f9efa41dc498
Imported: complete product delta from the source PR.
(cherry picked from commit 9fae005dcbd577375b203391d32551c475694b0c)
Load direnv environments for provider sessions
Source: https://github.com/tim-smart/t3code/pull/5
Source head: 8f5fc87c13f4628c179cda44d4f32f7fe4d316b2
Source commits: e4f07014d39964fde2498bcb35588974cc5e6232,0d1463af61e0bd174f698b2519ebf3b207a2eaca,a66e4160d5f4b79140ec8fbcbc6aa66af750a991,8f5fc87c13f4628c179cda44d4f32f7fe4d316b2
Imported: complete product delta from the source PR.
(cherry picked from commit 0da8bfeb54f685ded6021801c87017fadf757175)
Add unsigned retry for commit signing failures
Source: https://github.com/tim-smart/t3code/pull/6
Source head: 7d65c5a224e97a6b811b0a84892f1fda065c5963
Source commits: 18ee567ecfdb11c9372153127b26b5cf57213a76,72a6fae23c86708080c4fed346d5bf0f136f0221,6614b28239ed2330a8f601357a413f2d50da195a,ec169369daa554541511aa28f551b36f3dd26485,7d65c5a224e97a6b811b0a84892f1fda065c5963
Imported: complete product delta from the source PR.
(cherry picked from commit 03671a2ed17a119466fe36ff31929c03d6fb1ec9)
Add /new command for contextual threads
Source: https://github.com/tim-smart/t3code/pull/7
Source head: 2051a8003041fe2806fcb4bc7a0d8940579fc543
Source commits: 2051a8003041fe2806fcb4bc7a0d8940579fc543
Imported: complete product delta from the source PR.
(cherry picked from commit 4d94f31f866d0af389e2503cba56b57f395f41a9)
Add session dashboard board
Source: https://github.com/tim-smart/t3code/pull/8
Source head: d9f8e4d0a8dc22231ca315f3c595c3597f3b13e5
Source commits: 268fb8df9863ffbda51b975a8dbe68f11c41500c,dde20f271f674da22dd8f3a08201c2acf5e58ee5,df4a145e7b2cd2dc17a7a595267d2d8eb0a2a3f0,ce5723ddb0bf630a18d4cb8227b5344d12626e72,ad8c1a6af41161e1fc38a52f681b306517c7b918,6281887e6125317da0c7b4252d59bfd41c9bf35e,550db6316c634febdbe1cb27334d1347c23c7b2a,d9f8e4d0a8dc22231ca315f3c595c3597f3b13e5
Imported: complete product delta from the source PR.
(cherry picked from commit cd0e28160138eec3f6344f7695aac7ff8746812b)
Recover interrupted provider turns after server restarts
Source: https://github.com/tim-smart/t3code/pull/9
Source head: b181832560177250b90bbfe07b0882c9e5b93493
Source commits: 7f69028a25be21f1882ecba14b62f387ad60cf2a,1d52bce1376766d804ef884d7d50b8b6d1b48cf7,b181832560177250b90bbfe07b0882c9e5b93493
Imported: complete product delta from the source PR.
(cherry picked from commit 83de8f5c4ccf8f89c493772fc8d34cdde99b92e3)
Avoid repeated thread snapshot loads during subscription retries
Source: https://github.com/tim-smart/t3code/pull/10
Source head: c8c9eadb9de3026706bc3a403ca05b12d0da8dd5
Source commits: c8c9eadb9de3026706bc3a403ca05b12d0da8dd5
Imported: complete product delta from the source PR.
(cherry picked from commit 9e400c3fd7558221bc27ddb8e58badb58e9c95b0)
Add image upload button to compact chat composer
Source: https://github.com/tim-smart/t3code/pull/11
Source head: 1ff63f9b9c418ef56a46c6422d22c01de97581a8
Source commits: 1ff63f9b9c418ef56a46c6422d22c01de97581a8
Imported: complete product delta from the source PR.
(cherry picked from commit 720ec65ce5c9794a4717d3712405eed08ea76891)
Truncate mobile branch toolbar controls
Source: https://github.com/tim-smart/t3code/pull/12
Source head: 1b7d44428472511bc98d8f936654359ce2536901
Source commits: 1b7d44428472511bc98d8f936654359ce2536901
Imported: complete product delta from the source PR.
(cherry picked from commit dc2bbb448735321da9240459d9beb4f02c0b812b)
Clean up worktrees when archiving threads
Source: https://github.com/tim-smart/t3code/pull/13
Source head: a23f42d6ac671ea36b8db5d03934c089a31be448
Source commits: 4a194707ed134f993502ac5fdf36a8425f1769cd,1b6688aa5b641010cb2e9dad23d36d87257403ad,9ed32aa3923fb674380564b1ffcb3268290069b9,a23f42d6ac671ea36b8db5d03934c089a31be448
Imported: complete product delta from the source PR.
(cherry picked from commit 7e02dc972f924bb120c9eda34b5b7433c73666dd)
Pass hosted app channel into Vercel web builds
Source: https://github.com/tim-smart/t3code/pull/14
Source head: de6966a6784b4703145c20b84fc482703bca4fa2
Source commits: de6966a6784b4703145c20b84fc482703bca4fa2
Imported: complete product delta from the source PR.
(cherry picked from commit 6333d8dd6cc8e2f3949664a2878a745fb7189e8d)
Allow worktrees to reuse the selected branch
Source: https://github.com/tim-smart/t3code/pull/15
Source head: 2d3900ba36c9397dc4fbe879c613a809f6b45384
Source commits: cd60531253fbafc470f5a5ac18d3e44832d3376d,2d3900ba36c9397dc4fbe879c613a809f6b45384
Imported: complete product delta from the source PR.
(cherry picked from commit 5e7dff28442625176bb4f62faf548cdb9a79f4dc)
Add optional worktree removal confirmation
Source: https://github.com/tim-smart/t3code/pull/16
Source head: c3f509fe8f690b704bb34692d9c132c0644db777
Source commits: 76f063e983ca3c39b20f79d8ea83783ab034251a,c3f509fe8f690b704bb34692d9c132c0644db777
Imported: complete product delta from the source PR.
(cherry picked from commit 98861098bbdd6bfc2fc6cade79fbbbd8867de2e0)
Stop retrying unavailable thread subscriptions
Source: https://github.com/tim-smart/t3code/pull/17
Source head: 1359af8ba0b146e3d49f89b72c250f681e86199d
Source commits: 1359af8ba0b146e3d49f89b72c250f681e86199d
Imported: complete product delta from the source PR.
(cherry picked from commit 7b37a7adfc23e6ee0445a5eb20da04f17f341d55)
Compatibility fix for running the selected Tim stack on the fork CI matrix. Source adaptation review: patroza/t3code#31.
(cherry picked from commit 6edd39a72a23cdf15f199ec271c49b25f1e0f013)
Keep the selected Tim Open With feature portable on non-macOS builders and avoid treating custom app definitions as macOS bundles. Source adaptation review: patroza/t3code#33.
(cherry picked from commit 15a7d2a4513badeffe8e1b2a13fb1e53951c45f2)
… tip
Bring Tim layer tip to typecheck green by joining main ref-refresh VCS client
state with fork failureKind/worktree-cleanup contracts, restoring
filterBrowseEntries/reuse-base-branch surfaces Tim dropped, and fixing
ChatView/Board call-site type errors left by incomplete Tim joins.
(cherry picked from commit 0e249178af3f186e645567393127d55fb7397e25)
Bring fork/tim typecheck/test green after main #2679 + Tim client-runtime
rewrite: rejoin EnvironmentSubscriptionRpcTag/localApi/ws scopes, wire
BackgroundPolicy/ResourceTelemetry layers, force openpgp for signing tests
on hosts with gpg.format=ssh, and treat TRACE2 child_exit without
child_class as hook finish (git 2.55+).
Source: pingdotgg/t3code#4018
Source SHA: de8fd65934768173819b93adcd6b92af3e8c7fc3
Imported: bounded server activity snapshots, cursor pagination, lazy web history loading, reconnect-safe reset/dedup, and disabled eager browser sidebar hydration.
Adapted: preserved Tim thread lifecycle handling and Omega composer/minimap behavior while resolving current-stack conflicts.
Excluded: none of the source PR behavior; native mobile pagination remains separate because #4018 intentionally excludes it.
Source: pingdotgg/t3code#3510
Source SHA: 034f4936d7a1435887bb62ac3f2db61f08928cbf
Imported: native mobile lazy loading for older thread activity, a 1,000-event subscription catch-up ceiling with snapshot fallback, and synchronized stale snapshot watermarks.
Adapted: applied above the refreshed #4018 web/server candidate and preserved Tim lifecycle handling plus our mobile composer changes.
Excluded: #3510 server/web pagination duplicated by #4018, the later shared-hook refactor, formatting-only commits, and contract comments. The shared refactor can be revisited independently after production validation.
Source: pingdotgg/t3code#4176
Source SHA: 56b6615afdfe3804a466e33cbab9056b8981f217
Imported: O(1) command read-model maps, deleted-thread eviction, VCS cache cleanup, browser surface cleanup, preview idle TTL, and per-thread UI cleanup.
Adapted: preserved our thread settlement, snooze, and sequential worktree deletion actions while wiring upstream cleanup into the current hook.
Excluded: none.
Co-authored-by: Rusiru Sadathana <[email protected]>
Source: pingdotgg/t3code#4506
Source SHA: f7eaa00b99e67a9c1caf09e2fe6ff1f536f66b91
Imported unchanged as one candidate provenance commit.
After rebasing candidates onto the green tim tip, restore missing
EnvironmentThread loading fields, ChatView sendDisabledReason/threadSyncPhase
wiring, and orchestration.getThreadActivities auth coverage.
This was referenced Aug 6, 2026
|
Thanks for this, @bulgadev — it's shipped. 🎉
Merged as #351 (4a13d9643) on fork/dev, with your Co-authored-by trailer intact on the commit.
Closing this one only because it targets fork/vscode, an overlay branch that has since been frozen
and drained: this repository moved to a stable, never-rebased fork/dev as the contributor target
and release source, so the branch your PR was based on no longer receives work. Since the PR came
from your fork, we couldn't rebase it in place — hence the port. Nothing was rejected, and the
change went in essentially as you wrote it.
Two things were added on review before merge, both worth knowing about:
- The bearer token is now pinned to the server that issued it. Pairing resolves an endpoint from
the URL, but ensureConnected() walks the desktop and configured candidates and would have offered
that token to each in turn — so pairing with server B could disclose B's token to server A. The
paired endpoint is now the first connection candidate and the only one the token is sent to.
Hand-entered tokens stay unpinned, since there the user picks the destination.
- The token is stored only after the connection is proven. It was written to
SecretStorage
before connecting, so a failed pairing destroyed a working credential.
Both are consequences of the surrounding multi-candidate connection logic rather than anything wrong
with the feature — the pairing flow itself is unchanged.
If you want to send more our way, fork/dev is the branch to target now. Appreciated. 🙏
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|