Repository navigation
Add file explorer sidebar entrypoint #3976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 10 commits
f316656
0bfb099
f1aa063
de461a6
10fcbd7
6577012
d76b7a0
1649b7c
8b3ea6a
bacaf2d
3ca32d9
30b8234
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5473,6 +5473,38 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent | |
| return true | ||
| } | ||
|
|
||
| @discardableResult | ||
| func showRightSidebarModeInActiveMainWindow( | ||
| mode: RightSidebarMode, | ||
| focusFirstItem: Bool = true, | ||
| preferredWindow: NSWindow? = nil | ||
| ) -> Bool { | ||
| guard mode.isAvailable() else { | ||
| return false | ||
| } | ||
|
|
||
| let context = preferredRegisteredMainWindowContext(preferredWindow: preferredWindow) | ||
| if let context { | ||
| let window = context.window ?? windowForMainWindowId(context.windowId) | ||
| if let window { | ||
| mainWindowVisibilityController.focusForInWindowCommand(window, reason: .rightSidebarFocus) | ||
| } | ||
| return context.keyboardFocusCoordinator.focusRightSidebar( | ||
| mode: mode, | ||
| focusFirstItem: focusFirstItem | ||
| ) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sidebar state mutated before focus result causes false beepMedium Severity When Additional Locations (2)Reviewed by Cursor Bugbot for commit 3ca32d9. Configure here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not changed: this is not a real failure path in the current coordinator contract. Once context.fileExplorerState exists, focusRightSidebar sets the pending request and returns success even if the concrete endpoint is not mounted yet; the false-return paths are validated before any sidebar mutation in showRightSidebarModeInActiveMainWindow. — Claude Code |
||
| } | ||
|
|
||
| guard let state = fileExplorerState else { | ||
| return false | ||
| } | ||
|
cursor[bot] marked this conversation as resolved.
Resolved
|
||
| if state.mode != mode { | ||
| state.mode = mode | ||
| } | ||
| state.setVisible(true) | ||
| return true | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
cursor[bot] marked this conversation as resolved.
Resolved
|
||
| } | ||
|
|
||
| func applyRightSidebarRemoteCommand( | ||
| _ command: RightSidebarRemoteCommand, | ||
| target: RightSidebarRemoteTarget = RightSidebarRemoteTarget() | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.