Commit graph

6 commits

Author SHA1 Message Date
Anthony Eid
302e591e3d
agent: Fix find_or_create repository to support remote (#54074)
### Summary

Follow up to: https://github.com/zed-industries/zed/pull/54001

This PR makes
`agent_ui::thread_worktree_archive::find_or_create_repository` whether
or not the repository it's searching for is on a remote machine. In the
case where it's on a remote machine that has an active connection in
Zed's connection pool, we return the repository; otherwise, we error
out.

I implemented it this way so archiving a thread on a remote machine that
isn't connected deletes the metadata without showing a remote connection
modal to a user. In the future, we can work around this by having better
git worktree garbage collection, where remote machines remove git
worktree's that were created by Zed and have no thread metadata on
connection too.

Finally, this PR gets archive threads working on remotes!


#### Follow Ups 

1. Replace instances of `std::fs` with Zed's Fs trait in the archive
thread codepaths
2. Make archive thread work properly for workspace's that are not open
(local and remote)

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 is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-04-16 16:36:09 -07:00
Eric Holk
f1d9afff66
Dismiss stale remote connection modal when switching back to local workspace (#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.
2026-04-10 02:22:55 +00:00
Eric Holk
d812adc833
sidebar: Better handling for threads in remote workspaces (#53451)
This PR greatly improves our handling of remote threads in the sidebar.

One primary issue was that many parts of the sidebar were only looking
at a thread's path list and not its remote connection information. The
fix here is to use `ProjectGroupKey` more consistently throughout the
sidebar which also includes remote connection information.

The second major change is to extend the MultiWorkspace with the ability
to initiate the creation of remote workspaces when needed. This involved
refactoring a lot of our remote workspace creation paths to share a
single code path for better consistency.

Release Notes:

- (Preview only) Fixed remote project threads appearing as a separate
local project in the sidebar

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-04-09 06:56:28 +00:00
Piotr Osiewicz
93e641166d
theme: Split out theme_settings crate (#52569)
Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
2026-03-27 14:41:25 +01:00
Xiaobo Liu
4add7819dc
remote_connection: Add visibility toggle to password prompt (#52297)
This adds an eye icon button to the right of the password input field
when connecting to a remote device, allowing users to toggle the
visibility of the typed password. The toggle defaults to masked and only
appears for actual password prompts, avoiding yes/no confirmations.

After modification, an eye button has been added:


https://github.com/user-attachments/assets/76fb5a89-0aa3-4017-b050-d6bb9c2ad4a8

--- 

Release Notes:

- Added a toggle to control password visibility when connecting to a
remote project.

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-24 11:13:53 -03:00
Piotr Osiewicz
e99c11dee6
build: Decouple git_ui from recent_projects (#48062)
- **git_ui: Decouple git_ui from the recent_projects crate**
- **Move git_ui closer to editor**

Release Notes:

- N/A
2026-02-02 13:30:07 +01:00