Skip to content

feat: add recursive file search - #123

Merged
nextestudios merged 1 commit into
mainfrom
feature/46-recursive-search
Sep 27, 2026
Merged

nextestudios merged 1 commit into
mainfrom
feature/46-recursive-search

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

  • Select/View (Ctrl+F) in a disk folder opens the on-screen keyboard; Done starts a name search (substring, case- and accent-insensitive). No indexing: only the current folder (and, if chosen, its subfolders) is read at search time.
  • Explicit include subfolders toggle: Menu → "Busca em subpastas" (next search) and North → "Subpastas" on the results (re-runs). Default: included.
  • Results are a virtual SearchLocation in AppController (PaneState.Search / ActiveSearch). Enumeration runs on a background task (IFileSystemProvider.Search); a batcher delivers results to the UI thread at most one pending batch at a time and at most every 150 ms, merged into the sorted list without re-sorting (FileListState.AppendItems). Hard cap of 10,000 results ("refine the term").
  • Footer states: running/partial, completed, cancelled (partial), limit reached, plus "N folder(s) skipped" for unreadable folders; North → "Pastas puladas" lists them.
  • East/B while running cancels and keeps partial results; East/B again returns to the folder with the previous focus.
  • South/A on a result navigates to its real folder with focus on the item; Back returns to the stored results (no re-run) with focus on that result.
  • LocalFileSystemProvider.Search walks folders breadth-first with EnumerationOptions { RecurseSubdirectories = false, IgnoreInaccessible = false } and never descends into entries with ReparsePoint (junctions, symlinks); the link itself may be listed as a result.

Tests (CI, Windows)

  • SearchJourneyTests.Search_streams_results_in_subfolders_and_opening_one_focuses_it_in_its_folder: first result visible while the search is still running (partial), completion, open result → folder with item focused, Back → results, Back → original folder/focus.
  • SearchJourneyTests.Back_cancels_a_running_search_keeping_partial_results_and_stops_enumerating.
  • SearchIntegrationTests.Search_never_descends_into_a_junction (junction in a temp dir pointing outside the tree).
  • SearchIntegrationTests.Folder_without_permission_is_reported_not_silently_skipped (deny ACL on a temp folder).

Manual checks (docs/TESTING.md)

UI responsiveness on a ~50,000-file tree with a controller, cancel latency, real permission-denied folders on C:\, OneDrive on-demand folders (reparse points are not traversed by design). Not verifiable in CI.

Closes #46

🤖 Generated with Claude Code

Select/View (Ctrl+F) opens the on-screen keyboard; Done searches the
current folder by name (case- and accent-insensitive), with an explicit
include-subfolders toggle and no indexing. Results are a virtual
SearchLocation in AppController: enumeration runs off the UI thread and
results reach the list in bounded batches. The footer shows partial,
completed, cancelled or limit-reached state and folders skipped for
permission. East/B cancels keeping partial results; opening a result
navigates to its folder with focus on the item. Search never descends
into junctions, symlinks or other reparse points.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nextestudios
nextestudios force-pushed the feature/46-recursive-search branch from bb73438 to 3615827 Compare September 27, 2026 03:26
@nextestudios
nextestudios merged commit 702aa02 into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/46-recursive-search branch September 27, 2026 03:29
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.

feat: add recursive file search

1 participant