From 62f512adb5dee1fe8299b8239756142d9db1e930 Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 21:37:42 +0000 Subject: [PATCH] Open new remote projects in the same window via sidebar (#53654) (cherry-pick to preview) (#53656) Cherry-pick of #53654 to preview ---- Previously, when opening a remote project via the sidebar, and picking a new project path via the path picker, it would incorrectly open in a new window. Release Notes: - N/A Co-authored-by: Max Brunsfeld --- crates/recent_projects/src/remote_servers.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crates/recent_projects/src/remote_servers.rs b/crates/recent_projects/src/remote_servers.rs index 7db09c88616879010352cbc2ac0fd0549982240b..97ba0ccbf10718418f8747313521a253220a4b9d 100644 --- a/crates/recent_projects/src/remote_servers.rs +++ b/crates/recent_projects/src/remote_servers.rs @@ -488,18 +488,21 @@ impl ProjectPicker { }) .log_err(); - let options = cx - .update(|_, cx| (app_state.build_window_options)(None, cx)) - .log_err()?; - let window = cx - .open_window(options, |window, cx| { + let window = if create_new_window { + let options = cx + .update(|_, cx| (app_state.build_window_options)(None, cx)) + .log_err()?; + cx.open_window(options, |window, cx| { let workspace = cx.new(|cx| { telemetry::event!("SSH Project Created"); Workspace::new(None, project.clone(), app_state.clone(), window, cx) }); cx.new(|cx| MultiWorkspace::new(workspace, window, cx)) }) - .log_err()?; + .log_err() + } else { + cx.window_handle().downcast::() + }?; let items = open_remote_project_with_existing_connection( connection, project, paths, app_state, window, cx,