Skip to content

Make browser find shortcuts respect remaps - #3728

Merged
austinywang merged 10 commits into
mainfrom
issue-3726-remappable-keyboard-shortcuts
May 9, 2026
Merged

austinywang merged 10 commits into
mainfrom
issue-3726-remappable-keyboard-shortcuts

Conversation

@austinywang

@austinywang austinywang commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Corrected the shipped defaults for the reported shortcuts: Open File Explorer is now ⌘⇧E, Toggle Right Sidebar is now ⌥⌘B, and Find in Directory remains ⌘⇧F.
  • Renamed the user-facing right-sidebar shortcut label/menu/docs text from “Focus Right Sidebar” to “Toggle Right Sidebar” while preserving the internal .focusRightSidebar action id for existing config compatibility.
  • Renamed the user-facing shortcut label/docs text for the file explorer shortcut from “Toggle File Explorer” to “Open File Explorer” while preserving the internal .toggleFileExplorer action id for existing config compatibility.
  • Placed the three related Settings -> Keyboard Shortcuts rows adjacent in this order: Toggle Right Sidebar, Open File Explorer, Find in Directory. The row order is action-based; the displayed/default key equivalents still come from KeyboardShortcutSettings.
  • Removed the right-sidebar mode selectors (Ctrl+1 through Ctrl+5) from public shortcut defaults, Settings search/display, docs, and generated config templates while keeping legacy explicit cmux.json bindings parseable and schema-valid.
  • Kept the routing fix from the earlier commits so the reported actions are dispatched through KeyboardShortcutSettings.shortcut(for:) instead of hardcoded literals.

Changed Sites

  • Sources/KeyboardShortcutSettings.swift: swapped the File Explorer / right-sidebar defaults, renamed the visible labels to Toggle Right Sidebar and Open File Explorer, marked right-sidebar mode selector actions non-public, unbound their built-in defaults, and orders the Settings-visible action list so Toggle Right Sidebar, Open File Explorer, and Find in Directory are adjacent without hardcoding their key chords.
  • Sources/cmuxApp.swift: Settings -> Keyboard Shortcuts renders KeyboardShortcutSettings.settingsVisibleActions; View menu label now says Toggle Right Sidebar.
  • Resources/Localizable.xcstrings: updated English/Japanese/Korean translations for the Settings shortcut labels.
  • Sources/SettingsSearchAliases.swift: Settings search aliases use the same visible action list.
  • Sources/KeyboardShortcutSettingsFileStore.swift: generated cmux.json shortcut templates include public shortcut actions only.
  • Sources/App/ShortcutRoutingSupport.swift: browser find-family command-equivalent routing reads configured shortcuts.
  • cmuxTests/AppDelegateShortcutRoutingTests.swift: regression coverage for .toggleFileExplorer, .focusRightSidebar, and .findInDirectory uses the corrected default chords.
  • cmuxTests/WorkspaceUnitTests.swift: asserts the corrected defaults, visible Toggle Right Sidebar/Open File Explorer labels, public Settings visibility/order for the three reported actions, and non-public/unbound status for right-sidebar mode selectors.
  • cmuxTests/ShortcutAndCommandPaletteTests.swift: asserts Ctrl+1...5 do not switch right-sidebar modes by default while explicit configured bindings still work.
  • README.md, web/data/cmux-shortcuts.ts: docs now match the corrected public shortcut surface and order; README also documents Find Previous as ⌥⌘G.
  • web/data/cmux.schema.json: adds toggleFileExplorer while preserving legacy switchRightSidebar* action IDs so existing explicit cmux.json bindings remain schema-valid.

Shortcut Audit

