feat(desktop): add CMD+P quick open file command palette#1551
Conversation
Adds a VS Code-style CMD+P (Ctrl+Shift+P on Windows/Linux) command palette for fuzzy-searching and opening files in the current workspace worktree.
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR introduces a Command Palette feature enabling quick file search and navigation. It adds a new CommandPalette React component, a useCommandPalette hook managing state and integrating with file search and tabs store, binds the feature to a meta+p hotkey, and wires it into the workspace route. Changes
Sequence DiagramsequenceDiagram
actor User
participant Hotkey as Hotkey System
participant Hook as useCommandPalette
participant Palette as CommandPalette UI
participant FileSearch as FileSearch Hook
participant TabsStore as Tabs Store
User->>Hotkey: Press meta+p
Hotkey->>Hook: toggle()
Hook->>Palette: open = true
User->>Palette: Type query
Palette->>Hook: onQueryChange(query)
Hook->>FileSearch: Search with query term
FileSearch->>Hook: Return results
Hook->>Palette: Update searchResults
Palette->>Palette: Render file results
User->>Palette: Select file
Palette->>Hook: onSelectFile(relativePath)
Hook->>TabsStore: Add viewer pane for file
Hook->>Hook: Close palette (open = false)
Hook->>Palette: open = false, query = ""
Palette->>Palette: Close dialog
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
✨ 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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
useFileSearchhook (Fuse.js backend) andCommandDialogfrom@superset/uiaddFileViewerPaneusingrelativePath, matching sidebar behaviorTest plan
Summary by CodeRabbit