Repository navigation
feat(explorer): search loaded folders with / - #1470
Conversation
BinariesBuilt from
Downloads need a GitHub sign-in and arrive as zips. On Linux and macOS, run |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Binary sizeComparing
|
Editor, diff, and log benchmarksComparing Allocated bytes measure total allocation per operation, not peak or retained RAM. Logs are opened by each side's built Code files open a 64 MiB Go file, this repository's sources repeated, with LSP and the git gutter off; EditorGeometric-mean change: time -0.5%, allocated bytes +1.1%, allocations +0.9%. Click here to see benchmark details
Diff viewsGeometric-mean change: time +0.2%, allocated bytes +0.5%, allocations +0.4%. Click here to see benchmark details
Log filesGeometric-mean change: time +0.7%, peak RSS -0.2%. Click here to see benchmark details
Code filesGeometric-mean change: time +1.5%, peak RSS +2.9%. Click here to see benchmark details
Timing changes are informational because shared CI runners are noisy; a benchmark error still fails the job. |
|
Tested on Windows 11, works well. Esc ×2 (clear → editor) and Enter respecting One thing it surfaces (pre-existing on main): Ctrl+B hiding the sidebar leaves focus on the hidden explorer, so keys go nowhere visible. |
eugenioenko
left a comment
There was a problem hiding this comment.
@BrettKinny Thank you so much for testing it out, really appreciate your effort and for following up on the sidebar focus bug. Thank you :)
Adds Search in Folders to the Explorer More menu and
explorer.findto the palette. Pressing/in the Explorer opens and focuses a Search-style input with a chevron, divider, and clear/close action.Case-insensitive substring filtering searches materialized file and folder names across all roots, keeps ancestors visible, and preserves expansion state. It never walks unopened directories.
asynctaskdebounces rebuilding the tree on the UI thread usingsearch.debounce; clearing cancels pending work immediately. Up/Down skip context-only ancestors, Enter applies any pending query before opening the selection, and Esc or ✕ clears and hides the input.Closes #1460.
Validation
make testandmake lintpass.go test -race ./internal/ui ./internal/widgets ./tests/e2e -run 'TestExplorerSearch|TestTreeFilter'passes.Before / after
Explorer excerpts from
bin/ttt --size 100x28 --exec '…; screenshot …; quit'.Before:
After pressing
/and enteringbeta:Summary by CodeRabbit
/or Search in Folders.