Skip to content

Add empty workspace group entrypoints - #7061

Merged
azooz2003-bit merged 10 commits into
mainfrom
feat-empty-workspace-group
Jun 30, 2026
Merged

azooz2003-bit merged 10 commits into
mainfrom
feat-empty-workspace-group

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add a shared empty-workspace-group action used by the shortcut handler, File menu, workspace row context menu, and blank sidebar context menu
  • add the newWorkspaceGroup shortcut to app/settings catalogs, schema/docs, and shortcut docs with default ⌃⌘G
  • localize the new menu/context/shortcut strings in English and Japanese

Verification

  • git diff --check
  • jq empty Resources/Localizable.xcstrings web/messages/en.json web/messages/ja.json web/data/cmux.schema.json
  • localized string audit for new user-facing strings
  • swift test --package-path Packages/macOS/CmuxSettings
  • xcodebuild test -project cmux.xcodeproj -scheme cmux-unit -configuration Debug -destination platform=macOS -derivedDataPath /tmp/cmux-emptygrp -only-testing:cmuxTests/WorkspaceGroupTests (new createEmptyGroupInsertsAnchorOnlyGroup() passed; existing workspace group ordering tests still fail when the whole suite runs together)
  • tagged reload emptyg, preflighted workspace.group.create with child_workspace_ids: []; it created Group 1 with a single anchor workspace and rendered in the sidebar

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Adds a “New Empty Workspace Group” entrypoint with a default ⌃⌘G shortcut across the app. It creates an anchor‑only, auto‑named group and is available from the keyboard, File menu, workspace row context menu, and the empty sidebar area.

  • New Features
    • Added newWorkspaceGroup shortcut and handler; routes to the active window/tab manager and is disabled on remote tmux mirror tabs.
    • File > New Workspace Group command; context menu entry on workspace rows and the blank sidebar area (shows the configured shortcut).
    • Flattened and organized sidebar context menus (top‑level action, fewer dividers, clearer Move submenu titles).
    • Refined pinned‑group indicator (scaled and aligned pin glyph, tooltip, accessibility label).
    • Localized strings and docs/site updates; added menu.file.newWorkspaceGroup, contextMenu.workspaceGroup.newEmpty, shortcut.newWorkspaceGroup.label, workspaceGroup.pinned.tooltip; updated web/data/cmux.schema.json, web/data/cmux-shortcuts.ts; added a unit test for anchor‑only group creation.

Written for commit 76fab67. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added New Workspace Group to the main menu and workspace-group context menus, including the sidebar blank area, with a default configurable shortcut (Ctrl+Cmd+G / “g”).
    • Added a new keyboard shortcut action (New Workspace Group) and updated the shortcut picker/definitions.
  • Bug Fixes

    • Workspace-group creation now consistently inserts an anchor-only empty group with correct selection behavior (regression test added).
  • Documentation

    • Refreshed workspace-group help text, keyboard shortcut references, and sidebar/context-menu wording (including localization).

@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Jun 30, 2026 6:03am
cmux-staging Building Building Preview, Comment Jun 30, 2026 6:03am

@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new newWorkspaceGroup shortcut and command path for creating an empty workspace group. The change wires the action through settings, AppDelegate, menu and context-menu entry points, plus updates workspace-group header UI, localization, docs, and tests.

Changes

Workspace Group Creation and Sidebar UI

Layer / File(s) Summary
Action contract and shortcut metadata
Packages/macOS/CmuxSettings/Sources/CmuxSettings/Values/ShortcutAction.swift, Packages/macOS/CmuxSettings/Sources/CmuxSettings/Values/ShortcutAction+Defaults.swift, Sources/KeyboardShortcutSettings.swift, web/data/cmux.schema.json, web/data/cmux-shortcuts.ts, skills/cmux-settings/references/shortcut-actions.md
Adds newWorkspaceGroup to the shortcut-action enums, assigns its default shortcut, includes it in shortcut grouping and labels, allows it in schema bindings, and lists related shortcut data.
Shortcut dispatch and group creation helper
Sources/AppDelegate.swift
Adds the .newWorkspaceGroup shortcut branch and a helper that resolves the target TabManager and creates an empty workspace group.
Menu and context-menu entry points
Sources/cmuxApp.swift, Sources/ContentView.swift, Sources/TabItemView+WorkspaceGroups.swift, Resources/Localizable.xcstrings
Adds main-menu, sidebar empty-area, and tab context-menu entry points for creating an empty workspace group, along with the labels used by those controls.
Pinned header indicator and menu grouping
Sources/SidebarWorkspaceGroupHeaderMetrics.swift, Sources/SidebarWorkspaceGroupHeaderView.swift, Resources/Localizable.xcstrings
Adds pinned-group sizing and tooltip text, renders the pin indicator in the header, and groups sidebar header actions under titled menus.
Tests, messages, and documentation
cmuxTests/WorkspaceGroupTests.swift, docs/workspace-groups.md, web/messages/en.json, web/messages/ja.json
Adds a regression test for empty-name group creation and updates workspace-group documentation and localized explanatory copy.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • manaflow-ai/cmux#4815: Modifies the same sidebar workspace-group UI and context-menu pathways that this PR extends with the empty-group creation entry.
  • manaflow-ai/cmux#4989: Touches tabManager.createWorkspaceGroup(...), which is the creation path used by the new empty-group helper here.
  • manaflow-ai/cmux#5541: Changes workspaceGroupContextMenuSection in the same tab-item context-menu area where this PR adds the new creation button.

