Repository navigation
Expose right-sidebar built-in actions - #4113
austinywang wants to merge 14 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedFailed to post review comments Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds ten right‑sidebar built‑in actions, maps them to RightSidebarRemoteCommand, wires execution through AppDelegate/Workspace/ContentView, updates config resolution, expands tests, and updates docs and localization to expose these actions for UI wiring. ChangesRight-Sidebar Built‑In Actions
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 `@web/messages/ja.json`:
- Line 331: The localized string for nightlyActionRegistryDesc contains
unqualified right-sidebar action IDs (show, hide, focus, files, find, vault,
sessions, feed, dock); update that text so each of those tokens is written as
fully-qualified IDs (cmux.rightSidebar.show, cmux.rightSidebar.hide,
cmux.rightSidebar.focus, cmux.rightSidebar.files, cmux.rightSidebar.find,
cmux.rightSidebar.vault, cmux.rightSidebar.sessions, cmux.rightSidebar.feed,
cmux.rightSidebar.dock) to make copy-paste safe and preserve the explicit ID
contract—modify the value for the nightlyActionRegistryDesc key accordingly.
🪄 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: 09775360-e8fe-4b30-acfe-89e3cde1bfc7
📒 Files selected for processing (14)
Resources/Localizable.xcstringsSources/AppDelegate.swiftSources/CmuxConfig.swiftSources/CmuxSurfaceTabBarBuiltInAction.swiftSources/ContentView+RightSidebarCommandPalette.swiftSources/ContentView.swiftSources/RightSidebarPanelView.swiftSources/Workspace.swiftcmuxTests/CmuxConfigTests.swiftcmuxTests/TerminalControllerSocketSecurityTests.swiftweb/app/[locale]/docs/custom-commands/page.tsxweb/data/cmux.schema.jsonweb/messages/en.jsonweb/messages/ja.json
Greptile SummaryThis PR exposes ten
Confidence Score: 4/5Swift routing changes are well-structured and exhaustive; the one gap is incomplete web documentation localisation across 18 of 20 supported locales. The Swift side of this PR — new enum cases, centralised dispatch, window-targeting, CLI parity tests — is carefully constructed and replaces two duplicate routing tables without introducing new logic branches. The web documentation update skips 18 locale files that already contain translated versions of the changed keys, so users in those locales will see stale docs that don't mention the new right-sidebar built-ins. The fix is mechanical but it's a real gap in a PR that explicitly sets out to update documentation. web/messages/en.json and web/messages/ja.json — the 18 other locale files need the same Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User triggers action] --> B{Source}
B -->|cmux config shortcut| C[executeConfiguredCmuxAction]
B -->|Surface tab bar tap| D[Workspace.executeBonsplitButton]
B -->|CLI remote command| E[applyRightSidebarRemoteCommand]
C --> F[executeBuiltInAction scope: .configured]
D --> G[AppDelegate.executeSurfaceTabBarBuiltInAction scope: .surfaceTabBar]
G --> F
F --> H{action.rightSidebarRemoteCommand?}
H -->|nil| I[Scope-specific handler]
H -->|non-nil — all rightSidebar.*| J[applyRightSidebarRemoteCommand preferredWindow]
J --> K[rightSidebarRemoteContext preferredWindow]
K --> L[MainWindowContext]
L --> M[RightSidebarRemoteCommand]
M --> N[FileExplorerState mutation]
Reviews (10): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
There was a problem hiding this comment.
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/CmuxSurfaceTabBarBuiltInAction.swift`:
- Line 129: The localization call currently uses key
"shortcut.switchRightSidebarToSessions.label" but supplies the defaultValue
"Show Sidebar Vault", causing a mismatch; fix by either (A) changing the
defaultValue in the String(localized:) call to "Show Sidebar Sessions" to match
the key (look for the return in CmuxSurfaceTabBarBuiltInAction where the
localization is returned) or (B) if the intent is to use the Vault wording, add
a new key "shortcut.switchRightSidebarToVault.label" to
Resources/Localizable.xcstrings with the appropriate translations and update any
related enum cases (.rightSidebarVault / .rightSidebarSessions) or callers so
the key and defaultValue are consistent.
🪄 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: 008ca989-4670-47d4-b90b-fc0e591fc517
📒 Files selected for processing (5)
Resources/Localizable.xcstringsSources/CmuxSurfaceTabBarBuiltInAction.swiftSources/Workspace.swiftcmuxTests/CmuxConfigTests.swiftweb/messages/en.json
Stale bot change request; inline thread is resolved/outdated and later CI/review checks pass on current head.
…-4109-rightsidebar-action-ids
Summary
cmux.rightSidebar.*built-in action IDs that mirrorcmux right-sidebarCLI subcommands.Tests
Follow-up
ui.titleBar.buttonsis not currently plumbed in this codebase, so this PR limits wiring to the existing surface tab bar action system.Closes #4109
Note
Medium Risk
Moderate risk because it adds new built-in action IDs and refactors built-in action dispatch/window targeting, which could affect right-sidebar focus/visibility behavior across windows and surface tab bar buttons.
Overview
Adds ten new
cmux.rightSidebar.*built-in actions (toggle/show/hide/focus plus mode switches) so the surface tab bar and Command Palette can control the right sidebar via the in-process remote-command path.Refactors built-in action execution into a shared
executeBuiltInActiondispatcher with explicit scope handling, updates right-sidebar command application to accept apreferredWindow, and maps Command Palette right-sidebar mode commands to these built-in action IDs.Updates localizations and web docs/schema to list the new built-ins, and adds tests asserting action-registry resolution and parity with CLI/keyboard right-sidebar behavior.
Reviewed by Cursor Bugbot for commit eca4250. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds ten
cmux.rightSidebar.*built-in actions and runs them in-process so the surface tab bar, Command Palette, and shortcuts can control the right sidebar without shelling out. Centralizes built‑in action routing with window targeting, updates docs/schema/localization, and adds CLI/keyboard parity tests; closes #4109.New Features
toggle/show/hide/focusandfiles/find/vault/sessions/feed/dock, with default titles, keywords, and icons onCmuxSurfaceTabBarBuiltInAction;CmuxConfignow usesdefaultTitle/defaultKeywords.executeBuiltInActionwith scoped execution plusexecuteBuiltInRightSidebarAction(...)andexecuteSurfaceTabBarBuiltInAction(...); configured actions and the surface tab bar now route through these;applyRightSidebarRemoteCommandacceptspreferredWindow.RightSidebarMode.builtInAction; docs/schema/localization enumerate right‑sidebar built-ins and examples; tests cover registry resolution, metadata completeness, CLI parity, and keyboard toggle behavior.Bug Fixes
vaultlabel key.Written for commit eca4250. Summary will update on new commits. Review in cubic
Summary by CodeRabbit
New Features
Documentation
Tests