Skip git worktree removal when archiving threads on main worktrees (#53629)

When archiving a thread that lives on a main worktree (not a linked
worktree), `build_root_plan` was still returning a `RootPlan`, which
caused the archive flow to call `git worktree remove` on the main
working tree. Git rightfully refuses this with:

```
fatal: '/Users/rtfeldman/code/zed' is a main working tree
```

This fix makes `build_root_plan` return `None` for non-linked worktrees,
so the archive-to-disk machinery is simply skipped. The thread is marked
archived in the metadata store and can be unarchived later — no git
operations needed.

Since `build_root_plan` now guarantees a linked worktree when it returns
`Some`, `RootPlan::worktree_repo` is tightened from
`Option<Entity<Repository>>` to `Entity<Repository>`, removing the
fallback codepath and the `is_some()` guard in `archive_worktree_roots`.

Release Notes:

- Fixed a crash when archiving an agent thread that was opened on the
main project (not a linked git worktree).
5f2373b7b1Richard Feldman committed on 4/13/2026, 8:34:36 PM· committed by GitHubparent1150c9d
2 files changedLine totals unavailable