Skip to content

acpmux group ls|move|tidy: sort sessions into sidebar groups without duplicates - #32107

Merged
cmux-bot[bot] merged 5 commits into
feat-cmux-nextfrom
lane/acpmux-group-cmds
Nov 2, 2026
Merged

cmux-bot[bot] merged 5 commits into
feat-cmux-nextfrom
lane/acpmux-group-cmds

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Leo: "there are still hundreds of random sessions that i have 0 clue what are for plus you didnt do these groups well don't we have better acpmux commands for you guys yet"

Agents sorted his sessions into sidebar groups with raw workspace_group_create + workspace_place calls and made one "Leads" group per lane, plus empty "UI think tank" duplicates. This adds commands for that job:

  • acpmux group ls [--json]: every sidebar group, with its space, members and pin. Groups that share a name with another group in the same space are marked DUP.
  • acpmux group move SESSION GROUP: the workspace acpmux new --group opened for SESSION (found by its stable workspace key) joins GROUP. GROUP is created only when the space has no group of that name: workspace group create --reuse from cmux-tui: workspace_group.create {reuse: true} finds the group by name instead of making one per member #32097, or on an older daemon, a lookup by name first.
  • acpmux group tidy [--apply]: for each space and name (outer spaces trimmed, case counted), keeps the pinned group if there is one, otherwise the first in group order. It moves each duplicate's members into the kept group in their order with workspace group <kept> add, then deletes the emptied duplicate. A group with no same-named twin is never touched, even if it is empty. A duplicate that still holds another machine's row (which this Mac can't move) stays. Without --apply it only prints the plan.

Every step runs the cmux CLI, which is the app's bundled one when the app started the daemon, so the app's group rules and undo apply. It needs no new daemon API, so it works on today's builds.

Tests

cli/group.rs unit tests: the tidy plan (merges Leads and UI think tank duplicates, keeps member order, leaves another space's Leads, a lowercase "leads" and a lone group alone; prefers a pinned group; leaves another machine's row and its group), ls duplicate marks, and move's workspace lookup by the launch key. help_examples gets entries for the new commands.

Observed / Not run

The unit tests and help tests run on the PR (cmux-ci test). Running against a live app is not done yet; it waits for a DEV build capture.

Agent session: agent session

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds acpmux group ls|move|tidy so agents can sort sessions into sidebar groups without creating duplicates. Previously agents made groups with raw API calls, leaving many unnamed sessions and duplicate groups like multiple "Leads" and empty "UI think tank" copies per space.

New Features

  • acpmux group ls [--json] lists every sidebar group with its space, members, and DUP marks for same-named groups in a space.
  • acpmux group move SESSION GROUP puts the session's workspace into GROUP, creating it only when its space has none; it skips another machine's row of the launch key.
  • acpmux group tidy [--apply] merges duplicate groups by moving members into the kept one, a pinned group first, then deletes the emptied duplicates; prints the plan unless --apply.
  • tidy never touches a group whose name no other group in its space has, even if empty, and leaves a duplicate that still holds another machine's rows.
  • Every step runs the cmux CLI, so the app's group rules and undo apply; no new daemon API is needed.

Written for commit 3922d25. Summary will update on new commits.

View guided diff Turn on auto-fix

…ithout making duplicates

Leo, 2026-11-02: "you didnt do these groups well don't we hav ebetter acpmux commands for you
guys yet". `ls` lists groups with members and marks same-named ones in a space; `move` puts a
session's workspace in a group, made only when its space has none; `tidy` moves each duplicate's
members into the first group of that name (a pinned one first) and deletes the emptied duplicate,
a dry run unless --apply. A group with a name of its own is never touched. Every step is the cmux
CLI's, so the app's group rules apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-f5d88e75bcfb55e3ae79
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review ae52b83: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr32107 -f ref=lane/acpmux-group-cmds -f platform=macos -f backend_mode=local

web and size checks: green

Shipped in:

@cursor

cursor Bot commented Nov 2, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 2, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at 4100f70
Visual verdict: unchanged by this diff
Checked the parsed shapes against cmux --json output (bare arrays for list, {value} for create), that group <id> add keeps the row's order, that tidy deletes only a non-kept member of a same-room same-name set after moving every movable member, and that the move key matches the placement's workspace_ref.
Follow-ups: [follow-up] move needs --reuse from #32097 (until then it falls back to find_or_make, which hides the create error); [follow-up] find_or_make ignores the room and pin; [follow-up] workspace_of should skip rows with a null workspace_id; [follow-up] re-read members before deleting a duplicate (race with a concurrent join; the delete is recoverable).

…chine's row of the key

The panic ratchet counts indexing and unchecked arithmetic in library code: the tidy plan
reads its groups with get/first and counts with saturating math. move finds the first row of
the launch key that has this Mac's workspace id (review follow-up).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-f5d88e75bcfb55e3ae79
@blacksmith-sh

blacksmith-sh Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpnhwy4s8o/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpoqw7ebfx/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at ae52b83
Visual verdict: unchanged by this diff
Delta since the SHIP at 4100f70: the panic-ratchet rewrites (Value::pointer, get/first, saturating math) read the same values as before. The one behaviour change is the intended one: workspace_of now skips rows whose workspace_id is null.
Follow-ups: none

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, sweep, via the review router; full diff from merge base 19a2a23 to this head): BLOCK at ae52b83

[P2] [blocking] files/cmux-tui/crates/acpmux/src/cli/group.rs:70-81 - group move discards the workspace’s room and the fallback lookup searches all rooms, so moving from a non-default room can attach the workspace to a same-named group elsewhere or create it in the default room - preserve the source room/group context, restrict lookup to that room, and pass --room when creating.
[P2] [follow-up] files/cmux-tui/crates/acpmux/src/cli/group.rs:255-264 - fallback group resolution is list-then-create; concurrent group move calls can both observe no match and create duplicate groups - use an idempotent create/reuse operation or re-read and reconcile after creation.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 10:59 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at 98a815b
Visual verdict: unchanged by this diff
Carried from the SHIP at ae52b83 across cmux-bot's base merge: the PR's patch-id is unchanged (54c5775de807).
Follow-ups: none

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (next-review patch-id; carried): SHIP at 3922d25

The independent SHIP at 98a815b carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (c77798343802c57c) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

@cmux-bot
cmux-bot Bot merged commit 10aaddb into feat-cmux-next Nov 2, 2026
205 of 207 checks passed
@cmux-bot
cmux-bot Bot deleted the lane/acpmux-group-cmds branch November 2, 2026 12:40

This branch was previously deployed

3 inactive deployments
ci-routing-agent — 3922d25f Deployed Nov 2, 2026 by github-actions[bot] via cmux-next macOS placement #62765
artifacts — 3922d25f Deployed Nov 2, 2026 by cmux-bot[bot] via publish tree-addressed cmux-tui #101106
sentry-dsyms — 3922d25f Deployed Nov 2, 2026 by cmux-bot[bot] via upload cmux-tui dSYMs to Sentry #101106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant