### Summary This PR is the first step in improving Zed's error handling when a user opens an old thread that's associated with a deleted git worktree. Before, the thread would open in an empty project with a broken state. This PR instead opens the thread in the workspace associated with the thread’s main git worktree when available. ### Follow ups 1. Implement remote support for this fallback 2. Update `ThreadMetadataStore` database to set paths from deleted worktree to the main worktree 3. If the main git worktree is deleted as well, fallback to the currently active workspace 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 Closes #ISSUE Release Notes: - N/A
6 files changedLine totals unavailable