Skip to content

refactor(file-search): replace heavyweight workspace index - #105

Merged
danielkov merged 3 commits into
mainfrom
refactor/workspace-file-search
Sep 4, 2026
Merged

refactor(file-search): replace heavyweight workspace index#105
danielkov merged 3 commits into
mainfrom
refactor/workspace-file-search

Conversation

@danielkov

Copy link
Copy Markdown
Contributor

Summary

Replace fff-search with an in-memory workspace file list built by ignore and fuzzy-matched by neo_frizbee. Prune Git metadata before traversal and report scan failures rather than returning silently incomplete results.

Motivation

Workspace filename search does not need the removed backend's database, Git bindings, or file-watching dependencies. This removes 48 locked packages; both replacement crates remain at their previously locked versions, with no newly selected package versions.

Impact

Search remains capped at 100 results with UTF-8-safe highlighting. Empty queries return alphabetically sorted paths; nonempty queries use the new matcher's ranking and typo tolerance, so result order can differ. Filesystem roots are rejected, and traversal or ignore-rule errors now fail the scan explicitly.

Technical details

File discovery

Walk the workspace in parallel while honoring ignore rules and avoiding symlink traversal. Include hidden files in Git workspaces and exclude .git entries before descent.

Match highlighting

Rank the file list first, then obtain character indices for the top candidates and convert them into merged UTF-8 byte ranges.

@kit-code-agent kit-code-agent 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.

The replacement misinterprets matcher byte offsets as character indices and drops the previous backend's non-Git directory exclusions, causing incorrect highlights and unnecessarily broad workspace scans.

Comment thread src/file_search.rs Outdated
Comment thread src/file_search.rs
@danielkov
danielkov enabled auto-merge (squash) September 4, 2026 22:29
kit-code-agent[bot]
kit-code-agent Bot previously approved these changes Sep 4, 2026

@kit-code-agent kit-code-agent 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.

No issues found. The changes look good to merge.

@kit-code-agent kit-code-agent 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.

No issues found. The changes look good to merge.

@danielkov
danielkov merged commit 0655b06 into main Sep 4, 2026
3 checks passed
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.

1 participant