Skip to content

cmux-tui: a tab group closed with its terminals reopens as its group (cx-gzh.31) - #20868

Merged
teamleaderleo merged 8 commits into
feat-cmux-nextfrom
fix/batch-group-close-history
Oct 15, 2026
Merged

teamleaderleo merged 8 commits into
feat-cmux-nextfrom
fix/batch-group-close-history

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Close Group with end_terminals: true goes through the batch close path. That path wrote the pruned tab groups before applying the resource patch, so when the patch's closed-history capture (#20736) ran, the group's rows were already gone. No group was recorded, and Cmd-Shift-T brought the tabs back loose.

  • topology_close_store.rs now writes the pruned groups after apply_resource_patch (in the same transaction), so the capture still sees them.

Testing

Changelog

Fixed: Closing a tab group together with its terminals keeps the group for Reopen Closed.

🤖 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

Fixes tab groups being lost when closed together with their terminals, so Reopen Closed restores the group instead of loose tabs.

Closing a tab group with end_terminals: true takes the batch close path, which wrote the pruned tab groups before applying the resource patch. The patch's closed-history capture then no longer saw the group, and reopening brought the tabs back without a group. The fix writes the pruned groups after the patch in the same transaction, and adds a regression test covering the reopen-as-group behavior.

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

View guided diff Turn on auto-fix

teamleaderleo and others added 8 commits October 14, 2026 13:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ps for reopen (cx-gzh.31)

A close records every live tab group holding a closing tab (directly, or in
a closing screen or workspace) on its closed-history group, naming the
group's closed tabs. Reopen forms each group again around the tabs it
brought back, or adds them to the group if it is still open. Close Group
now goes through the same capture, which replaces its separate attach step;
records stored with the older single tab_group still reopen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A group row a screen, pane or workspace close left behind is not live:
  reopen forms the group again instead of adding to a group whose pane is
  gone. Every strip edit prunes such rows before it runs, so the id is
  free again.
- Capture the groups before capture_workspace forgets which closing
  workspaces are ephemeral, so incognito group names are never recorded.
- Record only memberships of tabs still in their group's pane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…group (cx-gzh.31)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…for reopen (cx-gzh.31)

The batch close wrote the pruned tab groups before the resource patch,
so the patch's closed-history capture no longer saw the group. Write
them after the patch instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 15, 2026 03:24 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 44be00c3-62ca-498c-963d-14fe00998b9c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Merging at exact head a62cd6a.

  • Checks: all 85 checks are green on this head.
  • Tests: hosted run 38676126989 passes a_tab_group_closed_with_its_terminals_reopens_as_its_group on Linux and macOS. The red is recorded in the PR body (hosted run 38647639219).
  • Review: the review subagent found no defects.

@teamleaderleo
teamleaderleo merged commit c6416c5 into feat-cmux-next Oct 15, 2026
151 checks passed
@teamleaderleo
teamleaderleo deleted the fix/batch-group-close-history branch October 15, 2026 03:53

This branch was previously deployed

2 inactive deployments
artifacts — a62cd6a9 Deployed Oct 15, 2026 by teamleaderleo via publish tree-addressed cmux-tui #15853
cmux-tui-merge-tree — a62cd6a9 Deployed Oct 15, 2026 by teamleaderleo via publish the merge tree #1185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant