Ben Kunkle
4aad57fd1f
workspace: Return the created workspace when opening a remote project ( #62028 )
...
# Objective
Fix the `fallback workspace must not be one of the workspaces being
removed` panic.
Fixes FR-148
Fixes ZED-AKR
Fixes ZED-97M
# Solution
The remote path of `find_or_create_workspace` opened a project, then
returned the
window's *active* workspace instead of the one it created. The open
awaits toolchain
loading and item restoration, and a save prompt from a concurrent
workspace removal
can re-activate a workspace being removed during that wait; the stale
return value
then trips the assert in `MultiWorkspace::remove`.
Return the created workspace from `open_remote_project_inner` and use it
at the
call sites instead of re-reading the active workspace after the await.
# Testing
Added
`test_find_or_create_workspace_returns_the_created_remote_workspace`:
opens a
mock remote project and re-activates the previous workspace mid-open
(standing in
for the save prompt), then asserts the open returns the workspace it
created.
Verified it fails against the pre-fix behavior.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist )
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md )
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
---
Release Notes:
- Fixed a crash when a workspace was removed while a remote project was
opening in the same window.
2026-08-03 20:43:45 +00:00
..
2026-07-31 19:57:13 +00:00
2026-06-22 09:04:29 +00:00
2026-07-31 19:57:13 +00:00
2026-07-13 16:37:28 +00:00
2026-08-03 11:53:30 +00:00
2026-07-27 11:30:39 +00:00
2026-07-29 13:03:22 +00:00
2026-06-08 14:57:47 +00:00
2026-08-03 14:47:45 +00:00
2026-06-18 20:51:36 +00:00
2026-07-27 12:07:31 +00:00
2026-07-20 16:14:26 +00:00
2026-06-05 16:49:42 +00:00
2026-07-07 10:23:28 +00:00
2026-05-01 22:33:54 +00:00
2026-06-07 16:55:18 +00:00
2026-07-27 15:59:19 +00:00
2026-06-18 02:47:10 +00:00
2026-06-01 04:40:13 +00:00
2026-07-31 19:57:13 +00:00
2026-07-28 16:56:55 +00:00
2026-06-29 20:21:46 +00:00
2026-07-18 19:56:01 +00:00
2026-07-23 22:46:06 +00:00
2026-07-21 13:20:31 +00:00
2026-07-30 14:55:00 +00:00
2026-07-15 13:14:36 +00:00
2026-07-06 22:12:33 +00:00
2026-07-25 03:39:45 +00:00
2026-07-29 20:58:08 +00:00
2026-06-05 10:32:57 +00:00
2026-07-21 09:13:56 +00:00
2026-06-05 10:32:57 +00:00
2026-05-29 07:06:57 +00:00
2026-06-15 03:26:51 +00:00
2026-07-29 10:46:31 +00:00
2026-07-30 10:34:16 +00:00
2026-07-30 10:34:16 +00:00
2026-07-30 10:34:16 +00:00
2026-07-14 21:47:47 +00:00
2026-04-02 17:06:57 -03:00
2026-07-26 10:27:23 +00:00
2026-06-15 10:55:39 +00:00
2026-04-29 10:27:47 +00:00
2026-04-24 10:29:51 +00:00
2026-05-13 23:35:10 +00:00
2026-07-23 11:22:43 +00:00
2026-06-02 13:29:23 +00:00
2026-07-31 08:53:21 +00:00
2026-07-13 16:37:28 +00:00
2026-07-08 20:54:51 +00:00
2026-07-31 09:53:28 +00:00
2026-07-08 12:36:29 +00:00
2026-07-15 08:33:25 +00:00
2026-07-18 18:48:49 +00:00
2026-07-15 13:14:36 +00:00
2026-07-31 19:57:13 +00:00
2026-08-03 01:46:00 +00:00
2026-06-05 19:24:28 +00:00
2026-07-13 16:37:28 +00:00
2026-04-07 12:28:19 -03:00
2026-06-29 15:58:53 +00:00
2026-07-23 11:22:43 +00:00
2026-07-10 11:51:16 +00:00
2026-07-14 15:02:41 +00:00
2026-07-23 11:22:43 +00:00
2026-07-30 14:55:00 +00:00
2026-08-03 15:36:02 +00:00
2026-04-18 06:34:19 +00:00
2026-05-04 06:30:47 +00:00
2026-08-01 19:42:37 +00:00
2026-07-31 19:57:13 +00:00
2026-07-30 13:24:19 +00:00
2026-07-30 12:59:16 +00:00
2026-07-31 19:57:13 +00:00
2026-06-15 08:48:19 +00:00
2026-08-01 19:42:37 +00:00
2026-08-01 19:42:37 +00:00
2026-07-29 12:49:46 +00:00
2026-07-27 12:07:31 +00:00
2026-08-03 14:37:21 +00:00
2026-07-31 10:29:47 +00:00
2026-08-03 14:37:21 +00:00
2026-07-08 15:52:48 +00:00
2026-07-28 13:32:52 +00:00
2026-04-24 08:58:26 +00:00
2026-06-16 13:47:55 +00:00
2026-07-30 12:59:16 +00:00
2026-07-29 06:41:29 +00:00
2026-08-03 14:37:21 +00:00
2026-08-03 14:37:21 +00:00
2026-07-30 21:16:10 +00:00
2026-07-20 13:21:18 +00:00
2026-07-14 15:29:30 +00:00
2026-07-31 15:06:40 +00:00
2026-07-31 19:57:13 +00:00
2026-07-26 01:19:29 +00:00
2026-06-12 12:27:28 +00:00
2026-06-22 18:20:57 +00:00
2026-05-05 22:41:13 +00:00
2026-06-25 17:30:12 +00:00
2026-07-14 10:07:58 +00:00
2026-07-30 18:14:58 +00:00
2026-07-23 11:22:43 +00:00
2026-07-23 11:22:43 +00:00
2026-07-24 16:53:45 +00:00
2026-07-24 16:53:45 +00:00
2026-07-31 15:06:40 +00:00
2026-07-24 16:53:45 +00:00
2026-03-25 12:07:34 -06:00
2026-07-23 11:22:43 +00:00
2026-07-23 11:22:43 +00:00
2026-07-30 21:16:10 +00:00
2026-07-13 16:37:28 +00:00
2026-07-03 09:50:42 +00:00
2026-07-28 16:56:55 +00:00
2026-06-29 13:24:33 +00:00
2026-07-10 15:32:21 +00:00
2026-07-18 08:04:17 +00:00
2026-07-15 14:36:43 +00:00
2026-07-30 16:30:13 +00:00
2026-07-30 16:30:13 +00:00
2026-07-21 07:58:16 +00:00
2026-06-22 15:42:12 +00:00
2026-07-14 15:02:41 +00:00
2026-06-02 12:03:05 +00:00
2026-07-21 14:51:27 +00:00
2026-07-31 19:57:13 +00:00
2026-07-29 15:16:39 +00:00
2026-05-29 07:06:57 +00:00
2026-05-14 21:03:56 +00:00
2026-06-23 09:21:31 +00:00
2026-07-24 07:54:03 +00:00
2026-07-24 16:53:45 +00:00
2026-08-01 19:42:37 +00:00
2026-06-23 23:01:58 +00:00
2026-07-28 14:17:18 +00:00
2026-07-13 12:13:49 +00:00
2026-07-17 11:41:08 +00:00
2026-07-31 19:57:13 +00:00
2026-05-12 15:52:52 +00:00
2026-07-31 06:41:53 +00:00
2026-07-15 08:33:25 +00:00
2026-07-22 08:42:34 +00:00
2026-07-14 17:18:23 +00:00
2026-07-31 06:38:08 +00:00
2026-06-13 05:21:05 +00:00
2026-08-03 20:33:31 +00:00
2026-05-05 22:41:13 +00:00
2026-08-01 19:42:37 +00:00
2026-07-23 11:22:43 +00:00
2026-06-05 19:46:05 +00:00
2026-07-31 19:57:13 +00:00
2026-07-23 22:46:06 +00:00
2026-08-03 20:43:45 +00:00
2026-07-27 18:20:35 +00:00
2026-08-02 09:09:11 +00:00
2026-04-16 16:36:09 -07:00
2026-07-24 15:34:17 +00:00
2026-07-29 23:23:41 +00:00
2026-07-28 03:16:10 +00:00
2026-05-27 10:31:53 +00:00
2026-07-16 09:41:21 +00:00
2026-08-03 11:53:30 +00:00
2026-07-29 06:41:29 +00:00
2026-07-29 20:59:24 +00:00
2026-08-01 19:42:37 +00:00
2026-07-07 11:48:14 +00:00
2026-08-03 01:46:00 +00:00
2026-08-03 01:46:00 +00:00
2026-07-14 15:02:41 +00:00
2026-06-23 09:33:47 +00:00
2026-08-03 01:46:00 +00:00
2026-05-05 16:25:56 +00:00
2026-08-03 20:43:45 +00:00
2026-07-20 11:17:43 +00:00
2026-04-29 10:27:47 +00:00
2026-07-23 04:49:39 +00:00
2026-04-24 10:29:51 +00:00
2026-05-27 19:33:04 +00:00
2026-05-27 10:31:53 +00:00
2026-07-20 04:08:28 +00:00
2026-03-31 08:06:37 -06:00
2026-05-04 06:30:47 +00:00
2026-07-31 19:57:13 +00:00
2026-07-28 11:51:44 +00:00
2026-07-23 11:22:43 +00:00
2026-07-23 03:47:47 +00:00
2026-07-31 08:56:46 +00:00
2026-07-19 05:36:35 +00:00
2026-07-01 17:36:23 +00:00
2026-03-27 14:41:25 +01:00
2026-07-29 20:59:24 +00:00
2026-06-23 09:33:47 +00:00
2026-07-29 20:59:24 +00:00
2026-05-28 19:43:30 +00:00
2026-08-01 19:42:37 +00:00
2026-07-13 16:37:28 +00:00
2026-07-30 16:30:13 +00:00
2026-07-01 04:25:40 +00:00
2026-05-29 07:06:57 +00:00
2026-06-08 14:59:39 +00:00
2026-07-31 06:41:53 +00:00
2026-07-30 10:41:17 +00:00
2026-03-19 12:53:26 -04:00
2026-05-27 10:31:53 +00:00
2026-06-09 12:06:49 +00:00
2026-03-27 14:41:25 +01:00
2026-05-01 22:33:54 +00:00
2026-08-03 20:43:45 +00:00
2026-07-29 10:22:08 +00:00
2026-05-29 16:28:27 +00:00
2026-08-01 19:42:37 +00:00
2026-08-01 19:42:37 +00:00
2026-04-02 17:06:57 -03:00
2026-04-02 17:06:57 -03:00
2026-07-18 18:48:49 +00:00
2026-07-01 15:18:54 +00:00
2026-05-28 20:19:17 +00:00
2026-05-28 20:19:17 +00:00