### Context This fixes a bug where the sidebar would show a newly created git worktree thread as its own project while the recently created workspace is loading its git state. The fix is adding project APIs to await the initial worktree store scan and then each git repo initial snapshot; then awaiting on them before adding the new workspace to the multi-workspace. ### Architecture: I added the `Worktree::Remote::wait_for_snapshot` API to `Worktree::Local` to enable `WorktreeStore` to await for both remote and local projects until there's an initial scan. The `WorktreeStore` uses the watcher pattern so it can update the initial scan state whenever visible worktrees are added or removed from the store. Before you mark this PR as ready for review, make sure that you have: - [x] Added solid test coverage and/or screenshots from doing manual testing - [x] Done a self-review taking into account security and performance aspects - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - N/A --------- Co-authored-by: Ben Kunkle <ben@zed.dev> Co-authored-by: cameron <cameron.studdstreet@gmail.com> Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
7 files changedLine totals unavailable