Repository navigation
cmux-next: reopen closed workspace - #17794
Closed
azooz2003-bit wants to merge 2 commits into
Closed
azooz2003-bit wants to merge 2 commits into
azooz2003-bit wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The refusal for an empty history beeps like Reopen Closed Tab, an offline daemon refuses up front, and a press that loses its item to another press reopens the next newest. The reveal wait uses a helper task, which the region isolation checker accepts, and the plan lists what is not restored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reopen Closed Workspace was registered as unavailable in cmux-next. It now reopens the newest closed workspace.
Part of the cmux-next parity work listed in #16174 (comment).
What it does
closed.list, resource API v2) and picks the newest item of kindworkspace. Closed tabs and screens newer than it stay in the history, like the old app.closed.reopenwith an idempotency key. If another press or client reopened that item first, it lists again and reopens the next newest, up to 3 attempts.cmux workspace reopen-closedshare this path.What the daemon does not restore yet
The daemon's
closed.reopen(on #16174's branch) recreates the name, screens and tabs. Compared with the old app it misses:new_workspacegets no cwd)Terminals start fresh shells, because a workspace close ends them. These are daemon follow-ups, listed in the plan row, not part of this app-only PR.
Why it is stacked
closed.listandclosed.reopenare in the cmux-tui pinned on #16174's branch, not on feat-cmux-next's pin. So this PR targetsfeat-cmux-next-acpmuxand stays open until #16174 merges and GitHub retargets it.No daemon change here.
Design call for Lawrence
The daemon doesn't advertise a capability for closed history. The handler calls the operations directly, and an older daemon's error comes back to the caller. My proposal: advertise
closed-history-v1(the name the module docs already use) and gate this action withrequires:. That would be a one-line daemon change, which I left out to keep this PR app-only.reopenPreviousSessionandrecentlyClosed(the list submenu) stay unavailable.Tests
ReopenClosedWorkspaceTests: picks the newest workspace and skips tabs, refuses when no workspace was closed, retries the next one afterresource.not_foundand not after other errors, waits for the mirror, gives up after the timeout.ClosedHistoryTests: the request shapes (no key on the list, key andclosedon the reopen), and decoding of both replies.plans/cmux-next/REWRITE.mdworkspace row.No screenshots: there is no visible UI beyond the existing menu item.
Inherited red checks
cmux-next swift testfails on this base for reasons outside this diff (ResourceControl.swift:21on the base): #16174's base is behind feat-cmux-next (Bundle.modulein CmuxNextActions, GhosttyKit lib prefix). The same goes for the branch-wide routing guards that fail on #16431.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Reopens newest closed workspace in cmux-next (previously registered unavailable). It reads the daemon's closed history (
closed.list,closed.reopen), has the daemon recreate the workspace, and shows it in the active window.closed.list; headers closed after it (tabs, screens) stay in history for their own verbs.reopenPreviousSessionandrecentlyClosedstay unavailable.closed-history-v1and gate the action on it.feat-cmux-next-acpmuxbecause the daemon methods are pinned on cmux-next: the Rust cmux CLI (cmux-tui) with acpmux and cmux acp; delete the Swift CLI #16174; this stays open until that merges and retargets.Written for commit c511f45. Summary will update on new commits.