Skip to content

fix(host): let a peer's current GitHub login replace a stale one without a restart - #611

Merged
iamnbutler merged 3 commits into
mainfrom
peer-login
Oct 22, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
peer-login

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Fixes #610. A teammate's Mac kept its owner's old GitHub login until this Mac's helper restarted, so People, the share list and message authors credited Sam as iamnbutler.

  • people() in gateway.ts now lets the directory's hosts[].github override logins remembered from peers' hellos. Each host re-announces itself to the directory every heartbeat; a hello is asked only on connect, so the directory is the fresher source.
  • greet() in peers.ts records a peer whose hello came back without github (a restarted helper answers before gh resolves). discover() re-asks those peers every 15 s pass, also with a directory chosen, until one answers with a login. It keeps the old name in the meantime, so a plain restart doesn't blank names.
  • Settings → Team → People (team-roster) names every member from people(), so the online peers get the same answer as message authors and share lists. Before, they read the raw hello cache.

Smoke: isolated loopback host on port 4771 from this lane. team-roster and the people frame still name this host's owner (iamnbutler). I couldn't reproduce the two-peer case: loopback hosts don't find peers, and peers come only from Tailscale, one host per Mac. That path is reasoned from the code and not verified.

Built in Ace

No. Built by Claude Code as a fix worker after the two-Mac pair study because the worker runs outside an Ace channel. Dogfooding gap tracked in #5.

…out a restart

Why: apps/host/src/gateway.ts#function people | the directory's hosts[].github is re-announced by each host every heartbeat, so it must override logins remembered from peers' hellos
Why: apps/host/src/peers.ts#function greet | a hello without github leaves the peer in unnamed, and discover re-asks it even with a directory chosen, until a login arrives
@iamnbutler
iamnbutler merged commit d785c7e into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the peer-login branch October 22, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Teammate's Mac keeps its owner's old GitHub login until Ace Helper restarts

1 participant