Add browse-view hotkeys for new entry and search focus - #2481
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughChangesBrowse keyboard shortcuts
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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: 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 `@frontend/viewer/tests/ui/browse-hotkeys.test.ts`:
- Around line 18-22: Add a read-only project fixture to the “New entry
(Ctrl/Cmd+E)” tests and verify that pressing Ctrl/Cmd+E leaves
newEntryDialog(page) hidden when write access is disabled. Keep the existing
writable-project assertion, and ensure the standalone “Browse hotkeys” filter
runs both permission cases.
- Around line 60-61: Update the Ctrl/Cmd+F test around
projectPage.entriesList.searchInput to populate the input with a non-empty
filter value before triggering the shortcut, then assert the field is focused
and its selection range covers the entire value.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d1e2d027-e280-4175-9410-ebb71a8b14c6
📒 Files selected for processing (7)
frontend/viewer/src/lib/components/hotkey/hotkey.sveltefrontend/viewer/src/lib/components/ui/dialog-shared/dialog-shared-root.sveltefrontend/viewer/src/lib/utils/platform.tsfrontend/viewer/src/project/PrimaryNewEntryButton.sveltefrontend/viewer/src/project/browse/BrowseView.sveltefrontend/viewer/src/project/browse/SearchFilter.sveltefrontend/viewer/tests/ui/browse-hotkeys.test.ts
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Hotkeycomponent (key,modifier: "primary",disabled,allowWhenDialogOpen,onHotkey) so shortcuts share dialog/write gatingTest plan
task test:ui-standalone -- browse-hotkey(fromfrontend/viewer/)Made with Cursor