Already data-driven .keyboardShortcut(...) sites:

  • Sources/NotificationsPage.swift: Jump to Latest Unread uses KeyboardShortcutSettings.shortcut(for: .jumpToUnread).
  • Sources/WorkspaceContentView.swift: empty-pane New Terminal/Open Browser buttons use KeyboardShortcutSettings.shortcut(for:).
  • Sources/ContentView.swift: rename/edit/close context-menu shortcuts use KeyboardShortcutSettings.shortcut(for:).
  • Sources/cmuxApp.swift: numbered workspace selection uses menuShortcut(for: .selectWorkspaceByNumber), and menu command buttons use menuShortcut(for:).

Allowed non-remappable .keyboardShortcut(...) sites:

  • Default/cancel button modifiers using .defaultAction / .cancelAction in alerts and popovers.

Changed .keyboardShortcut(...) sites:

  • None; the runtime gap was in raw command-equivalent routing and Settings/default metadata, not a SwiftUI .keyboardShortcut literal.

NSEvent and Menu Audit

  • AppDelegate.handleCustomShortcut dispatches .toggleFileExplorer, .focusRightSidebar, and .findInDirectory through matchConfiguredShortcut(event:action:).
  • SwiftUI menu commands in Sources/cmuxApp.swift read KeyboardShortcutSettings.menuShortcut(for:); no hardcoded "b", "e", or "f" modifier sets remain for the reported actions.
  • NSMenuItem construction sites either use configured menu shortcuts or system/default/cancel equivalents.

Settings UI / E2E Validation

Expected Settings -> Keyboard Shortcuts rows after this correction:

  • Toggle Right Sidebar: default ⌥⌘B.
  • Open File Explorer: default ⇧⌘E.
  • Find in Directory: default ⇧⌘F.
  • These three rows are adjacent in Settings, but not a separate visible subgroup.
  • Show Sidebar Files/Find/Vault/Feed/Dock (^1...^5) are no longer public Settings rows or default shortcuts.

Tagged dev launch validation is executed with ./scripts/reload.sh --tag issue-3726-remappable-keyboard-shortcuts --launch.

Test Plan

  • git diff --check
  • GitHub PR checks on latest commit 5ac69852a: 18 passed, 0 failed, 0 pending, 7 skipped.
  • Review bots: CodeRabbit/Cursor/Greptile checks passed; stale CodeRabbit changes-requested reviews were dismissed after their threads were resolved/addressed.
  • Local XCTest/XCUITest not run per repo policy and task constraints; no direct xcodebuild was run.

Add regression coverage for the three reported shortcut actions and for the browser find preflight path that still classifies Find in Directory from a literal key combination.

Constraint: Local test execution is disabled for this repo; CI must run the new XCTest.

Confidence: high

Scope-risk: narrow

Directive: Keep the browser find preflight tied to KeyboardShortcutSettings so remapped find-family shortcuts do not leave stale browser key-equivalent behavior behind.

Tested: git diff --check

Not-tested: XCTest execution; local tests are prohibited by project policy
Browser find command-equivalent preflight used literal Command-family combos to classify Find, Find in Directory, next/previous find, hide find, and Use Selection for Find before menu fallback. That meant a remapped or unbound shortcut could still be treated as its default command equivalent on the browser path.\n\nRoute the classifier through the same KeyboardShortcutSettings.Action defaults and persisted overrides as the central shortcut dispatcher, while preserving the existing browser-first exclusions for cmux-owned Find and Find in Directory.\n\nConstraint: Local test execution is disabled by project policy and this task forbids direct xcodebuild usage.\nRejected: Patch only Cmd+Shift+F | the same hardcoded classifier owned the rest of the browser find-family equivalents.\nConfidence: high\nScope-risk: narrow\nDirective: Browser find-family command equivalents must remain mapped through KeyboardShortcutSettings.Action before deciding browser-first routing.\nTested: git diff --check\nNot-tested: XCTest locally; CI is the validation path for this repo
@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 8, 2026 9:03pm
cmux-staging Building Building Preview, Comment May 8, 2026 9:03pm

@coderabbitai

coderabbitai Bot commented May 8, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Refactors browser “Find” routing to map enum cases to KeyboardShortcutSettings.Action and match incoming NSEvents against StoredShortcut values via a shortcut-driven matcher; introduces public/settings-visible action lists and default-binding changes; updates UI, template, web/schema, README, and localization; adds tests and test-teardown cleanup for shortcut lookup observation.

Changes

Shortcut & Routing Change DAG

Layer / File(s) Summary
KeyboardShortcutSettings: public / visible action lists and defaults
Sources/KeyboardShortcutSettings.swift
Adds publicShortcutActions and settingsVisibleActions, Action.isPublicShortcutAction; changes default bindings (focusRightSidebar, toggleFileExplorer) and marks legacy right-sidebar mode-switch actions unbound by default.
Frontend data / schema / docs / localization
web/data/cmux-shortcuts.ts, web/data/cmux.schema.json, README.md, Resources/Localizable.xcstrings
Adds toggleFileExplorer, changes focusRightSidebar combo and description, updates JSON schema allowed action ids, updates README Workspaces/Find shortcut tables, and updates localized labels for file explorer and right sidebar.
Shortcut-driven browser Find enum
Sources/App/ShortcutRoutingSupport.swift
Introduces BrowserFindCommandEquivalent: CaseIterable and adds an action computed property mapping cases (findNext, findPrevious, useSelection) to KeyboardShortcutSettings.Action.
Shortcut-driven matching implementation
Sources/App/ShortcutRoutingSupport.swift
Implements browserFindCommandEquivalent(for:shortcutForAction:) that iterates enum cases and returns the first whose StoredShortcut (from shortcutForAction, defaulting to KeyboardShortcutSettings.shortcut(for:)) matches the incoming NSEvent.
Settings template, UI, and search alias updates
Sources/KeyboardShortcutSettingsFileStore.swift, Sources/SettingsSearchAliases.swift, Sources/cmuxApp.swift
Default settings template generation, settings UI action list, and settings-search alias generation now use publicShortcutActions/settingsVisibleActions rather than Action.allCases.
Tests: teardown, new tests, and related assertions
cmuxTests/* (AppDelegateShortcutRoutingTests.swift, ShortcutAndCommandPaletteTests.swift, WorkspaceUnitTests.swift)
Clear DEBUG shortcutLookupObserver in tearDown(); add DEBUG-gated tests that install shortcutLookupObserver and assert routed actions come from configured lookups; extend non-find exclusion cases; add tests asserting mode-switch actions are unbound by default and settingsVisibleActions contents and ordering.

Sequence Diagram(s)

sequenceDiagram
  participant UserEvent
  participant AppDelegate
  participant KeyboardShortcutSettings
  participant StoredShortcutMatcher
  participant Observer

  UserEvent->>AppDelegate: NSEvent arrives
  AppDelegate->>KeyboardShortcutSettings: request StoredShortcut via shortcutForAction(action)
  KeyboardShortcutSettings->>StoredShortcutMatcher: provide StoredShortcut
  StoredShortcutMatcher->>AppDelegate: match result (matches / no)
  AppDelegate->>Observer: notify lookup (DEBUG observer)
  AppDelegate->>AppDelegate: return BrowserFindCommandEquivalent? or nil
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

"🐇 I mapped keys to actions, one by one,
Hopped through lookups until matching was done.
A tiny observer watches each find,
Tests keep the shortcuts tidy and kind.
Hooray — the rabbit’s routing is spun!"


Caution

Pre-merge checks failed

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

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Cmux Swift Concurrency ❌ Error Regressed WindowScopedShortcutHintModifierMonitor from @Observable to ObservableObject+@published, introducing legacy Combine patterns where modern Observation is available. Restore @Observable with @ObservationIgnored, removing @Published and ObservableObject.
Docstring Coverage ⚠️ Warning Docstring coverage is 17.39% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main technical change: making browser find shortcuts respect user remappings via KeyboardShortcutSettings.
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 All Swift changes are safe for Swift 6 actor isolation. New properties are computed read-only getters used in MainActor contexts. No mutable shared state or unsafe Sendable violations.
Cmux Swift Blocking Runtime ✅ Passed PR introduces no blocking/timing constructs. Changes involve routing logic, data structures, UI labels, and metadata updates only. Pre-existing NSLock and .waitUntilExit calls are unmodified.
Cmux No Hacky Sleeps ✅ Passed No sleep/delay patterns found in TypeScript code. PR modifies primarily Swift code (not covered by this rule) and data structure definitions without runtime timing dependencies.
Cmux Swift @Concurrent ✅ Passed No new async functions, @concurrent annotations, or nonisolated async work introduced. All changes use synchronous functions or existing GCD patterns consistent with the codebase.
Cmux Swift File And Package Boundaries ✅ Passed All changes to oversized files remain under 250-line threshold, no mixed responsibilities introduced, and changes are focused refinements preserving clear extraction paths.
Cmux Swift Logging ✅ Passed No logging violations found. All 23 modified production Swift files passed inspection for print, NSLog, debugPrint, dump, file I/O logging, MainActor Logger isolation, and sensitive data patterns.
Cmux Swiftui State Layout ✅ Passed No SwiftUI state violations. Data-layer changes only. ShortcutSettingRow receives immutable action with private @State. No ObservableObject, @Published, store references in rows, or render mutations.
Cmux Architecture Rethink ✅ Passed Find routing refactored through centralized KeyboardShortcutSettings lookup. No timing repairs, duplicate ownership, or split UI lifecycle. Adds only DEBUG observer and computed property classifiers.
Description check ✅ Passed The pull request provides a detailed and comprehensive description covering all required sections: what changed, why it changed, testing approach, and expected validation outcomes.
✨ 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-3726-remappable-keyboard-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

This PR corrects a long-standing mismatch between the shipped default shortcuts and the Settings/docs surface for three actions (Toggle Right Sidebar → ⌥⌘B, Open File Explorer → ⌘⇧E, Find in Directory → ⌘⇧F), renames their user-facing labels, removes the Ctrl+1…5 right-sidebar mode selectors from public defaults, and—critically—rewrites browserFindCommandEquivalent to read KeyboardShortcutSettings.shortcut(for:) instead of hardcoded modifier-flag literals, so the routing now respects user remaps.

  • ShortcutRoutingSupport.swift: Replaces the large switch flags/matches block with a data-driven BrowserFindCommandEquivalent.allCases.first { shortcutForAction($0.action).matches(event:) } loop, using the same StoredShortcut.matches normalization path as the rest of the shortcut system.
  • KeyboardShortcutSettings.swift: Swapped defaults for toggleFileExplorer and focusRightSidebar, introduced isPublicShortcutAction and settingsVisibleActions to expose only the correct actions in Settings UI and config-file templates, and adds orderedSettingsVisibleActions to colocate the three reported actions adjacent to each other after jumpToUnread.
  • Tests cover the new data-driven routing consultation for all six find-family actions, the corrected defaults, the public/non-public split, and the adjacent ordering in the Settings list.

Confidence Score: 5/5

Safe to merge. The routing rewrite eliminates hardcoded modifier-flag literals in favor of the existing StoredShortcut matching path, and every changed default is covered by unit assertions.

The browser find routing is now driven by the same StoredShortcut.matches(event:) path used everywhere else in the shortcut system, removing a class of stale-literal bugs. All six find-family actions are regression-tested via the shortcutLookupObserver hook. Default swaps for toggleFileExplorer and focusRightSidebar are asserted in WorkspaceUnitTests, and the public/non-public split for switchRightSidebarTo* actions is tested at both the settings-visibility and config-template levels. No actor isolation, blocking primitive, or SwiftUI state concerns were introduced.

No files require special attention.

Important Files Changed

Filename Overview
Sources/App/ShortcutRoutingSupport.swift Core routing fix: replaces hardcoded modifier-flag switch with CaseIterable allCases.first loop using StoredShortcut.matches(event:); shortcutForAction injection point enables test observation. No new concurrency or isolation issues.
Sources/KeyboardShortcutSettings.swift Swaps toggleFileExplorer/focusRightSidebar defaults, adds isPublicShortcutAction, settingsVisibleActions, and orderedSettingsVisibleActions; cleans up switchRightSidebarTo* defaults to .unbound. Logic is straightforward value-type enum manipulation with no concurrency concerns.
Sources/cmuxApp.swift View menu label updated to Toggle Right Sidebar and Settings shortcut list now driven by settingsVisibleActions instead of allCases; straightforward SwiftUI/menu change.
Sources/KeyboardShortcutSettingsFileStore.swift Generated cmux.json template now iterates publicShortcutActions instead of allCases, correctly excluding the non-public switchRightSidebarTo* actions from shipped config templates.
Sources/SettingsSearchAliases.swift Settings search alias index now uses settingsVisibleActions labels, so Ctrl+1-5 mode selectors are no longer searchable. Consistent with the public/non-public split.
cmuxTests/AppDelegateShortcutRoutingTests.swift New MARK sections added; regression tests for shortcut settings consultation cover all three reported actions and all six find-family actions; observer teardown added to tearDown().
cmuxTests/WorkspaceUnitTests.swift Asserts corrected defaults, visible label, public/non-public status, and adjacency ordering for the three reported actions; comprehensive guard against future regressions.
cmuxTests/ShortcutAndCommandPaletteTests.swift New testModeShortcutsAreUnboundByDefault asserts Ctrl+1-5 do not fire by default; existing testModeShortcutUsesConfiguredBindings preserved to confirm explicit config still works.
Resources/Localizable.xcstrings English, Japanese, and Korean translations updated for both right-sidebar label strings and the file explorer label. Both occurrences of the right-sidebar key are updated consistently.
web/data/cmux-shortcuts.ts Docs updated: switchRightSidebarMode entry removed, focusRightSidebar combo corrected to opt-cmd-B, toggleFileExplorer added with cmd-shift-E. Matches new public shortcut surface.
web/data/cmux.schema.json toggleFileExplorer added to schema enum while legacy switchRightSidebar* IDs are preserved, keeping existing cmux.json bindings schema-valid.
README.md Shortcut table corrected: opt-cmd-B for Toggle right sidebar, cmd-shift-E for Open file explorer, Ctrl+1-3 row removed; Find section updated with cmd-shift-F for find-in-directory and opt-cmd-G for Find Previous.

Sequence Diagram

sequenceDiagram
    participant App as AppDelegate
    participant Routing as ShortcutRoutingSupport
    participant KSS as KeyboardShortcutSettings
    participant SS as StoredShortcut

    App->>Routing: shouldRouteBrowserFindCommandEquivalent(event)
    Routing->>Routing: browserFindCommandEquivalent(for: event)
    loop BrowserFindCommandEquivalent.allCases
        Routing->>KSS: shortcut(for: command.action)
        KSS-->>Routing: StoredShortcut
        Routing->>SS: matches(event:)
        SS-->>Routing: Bool
    end
    Routing-->>App: BrowserFindCommandEquivalent?
    App->>App: Route or pass through
Loading

Reviews (7): Last reviewed commit: "Name the file explorer shortcut as open ..." | Re-trigger Greptile

Comment thread cmuxTests/AppDelegateShortcutRoutingTests.swift Outdated
Comment thread cmuxTests/AppDelegateShortcutRoutingTests.swift Outdated
Review feedback pointed out that the browser preflight regression only observed Find in Directory even though the implementation now maps the whole browser find-family through KeyboardShortcutSettings.\n\nExtend the observer test across Find, Find in Directory, Find Next, Find Previous, Hide Find, and Use Selection for Find, and move the new tests into explicit shortcut-settings/browser-find sections so the non-Latin section remains scoped.\n\nConstraint: Local test execution is disabled by project policy and this task forbids direct xcodebuild usage.\nRejected: Cover only Cmd+G | every mapped browser find-family action now shares the same configurable lookup path.\nConfidence: high\nScope-risk: narrow\nDirective: Keep browser find-family regression coverage aligned with BrowserFindCommandEquivalent.action mappings.\nTested: git diff --check\nNot-tested: XCTest locally; CI is the validation path for this repo

@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 134c3d1. Configure here.

Comment thread Sources/App/ShortcutRoutingSupport.swift
Cursor Bugbot flagged that replacing the hardcoded browser Find Previous route changes Cmd+Shift+G behavior. The configured cmux default and docs use Cmd+Option+G for Find Previous, while Cmd+Shift+G is the documented Toggle React Grab shortcut.\n\nUpdate the browser preflight regression tests to assert the settings-owned Find Previous default and to keep Cmd+Shift+G out of the browser find-family classifier, preserving remappability without reviving the hidden hardcoded duplicate.\n\nConstraint: Local test execution is disabled by project policy and this task forbids direct xcodebuild usage.\nRejected: Change the Find Previous default to Cmd+Shift+G | that would conflict with the documented Toggle React Grab default.\nConfidence: high\nScope-risk: narrow\nDirective: Browser find preflight should follow configured KeyboardShortcutSettings defaults; do not add an unremappable Cmd+Shift+G browser-only exception.\nTested: git diff --check\nNot-tested: XCTest locally; CI is the validation path for this repo
The Settings UI was exposing right-sidebar mode selectors as first-class shortcuts and the defaults for file explorer/right-sidebar focus were swapped from product intent. Keep the legacy action cases available for existing cmux.json bindings, but remove their public defaults and Settings/docs exposure.

Constraint: Do not run local XCTest or direct xcodebuild per repo/task policy

Rejected: Delete right-sidebar mode action cases | existing cmux.json users can still have explicit bindings, and the parser coverage depends on those cases

Confidence: high

Scope-risk: narrow

Tested: git diff --check

Not-tested: Local XCTest/XCUITest/direct xcodebuild per policy
coderabbitai[bot]
coderabbitai Bot previously requested changes May 8, 2026

@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 `@README.md`:
- Around line 212-215: Update the README Find table entry for "Find Previous" to
match the actual default shortcut used by the code: change the documented key
from "⌘ ⇧ G" to "⌥ ⌘ G" (Option+Command+G) so it aligns with the findPrevious
case that returns StoredShortcut(key: "g", command: true, shift: false, option:
true, control: false); ensure the symbol and plain-text description reflect
Option+Command+G consistently.
🪄 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: 752b7481-b431-474b-812f-9041afc190b6

📥 Commits

Reviewing files that changed from the base of the PR and between b70c932 and 811fbad.

📒 Files selected for processing (10)
  • README.md
  • Sources/KeyboardShortcutSettings.swift
  • Sources/KeyboardShortcutSettingsFileStore.swift
  • Sources/SettingsSearchAliases.swift
  • Sources/cmuxApp.swift
  • cmuxTests/AppDelegateShortcutRoutingTests.swift
  • cmuxTests/ShortcutAndCommandPaletteTests.swift
  • cmuxTests/WorkspaceUnitTests.swift
  • web/data/cmux-shortcuts.ts
  • web/data/cmux.schema.json

Comment thread README.md
The user-facing shortcut action toggles focus between the terminal and right sidebar, so the Settings row and View menu should say Toggle Right Sidebar instead of Focus Right Sidebar. Keep the internal action id unchanged so existing cmux.json bindings continue to work.

Constraint: Do not run local XCTest or direct xcodebuild per repo/task policy

Rejected: Rename the action case or config key | would churn persisted shortcut identifiers for a display-only change

Confidence: high

Scope-risk: narrow

Tested: git diff --check; rg confirmed no user-facing Focus Right Sidebar text remains

Not-tested: Local XCTest/XCUITest/direct xcodebuild per policy
CodeRabbit caught that the README still described Find Previous as Cmd+Shift+G even though the configured default is Cmd+Option+G. Update the docs so the shortcut table matches KeyboardShortcutSettings.

Constraint: Do not run local XCTest or direct xcodebuild per repo/task policy

Confidence: high

Scope-risk: narrow

Tested: git diff --check; rg confirmed README uses Option+Command+G

Not-tested: Local XCTest/XCUITest/direct xcodebuild per policy
Legacy right-sidebar mode actions are no longer public defaults or Settings rows, but users may still have explicit cmux.json bindings. Keeping the schema enum aligned with runtime parsing prevents editor/schema validation from rejecting those existing configs while still adding the new toggleFileExplorer action.

Constraint: User requested the Ctrl+1 through Ctrl+5 shortcuts disappear from Settings/defaults, not that legacy config files become invalid.

Rejected: Remove the legacy action ids from the schema | runtime still parses them, so schema validation would be stricter than the app.

Confidence: high

Scope-risk: narrow

Tested: git diff --check

Not-tested: Local tests per repository policy; CI will rerun after push.
@austinywang

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 8, 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.

@austinywang

Copy link
Copy Markdown
Contributor Author

@coderabbitai resume

@austinywang

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown
✅ Actions performed

Reviews resumed.

The Settings shortcut list follows the public action order by default, which placed Toggle Right Sidebar, Find in Directory, and Toggle File Explorer in separate parts of the list. The Settings visible-action projection now colocates those action rows in the requested order while leaving their displayed chords driven by KeyboardShortcutSettings.

Constraint: Do not hardcode the default key equivalents in the Settings UI; only order action cases.

Rejected: Move enum cases to force UI order | enum order is shared with defaults/schema/template expectations and would make the setting-specific intent less clear.

Confidence: high

Scope-risk: narrow

Tested: git diff --check

Not-tested: Local XCTest per repository policy; CI will rerun after push.
The Settings shortcut row should describe the action users invoke, not the historical internal action id. Keep the stable toggleFileExplorer id for persisted configs, but show Open File Explorer and place the three related rows in the requested order: Toggle Right Sidebar, Open File Explorer, Find in Directory.

Constraint: Shortcut key equivalents must remain driven by KeyboardShortcutSettings, not hardcoded UI labels.

Rejected: Rename the Action case | would churn persisted shortcut/config identifiers without changing runtime behavior.

Confidence: high

Scope-risk: narrow

Tested: git diff --check

Not-tested: Local XCTest per repository policy; CI will rerun after push.
coderabbitai[bot]
coderabbitai Bot previously requested changes May 8, 2026

@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 `@README.md`:
- Line 161: Replace the text "Open file explorer" in the keyboard shortcuts
table row (the entry showing "⌘ ⇧ E") with "Toggle file explorer" so it matches
the wording used for "Toggle sidebar" and "Toggle right sidebar", ensuring
consistent use of "Toggle" across related entries in README.md.
🪄 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: 93e1f08e-1c18-4520-b226-9cb6b99be6b9

📥 Commits

Reviewing files that changed from the base of the PR and between cb5cf0c and 5ac6985.

📒 Files selected for processing (5)
  • README.md
  • Resources/Localizable.xcstrings
  • Sources/KeyboardShortcutSettings.swift
  • cmuxTests/WorkspaceUnitTests.swift
  • web/data/cmux-shortcuts.ts

Comment thread README.md
@austinywang

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 8, 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.

@austinywang
austinywang dismissed stale reviews from coderabbitai[bot] and coderabbitai[bot] May 8, 2026 21:07

Dismissed stale CodeRabbit review after the README Find Previous thread was fixed and resolved; current checks are green.

@austinywang
austinywang merged commit 556cad8 into main May 9, 2026
30 checks passed

This branch was successfully deployed

1 active deployment
Preview – cmux — 5ac69852 Deployed May 8, 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