From 5f857ffbb128201926c0490bb09af582978039fe Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Fri, 10 Oct 2025 12:07:35 -0400 Subject: [PATCH] Fix menu navigation in remote projects modal (#39965) Previously we were always adding a `Navigable` entry for the "new WSL connection" option in this modal, even though we don't have the corresponding button on non-Windows. This was causing `menu::SelectNext` to behave incorrectly (focusing the center pane instead) when `Connect New Server` was selected on macOS and Linux. Release Notes: - Fixed a bug with keyboard navigation in the remote project modal. --- crates/recent_projects/src/remote_servers.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/recent_projects/src/remote_servers.rs b/crates/recent_projects/src/remote_servers.rs index cf03d226986c2a8e79f630eff430baf9206985ce..7a144308f938c70134ba58eddef235902f9a0933 100644 --- a/crates/recent_projects/src/remote_servers.rs +++ b/crates/recent_projects/src/remote_servers.rs @@ -2030,8 +2030,11 @@ impl RemoteServerProjects { ) .into_any_element(), ) - .entry(state.add_new_server.clone()) - .entry(state.add_new_wsl.clone()); + .entry(state.add_new_server.clone()); + + if cfg!(target_os = "windows") { + modal_section = modal_section.entry(state.add_new_wsl.clone()); + } for server in &state.servers { match server {