Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(connect): let hosts set their display name - #4850

Closed
PixPMusic wants to merge 4 commits into
pingdotgg:mainfrom
PixPMusic:pixpmusic/connect-host-name
Closed

PixPMusic wants to merge 4 commits into
pingdotgg:mainfrom
PixPMusic:pixpmusic/connect-host-name

Conversation

@PixPMusic

@PixPMusic PixPMusic commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a host-local Host name setting under Settings → Connections for web and desktop
  • use the configured name in live environment descriptors and as the default for newly paired manual connections
  • refresh relay-managed environment labels from verified health responses so renamed hosts propagate to other clients
  • fall back to the existing OS-detected computer name when the setting is cleared
  • keep web and mobile environment presentation in sync with the live server descriptor

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

Connections settings before host naming

After

Connections settings after setting a neutral host display name

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 passed
  • vp run --filter @t3tools/contracts --filter @t3tools/client-runtime --filter t3 --filter @t3tools/web --filter @t3tools/mobile --filter t3code-relay --concurrency-limit 2 typecheck
  • targeted formatting and lint for all changed files
  • git diff --check
  • isolated test-t3-app pass: verified the new row is absent on main, setting “Studio Mac” persists, and Connections renders the configured name without exposing the system hostname

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I added regression coverage
  • I included before/after UI evidence

Note

Add environmentLabel to ServerSettings and let hosts set their display name

  • Adds environmentLabel to ServerSettings and ServerSettingsPatch schemas in settings.ts, defaulting to an empty trimmed string so legacy configs decode unchanged.
  • ServerEnvironment.getDescriptor now reads the current configured label at runtime (no restart), and the new getDescriptorForSettings returns a descriptor snapshot for a given settings object in ServerEnvironment.ts.
  • The settingsUpdated websocket event includes an environment descriptor in ws.ts, and clients project it into config state in server.ts.
  • Web users with orchestration-operate scope can edit the "Host name" field in ConnectionsSettings.tsx; mobile and web presentation utils now prefer the server-reported label.
  • The relay persists label updates from verified health responses via EnvironmentLinks.updateLabelForUser in EnvironmentConnector.ts, and client discovery updates labels from status descriptors in discovery.ts.
  • Behavioral Change: ServerEnvironment.getDescriptor now depends on ServerSettings; if settings cannot be read it logs a warning and falls back to defaultDescriptor. The ServerConfigSettingsUpdatedPayload schema gains an optional environment field that older clients will ignore.

Macroscope summarized 4ae38b7.

Model: GPT-5.6 Sol | Harness: Codex in T3 Code


Note

Medium Risk
Touches live server descriptors, WebSocket config events, and relay link persistence. Label updates are gated by verified health responses and a timestamp compare-and-set, but still change shared environment identity shown across clients.

Overview
Hosts can now set a Host name in Settings → Connections. That override is stored as environmentLabel in server settings, applied live to the environment descriptor, and used as the default name for new manual connections. Clearing it falls back to the OS-detected computer name.

settingsUpdated WebSocket events now include the environment descriptor so web/mobile presentation tracks the live label without a restart. Relay health checks persist a renamed label onto the user’s environment link (updateLabelForUser) when the verified descriptor differs, so T3 Connect clients pick up the new name.

Reviewed by Cursor Bugbot for commit 4ae38b7. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d98afac-d0d6-468c-901e-773cd450170a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jul 29, 2026
Comment thread apps/web/src/components/settings/ConnectionsSettings.tsx
@macroscopeapp

macroscopeapp Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a new user-facing feature allowing hosts to customize their display name. The changes span server, relay, web, mobile, and contracts packages with new database operations and modified data flow for environment labels. New features of this scope warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@PixPMusic
PixPMusic force-pushed the pixpmusic/connect-host-name branch from f7d7c28 to 1b689f9 Compare August 3, 2026 16:07

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1b689f955fae75ffded96473ca0e13e695cabbcd. Configure here.

Comment thread apps/server/src/ws.ts
@inayayousfi

Copy link
Copy Markdown
Contributor

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.

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.

@PixPMusic
PixPMusic force-pushed the pixpmusic/connect-host-name branch from f03974b to 1ef1fec Compare August 20, 2026 03:07
Comment thread infra/relay/src/environments/EnvironmentConnector.ts
@PixPMusic PixPMusic closed this Aug 20, 2026
@PixPMusic
PixPMusic deleted the pixpmusic/connect-host-name branch August 20, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants