Skip to content

fix(search): use filesystem search for non-Git folders - #2950

Merged
wgqqqqq merged 1 commit into
GCWing:mainfrom
wgqqqqq:wgq/fix-non-git-content-search
Sep 10, 2026
Merged

fix(search): use filesystem search for non-Git folders#2950
wgqqqqq merged 1 commit into
GCWing:mainfrom
wgqqqqq:wgq/fix-non-git-content-search

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

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:rs and git diff --check — passed.
  • Regression coverage: ordinary folders, unborn repositories, committed repositories, nested directories, linked worktrees, bare repositories, and actual filesystem content matches in ordinary/unborn folders.

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

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@wgqqqqq
wgqqqqq merged commit 21549a4 into GCWing:main Sep 10, 2026
13 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