Repository navigation
cmux NEXT palette: Close Workspaces in Group, and Set Space Terminal Defaults asks instead of clearing - #23385
Conversation
The palette shows group closes out of context, so each title names the group: Close Tab Group and Close Screen Group already did; Close All Workspaces in Group becomes Close Workspaces in Group in all 21 locales. Context-menu labels keep their shorter form, since the right-clicked row names the group. A vocabulary test pins the three titles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray
Red on base: from the palette with no arguments, space.setDefaults sends an update that clears the space's terminal defaults instead of asking, and a CLI run with no arguments clears them too instead of refusing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray
space.setDefaults has only optional arguments, so the palette and the space menu ran it with none, and a run with neither cwd nor env cleared the space's terminal defaults silently. A run that names neither now asks for the working directory in the palette, starting from the current one and carrying the current env so the answer keeps it; a CLI, MCP or socket run that names neither is refused with how to clear. Clearing stays explicit: name both empty (cwd= env=), as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray
|
Owned by palette-audit on cosmic-gray · session |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
|
Bead |
…up-close-setdefaults
… non-text, and Clear asks first Failing tests for the #23385 follow-ups: - a cwd or env that is not text (an in-app bool, or the "true" the socket makes of a bare --cwd) is refused and sends nothing; - --cwd alone keeps the space's env and --env alone keeps its cwd (real daemon); - Clear Space Terminal Defaults… (space.clearDefaults) asks from the palette and needs confirm from automation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray
…n-text, add Clear Space Terminal Defaults… Follows #23385. - space.setDefaults changes only the fields a run names: --cwd X keeps the space's env, --env alone keeps its cwd, an empty one clears that field, both empty clear. The palette's directory ask no longer copies env into the rerun; the merge keeps it. - A cwd or env that is not text is refused (rooms.refusal.defaultsMustBeText), and so is a relative cwd (rooms.refusal.cwdMustBeAbsolute): the socket turns a bare --cwd into the string "true", which used to become a directory named "true". - New destructive action space.clearDefaults ("Clear Space Terminal Defaults…", CLI `space clear-defaults`): the palette asks with the standard confirmation dialog while the space has defaults; CLI and MCP pass confirm, as for every destructive action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray
|
Shipped in:
|
…use non-text, and Clear Space Terminal Defaults… asks first (#23461) * test(cmux-next): space terminal defaults keep the other field, refuse non-text, and Clear asks first Failing tests for the #23385 follow-ups: - a cwd or env that is not text (an in-app bool, or the "true" the socket makes of a bare --cwd) is refused and sends nothing; - --cwd alone keeps the space's env and --env alone keeps its cwd (real daemon); - Clear Space Terminal Defaults… (space.clearDefaults) asks from the palette and needs confirm from automation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray * fix(cmux-next): space terminal defaults merge named fields, refuse non-text, add Clear Space Terminal Defaults… Follows #23385. - space.setDefaults changes only the fields a run names: --cwd X keeps the space's env, --env alone keeps its cwd, an empty one clears that field, both empty clear. The palette's directory ask no longer copies env into the rerun; the merge keeps it. - A cwd or env that is not text is refused (rooms.refusal.defaultsMustBeText), and so is a relative cwd (rooms.refusal.cwdMustBeAbsolute): the socket turns a bare --cwd into the string "true", which used to become a directory named "true". - New destructive action space.clearDefaults ("Clear Space Terminal Defaults…", CLI `space clear-defaults`): the palette asks with the standard confirmation dialog while the space has defaults; CLI and MCP pass confirm, as for every destructive action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray * test(cmux-tui): an action's --cwd reaches the app absolute, ~ and empty untouched `cmux space set-defaults --cwd .` sends "." today, which the app now refuses (a space's directory must be absolute). Also states the Default-space assumption in the Swift clearDefaults "nothing at stake" test (review nit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray * fix(cmux-tui): resolve an action's --cwd against the caller's directory `cwd` joins `path` and `out` in the caller-path rewrite, so `cmux space set-defaults --cwd .` (and --cwd on tab new, split, workspace new) reaches the app as an absolute directory instead of one the app resolves against its own working directory or refuses. `~/…`, an empty `--cwd=` and a bare `--cwd` are sent unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray * Regenerate action surfaces for space.clearDefaults From CI's cmux-next-generated-patch artifact (run 39646893133, merge ref faf4d3a). It also carries chief.openViews, which base #22683 added without regenerating these files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray * Regenerate action surfaces for space.clearDefaults From CI's cmux-next-generated-patch artifact (run 39656807210, merge ref 63c8844). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fdc6-7623-8ee3-fa94b3900ccd&host=cosmic-gray * cmux NEXT spaces: terminal defaults updates run in order against the daemon's defaults Review finding: a partial Set Space Terminal Defaults run merged into the app's mirrored room.defaults and sent the whole object, so two quick runs (--cwd /a, then --env) both read the old mirror and the second dropped the first's field. Set and Clear Space Terminal Defaults now run one at a time per space, each merging its named fields into what list-personal returns when it runs. The live test sends --cwd and --env back to back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f68ebdd9a3c1704ffb42 * cmux NEXT spaces: nonisolated deinit and a bounded stream for defaults runs The crash-class gate flagged RoomDefaultsUpdates.Finish's plain deinit (main-actor isolated in this target, cx-t7hu) and its unbounded AsyncStream. Finish only finishes a Sendable continuation, so its deinit is nonisolated; the stream never yields, so it buffers at most one element. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f68ebdd9a3c1704ffb42 * cmux NEXT spaces: Clear asks by the daemon's defaults; remote --cwd is sent as typed Review findings on c3b37ee: - Clear Space Terminal Defaults… skipped its question when the app's mirror showed no defaults, but the mirror lags a reply: set-then-clear could clear unasked. It now also asks while a defaults run for the space is in flight, and otherwise asks the daemon (listPersonal); a daemon that does not answer asks. - The CLI resolved every action's --cwd against the caller's directory, including remote, cloud and agent actions whose cwd names a folder on another machine (`cmux open-remote HOST --cwd .`). Those now send --cwd as typed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f68ebdd9a3c1704ffb42 * cmux NEXT spaces: the defaults patch is nonisolated, so the daemon-side run can apply it The Release compile refused RoomDefaultsUpdates' send body calling the main-actor Patch.applied(to:) off the main actor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f68ebdd9a3c1704ffb42 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Two palette-audit fixes in cmux NEXT.
Group close titles name their noun. The palette shows these rows out of context, so each title says which group it closes:
tabGroup.closescreenGroup.closeworkspaceGroup.closeWorkspacesOnly the workspace-group title changed. The Swift
defaultValueand all 21 locales inActionCatalog.xcstringswere updated through./scripts/localize-changes. The context-menu labels (Close Group,Close All in Group) stay as they are, since the right-clicked row already names the group.PaletteMenuVocabularyTests.groupCloseTitlesNameTheirNounpins all three titles. No hand-written test asserted the old title.Set Space Terminal Defaults… no longer clears the defaults silently.
space.setDefaultstakes only optional arguments, so the palette and the space menu ran it at once with none. A run with neithercwdnorenvsentdefaults: .clear, wiping the space's terminal directory and environment without asking. Now:ActionRegistry.ask, the same prompt Rename Space uses), starting from the space's currentcwd. The ask carries the currentenv, so the answer keeps it. cmux NEXT has no separate editor sheet for space defaults; this inline palette prompt is the existing editor.rooms.refusal.defaultsRequired, 21 locales). It no longer pops a palette prompt on the person's screen.cmux space set-defaults --arg cwd= --arg env=), which is the documented "both empty clears" path.I checked every entrypoint. The palette row, the space context menu,
cmux space set-defaults, MCPapp_space_set_defaultsand socketaction.runall reach the singleRoomHandlersbinding, so the guard covers all of them. Nothing else callsupdateProfile(defaults:)for this.Testing
The regression test went in first (e0b3046), then the fix (head):
Tests/CmuxNextAppTests/SpaceSetDefaultsAskTests.swift(suiteSpaceSetDefaultsAskTests, CmuxNextAppTests). The test seams areActionRegistry.argumentAsker(to see the ask),DaemonService.workTracker(to count daemon sends) andcapturingRefusal.fromThePaletteWithNoArgumentsItAsksAndClearsNothing: fails on base (one daemon update sent, nothing asked), passes on head.automationWithNoArgumentsIsRefusedAndClearsNothing: fails on base (no refusal, one update sent), passes on head.namedArgumentsStillSetAndBothEmptyStillClears: passes on both, so explicit callers keep working.Focused command (fleet):
cmux-ci run --class light --script scripts/ci/package-test-lane.sh --ref SHA --arg=suite --arg=Packages/macOS/CmuxNext --arg=CmuxNextAppTests.SpaceSetDefaultsAskTests[,CmuxNextActionsTests.PaletteMenuVocabularyTests].ee597c06d373, branchtmp/pa-23385-red), cmux-ci step a7dcbdddbf5175df42189248:SpaceSetDefaultsAskTestsfailed with 4 issues,Expectation failed: (fixture.sends() → 1) == 0and(fixture.asked() → []).first → nilfor the palette run,(reason → nil) != niland(fixture.sends() → 1) == 0for the CLI run; the explicit-arguments test passed.SpaceSetDefaultsAskTestsandPaletteMenuVocabularyTestsboth passed.Observed / Not run
python3 scripts/cmux-next/prepush-gate.pyreports no new violations.scripts/localization_catalog.py checkreports no errors for the two touched keys (the remaining parity errors in those catalogs are on base)../scripts/localize-changesimported all 20 non-English locales for the changed title.plans/cmux-next/action-surfaces.jsonand the captured palette fixtures (webviews/test/fixtures/palette-eval/root-entries.json,cmux-tui/.../palette-corpus.json) still show the old title. They are generated or live-captured, so they are left to their generators.Changelog
Fixed: Set Space Terminal Defaults… asks for the working directory instead of silently clearing the space's terminal defaults, and the palette's group close reads Close Workspaces in Group
Proof
No capture: the title change is a one-word copy edit listed above, and Set Space Terminal Defaults… now opens the existing inline palette prompt (the same one as Rename Space) rather than any new UI.
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes two palette issues in cmux NEXT: renames the workspace-group close title, and stops Set Space Terminal Defaults from wiping a space's terminal defaults when run without arguments.
space.setDefaultstakes only optional arguments, so the palette and the space menu ran it with none, and a run with neithercwdnorenvcleared the space's working directory and environment silently.Behavior changes
cwdand carrying the currentenvso the answer keeps it.cwd=env=).Added
SpaceSetDefaultsAskTestscovering the ask, refusal, and explicit clearing paths, and pinned the three group-close titles inPaletteMenuVocabularyTests.Written for commit 7821b76. Summary will update on new commits.