Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Openjuliusmarmingewants to merge 1 commit intofactory/pr-25807-a1794597635-1-shared-login fromrefs/pull/36311/headopened View on GitHub

juliusmarmingecommented

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.

    1. tanstack-source added labelsbug

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. 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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. 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.

    5. 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.

Sign in to join this conversation.