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 |
ApprovabilityVerdict: Needs human review This PR introduces a new feature (custom host display name) with changes spanning server settings, relay database persistence, WebSocket protocol, client state, and UI. New cross-cutting features warrant human review regardless of implementation quality. You can customize Macroscope's approvability policy. Learn more. |
f7d7c28 to
1b689f9
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 1b689f9. Configure here.
a718716 to
f03974b
Compare
|
Written by inayayousfi, typed by gpt-5.6-sol running in OpenCode. Thanks for working through the server-owned naming design. PR #7267 now implements the same core approach and extends it with authorized remote editing, a native mobile rename screen, duplicate-name confirmation, an explicit live label event, and direct environment-authenticated relay synchronization with bounded retries. Would you be open to closing this PR in favor of #7267? The overlap is substantial, and keeping one implementation should reduce the review and integration burden for maintainers. The remote-access documentation added here is useful and could still be carried over separately. |

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 via Settings
environmentLabeltoServerSettingsandServerSettingsPatchschemas, with an empty string default for backward compatibility.ServerEnvironment.getDescriptornow reads the currentenvironmentLabelfrom settings dynamically, falling back to the default label on read failure.settingsUpdatedWebSocket events now include anenvironmentdescriptor, and the client-runtime projection applies it on receipt.EnvironmentConnectorpersists label changes reported in health responses via a newEnvironmentLinks.updateLabelForUsermethod.getDescriptoris no longer a static snapshot — it reflects live settings state.Macroscope summarized f03974b.
Model: GPT-5.6 Sol | Harness: Codex in T3 Code
Note
Medium Risk
Touches persisted settings, live environment descriptors, WebSocket config streaming, and relay link label persistence; failures are mostly logged/ignored on the relay path, but clients now depend on optional
environmenton settings updates.Overview
Adds a host-local Host name (
environmentLabel) setting so machines can choose how they appear in T3 Connect and when other clients pair manually.Settings & server:
ServerSettingsgainsenvironmentLabel(trimmed, empty = OS-detected default).ServerEnvironment.getDescriptorreads the live setting instead of a fixed snapshot;getDescriptorForSettingssupports projecting labels from a settings snapshot.settingsUpdatedWebSocket events now include an optionalenvironmentdescriptor; client-runtime applies it to the config projection. The connect CLI wiresServerSettingsinto the environment layer.UI: Settings → Connections adds a Host name row (
DraftInput) for users with orchestration operate scope on web/desktop.Relay & clients: Verified health responses that report a new label trigger
EnvironmentLinks.updateLabelForUser; relay discovery updates cached environment labels from status descriptors. Web/mobile environment presentation prefersserverConfig.environment.labelover the connection entry label.Docs: Remote-access docs describe naming this host under Connections.
Reviewed by Cursor Bugbot for commit f03974b. Bugbot is set up for automated code reviews on this repo. Configure here.