cmux NEXT palette: Close Workspaces in Group, and Set Space Terminal Defaults asks instead of clearing
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:
| Action | Palette title |
|---|---|
tabGroup.close | Close Tab Group (already right, unchanged) |
screenGroup.close | Close Screen Group (already right, unchanged) |
workspaceGroup.closeWorkspaces | Close All Workspaces in Group → Close Workspaces in Group |
Only the workspace-group title changed. The Swift defaultValue and all 21 locales in ActionCatalog.xcstrings were 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.groupCloseTitlesNameTheirNoun pins all three titles. No hand-written test asserted the old title.
Set Space Terminal Defaults… no longer clears the defaults silently. space.setDefaults takes only optional arguments, so the palette and the space menu ran it at once with none. A run with neither cwd nor env sent defaults: .clear, wiping the space's terminal directory and environment without asking. Now:
- A person's run that passes neither argument (palette, space context menu) asks for the working directory inline in Cmd-Shift-P (
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. - A CLI, MCP, socket or page run that passes neither is refused with "a cwd or env argument is required; pass both empty to clear the defaults" (new
rooms.refusal.defaultsRequired, 21 locales). It no longer pops a palette prompt on the person's screen. - Runs that pass arguments behave as before. Clearing is still possible, but only when asked for explicitly: pass both empty (
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, MCP app_space_set_defaults and socket action.run all reach the single RoomHandlers binding, so the guard covers all of them. Nothing else calls updateProfile(defaults:) for this.
Testing
The regression test went in first (e0b3046c536f), then the fix (head):
Tests/CmuxNextAppTests/SpaceSetDefaultsAskTests.swift (suite SpaceSetDefaultsAskTests, CmuxNextAppTests). The test seams are ActionRegistry.argumentAsker (to see the ask), DaemonService.workTracker (to count daemon sends) and capturingRefusal.
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].
- Red: the test commit alone on base f1c7068bc942 (
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. - Green: head 7821b760cf0c (base merged), cmux-ci step 3efd3b60f7fe8272d0ae58ef:
SpaceSetDefaultsAskTestsandPaletteMenuVocabularyTestsboth passed.
Observed / Not run
- Observed:
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. - Not run: no local build or test, per the repo rule against compiling on the person's Mac. The red and green results above ran on the fleet. The earlier head was merged with base after review (clean merge) to pick up #23386, which made the CmuxNext test targets compile again.
- Not regenerated:
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-bot with 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.setDefaults takes 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 working directory and environment silently.
Behavior changes
- A person's run with no arguments now asks for the working directory inline in Cmd-Shift-P, starting from the current
cwdand carrying the currentenvso the answer keeps it. - CLI, MCP, and socket runs with no arguments are refused with "a cwd or env argument is required; pass both empty to clear the defaults".
- Clearing stays explicit: pass both empty (
cwd=env=). - The palette title Close All Workspaces in Group now reads Close Workspaces in Group in all 21 locales; context-menu labels are unchanged.
Added SpaceSetDefaultsAskTests covering the ask, refusal, and explicit clearing paths, and pinned the three group-close titles in PaletteMenuVocabularyTests.