Skip to content

feat(search): Enter selects the top result, Enter opens, Cmd+Enter reveals - #242

Open
elanbw wants to merge 3 commits into
cardisoft:masterfrom
elanbw:feat/enter-keyboard-flow
Open

elanbw wants to merge 3 commits into
cardisoft:masterfrom
elanbw:feat/enter-keyboard-flow

Conversation

@elanbw

@elanbw elanbw commented Nov 24, 2026

Copy link
Copy Markdown

Closes #227.

Summary

This adds an Everything-style keyboard flow: type a query, press Enter, and press Enter again to open the top hit.

  • Enter in the search box runs the search right away. When the results arrive, it selects the top row and moves focus to the list.
  • With a result selected, Enter opens it and Cmd+Enter reveals it in Finder.
  • Double-clicking the folder (path) column reveals the item in Finder instead of opening it.
  • Fix: keyboard actions (Enter, Cmd+Enter, Cmd+O/R/C, Quick Look) now read the selected paths when the key is pressed. Before, a row selected before its data had loaded left the memoized selectedPaths empty, so the shortcut did nothing until the selection moved. This showed up as soon as Enter started auto-selecting the top row.

Testing

  • npm test: 32 files, 278 tests passed, with new cases in useAppHotkeys, useFilesTabState and FileRow
  • npm run typecheck: passed
  • npm run format:check: passed
  • I've used this daily since October on a full home-directory index.

Risks

  • Enter in the search box used to only re-run the search. It now also moves focus to the results list. Cmd+F still returns focus to the search box.
  • No changes to the search engine, indexing or icons.

🤖 Generated with Claude Code

elanbw and others added 3 commits November 24, 2026 12:03
Double-clicking the folder column reveals the item in Finder instead of
opening it. With a result selected, Enter opens it and Cmd+Enter reveals
it in its folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Enter in the search box runs the search immediately, then selects the
first row once those results arrive and moves focus to the list, so a
second Enter opens it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After Enter selected the top result, the memoized selectedPaths were
computed before that row's data loaded and stayed empty, so the next
Enter / Cmd+Enter (and Cmd+O/R/C, Quick Look) did nothing until the
selection moved. Keyboard actions now read paths at key-press time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: press Enter in the search bar to focus on search results

1 participant