M23: pane summaries (activity, kind, project, previews) #37
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: #36
Blocks: #39, #40
Swarm track. Each daemon gets a cheap, live summary of all its panes, enough to draw hundreds of them without attaching to any.
S16 (#36) found that today's whole-
Statebroadcasts already cost 6.6 MB/s per client and 15–20% of a core at 500 panes with 50 busy, in the ordinary tab view too. So the deltas here become how every client gets updates, not an extra mode for the swarm.PaneInfo(andPaneSummary,illogical ls --json):activity: a cumulative output byte counter andlast_output_msin the pane'sStatus, set under the lockState::outputalready takes for every chunk. The mux turns the counter into bytes per second when it builds a summary, so idle panes need no timer (S16);project: the git root of the cwd and its name, worked out when the cwd changes (cached, never agitper frame). Outside a repo it's empty, which S16 found is most panes (97 of 105 real commands), so clients need a fallback such as the cwd's top directory;kind: a classification (shell, build, test, agent, server, logs, editor) from the foreground process's/procargv first, then the shell integration's command text, with blocks keeping theirBlockType. That order got 52 of 54 labelled commands right in S16 and catches aliases (cforclaude);title: the OSC 0/2 title, when the program sets one.epoch,policyandintegration; a client that needs them reads the pane./api/panes/{id}/capture. S16: 50 panes at 1 Hz cost 0.8% of a core and 2.2 KB/s.summary.py;illogical ls --jsonshows kind, project and activity for every pane;cargo test,npm run dev,claude,nvim,tail -f,journalctl -f).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:
Done 2026-10-02, cut to the MVP (#44). Merged in
70003e2.What landed:
PaneInfogainskind(shell, build, test, agent, server, logs or editor),project({root, name}),activity({bps, last_ms}) andtitle.illogical ls --jsonshows them.creads as theclaudeit runs. It uses S16's heuristic..git, with no git process, and cached per directory.State::output's existing lock. The mux works out the rate once a second, so idle panes need no timer and parked panes aren't woken.States. Everything else is adeltawith only the fields that changed.subscribe {summary: true}gives summaries only, for the swarm and the fleet: no epoch, policy or integration, and nothing attached. The web client'snew Client(base, e2e, true)makes no terminals.Measured at S16's load, 500 panes with 50 busy (
spikes/s16-swarm/m23.py, release build on geek):Tests:
classify.rs: S16's labelled fixture plus this repo's commands.crates/daemon/tests/summaries.rs: kind, project and activity inls --jsonfor real processes (cargo test,npm run dev,claudebehind the aliasc,nvim,tail -f,journalctl -f). It also checks that 40 panes with 4 busy send no wholeStateand stay under 20 KB/s.e2e/summaries.spec.ts.Not covered (after the MVP):
/api/panes/{id}/capture.State(243 KB at 500 panes).What's left for the swarm: #39 connects a summaries-only client to each host. #40 needs a client-side fallback group, from
cwd, for panes outside git. #47 needs each pane's session owner to group by person.Done: merged to main in
70003e2(Merge M23), cut to the swarm MVP scope (#44).