1bc0e23
sidebar: Add adjustments to project header (#53891)
Click to expand commit body
- Change design a bit so that the separation between projects is clearer
- Add ability to cmd-click to focus most recent workspace
- Make hover and collapse/expand interactions unconditional, enabled by
adding a "No threads yet" empty state
- Improved keyboard nav by making cmd-n create a new thread in the
currently focused group
https://github.com/user-attachments/assets/e9cde153-d3f1-4945-9e45-db1597637a44
Release Notes:
- Agent: Improved the threads sidebar header by making the separation
between projects more distinct.
Danilo Leal
created
11edacf
cli: Defer app activation until after open-behavior prompt (#53915)
Click to expand commit body
On macOS, the CLI uses `LSOpenFromURLSpec` to deliver the `zed-cli://`
URL to the running Zed app. With `kLSLaunchDefaults`, Launch Services
activates (brings to foreground) the Zed app as a side effect of URL
delivery. This happens before the IPC handshake completes and before the
user can answer the terminal prompt asking whether to open in a new
window or existing workspace, forcing them to manually switch back to
the terminal.
## Fix
**CLI side** (`crates/cli/src/main.rs`): Add `kLSLaunchDontSwitch` to
the launch flags so macOS delivers the URL without activating the app.
**App side** (`crates/zed/src/zed/open_listener.rs`): Add
`cx.activate(true)` in `handle_cli_connection` after the prompt resolves
(or immediately for the URL-only path), so the app comes to the
foreground at the right time.
Linux and Windows are unaffected — they use Unix sockets and named pipes
respectively, which don't have activation side effects.
Release Notes:
- Fixed the Zed CLI activating the app window before the user answers
the open-behavior prompt in the terminal.
Eric Holk
created
c8b3da6
recent_projects: Fix clipping branch and project name (#53906)
Click to expand commit body
Just fixing an issue where the project and branch labels weren't
truncating in the project popover.
<img width="600" height="1054" alt="Screenshot 2026-04-14 at 11 49@2x"
src="https://github.com/user-attachments/assets/eefa5027-34cd-41da-9590-cb12a89cdb51"
/>
Release Notes:
- N/A
Danilo Leal
created
eed33ab
sidebar: Fallback to main git worktree path when opening thread in deleted git worktree (#53899)
Click to expand commit body
### Summary
This PR is the first step in improving Zed's error handling when a user
opens an old thread that's associated with a deleted git worktree.
Before, the thread would open in an empty project with a broken state.
This PR instead opens the thread in the workspace associated with the
thread’s main git worktree when available.
### Follow ups
1. Implement remote support for this fallback
2. Update `ThreadMetadataStore` database to set paths from deleted
worktree to the main worktree
3. If the main git worktree is deleted as well, fallback to the
currently active workspace
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
Closes #ISSUE
Release Notes:
- N/A
Anthony Eid
created
101083e
gpui_tokio: Use shutdown_background to avoid WASI panic on exit (#53904)
Click to expand commit body
When the Tokio runtime is dropped during Zed shutdown, it drives all
spawned tasks to cancellation by polling them one last time. The
`wasmtime-wasi` crate wraps child task `JoinHandle`s in an
`AbortOnDropJoinHandle` whose `Future::poll` calls `.expect("child task
panicked")` on the join result — but Tokio can also return
`JoinError::Cancelled` (not just panics), causing the expect to panic
with:
```
child task panicked: JoinError::Cancelled(Id(45))
```
This showed up as Sentry issue ZED-69A (106 events, 85 users, 100%
Windows, stable channel).
The fix is to explicitly call `shutdown_background()` on the owned Tokio
runtime during `GlobalTokio::drop`, which immediately drops all spawned
tasks without polling them again, avoiding the wasmtime-wasi panic path
entirely.
Release Notes:
- Fixed a crash on exit caused by the Tokio runtime shutdown triggering
a panic in extension WASI tasks (Windows).
Richard Feldman
created
da6ac6c
workspace: Add separate "format and save" action (#53710)
Click to expand commit body
Release Notes:
- Added `workspace: format and save` action which always formats,
regardless of settings
Cameron Mcloughlin
created
01fb476
client: Don't override organization plans with personal plan (#53842)
Click to expand commit body
This PR makes it so we don't override organization plans with the user's
personal plan.
If an organization is selected and does not have a plan, we want to
return `None` for the plan.
Closes CLO-655.
Release Notes:
- N/A
Closes #30644
Many X11 environments expect a window icon to be supplied [as pixel data
on a window property
`_NET_WM_ICON`](https://specifications.freedesktop.org/wm-spec/1.4/ar01s05.html#id-1.6.13).
I confirmed this change fixes the icon in xfce4 for me, I think its
likely it also fixes https://github.com/zed-industries/zed/issues/37961
but I haven't tested it.
## Questions
* [`image::RgbaImage` is exposed to the public API of
gpui](https://github.com/zed-industries/zed/pull/40096/files#diff-318f166d72ad9476bd0a116446f5db3897fc1a4eb1d49aaf8105608bcf49ea53R1136).
I would guess this is undesirable, but I wasn't sure of the best way to
use gpui's native `Image` type..
* Currently [the icon is embedded into the
binary](https://github.com/zed-industries/zed/pull/40096/files#diff-89af0b4072205c53b518aa977d6be48997e1a51fa4dbf06c7ddd1fec99fc510eR101).
If this is undesirable, zed could alternatively implement [icon
lookup](https://specifications.freedesktop.org/icon-theme-spec/latest/#icon_lookup)
and try and find its icon from the system at runtime.
## Future work
* It might be nice to expose a `set_window_icon` method also (it could
be used for example to show dirty state in the icon somehow), but I'm
unfamiliar with what other platforms support and if this could be beyond
X11 (there is a [wayland
protocol](https://wayland.app/protocols/xdg-toplevel-icon-v1) though!).
Release Notes:
- Fixed missing window icon on X11
---------
Co-authored-by: Yara <git@yara.blue>
kitt
and
Yara
created
5c7325a
title_bar: Don't show a badge for organizations without a plan (#53841)
Click to expand commit body
This PR makes it so we don't show a plan badge for organizations that
don't have a plan.
Closes CLO-654.
Release Notes:
- N/A
Marshall Bowers
created
a49739e
sidebar: Consistent thread display time (#53887)
c49973d
sidebar: Always focus agent when selecting thread (#53892)
Cameron Mcloughlin
created
07e9a2d
acp: Use npm --prefix for registry npx agents (#53560)
Click to expand commit body
Because we weren't going through the normal npm subcommand route, we
weren't getting a prefix flag applied. Which meant some users were
seeing errors of incorrect package managers when used with a JS project.
We still want the agent to run in the project dir if we can, we just
don't want it resolving packages from that project. (This actually means
I can run it in our claude-agent-acp repo again :D )
I refactored the node_runtime functions a bit to make these subcommand
functions a bit more inline wiht each other and actually fixed an issue
where --prefix might have been added after `--` previously which
wouldn't be correct anyway.
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:
- acp: Fix npm-based agents resolving based on current project.
Ben Brandt
created
0a0da3f
agent_ui: Only allow editing when agent supports truncation (#53886)
Click to expand commit body
Follow up to #53850. #53850 fixed the panic, but had the side effect
that we would allow editing messages in the UI, even if the agent did
not support it.
Related #53735
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
Bennet Bo Fenner
created
7240593
agent_ui: Do not show notifications when sidebar is open (#53883)
Click to expand commit body
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: Gaauwe Rombouts <mail@grombouts.nl>
Bennet Bo Fenner
and
Gaauwe Rombouts
created
5688167
recent_projects: Fix worktree path resolving to bare repo in recent projects modal (#52996)
Click to expand commit body
## Context
When using a bare-repo-based git worktree layout (e.g. `foo/.bare` as
the bare repository and `foo/my-feature` as a linked worktree), the
"recent projects" modal was showing `foo/.bare` instead of
`foo/my-feature`.
The root cause was in `original_repo_path_from_common_dir` — when
resolving a linked worktree back to its "main" repo, the function reads
the `commondir` file which, for bare repos, points to the bare directory
itself (e.g. `foo/.bare`). Since that path doesn't end in `.git`, the
old code fell back to returning it as-is. This bare repo path was then
substituted into the workspace's stored paths, causing the modal to show
the bare directory instead of the actual worktree the user had opened.
The fix makes `original_repo_path_from_common_dir` return
`Option<PathBuf>`, returning `None` when `common_dir` doesn't end with
`.git`. `resolve_git_worktree_to_main_repo` propagates this `None`,
meaning the original worktree path is preserved in recent projects
rather than being replaced with the bare repo path.
Closes #52931
Video of the manual test after the fix is below :
[Screencast from 2026-04-02
16-05-48.webm](https://github.com/user-attachments/assets/9659c7a7-c095-4c23-af59-17715f84ce3e)
## How to Review
- **`crates/git/src/repository.rs`** :
`original_repo_path_from_common_dir` changed to return
`Option<PathBuf>`. Returns `None` for bare repos (no `.git` suffix). The
existing `original_repo_path` call site falls back to `work_directory`
when `None` is returned, preserving its prior behaviour. Unit test
expectations updated accordingly, with the bare-repo case now asserting
`None`.
- **`crates/project/src/git_store.rs`** :
`resolve_git_worktree_to_main_repo` now simply forwards the
`Option<PathBuf>` returned by `original_repo_path_from_common_dir`
directly, propagating `None` for bare repos so the caller keeps the
original worktree path.
- **`crates/workspace/src/persistence.rs`** : New test
`test_resolve_worktree_workspaces_bare_repo` exercises the exact
scenario from the issue: a workspace entry pointing to a linked worktree
whose `commondir` resolves to a bare repo. Asserts the path is left
unchanged.
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the UI/UX checklist
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fixed recent projects modal showing `.bare` folder instead of the
worktree directory for bare-repo-based git worktree setups
saberoueslati
created
8420716
anthropic: Preserve custom model thinking mode after thinking-toggle refactor (#52975)
Click to expand commit body
PR #51946 broke `Model::Custom` thinking behavior: `mode()`,
`supports_thinking()`, and `supports_adaptive_thinking()` all inferred
capabilities from hardcoded built-in model lists, so any `Custom`
variant always fell back to `Default` regardless of its configured
`mode` field.
### Fixes
- **`Model::mode()`** — `Custom` now short-circuits to `mode.clone()`
before the built-in inference logic
- **`Model::supports_thinking()`** — `Custom` returns `true` when `mode`
is `Thinking { .. }` or `AdaptiveThinking`
- **`Model::supports_adaptive_thinking()`** — `Custom` returns `true`
when `mode` is `AdaptiveThinking`
Built-in model behavior is unchanged.
### Tests
Three regression tests added covering the three `Custom` mode cases:
explicit `Thinking`, `AdaptiveThinking`, and `Default` (which must
disable both flags).
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] 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:
- Fixed custom Anthropic models losing their configured
thinking/adaptive-thinking mode after the thinking-toggle refactor
(#51946)
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
## Context
When using regex buffer search (e.g. `^something`), Zed correctly
navigates only to actual matches. However, navigating to a match selects
the matched text, which triggers the **selection occurrence highlight**
feature. That feature performs a *plain literal* search for the selected
word and highlights all occurrences, including ones that don't satisfy
the regex. The user would see a 4th mid-line occurrence highlighted,
even though `^something` never matched it, this behavior is quite
confusing.
The fix tracks whether the current selection was set by search
navigation via a new `from_search: bool` on `SelectionEffects`. When
`last_selection_from_search` is set and `BufferSearchHighlights` are
active, selection occurrence highlights are suppressed. Making a manual
text selection during an active search clears the flag, restoring normal
occurrence-highlight behavior.
The behavior now matches how VSCode handles this case.
The video below demonstrates the behavior after the fix and shows that
it matches the VSCode behavior now
[Screencast from 2026-03-28
01-33-46.webm](https://github.com/user-attachments/assets/07a005b8-53b1-4abf-93d2-96406f0b6a11)
Closes #52589
## How to Review
Three files changed — read in this order:
1. **`crates/editor/src/editor.rs`** Adds `from_search: bool` to
`SelectionEffects` (with a builder method) and
`last_selection_from_search: bool` to `Editor`.
`selections_did_change()` records the flag from effects.
`prepare_highlight_query_from_selection()` returns `None` early when
both `last_selection_from_search` and active `BufferSearchHighlights`
are set.
2. **`crates/editor/src/items.rs`** `activate_match()` now calls
`.from_search(true)` on its `SelectionEffects` so search-driven
selections are marked at the source.
3. **`crates/search/src/buffer_search.rs`** Regression test
`test_regex_search_does_not_highlight_non_matching_occurrences`:
verifies that after search navigation, `SelectedTextHighlight` is
suppressed and exactly 3 `BufferSearchHighlights` exist; and that after
a manual selection, `SelectedTextHighlight` is restored.
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] 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:
- Fixed regex buffer search highlighting non-matching word occurrences
via the selection occurrence highlight feature
saberoueslati
created
bf185f7
Update Rust crate rand to v0.9.3 [SECURITY] (#53855)
Click to expand commit body
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [rand](https://rust-random.github.io/book)
([source](https://redirect.github.com/rust-random/rand)) |
workspace.dependencies | patch | `0.9.2` → `0.9.3` |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/15138) for more information.
### GitHub Vulnerability Alerts
####
[GHSA-cq8v-f236-94qc](https://redirect.github.com/rust-random/rand/pull/1763)
It has been reported (by @​lopopolo) that the `rand` library is
[unsound](https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library)
(i.e. that safe code using the public API can cause Undefined Behaviour)
when all the following conditions are met:
- The `log` and `thread_rng` features are enabled
- A [custom
logger](https://docs.rs/log/latest/log/#implementing-a-logger) is
defined
- The custom logger accesses `rand::rng()` (previously
`rand::thread_rng()`) and calls any `TryRng` (previously `RngCore`)
methods on `ThreadRng`
- The `ThreadRng` (attempts to) reseed while called from the custom
logger (this happens every 64 kB of generated data)
- Trace-level logging is enabled or warn-level logging is enabled and
the random source (the `getrandom` crate) is unable to provide a new
seed
`TryRng` (previously `RngCore`) methods for `ThreadRng` use `unsafe`
code to cast `*mut BlockRng<ReseedingCore>` to `&mut
BlockRng<ReseedingCore>`. When all the above conditions are met this
results in an aliased mutable reference, violating the Stacked Borrows
rules. Miri is able to detect this violation in sample code. Since
construction of [aliased mutable references is Undefined
Behaviour](https://doc.rust-lang.org/stable/nomicon/references.html),
the behaviour of optimized builds is hard to predict.
Affected versions of `rand` are `>= 0.7, < 0.9.3` and `0.10.0`.
---
### Release Notes
<details>
<summary>rust-random/rand (rand)</summary>
###
[`v0.9.3`](https://redirect.github.com/rust-random/rand/compare/0.9.2...0.9.3)
[Compare
Source](https://redirect.github.com/rust-random/rand/compare/0.9.2...0.9.3)
</details>
---
### Configuration
📅 **Schedule**: (in timezone America/New_York)
- Branch creation
- ""
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTAuMiIsInVwZGF0ZWRJblZlciI6IjQzLjExMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This was leftover from trying to hold the invariant of one empty draft,
which was dropped in #53852.
Removes all automatic draft deletion:
- `retain_running_thread` discarded empty drafts when navigating away
- `remove_empty_draft` cleaned up all retained drafts when loading from
history
- `open_external_thread_with_server` removed empty drafts when opening
external threads
Release Notes:
- Fixed agent drafts being silently discarded when navigating between
threads
Nathan Sobo
created
fb9415e
sidebar: Click project header row to toggle fold instead of switching worktrees (#53861)
Click to expand commit body
Previously, clicking a project header in the agent sidebar would
activate/switch to that worktree's workspace, resuming whatever thread
was most recently active. This felt jarring — activating a random thread
based on recency isn't that useful when the user can just click the
specific thread they want. There's also no clear semantic for clicking
the overall group header since each thread maps to a specific workspace
and there's no single workspace to activate for the group.
This changes the click target for folding from just the chevron to the
entire header row. The worktree-switching behavior is removed — clicking
anywhere on the row now toggles the fold, which is a more predictable
and useful interaction.
The hover-only buttons on the right side (ellipsis menu, collapse
threads, new thread) continue to work as before, with their own click
handlers that stop propagation.
Release Notes:
- Improved sidebar project headers to toggle fold on click instead of
switching worktrees.
Nathan Sobo
created
acf5da9
Guard CLI first-run prompt with agents-v2 flag (#53839)
Click to expand commit body
Gates the CLI first-run prompt (from #53663) on the `agent-v2` feature
flag, giving us an escape hatch if something goes wrong.
## What this does
**Commit 1: Gate on agent-v2 flag**
- Adds an `AgentV2FeatureFlag` check at the top of the open behavior
resolution. When the flag is off, the prompt is skipped.
- Refactors `maybe_prompt_open_behavior` → `resolve_open_behavior`:
moves the explicit-flags guard (`-n`, `-e`, `--reuse`) to the caller and
drops three parameters from the function signature, since the function
was only inspecting those values to decide whether to bail early.
**Commit 2: Default to new-window when flag is disabled**
- When the flag is off, falls back to the pre-#53254 behavior of opening
projects in a new window, rather than silently adding to the sidebar.
Release Notes:
- N/A
Eric Holk
created
b310904
Allow empty project groups in sidebar (#53852)
Click to expand commit body
Previously, the sidebar would automatically create an empty draft thread
for any project group that had no threads (via `reconcile_groups`). This
added complexity and felt janky — the user would see a phantom "Draft"
entry appear for every workspace they opened, even before they intended
to start a conversation.
Now, project groups can simply be empty. When a group has no threads:
- The fold indicator renders as closed and grayed out (disabled — no
click handler or tooltip)
- The plus button is always visible on the right side of the header (not
hidden behind hover)
- Keyboard fold toggling is disabled for the group
- Clicking the plus button creates the first thread and expands the
group
Draft threads are no longer auto-created anywhere:
- `AgentPanel::load` no longer creates a draft when there is no
previously active conversation
- Archiving the last thread in a group clears the panel instead of
creating a replacement draft
- `show_or_create_empty_draft` and `clear_active_thread` are removed
This removes a significant amount of supporting infrastructure that only
existed to maintain the "no group may be empty" invariant:
- `WorkspaceSidebarDelegate` trait and `AgentPanelSidebarDelegate`
struct
- `reconcile_groups` method and its 12 call sites
- `clear_empty_group_drafts` method and its 3 call sites
- `show_or_create_empty_draft` and `clear_active_thread` methods
- `reconciling` field on `Sidebar`
- `sidebar_delegate` field, setter, and getter on `Workspace`
Release Notes:
- Improved the sidebar to show empty project groups with a visible plus
button instead of auto-creating placeholder draft threads.
---------
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nathan Sobo
,
Zed Zippy
, and
Max Brunsfeld
created
66ac781
Start new git worktrees in detached HEAD state (#53840)
Click to expand commit body
Create worktrees in detached HEAD state, then attempt to check out the
requested branch. If the checkout fails (e.g. the branch is already in
use by another worktree), log a warning and stay in detached HEAD state
instead of showing an error to the user.
This simplifies the worktree creation flow by:
- Removing the occupied-branch fallback logic that would generate random
branch names
- Always using `CreateWorktreeTarget::Detached` for worktree creation
- Attempting branch checkout as a best-effort post-creation step
- Updating the branch picker UI to reflect the new behavior
Release Notes:
- Threads now start git worktrees in detached HEAD state if branch is in
use or unspecified, instead of generating a random branch name.
---------
Co-authored-by: Eric Holk <eric@zed.dev>
Richard Feldman
and
Eric Holk
created
549db9f
acp_thread: Make UserMessageId required in AgentConnection::prompt (#53850)
Click to expand commit body
The `user_message_id` parameter on `AgentConnection::prompt` was
`Option<UserMessageId>`, but `NativeAgentConnection::prompt` immediately
called `.expect()` on it, crashing when the value was `None`.
Because the `expect` message said `UserMessageId` was required, this PR
makes the parameter not optional which makes the panic impossible.
This means we also need to unconditionally generate an ID in `send`,
where before we gated this on whether `truncate` returned `Some`.
Generating IDs unconditionally should be find, especially because the
prompt requires them.
Release Notes:
- N/A
Based on a partial revert of: 7bcdb12b4c5e9de0e4632c770336799e7c8d13d6
The main difference is instead of a feature flag we now check
`ReleaseChannel::Stable` != current_release_channel when the UI checks
if agent v2 (sidebar) features should be enabled.
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 or Added/Fixed/Improved ...
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Anthony Eid
and
Max Brunsfeld
created
092fedc
Fix the opening of the agent panel when clicking Try Now in new onboarding notification (#53845)
Click to expand commit body
This fixes an issue reported by @Veykril where the "Try Now" button
would open a different panel than the agent panel. The bug was caused by
us attempting to focus the agent panel before layout settings updates
had been applied.
This should also make all programmatic settings updates more responsive,
because they won't have to wait for FS watchers to take effect.
Release Notes:
- N/A
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Max Brunsfeld
and
Anthony Eid
created
909dfd0
compliance: Expose some more methods (#53831)
Click to expand commit body
They will again come in handy for the GitHub worker.
Release Notes:
- N/A
Finn Evers
created
15dce9d
Always remove linked worktree workspaces before archive cleanup (#53672)
Click to expand commit body
When archiving a thread's last reference to a linked worktree, the
worktree workspace must be removed from the MultiWorkspace before the
background cleanup task runs `git worktree remove`. Previously, only the
workspace found via exact PathList match on the thread's `folder_paths`
was removed. This missed cases where the workspace's root paths diverged
from the thread's `folder_paths` (e.g. after folders were added/removed
from the workspace).
Now we also scan `roots_to_archive` for any linked worktree workspaces
that contain the worktree being archived and include them in the removal
set. This ensures all editors are dropped, releasing their
`Entity<Worktree>` references (held through `File` structs in buffers),
so `wait_for_worktree_release` completes and `git worktree remove` can
proceed.
Release Notes:
- Fixed some linked worktree directories not always being cleaned up
from disk when archiving a thread.
Richard Feldman
created
25e02cb
project_panel: Always open panel on pane's reveal in project panel (#53539)
Click to expand commit body
Update the way `pane::RevealInProjectPanel` is handled to ensure that,
regardless of whether the file belongs to any open project, the project
panel is always activated and focused.
This refactor is a result of some internal feedback after changing its
handling so as to show a notification stating that the item that the
user was trying to reveal didn't belong to an open project
– https://github.com/zed-industries/zed/pull/51246 .
We feel users are probably already used to relying on `cmd-shift-e` (on
macOS), in pretty much every context, in order to open the project
panel, and so having situations where it doesn't actually happen seems
like a bad user experience.
Relates to #23967
Release Notes:
- Improved `pane: reveal in project panel` to open the project panel,
even if working with an unsaved buffer.
Dino
created
5f2373b
Skip git worktree removal when archiving threads on main worktrees (#53629)
Click to expand commit body
When archiving a thread that lives on a main worktree (not a linked
worktree), `build_root_plan` was still returning a `RootPlan`, which
caused the archive flow to call `git worktree remove` on the main
working tree. Git rightfully refuses this with:
```
fatal: '/Users/rtfeldman/code/zed' is a main working tree
```
This fix makes `build_root_plan` return `None` for non-linked worktrees,
so the archive-to-disk machinery is simply skipped. The thread is marked
archived in the metadata store and can be unarchived later — no git
operations needed.
Since `build_root_plan` now guarantees a linked worktree when it returns
`Some`, `RootPlan::worktree_repo` is tightened from
`Option<Entity<Repository>>` to `Entity<Repository>`, removing the
fallback codepath and the `is_some()` guard in `archive_worktree_roots`.
Release Notes:
- Fixed a crash when archiving an agent thread that was opened on the
main project (not a linked git worktree).
Richard Feldman
created
1150c9d
Fix crash when fallback workspace is in the removal set (#53549)
Click to expand commit body
When removing a project group, the fallback closure calls
`find_or_create_local_workspace` which searches `self.workspaces` for an
existing match. Because the workspaces to be removed haven't been
removed yet at that point, `workspace_for_paths` can return a doomed
workspace, hitting the `assert!` in `MultiWorkspace::remove` and
crashing the app.
Fix by adding an `excluding` parameter to
`find_or_create_local_workspace` so callers inside removal fallbacks can
skip workspaces that are about to be removed. Both
`remove_project_group` and `sidebar::archive_thread` now pass the
appropriate exclusion set.
Adds a regression test that deterministically reproduces the crash (the
assert fires without the exclusion, passes with it).
Release Notes:
- Fixed a crash when closing a project group whose fallback workspace
matched one being removed.
Richard Feldman
created
1c1f2d6
agent_ui: Fix worktree naming regression when using existing branches (#53669)
Click to expand commit body
When creating a new git worktree from an existing branch (e.g. `main`),
the worktree directory was incorrectly named after the branch instead of
getting a random adjective-noun name. Additionally, if a directory with
that name already existed, the rollback logic could destructively delete
the pre-existing worktree.
Changes:
- Generate a random adjective-noun name for worktree directories when no
explicit name is provided
- Collect existing worktree directory names to avoid collisions
- Check generated paths against known worktree paths before creating
- Reduce random name retry count from 100 to 10
- Add regression test
Release Notes:
- Fixed a regression where creating a git worktree from an existing
branch would name the worktree directory after the branch (instead of
generating a random name)
Richard Feldman
created
d0c8109
Add more harness to the CI scripts (#53816)
Click to expand commit body
Fixes
<img width="1238" height="520" alt="image"
src="https://github.com/user-attachments/assets/5e6c0d93-660f-4d1a-ab8c-c9c269292eaa"
/>
If a parent script with `-euo pipefail` invokes a script, that does not
inherit the `-euo pipefail` option. Fix that by adding the flags to the
scripts needed and adjust the curl command to fail too.
Release Notes:
- N/A
Kirill Bulatov
created
850c94c
title_bar: Hide plan badge next to username when there are organizations (#53826)
Click to expand commit body
This PR makes it so we hide the plan badge next to the username in the
user menu when there are organizations.
We instead show the plans next to each organization:
<img width="257" height="317" alt="Screenshot 2026-04-13 at 1 29 26 PM"
src="https://github.com/user-attachments/assets/0111e7ff-af09-48ba-a043-9e25c2dd24bd"
/>
Closes CLO-649.
Release Notes:
- N/A
Marshall Bowers
created
cf69756
agent_ui: Fix empty agent panel state after startup (#53823)
Click to expand commit body
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
Bennet Bo Fenner
created
4d025b4
edit_prediction_ui: Enforce org configuration to disable Zed provider (#53655)
Click to expand commit body
The Zed provider is now disabled in the selection dropdown when the
current organization has disabled edit predictions. It is also
unselected when you switch organizations to one such organization.
This is also already enforced server side.
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: Marshall Bowers <git@maxdeviant.com>
This will help a lot when dealing with this in the context of the Zed
Zippy bot.
Release Notes:
- N/A
Finn Evers
created
b1f8bd6
Add automatic syntax highlighting for TopoJSON files (#53546)
Click to expand commit body
TopoJSON is an extension of the geospatial data interchange format,
GeoJSON. Although it is not as widely popular, it is frequently used in
web maps, where its smaller file size is advantageous.
More information about TopoJSON can be found here:
https://github.com/topojson/topojson-specification
This change adds `topojson` as a recognised path suffix, so TopoJSON
files automatically open as JSON and get the standard JSON syntax
highlighting.
This PR is similar to @flother’s PR for GeoJSON:
https://github.com/zed-industries/zed/pull/49261
Closes (my own) discussion:
https://github.com/zed-industries/zed/discussions/32963
PS: This is my first PR. I'd appreciate any feedback or suggestions for
improvement
Self-Review Checklist:
- [X] 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
Release notes:
- Added automatic syntax highlighting for TopoJSON files
Jonas
created
9264f7f
git: Add missing `language_changed` notification for branch diffs (#53757)
Click to expand commit body
We need to reparse the base text using the same language as the main
buffer, whenever the main buffer's language changed. We already do this
for the uncommitted diff, but it was missing for the branch (OID-based)
diffs. (We don't need it for the unstaged diff because we don't
currently show you that base text anywhere in the UI, so its language is
immaterial.)
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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Cole Miller
created
9adff86
sidebar: Move to new window, going through sqlite (#53513)
Click to expand commit body
Re-adds the `multi_workspace::MoveProjectToNewWindow` action
It serializes, then closes, then re-opens the project to avoid issues
with pending tasks
Release Notes:
- N/A or Added/Fixed/Improved ...
Cameron Mcloughlin
created
bd78089
git: Use repo snapshot to fetch picker branch list instead of spawning a job (#53661)
Click to expand commit body
This should fix a delay where the thread_branch_picker and git_picker
would take a while to load the branch list while other git jobs are
being processed before hand.
I also added a subscription in both pickers to repository so they
refresh their matches when the repo snapshot branch list changes.
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
Anthony Eid
created
0272aab
Do not open the sidebar when opening a directory in a new window (#53815)
Click to expand commit body
Follow-up to https://github.com/zed-industries/zed/pull/53778
Covers another case when opening a directory via the file picker _from a
blank project_
<img width="865" height="539" alt="image"
src="https://github.com/user-attachments/assets/43eb035b-4f0f-4e8c-bfa3-fbcd7b4beb13"
/>
resulted in
<img width="1072" height="1162" alt="image"
src="https://github.com/user-attachments/assets/59c588b9-8925-41bb-b9fb-e4906c43c723"
/>
Release Notes:
- Fixed the sidebar opening when a new directory in a new window was
opened
Kirill Bulatov
created
ea42a19
git_ui: Improve design in branch, stash, and worktree pickers (#53798)
Click to expand commit body
Mainly improving label truncation as well as making date/time display
consistent between the branch and stash pickers. In the list item, we
display relative timestamps, while in the tooltip, we display it in
absolute for more details.
Release Notes:
- N/A
Danilo Leal
created
51dffe4
git_graph: Add some design adjustments (#53803)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/53524
- Improve overall colors
- Fix chip truncation
- Better highlight which branch is currently checked out
| Truncation | Checked out branch |
|--------|--------|
| <img width="2774" height="2158" alt="Screenshot 2026-04-13 at 9
40@2x"
src="https://github.com/user-attachments/assets/176cbe72-a757-4b83-b8c1-9fcbda16a5a8"
/> | <img width="2774" height="2158" alt="Screenshot 2026-04-13 at 9
41@2x"
src="https://github.com/user-attachments/assets/cf4a3863-9dae-4891-b93a-443e4d7ca5a2"
/> |
Release Notes:
- Git Graph: Improved visibility of the currently checked out branch and
fixed branch name truncation.
Danilo Leal
created
cbd856f
Revert "Fix duplicate window when opening from CLI on macOS (#48146)" (#53814)
Click to expand commit body
This reverts commit 5be9dc1781ef6d2cbfbdbcd417edd0935cbb83a8.
This change breaks dragging directories onto the App icon (or using the
directories listed in the menu on the app icon in the doc)
Release Notes:
- N/A
We were assuming that `Bgra8Unorm` always works, which was causing the
panic on configurations that don't support it ("wgpu-hal invariant was
violated: Requested feature is not available on this device")
This change makes a proper fallback to `Rgba8Unorm`. In the worst case,
if a device doesn't support that as well (highly unlikely), we return a
proper error instead of a panic.
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
Closes ZED-69S
Release Notes:
- Fixed panic on devices that don't support BGRA8
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [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
After fix:
https://github.com/user-attachments/assets/7a9b7947-e222-4839-a46d-078b6aec8f18
Closes #53749
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Fuad Hasan
and
Danilo Leal
created
beb0b02
agent_ui: Show full branch name in thread branch picker aside (#53791)
Click to expand commit body
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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Summary
- Display the full branch name in the DocumentationAside panel for
thread branch picker entries, so users can see truncated branch names in
full
- Add a separator between the branch name and descriptive text, matching
the pattern used by the model selector's DocumentationAside
Release Notes:
- Agent: Improved branch picker by displaying the full branch name in
the documentation aside.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
XiaoYan Li
,
Claude Opus 4.6 (1M context)
, and
Danilo Leal
created