Skip to content

recent_projects: Connect on Enter from a remote host header#60171

Open
aanyberg wants to merge 1 commit into
zed-industries:mainfrom
aanyberg:feat/remote-host-enter-connect
Open

recent_projects: Connect on Enter from a remote host header#60171
aanyberg wants to merge 1 commit into
zed-industries:mainfrom
aanyberg:feat/remote-host-enter-connect

Conversation

@aanyberg

Copy link
Copy Markdown

The host header row was inert, so searching for a host and pressing Enter did nothing - users had to arrow down to the "Open Folder" row. Make the header a selectable confirm target that connects and opens the remote folder chooser, mirroring "Open Folder". Both paths now share a single open_folder_for_server helper, and the footer shows an "Open Folder" button when a header is selected.

Objective

In the remote server picker, searching for a host and pressing Enter did nothing — the host header row was inert, so users had to arrow down to the "Open Folder" row to connect. This makes the header row behave like a real confirm target.

Solution

  • RemoteMatch::ServerHeader is now selectable (is_selectable only excludes Separator), so search + Enter lands on it and confirm connects.
  • Extracted a shared RemoteServerPickerDelegate::open_folder_for_server helper (via a small FolderConnectTarget enum) so both the header row and the existing "Open Folder" row drive the exact same connect-and-open-folder flow - persisted SSH connections reuse their ServerIndex, and ssh-config-only hosts are first persisted via create_host_from_ssh_config.
  • The header row now renders a selected/highlighted background state, and the footer shows an "Open Folder" confirm button when a header row is selected.

Testing

  • Added unit tests covering RemoteMatch::is_selectable and folder_connect_target's routing for persisted vs. ssh-config-only entries.
  • Added gpui::tests verifying that searching a host selects its header (not a stale project row beneath it) and that an ssh-config-only host's header is selectable and followed by its "Open Folder" row.
  • Ran cargo test -p recent_projects --lib remote_servers - all 19 tests pass.
  • Manually verified: open the remote server picker, type part of a host name, press Enter — it now connects and opens the folder picker instead of being a no-op.

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content adheres to Zed's UI standards (UX/UI and icon guidelines)
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Showcase

Click to view showcase zed-enter-remote-host

Release Notes:

  • Fixed pressing Enter on a remote host search result doing nothing instead of connecting

@cla-bot

cla-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @aanyberg on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jun 30, 2026
@aanyberg

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 30, 2026
@cla-bot

cla-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@maxdeviant maxdeviant changed the title workspace: recent_projects - Connect on Enter from a remote host header recent_projects: Connect on Enter from a remote host header Jul 1, 2026
@SomeoneToIgnore SomeoneToIgnore added platform:remote Remote development, SSH and zed-remote-server area:pickers Everything related to pickers that are in a modal labels Jul 1, 2026
The host header row was inert, so searching for a host and pressing Enter
did nothing - users had to arrow down to the "Open Folder" row. Make the
header a selectable confirm target that connects and opens the remote folder
chooser, mirroring "Open Folder". Both paths now share a single
open_folder_for_server helper, and the footer shows an "Open Folder" button when a header is
selected.
@aanyberg
aanyberg force-pushed the feat/remote-host-enter-connect branch from 40688d1 to d0dd79b Compare July 17, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:pickers Everything related to pickers that are in a modal cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions platform:remote Remote development, SSH and zed-remote-server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants