Skip to content

Add browse-view hotkeys for new entry and search focus - #2481

Merged
hahn-kev merged 3 commits into
developfrom
feature/browse-new-entry-hotkey
Jul 24, 2026
Merged

Add browse-view hotkeys for new entry and search focus#2481
hahn-kev merged 3 commits into
developfrom
feature/browse-new-entry-hotkey

Conversation

@hahn-kev-bot

@hahn-kev-bot hahn-kev-bot commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add Ctrl/Cmd+E in browse to open the new-entry dialog (same as the FAB), with a tooltip shortcut hint on the button
  • Add Ctrl/Cmd+F to focus (and select) the browse Filter search box
  • Extract a reusable Hotkey component (key, modifier: "primary", disabled, allowWhenDialogOpen, onHotkey) so shortcuts share dialog/write gating

Test plan

  • Open a writable project → Browse → Ctrl+E (⌘E on Mac) opens New Entry; tooltip on the button shows the shortcut
  • With Filter focused, Ctrl/Cmd+E still opens New Entry
  • With New Entry open and a field filled, Ctrl/Cmd+E does not reset the dialog
  • In a read-only project, Ctrl/Cmd+E does nothing
  • Ctrl/Cmd+F focuses the Filter box (including after selecting an entry)
  • With a dialog open, Ctrl/Cmd+F does not steal focus from dialog fields
  • task test:ui-standalone -- browse-hotkey (from frontend/viewer/)

Made with Cursor

hahn-kev and others added 2 commits July 24, 2026 09:41
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Browse keyboard shortcuts

Layer / File(s) Summary
Hotkey foundation
frontend/viewer/src/lib/components/hotkey/hotkey.svelte, frontend/viewer/src/lib/components/ui/dialog-shared/dialog-shared-root.svelte, frontend/viewer/src/lib/utils/platform.ts
Adds global hotkey matching, dialog gating, and platform-aware primary modifier detection.
Browse shortcut wiring
frontend/viewer/src/project/browse/*, frontend/viewer/src/project/PrimaryNewEntryButton.svelte
Adds new-entry and search-focus shortcuts, input focusing, feature gating, and platform-specific tooltip hints.
Shortcut behavior validation
frontend/viewer/tests/ui/browse-hotkeys.test.ts
Tests new-entry and search-focus keyboard behavior across focus and dialog states.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: myieye

Poem

A rabbit taps “E” with a hop,
New entries bloom at the pop.
“F” finds the search,
With shortcuts so smart,
And dialogs stay safely on top.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly summarizes the main change: browse-view hotkeys for new entry and search focus.
Description check ✅ Passed The description matches the changeset and accurately summarizes the added shortcuts, component, and test plan.
✨ 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 feature/browse-new-entry-hotkey

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.

@hahn-kev hahn-kev added the self-reviewed 👁️ I reviewed this myself and with AI and decided it was safe to merge without a second set of eyes label Jul 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between c15d806 and 1ec969c.

📒 Files selected for processing (7)
  • frontend/viewer/src/lib/components/hotkey/hotkey.svelte
  • frontend/viewer/src/lib/components/ui/dialog-shared/dialog-shared-root.svelte
  • frontend/viewer/src/lib/utils/platform.ts
  • frontend/viewer/src/project/PrimaryNewEntryButton.svelte
  • frontend/viewer/src/project/browse/BrowseView.svelte
  • frontend/viewer/src/project/browse/SearchFilter.svelte
  • frontend/viewer/tests/ui/browse-hotkeys.test.ts

Comment thread frontend/viewer/tests/ui/browse-hotkeys.test.ts
Comment thread frontend/viewer/tests/ui/browse-hotkeys.test.ts Outdated
@argos-ci

argos-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 24, 2026, 5:07 AM
e2e (Inspect) ✅ No changes detected - Jul 24, 2026, 5:15 AM

@hahn-kev
hahn-kev enabled auto-merge (squash) July 24, 2026 05:14
@hahn-kev
hahn-kev merged commit 02e3212 into develop Jul 24, 2026
32 checks passed
@hahn-kev
hahn-kev deleted the feature/browse-new-entry-hotkey branch July 24, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related self-reviewed 👁️ I reviewed this myself and with AI and decided it was safe to merge without a second set of eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants