Repository navigation
Conversation
Search box above the tree with ranked flat results, match highlighting and keyboard navigation scoped to the input. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
simo787c
marked this pull request as ready for review
October 30, 2026 13:52
Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
nthomsencph
requested changes
Nov 8, 2026
nthomsencph
left a comment
Collaborator
There was a problem hiding this comment.
Esc needs fixing before merge.
simo787c
force-pushed
the
feat/search-files-in-editor-4b7
branch
from
November 10, 2026 14:54
a249b3a to
d6821c5
Compare
Collaborator
Author
|
Extras added beyond the review:
|
The file search now reads its files from the tree, uses the shared Command list, and lets the first Esc clear the box instead of closing the editor. - Esc closed the editor: a shared data-owns-escape marker, first Esc clears - The file list was built twice: search takes its files from the tree - Hand-written keys: results use ui/Command, the tree stays outside it - Ranking tests could not fail: each rule has an order test that goes red - Open file's row: the tree's background, normal-coloured mono name - Long names: the name and the folder both truncate, the folder first Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
A small count line under the search box says how many files matched, and how many of them are listed when the list is capped. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
Hovering a search result now shows its full path, as the tree rows already do, so a truncated folder can still be read. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
Until the file list arrives the search only knows the changed files, so it now shows Loading instead of a partial list, using the same rule as the tree. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
The count line now lives in a status region that is always there, so screen readers announce the count, or that no files match, as the query changes. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
A click anywhere in the search area, including the Clear button, now leaves focus in the box, so Esc and the arrow keys keep working and Enter never lands on the button. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
The Command list used Home and End to jump to the first and last result, so they never moved the caret; in the box they now move the caret again. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
When Esc only cancels an input method's composition, the search keeps its query instead of clearing it. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
Search used to score and highlight only the first letters that fit, so a clean word later in the name was ignored; it now tries a few word-start alignments and keeps the best, and breaks ties with a plain, faster comparison. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
A query typed out as one unbroken run that starts a word, like `store` in uiStore.ts, now ranks above letters picked from several words, even when those start at the file name. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
A few characters, like `İ`, grow when lowercased, which shifted the highlighted letters and could miss a query that contains one; paths and the query are now lowercased so every character keeps its place. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
The tree now stays mounted, just hidden, while searching, so the folders you opened and the scroll position are still there when the search ends. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
When the search is cleared after picking a file, the tree opens that file's folders and scrolls its row into view, so you can see where it lives. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
simo787c
force-pushed
the
feat/search-files-in-editor-4b7
branch
from
November 10, 2026 15:45
d6821c5 to
bf0355e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
146 files, or200 of 500 fileswhen the list is cut), a clear button and a "No files match" / "Loading…" state.ui/Command(cmdk) withshouldFilter={false}. The file list comes from the tree, so search follows the "changed only" toggle and "show all files" mode. Ignored directories match as their single collapsed entry.edsbfindsEditorSidebar.tsx). Ranking prefers file-name matches over directory-only ones, word starts and camelCase humps, and a clean word-start run over a scattered match; highlights follow the best of a few tried alignments. Pure logic insrc/renderer/lib/fileSearch.tswith behaviour tests (order only, no score values); each ranking rule has a test that goes red when the rule is removed.Modalgets one generaldata-owns-escapemarker (the comment inputs use it too, replacingdata-diff-comment-input); the search root sets it only while it has a query. No global key listeners, and the tree sits outside the cmdk root so its keys are untouched.Not included
Known limits
σdoesn't match a path-endingΣ.Test plan
fileSearchunit tests (25), tsc, eslintsrc/renderer/utils/__tests__/billionToast.test.tsfails on a locale format (1,278vs1.278); this PR doesn't touch it🤖 Generated with Claude Code