Allow custom environment names - #4538
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:
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
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.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e8f62d6. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature (custom environment naming) with new UI components, schema additions, and changes to environment display logic. New features warrant human review even when well-scoped. You can customize Macroscope's approvability policy. Learn more. |
# Conflicts: # apps/web/src/components/settings/ConnectionsSettings.tsx # apps/web/src/state/environments.ts # packages/contracts/src/settings.ts
# Conflicts: # apps/web/src/components/settings/ConnectionsSettings.tsx # apps/web/src/state/environments.ts # packages/contracts/src/settings.ts
# Conflicts: # apps/web/src/components/settings/ConnectionsSettings.tsx # apps/web/src/state/environments.ts # packages/contracts/src/settings.ts
# Conflicts: # apps/web/src/components/settings/ConnectionsSettings.tsx # apps/web/src/state/environments.ts # packages/contracts/src/settings.ts
# Conflicts: # apps/web/src/components/settings/ConnectionsSettings.tsx # apps/web/src/state/environments.ts # packages/contracts/src/settings.ts
# Conflicts: # apps/web/src/components/settings/ConnectionsSettings.tsx # apps/web/src/state/environments.ts # packages/contracts/src/settings.ts
e8f62d6 to
46480c0
Compare
f9f1b24 to
5e10a60
Compare
|
Written by inayayousfi, typed by gpt-5.6-sol running in OpenCode. Thanks for tackling environment naming. PR #7267 now covers the same core problem with a server-owned name that propagates across web, desktop, mobile, and T3 Connect. It also supports authorized remote renaming, duplicate-name confirmation, and restoring the detected machine name. Would you be open to closing this PR in favor of #7267? That would save maintainers from reviewing and reconciling two naming implementations. The SSH alias and connection URL presentation changes here do not overlap, so they could still stand on their own if you want to keep pursuing them. |

What Changed
Why
Different remote machines commonly report the same hostname, making saved connections and environment pickers indistinguishable. Custom names provide an opt-in per-client override without changing environment identity or server configuration.
UI Changes
Settings → Connections now exposes a Rename action on each saved environment. The dialog makes the override explicitly client-local and allows clearing it to return to the live server default. Browser verification covered pairing a remote, renaming it, persistence after reload, clearing the override, and the URL subtitle.
Checklist
vp run --filter @t3tools/contracts test -- src/settings.test.tsvp run --filter @t3tools/web test -- src/clientPersistenceStorage.test.ts src/localApi.test.tsvp check(passes with existing repository warnings)vp run typecheck(blocked by pre-existing web type errors and the isolated checkout missing@astrojs/check; changed contracts typecheck passes)Note
Low Risk
Changes are limited to client-local persistence and UI labeling; no server config or auth changes, with schema validation on saved names.
Overview
Adds optional per-environment display names stored in client settings (
environmentDisplayNames) so saved connections and environment pickers can be distinguished without changing server identity.Connections gets a Rename flow on each saved remote row: a dialog saves a trimmed override or clears it to fall back to the server default; rows show the connection URL via shared
displayUrlmetadata instead of ad hoc SSH formatting.Environment presentation now resolves
labelfrom client overrides (withdefaultLabelpreserved) everywhereuseEnvironments/useEnvironmentrun, so sidebars and pickers stay consistent.Also fixes SSH presentation: manual SSH adds use the target alias as the initial label, and
connectionCatalogDisplayUrlomits a missing username and appends port when set.useUpdatePrimarySettingsreads the primary environment id fromprimaryEnvironmentIdAtominstead of the presentation hook.Reviewed by Cursor Bugbot for commit 5e10a60. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Allow custom per-environment display names in connection settings
ClientSettings.environmentDisplayNames.environmentDisplayNamesfield (keyed byEnvironmentId, trimmed non-empty strings) and a matching patch field; defaults to{}.projectEnvironmentPresentationin environments.ts to apply overrides from client settings, exposing bothlabel(possibly overridden) anddefaultLabel.null@host) and include the port when set.Macroscope summarized 5e10a60.