Skip to content

Dismiss stale remote connection modal when switching back to local workspace#53575

Merged
eholk merged 1 commit intomainfrom
tidy-tide
Apr 10, 2026
Merged

Dismiss stale remote connection modal when switching back to local workspace#53575
eholk merged 1 commit intomainfrom
tidy-tide

Conversation

@eholk
Copy link
Copy Markdown
Contributor

@eholk eholk commented Apr 9, 2026

When the sidebar opens a remote SSH project, it shows a RemoteConnectionModal on the currently active (local) workspace. After the connection succeeds and a new remote workspace is created and activated, the modal on the local workspace was never dismissed. Switching back to the local workspace (e.g. by activating a thread) would re-render the local workspace's modal layer, revealing the stale "Starting proxy..." modal.

Other code paths that show this modal (recent_projects, git_ui) already call modal.finished(cx) after the connection completes. The sidebar and agent panel paths were missing this cleanup.

Changes

  • remote_connection: Added dismiss_connection_modal(), a public utility that finds and dismisses any active RemoteConnectionModal on a given workspace.
  • sidebar: Fixed two call sites (open_workspace_for_group and open_workspace_and_activate_thread) to dismiss the modal after the connection task completes, regardless of success or failure.
  • agent_ui: Fixed open_worktree_workspace_and_start_thread to dismiss the modal after workspace creation completes.

Release Notes:

  • (Preview only) Fixed a spurious "Starting proxy..." modal appearing and hanging when switching back to a local project after opening a remote SSH project in a multi-project workspace.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Apr 9, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Apr 9, 2026
@eholk eholk enabled auto-merge (squash) April 10, 2026 00:39
@eholk eholk merged commit f1d9aff into main Apr 10, 2026
62 of 64 checks passed
@eholk eholk deleted the tidy-tide branch April 10, 2026 02:22
rtfeldman pushed a commit that referenced this pull request Apr 10, 2026
…rkspace (#53575)

When the sidebar opens a remote SSH project, it shows a
`RemoteConnectionModal` on the currently active (local) workspace. After
the connection succeeds and a new remote workspace is created and
activated, the modal on the local workspace was never dismissed.
Switching back to the local workspace (e.g. by activating a thread)
would re-render the local workspace's modal layer, revealing the stale
"Starting proxy..." modal.

Other code paths that show this modal (`recent_projects`, `git_ui`)
already call `modal.finished(cx)` after the connection completes. The
sidebar and agent panel paths were missing this cleanup.

## Changes

- **`remote_connection`**: Added `dismiss_connection_modal()`, a public
utility that finds and dismisses any active `RemoteConnectionModal` on a
given workspace.
- **`sidebar`**: Fixed two call sites (`open_workspace_for_group` and
`open_workspace_and_activate_thread`) to dismiss the modal after the
connection task completes, regardless of success or failure.
- **`agent_ui`**: Fixed `open_worktree_workspace_and_start_thread` to
dismiss the modal after workspace creation completes.

Release Notes:

- (Preview only) Fixed a spurious "Starting proxy..." modal appearing
and hanging when switching back to a local project after opening a
remote SSH project in a multi-project workspace.
rtfeldman pushed a commit that referenced this pull request Apr 10, 2026
…rkspace (#53575)

When the sidebar opens a remote SSH project, it shows a
`RemoteConnectionModal` on the currently active (local) workspace. After
the connection succeeds and a new remote workspace is created and
activated, the modal on the local workspace was never dismissed.
Switching back to the local workspace (e.g. by activating a thread)
would re-render the local workspace's modal layer, revealing the stale
"Starting proxy..." modal.

Other code paths that show this modal (`recent_projects`, `git_ui`)
already call `modal.finished(cx)` after the connection completes. The
sidebar and agent panel paths were missing this cleanup.

## Changes

- **`remote_connection`**: Added `dismiss_connection_modal()`, a public
utility that finds and dismisses any active `RemoteConnectionModal` on a
given workspace.
- **`sidebar`**: Fixed two call sites (`open_workspace_for_group` and
`open_workspace_and_activate_thread`) to dismiss the modal after the
connection task completes, regardless of success or failure.
- **`agent_ui`**: Fixed `open_worktree_workspace_and_start_thread` to
dismiss the modal after workspace creation completes.

Release Notes:

- (Preview only) Fixed a spurious "Starting proxy..." modal appearing
and hanging when switching back to a local project after opening a
remote SSH project in a multi-project workspace.
maxbrunsfeld pushed a commit that referenced this pull request Apr 10, 2026
…rkspace (#53575)

When the sidebar opens a remote SSH project, it shows a
`RemoteConnectionModal` on the currently active (local) workspace. After
the connection succeeds and a new remote workspace is created and
activated, the modal on the local workspace was never dismissed.
Switching back to the local workspace (e.g. by activating a thread)
would re-render the local workspace's modal layer, revealing the stale
"Starting proxy..." modal.

Other code paths that show this modal (`recent_projects`, `git_ui`)
already call `modal.finished(cx)` after the connection completes. The
sidebar and agent panel paths were missing this cleanup.

## Changes

- **`remote_connection`**: Added `dismiss_connection_modal()`, a public
utility that finds and dismisses any active `RemoteConnectionModal` on a
given workspace.
- **`sidebar`**: Fixed two call sites (`open_workspace_for_group` and
`open_workspace_and_activate_thread`) to dismiss the modal after the
connection task completes, regardless of success or failure.
- **`agent_ui`**: Fixed `open_worktree_workspace_and_start_thread` to
dismiss the modal after workspace creation completes.

Release Notes:

- (Preview only) Fixed a spurious "Starting proxy..." modal appearing
and hanging when switching back to a local project after opening a
remote SSH project in a multi-project workspace.
maxbrunsfeld added a commit that referenced this pull request Apr 10, 2026
Cherry-picked PRs (in order applied):

1. #53386
2. #53400
3. #53396
4. #53428
5. #53356
6. #53215
7. #53429
8. #53458
9. #53436
10. #53451
11. #53454
12. #53419
13. #53287
14. #53521
15. #53463
16. #52848
17. #53544
18. #53556
19. #53566
20. #53579
21. #53575
22. #53550
23. #53585
24. #53510
25. #53599
26. #53099
27. #53662
28. #53660
29. #53657
30. #53654


Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Cameron Mcloughlin <cameron.studdstreet@gmail.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Katie Geer <katie@zed.dev>
Co-authored-by: ojpro <contact@ojpro.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants