Skip to content

Add Welcome sidebar toggle shortcuts - #3748

Merged
austinywang merged 15 commits into
mainfrom
issue-3745-welcome-sidebar-shortcuts
May 10, 2026
Merged

austinywang merged 15 commits into
mainfrom
issue-3745-welcome-sidebar-shortcuts

Conversation

@austinywang

@austinywang austinywang commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3745

Summary

  • Add regression coverage that the Welcome/main-window surface exposes shared left/right sidebar toggle shortcuts and that the bindings toggle the shared sidebar state owners.
  • Expose explicit left/right sidebar toggle labels through KeyboardShortcutSettings and the View menu.
  • Keep the right-sidebar shortcut rebindable through the existing settings raw id while naming the Swift action as toggleRightSidebar.
  • Document Cmd+B for the left sidebar and Cmd+Option+B for the right sidebar.

Conflict note

The codebase has no separate SwiftUI WelcomeView; Welcome is delivered in the shared main cmux window via the welcome command. No separate Welcome-only Cmd+B binding was found. The existing shared Cmd+B binding is the left-sidebar toggle and is now labeled that way.

Verification

  • git diff --check
  • jq empty Resources/Localizable.xcstrings
  • rg confirmed no Swift references remain to .toggleFileExplorer

Local xcodebuild/unit tests were not run per the build restrictions; CI should exercise the regression.


Note

Medium Risk
Changes keyboard shortcut routing and menu/command labels for sidebar toggles; low surface area but could affect existing shortcut bindings and window targeting behavior.

Overview
Adds explicit left vs right sidebar toggle commands across the app: ⌘B is now labeled as Toggle Left Sidebar and ⌘⌥B toggles the right sidebar via a shared toggleRightSidebar action (while preserving the persisted config id toggleFileExplorer).

Updates localized strings, View menu items, command palette entry/keywords, CLI cmux welcome shortcuts output, and web/docs shortcut examples to reflect the split toggles. Adds regression tests asserting the Welcome/main-window surface uses the shared toggle commands and updates shortcut/settings ordering and related test expectations.

Reviewed by Cursor Bugbot for commit 5efb2fc. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Adds explicit left/right sidebar toggle shortcuts to the Welcome surface and across the app via shared main-window commands per #3745. Updates menus, command palette, CLI Welcome splash, web/docs, and tests while keeping existing user bindings.

  • New Features

    • Welcome and main windows expose shared toggles: Cmd+B (left), Cmd+Option+B (right).
    • View menu adds “Toggle Left Sidebar” and “Toggle Right Sidebar” with full localization; right toggle beeps when no active window.
    • Command Palette shows “Toggle Left Sidebar” with “left” keyword; CLI Welcome splash and web/docs list both toggles.
    • Keeps the config id toggleFileExplorer while the Swift action is toggleRightSidebar; titlebar shortcut hints continue to use the raw value.
  • Refactors

    • Replaced generic “Toggle Sidebar” strings with explicit left/right keys and removed the old entries.
    • Simplified the right-sidebar menu handler to delegate to AppDelegate’s shared toggle.
    • Added regression tests for shared shortcut routing and Welcome toggling; assertions are localization-aware; aligned window drag suppression tests to current APIs.

Written for commit 5efb2fc. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Separate "Toggle Left Sidebar" and "Toggle Right Sidebar" commands with distinct shortcuts and behaviors.
  • Localization

    • Added localized labels for left/right sidebar commands and removed the previous generic sidebar strings.
  • UI

    • Updated command palette, menus, tooltips, sound cue, and shortcut hints to reflect left/right sidebar controls; CLI shortcuts list updated.
  • Documentation

    • Keyboard shortcuts and configuration docs updated to show new bindings.
  • Tests

    • Added and updated tests to verify left/right shortcut routing and behavior.

Review Change Stack

The Welcome surface is hosted by the same main-window state owners as regular workspaces, so the regression captures the shared shortcut registry and the SidebarState/FileExplorerState mutation path before changing labels or command wiring.

Constraint: Welcome is delivered through a main cmux window rather than a separate SwiftUI WelcomeView in this branch.

Confidence: medium

Scope-risk: narrow

Directive: Keep Welcome sidebar shortcuts routed through KeyboardShortcutSettings and the shared sidebar state owners.

Tested: Not run locally; regression commit is expected to fail until the implementation commit updates the right-sidebar command exposure.

Not-tested: Local xcodebuild/unit test execution intentionally skipped per build restrictions.
Welcome is hosted in the shared main-window surface, so the durable fix is to make the shared shortcut registry and View menu expose explicit left/right sidebar toggle actions. The right-sidebar action keeps the existing raw shortcut id for compatibility while code now names the concept as toggleRightSidebar.

Constraint: Cmd+B was already the shared left-sidebar binding; Cmd+Option+B was the existing File Explorer toggle binding and must remain rebindable through KeyboardShortcutSettings.

Rejected: Add Welcome-only shortcut handlers | would duplicate the main-window shortcut surface and miss future shared command updates.

Confidence: medium

Scope-risk: narrow

Directive: Do not add Welcome-specific sidebar shortcut definitions; route through KeyboardShortcutSettings.Action and AppDelegate's shared sidebar state owners.

Tested: git diff --check; jq empty Resources/Localizable.xcstrings; verified no Swift references remain to .toggleFileExplorer.

Not-tested: Local xcodebuild/unit tests intentionally not run; CI will exercise the new regression.
@vercel

vercel Bot commented May 8, 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 May 10, 2026 1:22am
cmux-staging Building Building Preview, Comment May 10, 2026 1:22am

@coderabbitai

coderabbitai Bot commented May 8, 2026 •

Copy link
Copy Markdown

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f2a2d010-c0ca-4776-97c7-287b6c568e5b

📥 Commits

Reviewing files that changed from the base of the PR and between 8e1801b and 5efb2fc.

📒 Files selected for processing (12)
  • CLI/cmux.swift
  • Resources/Localizable.xcstrings
  • Sources/AppDelegate.swift
  • Sources/ContentView.swift
  • Sources/KeyboardShortcutSettings.swift
  • Sources/RightSidebarPanelView.swift
  • Sources/cmuxApp.swift
  • cmuxTests/AppDelegateShortcutRoutingTests.swift
  • cmuxTests/WindowAndDragTests.swift
  • cmuxTests/WorkspaceUnitTests.swift
  • docs/cli-contract.md
  • web/data/cmux-shortcuts.ts

📝 Walkthrough

Walkthrough

This PR splits the unified sidebar toggle into distinct left/right actions: renames the enum case, adds left/right localization keys, updates default shortcuts, routes AppDelegate and menu/ContentView commands, adds tests, and updates docs/examples.

Changes

Left/Right Sidebar Shortcut Split

Layer / File(s) Summary
Localization Strings
Resources/Localizable.xcstrings
Adds and removes localized keys for left/right sidebar commands, menu items, and shortcut labels (English + Japanese).
Keyboard Shortcut Action Enum
Sources/KeyboardShortcutSettings.swift
Renames toggleFileExplorer → toggleRightSidebar (preserves rawValue) and updates label mappings so toggleSidebar targets left and toggleRightSidebar targets right.
Default Shortcut Mapping
Sources/KeyboardShortcutSettings.swift
Assigns Cmd+Option+B as the default for toggleRightSidebar; toggleSidebar remains Cmd+B.
AppDelegate Shortcut Routing
Sources/AppDelegate.swift
Routes the toggleRightSidebar action to toggleRightSidebarInActiveMainWindow(preferredWindow:).
Menu Commands Definition
Sources/cmuxApp.swift
Replace single "Toggle Sidebar" command with "Toggle Left Sidebar" (Cmd+B) and "Toggle Right Sidebar" (Cmd+Option+B), delegating to AppDelegate with fallback beep for right toggle.
ContentView / RightSidebar Wiring
Sources/ContentView.swift, Sources/RightSidebarPanelView.swift
Update right-sidebar titlebar button to use toggleRightSidebar, adjust tooltip/accessibility identifiers; command-palette entry now references "Left Sidebar".
Tests
cmuxTests/*
Adds testWelcomeWindowSidebarShortcutsUseSharedToggleCommands and updates tests to expect toggleRightSidebar instead of toggleFileExplorer; adds window drag-suppression tests.
Documentation & Examples
web/app/[locale]/docs/*, web/data/cmux-shortcuts.ts
Update JSON examples and web shortcut metadata to include toggleFileExplorer binding and clarify left/right sidebar descriptions.
CLI & Contracts
CLI/cmux.swift, docs/cli-contract.md
Insert CLI shortcut entries and add no-socket help-probe expectations for left/right toggle labels.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant UI
  participant KeyboardSettings
  participant AppDelegate
  participant Window
  User->>UI: press Cmd+B or Cmd+Opt+B
  UI->>KeyboardSettings: resolve action (toggleSidebar / toggleRightSidebar)
  KeyboardSettings->>AppDelegate: deliver action
  AppDelegate->>Window: toggleLeftSidebar or toggleRightSidebarInActiveMainWindow(preferredWindow:)
  Window->>Window: update SidebarState / FileExplorerState
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped from left to right through code tonight,
Two tiny keys now set the sidebars right.
Cmd+B nudges left, Cmd+Opt+B hops the other,
en and ja hum softly as locales gather.
A rabbit’s tap — the panes all dance with light.


Important

Pre-merge checks failed

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

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Cmux Architecture Rethink ❓ Inconclusive No result was produced after verification. Marking as INCONCLUSIVE. Re-run the check or adjust instructions to produce a final result.
✅ Passed checks (13 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Welcome sidebar toggle shortcuts' clearly summarizes the main change: adding sidebar toggle shortcuts to the Welcome window.
Description check ✅ Passed The description includes all required template sections: Summary (what changed, why), Testing (verification performed), and a Checklist with items addressed. Additional context from cubic summary and auto-generated descriptions is provided.
Linked Issues check ✅ Passed The PR fully implements issue #3745 requirements: adds Cmd+B/Cmd+Option+B shortcuts through KeyboardShortcutSettings, localizes labels in Localizable.xcstrings (English and Japanese), uses shared main-window command routing, and updates UI/menu/CLI/docs accordingly.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing #3745: sidebar toggle shortcuts, their localization, menu/command/CLI/docs updates, and regression tests. The window drag suppression test updates align with current API changes and support the broader refactoring consistency.
Cmux Swift Actor Isolation ✅ Passed PR maintains proper Swift 6 actor isolation. AppDelegate methods are @MainActor-isolated, no new Sendable types introduced, Task @MainActor properly used, all state access properly bounded.
Cmux Swift Blocking Runtime ✅ Passed PR changes to keyboard shortcut handlers don't introduce blocking/timing constructs. Pre-existing NSLock and Task.sleep in unrelated code areas remain unchanged.
Cmux No Hacky Sleeps ✅ Passed PR contains no problematic sleep/timer/delay patterns in TypeScript, JavaScript, shell, or other non-Swift runtime code. Changes are localization, Swift, data, and documentation only.
Cmux Swift Concurrency ✅ Passed No new legacy async patterns. Task @MainActor is pre-existing (renamed case). Synchronous button handlers only. No DispatchQueue, Combine, or completion handlers.
Cmux Swift @Concurrent ✅ Passed No violations of @concurrent annotation rules. The Task { @MainActor } in AppDelegate is intentional UI-bound async work, an allowed case per the rules.
Cmux Swift File And Package Boundaries ✅ Passed Minimal changes (<10 lines) to existing files for keyboard shortcut UI wiring. No new files or boundary violations detected.
Cmux Swift Logging ✅ Passed No violations found. The two new print() statements added to CLI/cmux.swift are allowed CLI command output (printWelcome function). No new NSLog, debugPrint, or dump added to production code.
Cmux Swiftui State Layout ✅ Passed No violations. No new @Published/@StateObject declarations or new GeometryReader affecting layout. State mutations only in Button action handlers, not render-time code.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed No new or materially changed standalone windows. Only updates keyboard shortcut routing and UI labels for existing features. No new NSWindow, NSPanel, NSWindowController, or WindowGroup instances.
✨ 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 issue-3745-welcome-sidebar-shortcuts

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 and usage tips.

@greptile-apps

greptile-apps Bot commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Splits the previously generic "Toggle Sidebar" into explicit Toggle Left Sidebar (⌘B) and Toggle Right Sidebar (⌘⌥B) commands, routing both through the shared AppDelegate window handlers, and preserves the persisted config key toggleFileExplorer as the raw value of the renamed Swift action toggleRightSidebar.

  • Renaming/relabeling: KeyboardShortcutSettings.Action.toggleFileExplorer → .toggleRightSidebar = "toggleFileExplorer" keeps user bindings intact; all call sites (AppDelegate shortcut matching, RightSidebarPanelView close-button hint, KeyboardShortcutSettings ordering/label/defaultShortcut) are updated consistently.
  • New View menu item: Adds "Toggle Right Sidebar" splitCommandButton in cmuxApp.swift that delegates to AppDelegate.shared?.toggleRightSidebarInActiveMainWindow(preferredWindow:), mirroring the pattern used by the existing focusRightSidebar menu item.
  • Localization and docs: New strings (command.toggleLeftSidebar.title, menu.view.toggleLeft/RightSidebar, shortcut.toggleLeft/RightSidebar.label) are fully translated across all 19 supported locales; CLI splash, web docs, and cmux-shortcuts.ts updated to document both shortcuts.

Confidence Score: 5/5

Safe to merge — all changes are renaming, relabeling, and routing shortcut actions that were already wired; user-persisted config keys are unchanged.

Every production call site that referenced .toggleFileExplorer has been updated to .toggleRightSidebar, which carries rawValue = "toggleFileExplorer" so persisted user bindings round-trip correctly. The new View-menu item follows the identical pattern already used by the existing focusRightSidebar entry. Localization is complete across all 19 locales. No new concurrency primitives, no actor isolation changes, no state duplication.

No files require special attention.

Important Files Changed

Filename Overview
Sources/KeyboardShortcutSettings.swift Renames toggleFileExplorer to toggleRightSidebar with raw value "toggleFileExplorer" preserving user config compatibility; updates orderedSettingsVisibleActions, label, and defaultShortcut switch cases consistently.
Sources/cmuxApp.swift Renames left-sidebar menu item to "Toggle Left Sidebar" and adds a new "Toggle Right Sidebar" splitCommandButton that delegates to AppDelegate's shared toggle with NSSound.beep() fallback (matching the existing focusRightSidebar pattern).
Sources/AppDelegate.swift Single-line rename: matchConfiguredShortcut action .toggleFileExplorer → .toggleRightSidebar; raw value preservation means config key matching is unaffected.
Resources/Localizable.xcstrings Adds 5 new localized string keys with full 19-locale coverage; removes 4 old generic sidebar strings (command.toggleSidebar.title, menu.view.toggleSidebar, shortcut.toggleSidebar.label, shortcut.toggleFileExplorer.label).
cmuxTests/AppDelegateShortcutRoutingTests.swift New regression test verifies label/defaultShortcut for both sidebar actions and simulates Cmd+B / Cmd+Opt+B events against a registered window; DEBUG-guarded with explicit #else XCTFail for release runs.

Sequence Diagram

sequenceDiagram
    participant User
    participant NSMenu as View Menu / KeyEquivalent
    participant cmuxApp as cmuxApp (SwiftUI)
    participant AppDelegate
    participant SidebarState
    participant FileExplorerState

    User->>NSMenu: ⌘B (Toggle Left Sidebar)
    NSMenu->>cmuxApp: splitCommandButton action
    cmuxApp->>AppDelegate: toggleSidebarInActiveMainWindow()
    alt Active window found
        AppDelegate->>SidebarState: toggle()
    else No active window
        cmuxApp->>SidebarState: sidebarState.toggle() (fallback)
    end

    User->>NSMenu: ⌘⌥B (Toggle Right Sidebar)
    NSMenu->>cmuxApp: splitCommandButton action
    cmuxApp->>AppDelegate: toggleRightSidebarInActiveMainWindow(preferredWindow:)
    alt Active window found
        AppDelegate->>FileExplorerState: toggle()
    else No active window
        cmuxApp->>cmuxApp: NSSound.beep()
    end
Loading

Reviews (10): Last reviewed commit: "Keep drag suppression tests aligned with..." | Re-trigger Greptile

Comment thread Resources/Localizable.xcstrings Outdated
Comment thread Sources/cmuxApp.swift

@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: 2

🤖 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 `@cmuxTests/AppDelegateShortcutRoutingTests.swift`:
- Around line 862-875: The test currently asserts English label literals for
KeyboardShortcutSettings.Action.toggleSidebar.label and
.toggleRightSidebar.label which is locale-dependent; change the assertions to
use the localized value or key-derived identifier instead of hardcoded
strings—e.g., fetch the expected label via the app's localization lookup
(NSLocalizedString with the same localization key the action uses) or compare to
a property that returns the key-derived value (such as a .labelKey or similar
exposed on KeyboardShortcutSettings.Action) so the test is stable across
locales; update the two assertions referencing
KeyboardShortcutSettings.Action.toggleSidebar.label and
KeyboardShortcutSettings.Action.toggleRightSidebar.label accordingly.

In `@web/data/cmux-shortcuts.ts`:
- Line 65: The shortcut entry with id "toggleFileExplorer" uses the modifier
order ["⌥","⌘","B"] which renders as opt+cmd+b and is inconsistent with the rest
of the config; update the combos array for the "toggleFileExplorer" object to
use the normalized modifier order ["⌘","⌥","B"] so it displays as cmd+opt+b,
matching other shortcut entries and generated docs.
🪄 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: 0b9386cc-233e-4cee-af63-ea9da5ace652

📥 Commits

Reviewing files that changed from the base of the PR and between c64fcc5 and 0721de6.

📒 Files selected for processing (9)
  • Resources/Localizable.xcstrings
  • Sources/AppDelegate.swift
  • Sources/ContentView.swift
  • Sources/KeyboardShortcutSettings.swift
  • Sources/cmuxApp.swift
  • cmuxTests/AppDelegateShortcutRoutingTests.swift
  • web/app/[locale]/docs/configuration/page.tsx
  • web/app/[locale]/docs/keyboard-shortcuts/page.tsx
  • web/data/cmux-shortcuts.ts

Comment thread cmuxTests/AppDelegateShortcutRoutingTests.swift
Comment thread web/data/cmux-shortcuts.ts Outdated
The review pass found two quality gaps after the Welcome shortcut wiring: newly-added sidebar command strings did not carry the same locale breadth as surrounding shortcut/menu labels, and the right-sidebar menu fallback read as less best-effort than the left-sidebar path. This keeps the shared shortcut model intact while tightening those edges without changing the persisted toggleFileExplorer config id.\n\nConstraint: Shortcut storage remains backward-compatible through the existing toggleFileExplorer raw config key\nRejected: Add Welcome-only shortcut actions | duplicates the shared sidebar command concept\nConfidence: high\nScope-risk: narrow\nTested: jq empty Resources/Localizable.xcstrings; git diff --check\nNot-tested: Local Xcode/unit test run, per no-local-build workflow
CodeRabbit flagged two real polish issues in the PR surface: localized label assertions were pinned to English literals, and the web shortcut metadata rendered the right-sidebar chord in the wrong modifier order. This keeps the behavioral regression test but makes its label checks locale-aware, and matches the docs' Cmd+Option+B ordering.\n\nConstraint: Do not run local Xcode builds or tests in this workflow\nConfidence: high\nScope-risk: narrow\nTested: git diff --check; jq empty Resources/Localizable.xcstrings\nNot-tested: Local unit tests, per workflow
Comment thread Sources/cmuxApp.swift Outdated
The menu handler was re-checking fileExplorerState after the shared AppDelegate toggle had already exhausted that fallback, leaving dead code in the command surface. Keep the menu thin and let the shared command own all best-effort toggle routing.

Constraint: Welcome and workspace windows share the same shortcut command surface.
Rejected: Duplicate fileExplorerState fallback in cmuxApp.swift | it was unreachable after the shared toggle returned false.
Confidence: high
Scope-risk: narrow
Directive: Keep sidebar menu handlers as thin dispatchers to AppDelegate shortcut actions.
Tested: git diff --check
Not-tested: Local unit tests not run because this branch avoids local xcodebuild; CI rerun required after push.
The shortcut split replaced generic sidebar labels with explicit left/right labels, and reviewer feedback identified the old catalog entries as orphaned. Remove only those unused keys so the string catalog reflects the active command surface.

Constraint: New sidebar shortcut labels remain fully localized through the replacement left/right keys.
Rejected: Keep orphaned generic keys | they had no remaining call sites and cluttered the catalog.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Tested: jq empty Resources/Localizable.xcstrings; git diff --check; rg no remaining old key references
Not-tested: Local unit tests not run because this branch avoids local xcodebuild; CI rerun required after push.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 92be92e. Configure here.

Comment thread Sources/ContentView.swift Outdated
The right-sidebar action has a Swift case name that intentionally differs from its persisted raw value. Titlebar shortcut hints elsewhere use the raw value, so this keeps UI automation identifiers stable across the rename.

Constraint: The toggleRightSidebar action must preserve the existing toggleFileExplorer raw id for user config compatibility.
Rejected: Hardcode titlebarShortcutHint.toggleRightSidebar | it diverges from the raw-value convention used by the titlebar hint overlay.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Tested: git diff --check; rg no titlebarShortcutHint.toggleRightSidebar literal remains
Not-tested: Local unit tests not run because this branch avoids local xcodebuild; CI rerun required after push.
The Welcome terminal output is a user-facing shortcut surface, so the CLI contract now checks that it advertises both sidebar toggle commands through the built cmux binary instead of by inspecting source text.

Constraint: Regression test added before the visible Welcome splash fix

Confidence: high

Scope-risk: narrow

Tested: git diff --check -- docs/cli-contract.md

Not-tested: CLI probe not run locally; final verification will use PR CI
The shortcut registry and menu routing already expose the shared sidebar toggles, but the first-run Welcome terminal screen keeps a separate static list of common shortcuts. Add the two sidebar rows there so the visible Welcome surface matches the default bindings users see and press.

Constraint: Welcome splash is static CLI output separate from KeyboardShortcutSettings

Rejected: Generate this splash from KeyboardShortcutSettings in this PR | the bundled CLI and app registry are separate runtimes, and replacing the splash source would broaden a follow-up documentation fix

Confidence: high

Scope-risk: narrow

Directive: Keep the Welcome splash shortcut list in sync when changing first-run default shortcuts

Tested: git diff --check -- CLI/cmux.swift docs/cli-contract.md

Not-tested: CLI welcome probe not run locally; final verification will use PR CI

@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 `@docs/cli-contract.md`:
- Around line 363-364: Update the CLI contract entries for the welcome command
to match the implementation's Title Case strings: replace the lowercase `"Toggle
left sidebar"` and `"Toggle right sidebar"` with `"Toggle Left Sidebar"` and
`"Toggle Right Sidebar"` so the docs/probes align with the actual localized
defaults used in the code (see defaults for the toggle strings in cmuxApp.swift
and KeyboardShortcutSettings.swift and the English values in
Localizable.xcstrings).
🪄 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: 96380bdb-d0ce-4622-bfd9-3ecd74e3f7ea

📥 Commits

Reviewing files that changed from the base of the PR and between 8e1801b and 588ebb2.

📒 Files selected for processing (2)
  • CLI/cmux.swift
  • docs/cli-contract.md

Comment thread docs/cli-contract.md Outdated
CodeRabbit correctly flagged that the new Welcome splash probes should track the visible command labels rather than introducing a separate sentence-case spelling. Use the same Title Case text as the shortcut registry labels while keeping the CLI contract probe on the runtime welcome output.

Constraint: Review feedback requested Title Case alignment for the Welcome shortcut rows

Confidence: high

Scope-risk: narrow

Tested: git diff --check -- CLI/cmux.swift docs/cli-contract.md

Not-tested: CLI probe not run locally; PR CI will run the built CLI contract
Merged origin/main into the sidebar shortcut branch and resolved the overlapping shortcut surfaces by keeping the shared right-sidebar action name while preserving the persisted toggleFileExplorer config key.

Constraint: Build verification must use scripts/reload.sh; local tests are not run in this workspace.\nRejected: Keep origin/main's toggleFileExplorer Swift enum case | it would reintroduce duplicate terminology and break the PR's central shortcut registry shape.\nConfidence: high\nScope-risk: moderate\nDirective: Keep toggleRightSidebar.rawValue equal to toggleFileExplorer for config compatibility.\nTested: python3 -m json.tool Resources/Localizable.xcstrings; git diff --cached --check; ./scripts/reload.sh --tag issue-3745-welcome-sidebar-shortcuts --launch\nNot-tested: Local unit/UI tests per repository policy.
The latest base split drag suppression state from temporary window movability. The unit tests still referenced the removed helper names, so the compile failed before exercising the shortcut regression coverage.

Constraint: Local test execution is deferred to CI for this repository.

Rejected: Reintroduce the removed helper functions | that would duplicate the current suppression and temporary-movability APIs.

Confidence: high

Scope-risk: narrow

Directive: Keep suppression-depth tests focused on suppression state; use withTemporaryWindowMovableEnabled for movability restoration behavior.

Tested: git diff --check

Not-tested: Local unit tests, per repository policy; CircleCI will run cmux-unit.
@austinywang

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

This branch was successfully deployed

1 active deployment
Preview – cmux — 5efb2fcc Deployed May 10, 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.

Add Cmd+B / Cmd+Option+B shortcuts in Welcome window to toggle sidebars

1 participant