Skip to content

cmux-tui: workspace_group.delete {merge_into} merges a duplicate group into its twin - #32101

Closed
teamleaderleo wants to merge 2 commits into
feat-cmux-nextfrom
lane/sidebar-group-tidy
Closed

teamleaderleo wants to merge 2 commits into
feat-cmux-nextfrom
lane/sidebar-group-tidy

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"

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.delete takes merge_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_into works as before: members are ungrouped and the group is recorded in closed history.
  • cmux workspace group G delete --merge-into K sends 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.rs and cases.rs: --merge-into maps to merge_into.

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 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_into works as before: members are ungrouped and the group recorded in closed history.
  • cmux workspace group G delete --merge-into K sends the new parameter.
  • Tests cover member order preservation, failure cases, and the CLI mapping.

Written for commit eff46ac. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits November 2, 2026 09:59
…'s members over (red)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-f5d88e75bcfb55e3ae79
…p into its twin

Members join the target group of the same room in their order, and the duplicate goes with no
closed-history record, since nothing of it is lost. `cmux workspace group G delete --merge-into K`
sends it; a tidy of same-named groups builds on it.

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 eff46ac: 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=pr32101 -f ref=lane/sidebar-group-tidy -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 19a2a23 to compare; do not merge until green; see lane-rules

@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

Closing: acpmux group tidy (#32107) merges duplicates with the existing workspace group <kept> add then a delete of the emptied group, which works on today's daemons, so this new delete field has no consumer.

@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/tmp1781wqpc/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpo_nohwhe/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 (codex gpt-6.1-sol xhigh, next-review): BLOCK at eff46ac

BLOCK at eff46ac
Visual verdict: no images; Leo tries the build

  1. [P1] [blocking] router.rs:1012: Update both contracts in spec/resource-operations-v2.json. The catalog rejects merge_into as unknown before dispatch, so every merge request fails and both new protocol tests fail. The result contract also rejects merged_into/moved and requires ungrouped; updating only the input would produce an error after committing the merge.

  2. [P1] [blocking] cases.rs:793: The added entry duplicates workspace_group.delete. The existing every_safe_transport_operation_has_a_noun_first_path test requires unique operations, so it still fails after fixing the catalog. Move this variant into that test’s additional-cases loop.

Verified against the catalog and validation/test source; Rust tests could not run because the box has no toolchain.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Superseded by #32107 (acpmux group ls|move|tidy, merged 2026-11-02): it merges duplicate groups with the existing workspace group <kept> add followed by a delete of the emptied group, so this new merge_into field has no consumer, as the earlier comment here said. Closing the PR that comment meant to close.

This branch was previously deployed

3 inactive deployments
ci-routing-agent — eff46ac5 Deployed Nov 2, 2026 by teamleaderleo via wait for same-key tree publisher #100569
artifacts — eff46ac5 Deployed Nov 2, 2026 by teamleaderleo via publish tree-addressed cmux-tui #100568
sentry-dsyms — eff46ac5 Deployed Nov 2, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #100568
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