Suggested reviewers

  • Ari4ka

Poem

🐇 A little group hops into view,
With ⌃⌘G as the clue.
Empty at first, but ready to grow,
Sidebar menus now make it so.
The rabbit smiles, ears held high —
New workspace nests reach for the sky.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Cmux Full Internationalization ❌ Error New Swift string-catalog keys only have en/ja despite the catalog supporting 20 locales, and the new web copy was updated only in en/ja while routing lists 20 locales. Add translations for the new keys in every locale already supported by Resources/Localizable.xcstrings and web/messages/*.json, or confine the change to non-user-facing text.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (23 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main change: adding entrypoints for empty workspace groups.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed New action paths stay in @MainActor AppDelegate/TabManager and SwiftUI views; no new background access or isolation debt was introduced.
Cmux Swift Blocking Runtime ✅ Passed PASS: Added code only wires empty-group menu/shortcut actions; diff search found no new semaphores, waits, sleeps, asyncAfter, sync, polling, or locks.
Cmux Browser Automation Off-Main ✅ Passed PR only adds workspace-group shortcuts/UI/localization; it doesn't touch browser.* socket-automation code or the scoped routing files.
Cmux Expensive Synchronous Load ✅ Passed New workspace-group entrypoints only call existing group creation; no expensive agent-history load was added to the shortcut/menu paths.
Cmux Cache Substitution Correctness ✅ Passed The PR adds new UI/menu entrypoints that directly invoke tabManager.createWorkspaceGroup; it doesn't replace any fresh persistence/history/undo/snapshot read with a cache.
Cmux No Hacky Sleeps ✅ Passed No added non-Swift runtime sleeps/timers/polling were introduced; the only timing-related change in tests removes a time.sleep helper, and remaining timeout args are test subprocess timeouts.
Cmux Algorithmic Complexity ✅ Passed New code is constant-time UI plumbing; no new nested scans or repeated sorting/filtering on large 1000-workspace paths were introduced.
Cmux Swift Concurrency ✅ Passed New code only adds sync menu/shortcut callbacks to an existing AppKit action; no new DispatchQueue, Combine, continuation, or fire-and-forget Task patterns in the changed blocks.
Cmux Swift @Concurrent ✅ Passed PASS: The PR adds only synchronous, @MainActor/UI-bound workspace-group entrypoints; no new async/nonisolated or @concurrent code appears in the diff.
Cmux Swift File And Package Boundaries ✅ Passed The diff adds small, focused glue and package-local shortcut metadata; oversized app files only got narrow UI/handler slices, with no mixed-responsibility or package-boundary violation.
Cmux Swiftpm Lockfiles ✅ Passed PR changes only Swift source/docs/localization; no Package.swift, Package.resolved, .gitignore, workflow, or xcodeproj changes, so the lockfile rule doesn’t apply.
Cmux Swift Logging ✅ Passed Touched workspace-group and shortcut code adds no print/debugPrint/dump/NSLog/Logger; only pre-existing logs elsewhere remain untouched.
Cmux User-Facing Error Privacy ✅ Passed No new user-facing errors, alerts, command output, API error bodies, or recovery copy were added; changes are menus, shortcuts, docs, and labels only.
Cmux Swiftui State Layout ✅ Passed The diff only adds menu/actions and a tooltip/icon tweak; I found no new ObservableObject/@published, GeometryReader expansion, or render-time state writes.
Cmux Architecture Rethink ✅ Passed PASS: newWorkspaceGroup is routed through one shared AppDelegate helper used by shortcut, File menu, and context menus; no sleeps, polling, locks, or split state ownership added.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PR only adds menu/shortcut paths and a workspace-group helper; no new NSWindow/NSPanel/WindowGroup/NSWindowController or cmux.* auxiliary-window registration changes.
Cmux Source Artifacts ✅ Passed All listed changed paths are intentional source/docs/localization/config files; none are logs, caches, build output, or scratch dirs.
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS: createEmptyWorkspaceGroup is a real product path (menu/shortcut/context menus), and the PR adds no new #if DEBUG/ForTesting/TestHook seam in Sources/.
Cmux No Ambient Global State ✅ Passed New behavior stays inside existing types/extensions (AppDelegate, View/TabItemView); no new file-scope funcs, mutable globals, or singleton/state surfaces were added.
Description check ✅ Passed The PR description is mostly complete, with clear Summary and Verification sections, though the demo video and explicit review-trigger checklist are missing.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-empty-workspace-group

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.

@greptile-apps

greptile-apps Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces a "New Empty Workspace Group" entrypoint wired to a new ⌃⌘G shortcut, available from the keyboard, File menu, workspace-row context menu, and the blank sidebar area. It also adds a scaled pin glyph with tooltip to pinned group headers and updates shortcut catalog, schema, docs, and all 19 app and web locales.

  • New shortcut & action: newWorkspaceGroup added to ShortcutAction, KeyboardShortcutSettings, shortcut defaults (⌃⌘G), schema JSON, and the web shortcuts catalog; handled by a new createEmptyWorkspaceGroup helper on AppDelegate that guards against remote tmux mirror tabs.
  • Context menu integration: The workspace-row context menu section prepends the new button with a correct .disabled(!canCreateEmptyWorkspaceGroup) guard; the blank-sidebar area and File menu expose the same action but omit the disabled state (blank sidebar flagged in a prior thread; File menu flagged in this review).
  • Localization: All four new string keys carry translations for all 19 supported app locales; four existing web doc keys are updated across all 19 web locale files.

Confidence Score: 4/5

Safe to merge with one UX fix: the File menu 'New Workspace Group' item should be disabled on remote tmux mirror tabs the same way the workspace-row context menu entry is.

The createEmptyWorkspaceGroup helper correctly guards the action internally, so no data corruption or crash can occur. However, the File menu button has no .disabled() modifier for the remote tmux mirror case, leaving users with a visually active menu item that silently does nothing — inconsistent with the workspace-row context menu, which correctly disables the item in that state. All other parts of the change (shortcut, shortcuts catalog, schema, localization, test) are well-executed.

Sources/cmuxApp.swift — the new File menu entry needs a .disabled() modifier for the remote tmux mirror tab case to match the workspace-row context menu behaviour.

Important Files Changed

Filename Overview
Sources/cmuxApp.swift Adds 'New Workspace Group' to the File menu; the button is missing a .disabled() guard for remote tmux mirror tabs that the workspace-row context menu correctly applies.
Sources/AppDelegate.swift Adds createEmptyWorkspaceGroup helper and wires it to the newWorkspaceGroup shortcut action; the guard against remote tmux mirrors is correctly implemented in the helper itself.
Sources/ContentView.swift Adds 'New Empty Workspace Group' to the blank-sidebar context menu and refactors the workspace-row context menu section; the blank-sidebar entry omits the isRemoteTmuxMirror guard (separately flagged in a previous review thread).
Sources/TabItemView+WorkspaceGroups.swift Prepends 'New Empty Workspace Group' to workspace-row context menu section with correct .disabled(!canCreateEmptyWorkspaceGroup) guard.
Resources/Localizable.xcstrings Adds four new string keys with full locale coverage across all 19 supported locales.
cmuxTests/WorkspaceGroupTests.swift Adds createEmptyGroupInsertsAnchorOnlyGroup regression test verifying anchor insertion, auto-naming, membership, and selection; lives correctly in the test target.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User triggers newWorkspaceGroup] --> B{Entrypoint}
    B --> C[⌃⌘G Shortcut\nAppDelegate shortcut handler]
    B --> D[File menu\ncmuxApp.swift]
    B --> E[Workspace-row\ncontext menu]
    B --> F[Blank sidebar\ncontext menu]

    C --> G[createEmptyWorkspaceGroup\npreferredWindow: event.window]
    D --> G2[createEmptyWorkspaceGroup\ntabManager: activeTabManager]
    E --> H{canCreateEmptyWorkspaceGroup\n= !isRemoteTmuxMirror}
    H -- false --> I[Button disabled ✓]
    H -- true --> G3[createEmptyWorkspaceGroup\ntabManager: tabManager]
    F --> G4[createEmptyWorkspaceGroup\ntabManager: tabManager\nNo disabled guard ⚠️]

    G --> K{resolvedTabs.selectedTab.isRemoteTmuxMirror?}
    G2 --> K
    G3 --> K
    G4 --> K

    K -- true --> L[return false\nsilent no-op]
    K -- false --> M[tabs.createWorkspaceGroup\nname: empty string]
    M --> N[Auto-named Group N\nanchor workspace inserted\nselection updated]

    D -. no disabled guard ⚠️ .-> G2
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[User triggers newWorkspaceGroup] --> B{Entrypoint}
    B --> C[⌃⌘G Shortcut\nAppDelegate shortcut handler]
    B --> D[File menu\ncmuxApp.swift]
    B --> E[Workspace-row\ncontext menu]
    B --> F[Blank sidebar\ncontext menu]

    C --> G[createEmptyWorkspaceGroup\npreferredWindow: event.window]
    D --> G2[createEmptyWorkspaceGroup\ntabManager: activeTabManager]
    E --> H{canCreateEmptyWorkspaceGroup\n= !isRemoteTmuxMirror}
    H -- false --> I[Button disabled ✓]
    H -- true --> G3[createEmptyWorkspaceGroup\ntabManager: tabManager]
    F --> G4[createEmptyWorkspaceGroup\ntabManager: tabManager\nNo disabled guard ⚠️]

    G --> K{resolvedTabs.selectedTab.isRemoteTmuxMirror?}
    G2 --> K
    G3 --> K
    G4 --> K

    K -- true --> L[return false\nsilent no-op]
    K -- false --> M[tabs.createWorkspaceGroup\nname: empty string]
    M --> N[Auto-named Group N\nanchor workspace inserted\nselection updated]

    D -. no disabled guard ⚠️ .-> G2
Loading

Reviews (11): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Sources/ContentView.swift`:
- Around line 13133-13149: The new empty-area context menu action in
sidebarEmptyAreaWorkspaceGroupContextMenu bypasses the remote-tmux guard and can
create a local orphan workspace via createEmptyWorkspaceGroup(tabManager:), so
update this path to respect the same remote-aware invariant used by the existing
empty-area new-workspace flow. Reuse the remote-aware helper or conditionally
disable/hide the menu item when the window is in remote-mirror/remote-tmux mode,
and avoid calling AppDelegate.shared?.createEmptyWorkspaceGroup(tabManager:)
unconditionally from the Button action.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2cad1adc-0257-4d35-a396-1e22edc803fc

📥 Commits

Reviewing files that changed from the base of the PR and between 517063e and 9810500.

📒 Files selected for processing (15)
  • Packages/macOS/CmuxSettings/Sources/CmuxSettings/Values/ShortcutAction+Defaults.swift
  • Packages/macOS/CmuxSettings/Sources/CmuxSettings/Values/ShortcutAction.swift
  • Resources/Localizable.xcstrings
  • Sources/AppDelegate.swift
  • Sources/ContentView.swift
  • Sources/KeyboardShortcutSettings.swift
  • Sources/TabItemView+WorkspaceGroups.swift
  • Sources/cmuxApp.swift
  • cmuxTests/WorkspaceGroupTests.swift
  • docs/workspace-groups.md
  • skills/cmux-settings/references/shortcut-actions.md
  • web/data/cmux-shortcuts.ts
  • web/data/cmux.schema.json
  • web/messages/en.json
  • web/messages/ja.json

Comment thread Sources/ContentView.swift
@azooz2003-bit
azooz2003-bit force-pushed the feat-empty-workspace-group branch from db41553 to ba7c610 Compare June 29, 2026 21:34
Comment thread Resources/Localizable.xcstrings Outdated
Comment on lines +60537 to +60552
"contextMenu.close": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Close"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "閉じる"
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing translations for 15+ app locales

All 12 new strings added to Localizable.xcstrings only carry en and ja translations, but the catalog already supports ar, bs, da, de, es, fr, it, ko, nb, pl, pt-BR, and others (confirmed by the adjacent contextMenu.closeOtherWorkspaces and contextMenu.workspaceGroup.newFromSelection entries, which both have a full locale set). Users on any of those locales will see raw English text in the new New Empty Workspace Group menu item, the New Workspace Group File-menu entry, the Pinned group tooltip, and the reorganized Close / Move / Copy / Notifications / Remote Connection submenus.

The affected keys are: contextMenu.close, contextMenu.copy, contextMenu.move, contextMenu.notifications, contextMenu.remoteConnection, contextMenu.workspaceGroup.newEmpty, contextMenu.workspaceGroup.title, menu.file.newWorkspaceGroup, shortcut.newWorkspaceGroup.label, workspaceGroup.contextMenu.configuration, workspaceGroup.contextMenu.notifications, and workspaceGroup.pinned.tooltip.

Rule Used: Flag production user-facing text that is not fully... (source)

Comment thread Sources/ContentView.swift
Comment on lines +13141 to +13150
if let key = newWorkspaceGroupShortcut.keyEquivalent {
Button(newWorkspaceGroupLabel) {
_ = AppDelegate.shared?.createEmptyWorkspaceGroup(tabManager: tabManager)
}
.keyboardShortcut(key, modifiers: newWorkspaceGroupShortcut.eventModifiers)
} else {
Button(newWorkspaceGroupLabel) {
_ = AppDelegate.shared?.createEmptyWorkspaceGroup(tabManager: tabManager)
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 The blank-sidebar context menu omits the isRemoteTmuxMirror guard that the workspace-row context menu section (workspaceGroupContextMenuSection) applies via canCreateEmptyWorkspaceGroup. On a remote tmux mirror tab the button appears enabled; clicking it silently returns false with no user feedback, unlike the workspace row entry which correctly shows the item disabled.

Suggested change
if let key = newWorkspaceGroupShortcut.keyEquivalent {
Button(newWorkspaceGroupLabel) {
_ = AppDelegate.shared?.createEmptyWorkspaceGroup(tabManager: tabManager)
}
.keyboardShortcut(key, modifiers: newWorkspaceGroupShortcut.eventModifiers)
} else {
Button(newWorkspaceGroupLabel) {
_ = AppDelegate.shared?.createEmptyWorkspaceGroup(tabManager: tabManager)
}
}
let canCreate = tabManager.selectedTab?.isRemoteTmuxMirror != true
if let key = newWorkspaceGroupShortcut.keyEquivalent {
Button(newWorkspaceGroupLabel) {
_ = AppDelegate.shared?.createEmptyWorkspaceGroup(tabManager: tabManager)
}
.keyboardShortcut(key, modifiers: newWorkspaceGroupShortcut.eventModifiers)
.disabled(!canCreate)
} else {
Button(newWorkspaceGroupLabel) {
_ = AppDelegate.shared?.createEmptyWorkspaceGroup(tabManager: tabManager)
}
.disabled(!canCreate)
}

…group

# Conflicts:
#	.github/swift-file-length-budget.tsv
Comment thread Sources/cmuxApp.swift
Comment on lines 734 to 744
}
}

splitCommandButton(title: String(localized: "menu.file.newWorkspaceGroup", defaultValue: "New Workspace Group"), shortcut: menuShortcut(for: .newWorkspaceGroup)) {
_ = AppDelegate.shared?.createEmptyWorkspaceGroup(
tabManager: activeTabManager,
preferredWindow: NSApp.keyWindow ?? NSApp.mainWindow
)
}

splitCommandButton(title: String(localized: "menu.file.openFolder", defaultValue: "Open Folder…"), shortcut: menuShortcut(for: .openFolder)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 File menu "New Workspace Group" is not disabled for remote tmux mirror tabs

The new splitCommandButton for menu.file.newWorkspaceGroup carries no .disabled(...) modifier. When the focused tab is a remote tmux mirror, createEmptyWorkspaceGroup silently returns false with no user feedback, but the menu item remains visually active and clickable — unlike the workspace row context menu entry, which correctly uses .disabled(!canCreateEmptyWorkspaceGroup) (evaluated as tabManager.selectedTab?.isRemoteTmuxMirror != true).

The intent described in the PR is that this action is disabled on remote tmux mirror tabs; applying that guard at the File menu level makes the affordance consistent across all four entrypoints.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@azooz2003-bit
azooz2003-bit merged commit 3246de9 into main Jun 30, 2026
35 of 37 checks passed
@azooz2003-bit
azooz2003-bit deleted the feat-empty-workspace-group branch June 30, 2026 05:55
azooz2003-bit added a commit that referenced this pull request Jul 3, 2026
…empty-workspace-group entrypoints (menu/shortcut/handler) reverted by refactor's AppDelegate/cmuxApp winning the merge

This branch was successfully deployed

1 active deployment
Preview – cmux — 76fab673 Deployed Jun 30, 2026 by vercel[bot]
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