Skip to content

cmux-tui: a reopened tab group keeps its saved-group link and its order (cx-gzh.31) - #20888

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
fix/reopen-keeps-saved-group
Oct 15, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
fix/reopen-keeps-saved-group

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

If a saved tab group was closed and then reopened, the group came back unsaved. On a partial reopen, the tabs restored later were also appended to the end of the live group instead of returning to their own places.

  • When a close records a tab group, its saved-group link (saved_id) is stored with it (state/closed_tab_groups.rs).
  • When reopen forms the group again, it relinks it to that saved group. It skips this if the saved group has been deleted or another live group took it (Reopen Saved Group since the close). The saved record is refreshed in the same strip change.
  • Tabs that a later partial reopen brings back rejoin the live group in strip order. Each has already been put back at its recorded index, so the group keeps the order it closed in. This uses rejoin_closed_tab_group instead of tab_group_add(.., None).

Testing

  • Red: at a7302081eb9a, a_closed_saved_group_reopens_linked_and_in_order failed on Linux and macOS in hosted run 38680818338 (the saved_tab_group_id was Null).
  • Green: at ecce626488a9, hosted run 38682764116 with the reopen filter. Result to follow in a comment.

Changelog

Fixed: A reopened saved tab group stays saved, and its tabs keep their order.

🤖 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 reopening a saved tab group so it stays linked to its saved record and keeps its tab order.

  • When a group closes, its saved-group link is stored with the archive.
  • Reopen relinks the group to that saved group unless the saved group is gone or another live group took it.
  • The saved record stays untouched — it still names every closed tab, not only the ones reopened so far.
  • Tabs restored by a later partial reopen rejoin the live group in strip order instead of appending at the end.

Written for commit 4a95acf. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 14, 2026 21:18
…gzh.31)

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

A close records the group's saved-group link with its archive. Reopen
links the group it forms again back to that saved group, unless the saved
group is gone or another live group took it. Tabs a later partial reopen
brings back rejoin the live group in strip order (each is back at its
recorded place) instead of at the group's end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 15, 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.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 15, 2026 04:41 — 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: 66a686a1-be60-4d2f-a138-efbc4f9b3651

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.

@blacksmith-sh

This comment has been minimized.

… SurfaceId (cx-gzh.31)

Review fixes: rejoin and relink no longer rebuild the saved record from
the tabs reopened so far (it still names every closed tab), and relink
checks the saved group and its other links inside the commit. The test
reads the saved group between the two reopens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Merge receipts for head 4a95acf:

  • PR checks: 85/85 green on this head.
  • Hosted cmux-tui focused run (reopen filter) on this head: https://github.com/manaflow-ai/cmux/actions/runs/38692924055 green. a_closed_saved_group_reopens_linked_and_in_order and the four reopen_closed_kinds group tests pass on Linux and macOS.
  • Red then green: the new test fails without the fix on two assertions, the saved-group link and the member order.
  • Review subagent, second pass: the shrink fix holds, and no defects block. The edge cases after a partial reopen (order after strip edits, the saved record shrinking on edits, Reopen Saved Group on a partial group, the relink retry) are filed as cx-vh6js.

@teamleaderleo
teamleaderleo merged commit bd73dca into feat-cmux-next Oct 15, 2026
181 of 187 checks passed
@teamleaderleo
teamleaderleo deleted the fix/reopen-keeps-saved-group branch October 15, 2026 07:18

This branch was previously deployed

2 inactive deployments
artifacts — 4a95acfc Deployed Oct 15, 2026 by teamleaderleo via publish tree-addressed cmux-tui #16286
cmux-tui-merge-tree — 4a95acfc Deployed Oct 15, 2026 by teamleaderleo via publish the merge tree #1254
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