Repository navigation
feat(connection): support multiple routes per environment - #7921
burnmandont wants to merge 9 commits into
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 |
There was a problem hiding this comment.
One finding on the new connection-method picker in apps/web/src/components/settings/ConnectionsSettings.tsx: the trigger size does not match the other controls in the same action row. Details inline.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Effect service conventions review of the changed TypeScript. Three findings, all in packages/client-runtime/src/connection: two error-handling shapes that should use Effect.catchTags, and one reuse of a removal-specific error for route selection whose message reaches the user.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
One finding on the new route picker in ConnectionsSettings.tsx. The earlier trigger-size mismatch is resolved (size="xs" now matches the neighbouring Button size="xs" controls at both breakpoints).
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
One finding on the new connection-method picker in ConnectionsSettings.tsx. Trigger geometry (size="xs" + w-full min-w-0 sm:w-48) now matches the sibling Button size="xs" controls and the IntegrationsSettings select pattern, so the earlier sizing/width findings look resolved.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
b46ff3f to
93ce180
Compare
93ce180 to
236484a
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 236484a. Configure here.
| return keys; | ||
| }, [savedEnvironments]); | ||
| const [sshConnectionError, setSshConnectionError] = useState<string | null>(null); | ||
| const [switchingRouteEnvironmentIds, setSwitchingRouteEnvironmentIds] = useState< |
There was a problem hiding this comment.
SSH dedup ignores inactive routes
Medium Severity
savedDesktopSshEnvironmentKeys and savedDesktopSshEnvironmentsByAlias only inspect the selected catalog entry. When relay is selected but an SSH route already exists, that host still appears in unsaved discovered hosts. Choosing it re-runs SSH provisioning and forces a route switch instead of treating the host as already saved.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 236484a. Configure here.
|
Note 🤖 GPT-5.6 Sol responding on behalf of Theo Closing this PR after an automated pass over open pull requests. Introduces a substantial cloud, virtual-machine, remote-filesystem, or forwarding system. |


What Changed
Why
A remote environment can be reachable through more than one transport. Treating each transport as a separate environment duplicates projects and state, while replacing the active target loses a working fallback. This keeps environment identity durable and makes transport selection a device-local routing concern.
UI Changes
Adds route visibility and manual route selection under Settings → Connections. Mobile route selection is intentionally out of scope.
Screenshots will be added before this draft is marked ready for review.
Verification
git diff --checkpasses againstupstream/main.Checklist
Prepared with GPT-5.6-Sol via the Codex harness in T3 Code.
Note
Add support for multiple connection routes per environment
selectRouteAPI that prepares the candidate before swapping the active session.SavedBackendListRowto switch routes, backed by new atoms and aselectRoutecommand increateEnvironmentCatalogAtoms.flocklocks, discover and reuse an already-running T3 server, and retry transientdatabase is lockederrors during pairing.ConnectionTargetStore.listRoutes,ConnectionRegistrationStore.select/removeRoute) and storage document helpers to register, select, and remove individual routes while preserving others.removeConnectionFromCatalognow clears all persisted data for the environment across all routes and deletes remote DPoP tokens;installPlatformRegistrationclears stored routes for the environment — reviewers should verify no callers depend on the old single-route removal semantics in storageDocument.ts and registry.ts.Macroscope summarized 236484a.
Note
High Risk
Touches persisted connection catalogs, credential reuse, SSH launch/pairing scripts, and live session swap. Failures here can drop sessions, mix environments, or leave remote servers in a bad state.
Overview
Lets a single environment keep multiple access methods (T3 Connect, SSH, direct) instead of replacing or duplicating it. Desktop users pick the method from Settings; the choice is local and never auto-falls back.
Selection is preflighted.
selectRouteprepares and verifies the candidate (including stable environment ID) while the current session stays live. Persistence and supervisor swap happen only after that succeeds. Failed prep leaves the selected route and session unchanged.Catalog persistence now stores
routesplus one selectedtarget. Registering SSH on a relay environment retains both. Relay sign-out removes only the relay route and falls back to SSH/direct when present. Legacy catalogs treattargetsas initial routes.SSH reuse. Cached SSH bearers are reused and re-paired only after auth rejection. Remote launch discovers a live
t3code.service/T3CODE_HOMEruntime, pairs against that base dir, serializes operations with flock, and retries locked-database pairing. SSH connect timeout is 120s. Mobile storage is route-capable but has no switcher UI.Reviewed by Cursor Bugbot for commit 236484a. Bugbot is set up for automated code reviews on this repo. Configure here.