Wait for worktree scan to complete before starting search (#54534)

When starting a search on a project that is in the middle of a scan, we
used to miss results in files that had not yet been scanned.

This change makes the search wait for the scan to complete.


Closes #9858

Release Notes:

- Fixed incomplete search results when the project scan is incomplete
5294e16547Oleksiy Syvokon committed on 4/23/2026, 1:35:13 PM· committed by GitHubparent3409a84
6 files changedLine totals unavailable