feat(connect): let hosts set their display name - #4850
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.
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 cce557d. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature allowing hosts to set custom display names, with changes spanning contracts, server settings, relay infrastructure (database updates), WebSocket payloads, and UI components. New features with this scope warrant human review. You can customize Macroscope's approvability policy. Learn more. |

Summary
Why
T3 Connect environment names were derived from the host operating system with no supported override. Relay-managed machines, especially remote hosts, could not choose a useful display name from the host itself.
Before / After
Before
After
The screenshots use an isolated test environment and the neutral example “Studio Mac”; no real machine hostname is shown.
Verification
vp test run packages/contracts/src/settings.test.ts apps/server/src/environment/ServerEnvironment.test.ts packages/client-runtime/src/state/server.test.ts packages/client-runtime/src/relay/discovery.test.ts infra/relay/src/environments/EnvironmentConnector.test.ts infra/relay/src/environments/EnvironmentLinks.test.ts infra/relay/src/agentActivity/AgentActivityPublisher.test.ts infra/relay/src/agentActivity/MobileRegistrations.test.ts infra/relay/src/environments/EnvironmentLinker.test.ts infra/relay/src/http/Api.test.ts— 105 tests passedvp run --filter @t3tools/contracts --filter @t3tools/client-runtime --filter t3 --filter @t3tools/web --filter @t3tools/mobile --filter t3code-relay --concurrency-limit 2 typecheckgit diff --checktest-t3-apppass: verified the new row is absent onmain, setting “Studio Mac” persists, and Connections renders the configured name without exposing the system hostnameChecklist
Note
Let hosts set a custom display name for their environment
environmentLabeltoServerSettingsandServerSettingsPatchschemas, defaulting to empty string when unset.ServerEnvironment.getDescriptornow returns the persistedenvironmentLabelfrom settings when non-empty, falling back to the default label on read failure with a warning.environmentLabelviaupdatePrimarySettings.settingsUpdatedWebSocket events now include the current environment descriptor, and the client-side projection inapplyServerConfigProjectionapplies it.EnvironmentConnectorpersists label changes reported in health responses via the newEnvironmentLinks.updateLabelForUserAPI, and relay discovery updates the stored label from status responses.Macroscope summarized f7d7c28.
Model: GPT-5.6 Sol | Harness: Codex in T3 Code