Collect main worktree paths on threads, and query them in the sidebar (#52945)

This PR has us collecting the main worktree path metadata for the
sidebar, allows us to query by that path, and in the interim adds in
logic for querying the main worktree paths. This means that, as this
change percolates, there shouldn't be much difference between opening a
workspace to a linked worktree, and opening a workspace to the main
worktree.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
20368bae44Mikayla Maki committed on 4/2/2026, 1:28:50 AM· committed by GitHubparent3941f44
4 files changedLine totals unavailable