Group threads by canonical path lists (#52524)

## Context

With the new sidebar, we are having some bugs around multi-root projects
combined with git work trees that can cause threads to be visible in the
agent panel but not have an entry in the sidebar.

## How to Review

This PR takes a step towards resolving these issue by adding a
`ProjectGroupBuilder` which is responsible for gathering the set of
projects groups from the open workspaces and then helping to discover
threads and map them into this set.

## Self-Review Checklist

<!-- Check before requesting review: -->
- [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

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Max Brunsfeld <max@zed.dev>
d77aba3ee7Eric Holk committed on 3/27/2026, 12:11:14 AM· committed by GitHubparent1625f98
2 files changedLine totals unavailable