Skip to content

fix: keep team state current on every Mac - #689

Merged
iamnbutler merged 3 commits into
mainfrom
fix-team-state
Oct 23, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
fix-team-state

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Keeps team state current on every Mac (^101, ^103, ^104, ^106; #610, #631, #636, #604).

  • People turns Offline when the sidebar does (^101, ^103). fix(host): keep a teammate whose helper stops in People as Offline, and only call a channel offline when its host is #682 made People and the sidebar use the same reachability. The roster was still polled every 15 s, so now useRoster asks again on every listings frame and every settings frame. The host sends a listings frame whenever a peer comes or goes.
  • A served directory's open Settings → Team shows joins (^111). The first time a host publishes to the directory this host serves, this host re-reads its own directory and tells its apps that settings changed. Before, it waited for its 30 s heartbeat, which can skip syncs for up to 5 min.
  • Team setup doesn't pre-select "You're the first on this tailnet" when a team exists (^120). The choice is unset until the person picks one. It defaults to Join your team when a peer's host is in a team or a teammate's hello offers a directory. The fork polls the peer list once and passes it to every Nearby.
  • A section's Offline isn't truncated (^104). SessionSidebarGroup gains a note that sits after the truncated label and never shrinks. A teammate's section now reads ace · samechoc… · Offline instead of losing the suffix.

Smoke, on an isolated bun ace serve --port 5145 from this lane (its own ACE_HOME, config and keychain service, with a rebuilt apps/app/dist):

  • I served a directory on this Mac and opened Settings → Team in headless Chromium. A real tailnet PUT /directory/hosts/natembp that counted as a first publish sent a settings frame within about 150 ms. A host added to the directory showed up under In the directory without a Refresh.
  • The open People page sent team-roster again after each channels frame.
  • Two directory teammates whose host is unreachable showed ace · rivera · Offline and ace · samechoc… · Offline in All Projects. The button's label says …, Offline.
  • With no peers, Team setup still pre-selects Get your team started.
  • Not seen: a real peer going offline, and the join default with a teammate in a team. Both need a second Mac.

Built in Ace

No. This was a Claude Code fix-train worker in a terminal (#5), with headless Playwright for the smoke screenshots. The fix train runs agents outside Ace.

…the sidebar, a served directory's Settings shows joins, Team setup defaults to joining an existing team, and a section's Offline isn't truncated

Why: apps/host/src/directory-server.ts#function handle | a host's first publish to the served directory calls joined, so the serving host re-reads its own directory now instead of on its heartbeat
Why: apps/app/src/onboarding.tsx#function useRoster | People re-asks the roster on every listings and settings frame, since the host sends one when a peer comes or goes or the directory changes; the 15 s poll only finds new peers
@iamnbutler
iamnbutler merged commit 4d88777 into main Oct 23, 2026
1 check passed
@iamnbutler
iamnbutler deleted the fix-team-state branch October 23, 2026 14:01
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.

1 participant