M25: the fleet in one page (every host at once) #39
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Depends on: #37; #30 for machines reached only through control's relay (tailnet hosts work without it)
Blocks: #40
Swarm track. The page holds every machine at once, so one view covers all your panes.
Today the page shows one host and connects to whichever is selected (M4a's
hosts.ts). Control never sees terminal content, so it can't merge panes on the server side. The merge happens in the browser.(host, pane id);Part of the Swarm MVP (#44). The MVP cut of this ticket is listed there; anything not on that list is after the MVP.
From S16: Chrome spaces out WebSocket connections to one address past about 8 (20 daemons took 2–5 s to reconnect). Carry relayed daemons over one socket to control, and stagger direct reconnects. 20 daemons (600 panes) add about 14 MB to the page.
Done 2026-10-02, apart from real phones and a real provider sandbox. Merged in
33a749f.What landed:
Every host at once (
web/src/fleet.ts). The page holds a summaries-only connection (M23) to every host in the directory, control's or the home daemon's. Each goes over its own transport and end-to-end channel, and they merge into one list where a pane is (host, pane id).Each host has a state:
The last summaries are kept for the next load.
Relayed daemons share one WebSocket to control.
/api/relay/mcarries numbered channels, each a daemon's Noise channel over its existing relay stream./api/relay/c/<id>.Reconnects:
onlinespread reconnects over 1.5 s.The host menu says what each host is doing ("2 panes · live", "stale, seen 4s ago", "asleep").
Measured: after a simulated wake, 23 direct hosts were back in 0.48 s, and 20 through control (19 relayed, over one new socket) in 0.5 s, with no failed tries. S16 measured 2.2–4.6 s with a socket each.
Tests:
e2e/fleet.spec.tsande2e/fleet-control.spec.tscover the three done-whens with local daemons and a local control, in laptop and phone-sized contexts.Not covered:
Next: #47 builds on
fleet.listandfleet.panes, with each host's owner and team from control's directory.Done: merged to main in
33a749f(Merge M25). Not yet checked on real phones or a real provider sandbox.