Files
zed/crates/recent_projects
Richard Feldman 685565a8d4 Fix crash when fallback workspace is in the removal set (#53549)
When removing a project group, the fallback closure calls
`find_or_create_local_workspace` which searches `self.workspaces` for an
existing match. Because the workspaces to be removed haven't been
removed yet at that point, `workspace_for_paths` can return a doomed
workspace, hitting the `assert!` in `MultiWorkspace::remove` and
crashing the app.

Fix by adding an `excluding` parameter to
`find_or_create_local_workspace` so callers inside removal fallbacks can
skip workspaces that are about to be removed. Both
`remove_project_group` and `sidebar::archive_thread` now pass the
appropriate exclusion set.

Adds a regression test that deterministically reproduces the crash (the
assert fires without the exclusion, passes with it).

Release Notes:

- Fixed a crash when closing a project group whose fallback workspace
matched one being removed.
2026-04-13 16:30:38 -04:00
..