Leaders list: acpmux ls --leads and a Leads list on New Tab
Leo: "i need to be able to see and talk to the leaders of every respective thing"
What
acpmux ls --leads(cli/run/ls_leads.rs) lists the leaders, each once, with its machine, state,areatag and the names of the sessions that report to it. The leader with the most reports comes first.--json/--fieldsrows are the daemon's rows plusreports.- A "Leads" list on New Tab (
AllChatsList): every leader once, above the live chats, with "N reporting". A press (or right-click > Open) opens that chat the same way a live chat row does. It shows under the All filter with no search.
Rule. A leader is a live session that at least one live session reports to. "Reports to" means the lane's lane.reportsTo tag, which the daemon sets on every lane a session starts (hub/lane_reports.rs), matched on the lane's own machine as (peer, id). The rule is derived from that tag, not from a hand list. The CLI and the web (acpmux/leads.ts) apply the same rule to the same row fields. Closed, archived and side chats never count. A session tagged as reporting to itself does not make itself a leader.
Audit (systems of record)
- leo-workspace
machines/fleet-registry.jsoncoordinators.- It names
current(the coordinator) andretired. - Its own note already says that a coordinator host's send targets are derived from acpmux: "a live session that hands out work", meaning another live session reports to it or was spawned by it. That is the same rule as here.
- No deputy or area-owner list exists by hand, and none is added.
- It names
acpmux ls --json. Rows carrytags(lane.reportsToon lanes;areais free-form and often just the lane's own name),parentandspawnedBy(lineage),startedBy(sub-sessions) andchildren(open sub-sessions).- On one lane host, 90 live sessions derive 7 leaders: the area owner with 13 reports, a dispatcher with 4, two cloud owners with 7 and 4, and three with 1 to 3.
lane.reportsTois the one link everyacpmux newlane carries.spawnedByis dropped once the parent is not a listed root.
- App.
- The sidebar "Leads" groups in Leo's screenshot are workspace groups made by repeated
acpmux new --group Leadsopens. Their reuse and duplicate rows are a separate fix in progress; this PR does not touch them. cmuxExec.tsonly titlescmux_exectranscript rows.AllChatsList(New Tab / History) already has a live-chats list that opens a chat on click. A second list beside it is the least new UI: no new surface, no sidebar change, nothing hidden or closed.
- The sidebar "Leads" groups in Leo's screenshot are workspace groups made by repeated
- Session entry. It gains
reportsTo(the tag). No other entry field changes.
Not covered
A coordinator whose lanes run on other machines and carry no lane.reportsTo is a leader only on the machine where its lanes report to it. sessions new --machine lanes do not tag a remote parent yet.
Tests
The tests were committed first, in 34b84e2 (red on base: ./leads missing, no .nt-all-leads). They are green at the head.
bun test src/agent-session/acpmux/leads.test.ts src/agent-session/acpmux/newtab/leadsList.test.tsx: 6 pass.- Neighbouring suites (AllChatsList, NewTabScreen, sessionList): 46 pass.
bun run typecheckandscripts/web-lint.shpass.- Rust unit tests are in
ls_leads.rs(derivation, closed and archived exclusion, per-machine match, text view). They run on the fleet; results are below. - Gallery:
agent-pane.all-chats-listgains aleadsvariant.
Observed / Not run
- Observed: the web tests, type check and lint above, and the live leader count on one lane host computed from
acpmux ls --json. - Not run yet: the Rust suite (fleet run pending) and the app capture.
- iOS: New Tab is a Mac pane, so this list has no phone row yet (follow-up).
Changelog
- Added: New Tab lists the leaders (the chats other chats report to) and opens one on click;
acpmux ls --leadsprints them.
Design spec: leo-workspace design/new-tab.md (no settled design changes; adds one list in the existing live-chats style).
Agent session: agent session
š¤ Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds a "Leads" list to New Tab and the acpmux ls --leads command so you can see and open the chat each session reports to.
A leader is derived, never hand-listed: a live session that at least one live session reports to, via the lane.reportsTo tag. The CLI and web derive the same rule from the same row fields, matched on the same machine as (peer, id). Closed, archived, and side or aside chats never count as leaders or reports, and a session tagged as reporting to itself does not make itself a leader.
New Features
acpmux ls --leadslists each leader once with its machine, state,areatag, and reporting session names, most reports first; it reads only live rows and conflicts with the other listing filters.- New Tab's "Leads" list sits above the live chats with an "N reporting" label; a press or right-click > Open opens that chat. It shows under the All filter with no search.