Skip to content

fix(clients): a saved environment's name follows its host and its paired address - #36311

Open
juliusmarminge wants to merge 1 commit into
factory/pr-25807-a1794597635-1-shared-loginfrom
factory/pr-25807-a1794597635-2-label-sync
Open

juliusmarminge wants to merge 1 commit into
factory/pr-25807-a1794597635-1-shared-loginfrom
factory/pr-25807-a1794597635-2-label-sync

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

T3 Connect and learned routes hold a copy of the environment label that nothing updated, so a renamed host kept its old name (#15683) and renaming a paired address did not show while T3 Connect was the first route. The supervisor now passes the host's reported label with each config snapshot (also when the server reports no direct endpoints); the registry applies it only to environments saved solely through T3 Connect, and a bearer or SSH registration copies its label to the relay and learned routes. A label set on a paired address is kept. Editing an address now picks the paired route via savedBearerRoute instead of the first bearer route, which could be a learned one with no login of its own. Independent of layer 1 in behaviour; stacked because both touch register() in registry.ts. Two failing-first tests in registry.test.ts; supervisor test stubs gained the environment label the stream now reads.

Supersedes #25807. The change is @t3dotgg's; their commits are kept.

Layer 2 of 3, on top of #36310.

…red address

T3 Connect and learned routes hold a copy of the environment's label that
nothing updated. A T3 Connect environment kept the name it had when it was
added after its host was renamed, and renaming a paired address did not
show while T3 Connect was the first route.

An environment saved only through T3 Connect now takes the name its host
reports on connect. A label set on a paired address is kept, and renaming
or pairing an address updates the copies. Editing an address now picks the
paired one, not a learned route that has no login of its own.

Refs #15683

Co-authored-by: Theo Browne <me@theo.li>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 13, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at be86110

Macroscope's review found this PR approvable — Saved environment names now follow their host or locally paired address consistently. The changes preserve paired labels and connection credentials, with effects limited to naming and saved-address selection.

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

@YasserDRIF

Copy link
Copy Markdown
Contributor

Claude Opus 5.5 via Claude Code, writing on behalf of YasserDRIF.

+1 from another reproduction on 0.1.9 (macOS desktop hosts, iOS client, T3 Connect), for #15683.

  • I renamed two Macs with scutil --set ComputerName and fully restarted T3 Code on each. Each host's /.well-known/t3/environment, both locally and through its T3 Connect hostname, returned the new label.
  • The iOS app kept showing the old labels for both saved environments.
  • On iOS, a T3 Connect environment's row has no Label field ("Managed by T3 Connect…"), so I couldn't rename it by hand. The only fix was to remove the environment on the phone and pair again (t3 pair).

This PR's supervisor → registry label update would have fixed it, since both entries were saved through T3 Connect. One related cause of a wrong label that this PR can't fix is two hosts sharing a copied environment-id behind one tunnel. I filed that separately as #37634.

@RajVarsani

Copy link
Copy Markdown

Hit this today: renamed both Macs, and the T3 Connect entry kept the old host name ("raj's MacBook Pro") even though the host already reported its new label. Restarting didn't help; only removing and re-adding the environment did. This PR's T3 Connect label sync matches the case exactly. Would love to see it land.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants