feat(connect): deregister account environments from any client - #4844
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new feature enabling users to deregister T3 Connect environments from the web UI, including new profile pages, account-level mutations, and workflow changes. New user-facing capabilities of this scope warrant human review. You can customize Macroscope's approvability policy. Learn more. |
8ff435b to
e66ad13
Compare
d107d08 to
2521427
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6c1a14b. Configure here.
6c1a14b to
85a4d07
Compare
- Add shared Clerk profile layout, rows, and refresh controls - Use inline T3 Connect deregistration confirmation - Add coverage for confirmation and pending states Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Keep account environment management on the web and desktop surfaces for now. Co-authored-by: codex <codex@users.noreply.github.com>
## What's Changed * fix(web): align update toast release notes link by @t3-code[bot] in pingdotgg/t3code#6322 * fix(web): render tooltips above dropdowns by @extoci in pingdotgg/t3code#6241 * fix(web): open modified PR clicks in browser by @t3-code[bot] in pingdotgg/t3code#6278 * Fix mobile command popover glass rendering by @juliusmarminge in pingdotgg/t3code#6370 * test(mobile): seed snoozed showcase threads by @PixPMusic in pingdotgg/t3code#5155 * fix(web): preserve appearance mode when changing themes by @extoci in pingdotgg/t3code#6343 * feat(connect): deregister account environments from any client by @StiensWout in pingdotgg/t3code#4844 * feat(web): pull request surfaces — filters & qualifiers, all-server listing, update branch, reactions, in-place editing, smarter diffs by @Bil0000 in pingdotgg/t3code#6039 **Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260812.1077...v0.0.34-nightly.20260812.1079 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260812.1079

A destroyed or reinstalled T3 Connect host can remain registered to its account indefinitely, consuming a host space with no reachable server to unlink itself.
This moves account lifecycle management into an account-level T3 Connect page. Web and desktop expose it as a custom Clerk profile page beside Mobile clients, while mobile exposes the same environment list from its Account settings. Both clients can deregister any account environment directly through the Clerk-authenticated relay endpoint without contacting the host. Device-local connect and disconnect controls remain in Connections or Environments.
Validation:
vp run --filter @t3tools/client-runtime typecheckvp run --filter @t3tools/web typecheckvp run --filter @t3tools/mobile typecheckCloses #5070
Closes #5135
Implemented with GPT-5.6 Codex in the T3 Code Codex harness.
Web and desktop
Authentic desktop capture of T3 Connect inside the full Clerk account panel. Environment names are redacted.
Mobile layout
Approved native account-route layout. A simulator capture was unavailable on this Linux host.
Note
Medium Risk
Deregistration revokes tunnels and account binding via relay; session/account checks limit misuse, but mistakes are destructive and worth careful review.
Overview
Adds account-level deregistration for T3 Connect environments so unreachable or wiped hosts can be removed without contacting the server.
Runtime & web:
deregisterManagedRelayEnvironmentin client-runtime calls the relayunlinkEnvironmentAPI with the current Clerk session and rejects stale account IDs. Web wires this through a serialderegisterManagedRelayEnvironmentCommandand a new Clerk profile tab T3 Connect that lists registered environments, inline confirm-to-deregister UI, optimistic list filtering, toasts (with trace ID on failure), and refresh.UI polish: Shared
ClerkUserProfilePage/ row / refresh primitives; Mobile clients profile page restyled to match.AlertDialogPopupgains optionalportalContainerfor correct layering in Clerk modals.Docs:
remote-access.mddocuments the deregistration flow and that device connect/disconnect stays in Settings.Reviewed by Cursor Bugbot for commit c3b2844. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add T3 Connect environment deregistration UI to user profile
T3ConnectUserProfilePagecomponent that lists linked environments per account and allows deregistering them via an inline confirmation flow, with success/error toasts and stale-entry filtering after removal.deregisterManagedRelayEnvironmentinpackages/client-runtime/src/relay/managedRelayState.ts, an Effect that validates the current session matches the givenaccountId, fetches a Clerk token, and callsunlinkEnvironmenton the ManagedRelay client.deregisterManagedRelayEnvironmentCommandinapps/web/src/cloud/managedRelayState.tsas a serialized-per-account runtime command to prevent concurrent deregistration mutations.T3 Connectentry in the Clerk user menu alongside the existing Mobile Clients page.ClerkUserProfilePage,ClerkUserProfileRefreshButton,ClerkUserProfileRow) and refactorsMobileClientsUserProfilePageto use them.Macroscope summarized c3b2844.