feat: let users rename environments - #7267
Conversation
Store environment names on the server so every client and T3 Connect share one label. Add authorized rename controls for web, desktop, and mobile with live propagation.
|
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.
UI consistency review found 3 issues in apps/web/src/components/settings/ConnectionsSettings.tsx (new EnvironmentLabelControl): a primitive height override that breaks the Input geometry, an Escape handler that also closes the settings page, and a native window.confirm where the file already uses AlertDialog.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c3f5a86. Configure here.
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR introduces a new user-facing feature for environment renaming spanning mobile, web, server, and relay infrastructure with new API endpoints and cross-cutting changes. New features of this scope warrant human review to validate the design and implementation. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
One finding on the new environment rename control in apps/web/src/components/settings/ConnectionsSettings.tsx. The dialog/escape/compact-input issues from the previous run are resolved.
Posted via Macroscope — UI Consistency
Preserve saved labels during mobile URL edits. Prevent startup and relay synchronization races, and align the web rename action.
There was a problem hiding this comment.
One inline-rename consistency issue in apps/web/src/components/settings/ConnectionsSettings.tsx. The primitive usage itself (compact Input, icon-micro/ghost-muted pencil matching SettingResetButton, AlertDialog for the duplicate-name confirmation, Escape handled locally) now lines up with the shared component system.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
One finding on the web rename control: the saved-environment row lost its heading element when the label moved into EnvironmentLabelControl.
Posted via Macroscope — UI Consistency
|
I was about to open the same PR. Hope this gets merged soon. Let me know if I can help in any way |

Written by inayayousfi, typed by gpt-5.6-sol running in OpenCode.
Every call here is inayayousfi's, and no agent acted on its own.
Problem
Environment names come from the host machine, so multiple servers on one machine can appear under the same name. Discussion #7017 describes this with several T3 Connect environments that all inherit one hostname.
Users also had no shared rename path. A client-local name could fix one device, but other web, desktop, mobile, and T3 Connect clients would keep showing something else.
Solution
Store the custom name in server settings and use it in the environment descriptor. Clearing the value restores the detected machine name.
Web and desktop get an inline editor in Settings → Connections. Mobile gets a native rename sheet in Settings → Environments. Any connected client with the orchestration operate scope can rename an environment.
Name changes propagate through the server config stream. T3 Connect receives the same effective name through an environment-authenticated relay endpoint with bounded retries.
Duplicate names remain allowed after confirmation. Existing mobile-only names are ignored so the server stays the source of truth.
Related Work
PR #4538 stores names on one web client, so other clients do not share the override.
PR #4850 also introduces a server-owned name. This pull request extends that model to remote environment editing, native mobile controls, duplicate confirmation, an explicit live label event, and direct relay synchronization.
PR #6053 addresses the narrower WSL hostname collision by adding an automatic distro suffix.
Web Evidence
Paired environment
Editing the remote name
Renamed environment
The Playwright pass loaded built web assets, paired a separate
t3 serveenvironment, and renamed it toT3 Server. The browser reported no console errors.Verification
packages/contracts: 36 focused tests passed; type check passed.packages/client-runtime: 14 focused tests passed; type check passed.apps/server: 4 focused tests passed; type check passed.infra/relay: 16 focused tests passed; type check passed.apps/web: type check passed.apps/mobile: type check passed.git diff --checkpassed.Addresses discussion #7017 and the converted issue #5623.
Note
Medium Risk
Touches settings persistence, WebSocket live updates, and relay synchronization; unsupported servers surface rename errors, while relay sync failures are only logged.
Overview
Introduces server-owned environment names via a new
environmentLabelsetting (up to 40 characters; empty restores the machine name). The execution descriptor and connected clients pick up changes through a dedicatedenvironmentLabelUpdatedconfig stream event andupdateEnvironmentLabelRPC.Web adds inline rename controls in Connections (primary environment + saved backends) gated on
AuthOrchestrationOperateScope, with duplicate-name confirmation. Mobile moves rename out of the expanded connection row into a dedicatedEnvironmentRenamesheet and only shows rename when connected with the same scope; URL-only edits no longer send a label.Server applies settings to an in-memory label override, starts background jobs to mirror settings into the descriptor and to push labels to the relay (
PUT /v1/environments/:environmentId/label) with retries and cancellation of stale syncs. Relay link rows getupdateLabelfor the authenticated environment credential.Client presentation prefers
serverConfig.environment.labelover connection-catalog labels; bearer URL updates can omitlabelso stored names are preserved.Reviewed by Cursor Bugbot for commit e7eb70e. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add environment renaming across web, mobile, server, and relay
environmentLabelfield toServerSettings(max 40 chars, defaults to empty) and a newsetEnvironmentLabelmethod onServerEnvironment;getDescriptorreturns the custom label when set.PUT /v1/environments/:environmentId/labelto persist label changes to active environment links in the database.updateEnvironmentLabelto client-side server environment atoms, which patches settings via WebSocket and verifies the server acknowledges the rename; emitsenvironmentLabelUpdatedstream events to connected clients.EnvironmentLabelControl) and a dedicated mobile screen (SettingsEnvironmentRenameRouteScreen), both with duplicate-name confirmation and error handling.runEnvironmentLabelRelaySync) that pushes label updates to the relay with exponential retry.Macroscope summarized e7eb70e.