cmux-tui: workspace_group.delete {merge_into} merges a duplicate group into its twin
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"
His sidebar already has about fifteen "Leads" groups with one workspace each, plus four empty "UI think tank" groups. #32097 stops new duplicates. This PR adds the step that merges the existing ones without closing anything.
Change
workspace_group.deletetakesmerge_into: <group>. The deleted group's members move into that group, keeping their places in the personal order, and then the group is deleted. It leaves no closed-history record, because nothing is lost: every member is still open and grouped. The target must exist and be in the same space. Otherwise the call fails (not found, or the space error) and nothing changes.- A delete without
merge_intoworks as before: members are ungrouped and the group is recorded in closed history. cmux workspace group G delete --merge-into Ksends it.
A dry-run-by-default acpmux group tidy comes in a follow-up PR. It finds same-named groups per space, keeps the first, merges the others into it, and deletes only empty duplicates. Never a user's only group.
Tests
state/group_merge_tests.rs(red first): a merge moves the members (order a, b, c across both groups), leaves one group and adds no closed record; a merge across spaces and a merge into a missing group both fail, and nothing is deleted.cli/command.rsandcases.rs:--merge-intomaps tomerge_into.
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 merge_into support to workspace_group.delete so a duplicate group's members move into a twin group and the duplicate is removed without a closed-history record.
- The target group must exist in the same space; otherwise the call fails and nothing changes.
- A delete without
merge_intoworks as before: members are ungrouped and the group recorded in closed history. cmux workspace group G delete --merge-into Ksends the new parameter.- Tests cover member order preservation, failure cases, and the CLI mapping.