fix(search): use filesystem search for non-Git folders - #2950
Merged
Conversation
3 tasks
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
Fix content search in ordinary folders such as Downloads when Flashgrep is enabled. Check the local Git worktree/HEAD prerequisite before selecting indexed search, so ordinary folders and repositories without a first commit use the existing filesystem content search.
Type and Areas
Type: Bug fix
Areas: Desktop/Tauri search routing, workspace-search integration, regression tests
Motivation / Impact
Previously the file manager sent these folders to Flashgrep and displayed a protocol error requiring a Git worktree with a HEAD commit. The shared availability check now covers all three desktop content-search entry points and index actions. The probe reuses existing Git discovery on a blocking worker without starting a daemon or counting files.
Verification
cargo test --locked -p openbitfun-services-integrations --no-default-features --features workspace-search --test workspace_search_contracts— 5 passed; 1 existing live-daemon test ignored.cargo test --locked -p openbitfun-desktop --lib api::search_api::tests— 3 passed.pnpm run fmt:rsandgit diff --check— passed.Reviewer Notes
AI-assisted; testing level: focused automated tests. No manual desktop UI verification. Remote workspace, remote control, Peer Device Mode, and Detached Dispatch were not exercised end to end. Remote-path refusal still runs before the local probe; its refusal-message test passes. No persisted shapes or wire contracts change.
Checklist