23ac4fd
title_bar: Move the organization items inside the user menu (#52343)
Click to expand commit body
Closes CLO-339
This PR moves the organization menu items inside the user menu, instead
of a standalone button within the title bar. We did it so because 1)
we're not fully sure how useful _always_ seeing in which org you are in
will be, and 2) seeing in which org you're in and seeing in which _plan_
you are in are very similar in terms of use case, and we don't currently
display the plan in the title bar... thus, that served as argument for
the same level of visibility.
---
- [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>
Danilo Leal
and
Gaauwe Rombouts
created
9b0f454
sidebar: Make sure workspace has git state loaded when opening a new one (#52233)
Click to expand commit body
## Context
This fixes a bug where switching to a worktree workspace sometimes
briefly flashes it as a top-level project in the sidebar. This happened
because the sidebar would rebuild its entries whenever the multi
workspace emits the added workspace event.
The fix is checking from the root workspace git linked worktree list as
well to see if newly added workspaces are linked.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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
b5fc09e
Don't keep stale predictions in if they were discarded (#52334)
Click to expand commit body
## Context
We're seeing issues where discarding a prediction (e.g. `editor::Cancel`
while a prediction is being shown) seems to just hide it temporarily.
This is becoming a larger issue with #51842 as we now expect people to
be dismissing predictions in order to insert literal tabs in certain
contexts.
The logic changed in this PR is part of the problem, but the model
generating the same prediction multiple times is also likely
contributing. That will be solved as-needed later.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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:
- Fixed an issue where dismissing an edit prediction would not fully
discard it, causing it to re-appear
Increases timeouts, simplifies queries, and makes other changes needed to
pull data more efficiently.
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Oleksiy Syvokon
and
Ben Kunkle
created
72c1d97
editor: Include closing delimiter on same line when folding (#50090)
Click to expand commit body
CLOSES: #50002
When using indent-based folding (the default, `document_folding_ranges =
Off`),
collapsed folds in brace-delimited languages displayed the closing
delimiter on
a separate line:
fn b() {⋯
}
This extends the fold range in `crease_for_buffer_row` to include the
trailing
newline and leading whitespace before a closing `}`, `)`, or `]`,
producing
the expected single-line display:
fn b() {⋯}
Whitespace-sensitive languages like Python are unaffected — their
terminating
lines don't start with a closing delimiter, so the existing behavior is
preserved.
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Screenshots:
Before:
<img width="676" height="584" alt="image"
src="https://github.com/user-attachments/assets/0779233b-e287-495a-bab4-d2a97829e1c0"
/>
After:
<img width="1498" height="824" alt="image"
src="https://github.com/user-attachments/assets/ec6b4cb0-dac1-4db0-beed-38131a27b5c8"
/>
Release Notes:
- Fixed indent-based code folding to display the closing delimiter (`}`,
`)`, `]`) on the same line as the fold placeholder instead of on a
separate line
([#50002](https://github.com/zed-industries/zed/issues/50002)).
João Soares
created
2072471
settings: Fix incorrect worktree root for symlinked settings.json on Windows (#51453)
Click to expand commit body
Closes #47007
After #50974, symlinked `settings.json` can be opened and saved, but the
worktree ends up rooted at the file itself rather than its parent
directory, which causes this error to be logged when changing settings
via the settings GUI:
```
2026-03-18T22:24:05+01:00 ERROR [worktree] ignoring event
"C:\\Users\\Bryan\\dev\\bryanpth\\dotfiles\\config\\zed\\settings.json~RF1ab7ae0.TMP" outside of root path
"C:\\Users\\Bryan\\dev\\bryanpth\\dotfiles\\config\\zed\\settings.json"
```
Fixed by canonicalizing the symlink path before passing to `open_paths`.
Tested with a symlinked settings.json, both directly and through WSL.
Release Notes:
- Fixed incorrect worktree root when settings.json is a symlink on
Windows
Bryan Pothon
created
2315856
task: Skip .vscode tasks when .zed/tasks.json exists (#51797)
Click to expand commit body
Fixes #51733
The previous fix in #32590 only filtered `.vscode` tasks at the modal
presentation layer, so they still appeared in other code paths and in
the used-tasks list. This moves the filtering into
`worktree_scenarios()` in the task inventory, so all consumers see the
correct behavior.
Changes:
- `InventoryFor::worktree_scenarios()` now skips `.vscode` entries when
`.zed` entries exist for the same worktree
- `used_and_current_resolved_tasks()` filters previously spawned
`.vscode` tasks from the used-tasks list
- Removes the now-redundant `.vscode` filter from the task picker modal
Release Notes:
- Fixed .vscode/tasks.json still being used when .zed/tasks.json is
present
Co-authored-by: moktamd <moktamd@users.noreply.github.com>
moktamd
and
moktamd
created
e9d1419
agent: Allow model to respond with stringified array when it edits (#52303)
Click to expand commit body
## Context
Sometimes the model likes to respond with `"[...]"` for the edits array,
instead of just `[...]`, which causes deserialisation to fail:
```
Failed to receive tool input: invalid type: string "[{"old_text": ..., "new_text": ...}]", expected a sequence
```
## How to Review
<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
- See the review process guidelines for comment conventions -->
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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
4add781
remote_connection: Add visibility toggle to password prompt (#52297)
Click to expand commit body
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>
Xiaobo Liu
and
Danilo Leal
created
f3534fc
git_ui: Improve UI for the branch, stash, and worktree pickers (#52274)
Click to expand commit body
## Context
This PR refines the design for all of these Git pickers but making them
look more consistent and polished (using same fonts, dividers, and
alignment). It also adds a delete button to all items in each picker so
you can more intuitively delete each item if you're on a mouse-based
flow.
| Worktrees | Stashes | Branches |
|--------|--------|--------|
| <img width="1490" height="1178" alt="Screenshot 2026-03-23 at 9 15
2@2x"
src="https://github.com/user-attachments/assets/3143a626-1b97-43b5-b769-d6cab2c5df7c"
/> | <img width="1490" height="1178" alt="Screenshot 2026-03-23 at 9 15
3@2x"
src="https://github.com/user-attachments/assets/80cbd5ee-394d-42b7-84f8-2d9950d9889e"
/> | <img width="1490" height="1178" alt="Screenshot 2026-03-23 at 9
15@2x"
src="https://github.com/user-attachments/assets/408fd12e-fb18-4233-a4bf-5fad53aa307f"
/> |
---
- [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
Danilo Leal
created
4b598bf
agent_ui: Add some thread view design improvements (#52322)
Click to expand commit body
This PR adds some small design refinements to the thread view: making
keybinding size consistent throughout, improving the activity bar
shadow, fixing the keybinding to open a file from an edit tool diff, and
other smaller spacing/color tweaks.
Release Notes:
- N/A
Danilo Leal
created
b0f2860
copilot_chat: Serialize ToolChoice::Any as "required" instead of "any" (#52015)
Click to expand commit body
**Observed behavior:** Inline assistant failed for GPT-4.1,
Gemini, and other non-Anthropic models. Claude worked correctly because
Anthropic's API accepts `"any"` as a valid value.
## Fix
Renamed `ToolChoice::Any` → `ToolChoice::Required` in both
`copilot_chat.rs` and `responses.rs`, matching the convention used by
other OpenAI-compatible providers (`open_ai`, `lmstudio`,
`open_router`).
`copilot_chat::ToolChoice` is a wire type only for the
`/chat/completions`
path — Anthropic models go through `into_anthropic()` and never touch
it,
so no per-model logic is needed.
Also fixes the same serialization bug in `responses::ToolChoice`, which
was not covered by the original approach, and adds regression tests for
both.
## Affected models
- `gpt-4.1` via copilot_chat provider
- `gemini-*` via copilot_chat provider
- Likely affects all OpenAI-compatible models routed through
copilot_chat
## Screenshots
**Bug (only Claude works, Gemini and GPT-4.1 fail):**
<img width="598" height="209" alt="image"
src="https://github.com/user-attachments/assets/bbd418d9-7de3-4191-9ca9-fd1961534e23"
/>
**Fix:**
<img width="532" height="154" alt="image"
src="https://github.com/user-attachments/assets/86bb0f8e-67e6-4417-9b78-b1b7ad328e9e"
/>
**Result:** After the fix, all models work correctly via inline
assistant.
## Release Notes
- Fix inline assistant 400 errors for GPT-4.1, Gemini, and other
non-Anthropic models via the copilot_chat provider (`tool_choice` was
sending `"any"` instead of `"required"`)
Valery Borovsky
created
4b60e63
agent: Remove priority from update_plan (#52320)
Click to expand commit body
## Context
We don't surface this in the UI, so removing it to make the input
smaller.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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
Ben Brandt
created
eeafae3
sidebar: Fix title bar upon moving workspace to a new window (#52266)
Click to expand commit body
## Context
This PR adds a function to sync up the title bar state if a workspace is
moved to a new window through the threads sidebar. This is needed
because otherwise the padding for the traffic control buttons on macOS
wasn't being taken into consideration.
## How to Review
- Move a project to a new window from the sidebar
- See that the title bar for that new window looks normal, as it should
---
- [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
This PR removes a bunch of unused icons in the codebase. Just cleaning
it up!
Release Notes:
- N/A
Danilo Leal
created
1f5d280
eval_cli: Improve setup for the eval_cli args (#52209)
Click to expand commit body
## Context
Fixes some issues I ran into when running this on a remote machine.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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
Ben Brandt
created
b478dfd
acp: Fix the spawn directory for agent servers in remote environments (#52308)
Click to expand commit body
We can't add a current_dir when in remote scenarios in the same place,
it gets added elsewhere.
Reused the same worktree selection logic, and make sure this gets passed
to the RPC call instead.
This fixes something that hasn't made it to preview yet.
Release Notes:
- N/A
Ben Brandt
created
45be23c
Fix git panel context menu keybinding jitter (#52217)
Click to expand commit body
Context
The git panel's context menu caused visual jitter (flickering/jumping)
when opened via right-click on a tracked file. The root cause was in
`dispatch_context()`: it used `self.focus_handle == focused` to check if
the panel itself was directly focused, but when a context menu opened,
focus moved to the menu (a child element), causing the `"menu"` and
`"ChangesList"` key contexts to be dropped. This triggered a re-render
with different keybindings, which re-added them, creating a loop of
jitter.
The fix replaces the direct focus equality check with
`self.focus_handle.contains_focused(window, cx)`, which returns `true`
when any child element (including the context menu) holds focus within
the panel's focus tree. This is consistent with how other panels
(project panel, outline panel, collab panel) handle focus-based dispatch
contexts.
Closes #51813
## Demo
**Before fix:**
https://github.com/user-attachments/assets/e18d49b2-72a6-4411-8ec5-519e36628f29
**After fix:**
https://github.com/user-attachments/assets/94c936d2-1e81-4d28-a86a-8b1ed76ddde1
## How to Review
This is a small, focused change in a single file:
`crates/git_ui/src/git_panel.rs`.
1. **The fix** (~line 974): `dispatch_context()` method — the old code
checked direct focus equality (`self.focus_handle == focused`), the new
code uses `self.focus_handle.contains_focused(window, cx)` and
restructures the conditionals so `CommitEditor` is checked first via
`if/else if`.
2. **The test** (~line 7871): `test_dispatch_context_with_focus_states`
— verifies 4 focus state transitions: commit editor focused, changes
list focused, back to commit editor, and back to changes list. Each case
asserts the correct key contexts are present/absent.
## 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 git panel context menu jitter caused by keybinding dispatch
context flickering when right-clicking on tracked files (#51813)
João Soares
created
ce7cd7c
git_ui: Hide status icon when status_style is set to label_color (#51947)
Click to expand commit body
## Context
When `git_panel.status_style` is set to `label_color`, the git panel
should indicate file status through text color only, without showing
status icons. However, the icons were still being rendered regardless
of this setting.
The root cause: `git_status_icon(status)` was called unconditionally
in `render_status_entry`, with no check against the current
`status_style` value.
Closes #51714
## How to Review
Single change in `crates/git_ui/src/git_panel.rs` —
`render_status_entry` function. The icon render call is now wrapped
in `.when(status_style != StatusStyle::LabelColor, ...)`.
Release Notes:
- Fixed git panel status icons still showing when
`git_panel.status_style`
is set to `label_color`
Bug:
<img width="2559" height="1357" alt="image"
src="https://github.com/user-attachments/assets/3cad9f96-8b5c-4554-8b9f-f931026bdfe1"
/>
Fix:
<img width="1512" height="801" alt="image"
src="https://github.com/user-attachments/assets/99f36d11-a8b2-412a-ab73-18200f6594d2"
/>
Valery Borovsky
created
b28990e
language_models: Use weak entities in subscribe/observes around the language model registry (#52312)
Click to expand commit body
## Context
I was getting some leak detection failures in evals and tracked it down
to these entities getting passed into observe/subscribe callbacks and
causing cycles.
Release Notes:
- N/A
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Ben Brandt
and
Lukas Wirth
created
7c18520
agent: Fix `cargo test -p agent` on windows (#52311)
Click to expand commit body
Release Notes:
- N/A or Added/Fixed/Improved ...
Lukas Wirth
created
951cf0c
docs: Document MCP HTTP OAuth support (#52240)
Click to expand commit body
The feature was implemented in
https://github.com/zed-industries/zed/pull/51768.
Release Notes:
- N/A
---------
Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
## Context
This PR builds on https://github.com/zed-industries/zed/pull/52047,
adding support for the new behavior to the keymap editor. The primary
change is replacing usages of `NoAction` with `Unbind` when updating the
users keymap, i.e. deleting/editing default bindings.
This PR does not completely solve the UI challenge of `Unbind`. For now,
we just don't show Unbind entries in the UI, and mark unbound
keybindings as unbound (shown in screenshot).
<img width="3854" height="2230" alt="Screenshot 2026-03-23 at 11 49
42 AM"
src="https://github.com/user-attachments/assets/843856c6-2c94-47c1-be44-21becfdf467e"
/>
## How to Review
- Check behavior changes in keymap updates
- Check UI changes and filters in keymap editor
<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
- See the review process guidelines for comment conventions -->
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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 or Added/Fixed/Improved ...
Ben Kunkle
created
cae8d3e
settings_ui: Fix open settings keybind always taking precedence (#52277)
Click to expand commit body
Solves an issue introduced by
https://github.com/zed-industries/zed/pull/49527 until we land
https://github.com/zed-industries/zed/pull/52275.
No release notes since this is only on Nightly.
Release Notes:
- N/A
## Context
Recently, we put bsn in the list of "macros to not reparse as rust"
(#51353).
We have since updated tree-sitter-rust to better handle the `@"string"`,
`:"string"`, etc cases, and can un-list bsn from the special casing.
on main, the highlighting currently looks like this for `bsn` and for
`not` (represents "other macros"). Note the `:"player.bsn"` string is
re-parsed as rust tokens.
<img width="1728" height="1084" alt="Screenshot 2026-03-23 at 9 33
35 AM"
src="https://github.com/user-attachments/assets/94ea5a6d-228b-44dd-857b-c41edcbd9af0"
/>
This pr, plus the tree-sitter-rust updates results in better handling by
default.
<img width="1728" height="1084" alt="Screenshot 2026-03-23 at 11 38
47 AM"
src="https://github.com/user-attachments/assets/fb6f71e3-7bcf-4c06-8e84-ce0823010b2e"
/>
Release Notes:
- N/A
Chris Biscardi
created
cc56071
Fix thread's worktree being discarded upon archiving the previous thread in the sidebar (#52271)
Click to expand commit body
This PR fixes a bug where archiving a thread could cause the *next*
thread to be opened in the current workspace, even though it belonged to
a different worktree.
Release Notes:
- N/A
Max Brunsfeld
created
28687ff
audio: Remove rodio audio backend (#51945)
Click to expand commit body
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
We've decided to remove rodio backend for audio as we didn't have time
to get it to a nice spot. I personally believe we should eventually
re-land it (the composable pipelines are quite nice!), but given that we
need audio to work, this seems like the best way forward. We won't have
to worry about all the ways in which the legacy pipeline interoped with
rodio's.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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:
- audio: Experimental rodio audio backend has been removed.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Yara <git@yara.blue>
Piotr Osiewicz
,
Smit Barmase
, and
Yara
created
3225e53
agent_ui: Don't reset cursor position when editing queued messages (#52210)
Click to expand commit body
## Context
When typing on the read-only queued message editor, we push the content
to the main, editable message editor. However, the cursor position was
being reset when that happened. This PR fixes that by tracking the
cursor offset when doing that, also accounting for the case where there
could be pre-existing content in the message editor.
## How to Review
- Queue a message in the agent panel
- Place your cursor somewhere in the middle of your queued message and
type something
- See how the cursor position is preserved once it goes down to the main
message editor
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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:
- Agent: Fix cursor position being reset when editing queued messages.
Danilo Leal
created
ae6a9c5
agent_ui: Fix full screen behavior on worktree creation (#52269)
Click to expand commit body
## Context
This PR removes the behavior in which we turn the agent panel full
screen on worktree creation, even if there aren't any files open.
Changing the width behavior of the panel will ultimately solve this, and
auto-full screening it turned out to be surprising. Also, in reaction to
this, I've added an icon button in the agent panel's toolbar when in
full screen so it's easier to get out of it. Eventually though, we can
probably remove it (also because of the flexible width work).
## How to Review
- Create a new worktree from a thread and see the panel with the same
width
- See the "disable full screen" icon button in the toolbar when you full
screen it
---
- [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
Danilo Leal
created
d30652f
sidebar: Adjust the sidebar UI slightly (#52228)
Click to expand commit body
This PR:
- Moves the "remove workspace" option into the context menu, so that
it's not swapping places with the + button in some circumstances. This
matches codexs behavior. Another solution to the problem could be having
the add button remain even when the "new thread" option exists.
- Adds a "go to workspace" button to the header
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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: Danilo Leal <daniloleal09@gmail.com>
Mikayla Maki
and
Danilo Leal
created
0b9aeaf
Make close sidebar button work regardless of focus state (#52260)
Click to expand commit body
Like https://github.com/zed-industries/zed/pull/52045, but for the
*close* button.
Release Notes:
- N/A
This PR adjusts the default panel layout for anyone on the agent v2
feature flag.
Note that this changes the right status bar items to show in reverse
priority order, and then adjusts priorities so that the "project
management" buttons appear to the right, and the outline panel appears
to the far left. The reversal "cancels out" most of the priority
changes, except the outline panel and the collab panel.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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:
- Swapped the order of the collab and outline status bar buttons
Mikayla Maki
created
1ee4d24
sidebar: Add "move to new window" action (#52219)
Click to expand commit body
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Cameron Mcloughlin
and
Anthony Eid
created
372ce88
agent: Wait until linked git worktree state is loaded (#51395)
Click to expand commit body
### Context
This fixes a bug where the sidebar would show a newly created git
worktree thread as its own project while the recently created workspace
is loading its git state. The fix is adding project APIs to await the
initial worktree store scan and then each git repo initial snapshot;
then awaiting on them before adding the new workspace to the
multi-workspace.
### Architecture:
I added the `Worktree::Remote::wait_for_snapshot` API to
`Worktree::Local` to enable `WorktreeStore` to await for both remote and
local projects until there's an initial scan. The `WorktreeStore` uses
the watcher pattern so it can update the initial scan state whenever
visible worktrees are added or removed from the store.
Before you mark this PR as ready for review, make sure that you have:
- [x] Added solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Anthony Eid
,
Ben Kunkle
,
cameron
, and
Zed Zippy
created
54f12d1
Log when migrating thread metadata in `ThreadMetadataStore` (#52230)
Click to expand commit body
## Context
This will make it easier to diagnose issues if any come up when
migrating thread metadata for the sidebar
## How to Review
<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
- See the review process guidelines for comment conventions -->
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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
60a2985
title_bar: Respect Linux titlebar config (#47506)
Click to expand commit body
Currently, Zed always places three fixed window buttons (Minimize,
Maximize and Close) on the right side of the window in a fixed order
ignoring any user configuration or desktop environment preference (like
elementary).
This PR adds support for GNOME-style layout strings (`minimize:close`).
By default, we pull it from the gsettings portal, but we also allow
manual configuration via `title_bar.button_layout` config key.
<img width="1538" height="797" alt="image"
src="https://github.com/user-attachments/assets/5db6bfa2-3052-4640-9228-95c37f318929"
/>
Closes #46512
I know it's a relatively large PR for my first one and I'm new to Rust.
So, sorry if I've made any huge mistakes. I had just made it for
personal use and then decided to try to clean it up and submit it.
I've tested with different configs on Linux. Untested on other
platforms, but should have no impact.
If it's not up to par, it's okay, feel free to close :)
Release Notes:
- Added support for GNOME's window buttons configuration on Linux.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Mufeed Ali
and
Smit Barmase
created
466995c
gpui_macos: Guard deferred AppKit calls against closed windows (#51992)
Click to expand commit body
MacWindow methods like activate(), zoom(), toggle_fullscreen(),
resize(), prompt(), and titlebar_double_click() capture the raw
native_window pointer and spawn detached async tasks on the foreground
executor. If the window is closed between the spawn and execution (e.g.
the user clicks the close button), the task sends AppKit messages to a
closed NSWindow, which throws an ObjC exception in
_changeKeyAndMainLimitedOK: and aborts the process.
Add an isVisible check inside each deferred task before sending messages
to the native window. After [NSWindow close], isVisible returns NO, so
the guard prevents the crash. Both the check and the subsequent AppKit
call execute synchronously within the same main-thread task, so there is
no TOCTOU race.
For prompt(), the else branch releases the alert object to avoid leaking
it; the oneshot sender inside the completion block is dropped, which
cancels the channel and propagates as an error to the caller.
Closes ZED-5TN
Release Notes:
- N/A or Added/Fixed/Improved ...
Lukas Wirth
created
f1f21d8
agent: Make branch diff completion use same default branch as branch diff action (#52223)
Click to expand commit body
## Context
Before this change the branch diff would compare with local main instead
of upstream main. This causes confusion because it's a different diff
than the branch diff action would show users, and cause agents to
potentially review a much larger diff then it has too.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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
f8b74ac
Move permission outcome construction out of the UI layer (#52050)
Click to expand commit body
Follow-up to the terminal permission params refactor, addressing
@benbrandt's [review
feedback](https://github.com/zed-industries/zed/pull/51782#pullrequestreview-2926899804)
about string formatting leaking into the UI layer.
## Changes
### Outcome construction moved to acp_thread
- Added `PermissionOptionChoice::build_outcome(is_allow)` — builds a
`SelectedPermissionOutcome` from a choice, attaching
`SelectedPermissionParams::Terminal` when the choice carries
`sub_patterns`.
- Added
`PermissionOptions::build_outcome_for_checked_patterns(checked_indices,
is_allow)` — handles the `DropdownWithPatterns` per-command checklist
flow, returning `None` when zero patterns are checked (degrading to
once).
The UI's `authorize_with_granularity` no longer does any
`format!("always_allow:{}",...)` string formatting or
`SelectedPermissionParams` construction.
### `option_kind` folded into `SelectedPermissionOutcome`
`SelectedPermissionOutcome` now carries `option_kind:
acp::PermissionOptionKind`, eliminating the separate parameter that was
threaded through the entire `authorize_tool_call` chain:
```
ThreadView::authorize_tool_call
→ Conversation::authorize_tool_call
→ AcpThread::authorize_tool_call
```
Every signature in this chain dropped one parameter.
### `SelectedPermissionParams` removed from UI imports
The type is now only referenced by `acp_thread` (construction) and
`agent` (consumption). The UI passes `SelectedPermissionOutcome`
opaquely.
Release Notes:
- N/A
Eric Holk
created
bcd29c8
docs: Add section on extension publishing prerequisites (#51655)
23e1bcf
languages: Improve semantic token highlighting for parameters and Python (#52130)
Click to expand commit body
## Context
Zed's semantic token highlighting does not cover all token types
returned by language servers, so the highlighting looks fairly primitive
compared with tree-sitter highlighting, especially for Python language
servers. This PR adds some global and Python-specific rules for better
highlighting.
I need to admit that the built-in Python language servers currently have
weak semantic highlighting implementations. Pylance, the closed-source
Python language server from Microsoft, provides the best highlighting
for now, but I think ty will do better, even though it still has a long
way to go.
## How to Review
Basically, this is a rule-adding change. Some rules are made global, and
some are made Python-specific.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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:
- Improved semantic token highlighting for parameters and Python
Xin Zhao
created
2938ab9
Fix close_session final save being a guaranteed no-op (#52030)
Click to expand commit body
`close_session` removed the session from `self.sessions` before calling
`save_thread`, but `save_thread` immediately looks up the session in
`self.sessions` and returns early if it's not found. This meant the
explicit final save was always a no-op.
Additionally, when the local `session` variable was dropped at the end
of the closure, it cancelled any in-flight save from a prior observe
callback by dropping `session.pending_save`.
So on session close:
- The explicit final save was a guaranteed no-op
- Any in-flight save from an earlier observation was cancelled
**Fix:** Call `save_thread` while the session is still in the map, then
extract the `pending_save` task and return it so the caller can actually
await the save completing.
**Test:** Added `test_close_session_saves_thread` which sets a draft
prompt without a `run_until_parked()` before `close_session`, so the
only way the data gets persisted is if `close_session` itself performs
the save. Also strengthened the existing `test_save_load_thread`
similarly.
Closes AI-95
Release Notes:
- Fixed a bug where closing an agent thread could lose unsaved changes
(e.g. draft prompts) made in the same frame.
Richard Feldman
created
4049a4c
Fix removed workspace resurrecting via serialization race (#52035)
Click to expand commit body
In `remove_workspace`, the removed `Entity<Workspace>` could still have
a pending `serialize_workspace` throttle timer (200ms). When that timer
fired, `serialize_workspace_internal` would write the old `session_id`
back to the DB — undoing the removal. On next restart, the workspace
would reappear.
The race window opens whenever any state change (worktree change,
breakpoint change, etc.) triggers `serialize_workspace` within 200ms
before `remove_workspace` is called.
**Fix**: Before the DB cleanup task, `update` the removed workspace
entity to:
1. `session_id.take()` — so any in-flight serialization writes
`session_id: None`
2. `_schedule_serialize_workspace.take()` — cancel the pending throttle
timer
3. `_serialize_workspace_task.take()` — cancel any actively running
serialization task
This mirrors what `remove_from_session` already does (clearing
`session_id`), but `remove_workspace` was missing it.
Release Notes:
- Fixed a bug where a removed workspace could reappear on next launch
due to a serialization race.
Richard Feldman
created
5d9e8a2
Replace typewriter/hash worktree naming with adjective-noun pairs (#52221)
Click to expand commit body
Replace the typewriter-brand + random-hash naming scheme for
auto-generated git worktree branches with an adjective-noun approach
(e.g. `swift-falcon`, `calm-meadow`).
- Removed the ~650-entry typewriter brand name list and hash generation
- Added 235 adjectives and 228 nouns (~53,500 unique combinations)
- Branch names are now checked for exact-match collisions against
existing branches
- Updated error messaging
Closes AI-101
Release Notes:
- Improved auto-generated git worktree branch names to use friendlier
adjective-noun pairs (e.g. `swift-falcon`) instead of typewriter brand
names with random hashes.
Richard Feldman
created
aa63f8e
Fix terminal block missing first line via f32 tolerance (#52111)
Click to expand commit body
## Context
`TerminalBounds::num_lines()` uses `floor(height / line_height)` to
compute the terminal grid row count. When the height is derived from `N
* line_height` (as it is for inline/embedded terminals in the Agent
Panel), IEEE 754 float32 arithmetic can produce `N - epsilon` instead of
`N`, causing `floor()` to return `N - 1`. This makes the terminal grid
one row too small, leaving the first line of output in invisible
scrollback (since `display_offset = 0`). The same issue applies to
`num_columns()`.
The fix adds a small tolerance (`0.01`) before flooring, which absorbs
float precision errors without affecting genuine fractional results.
Closes #51609
## How to Review
Small PR — focus on the tolerance value (`0.01`) in `num_lines()` and
`num_columns()` in `crates/terminal/src/terminal.rs`. The two new tests
(`test_num_lines_float_precision`, `test_num_columns_float_precision`)
verify the fix across 1,000+ float combinations that previously
triggered the bug.
## 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)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fixed the first line of terminal output sometimes missing in Agent
Panel terminal blocks.
João Soares
created
d31d3b8
project: Fix code_actions_on_format edits being reverted when no formatter available (#51605)
Click to expand commit body
Fixes #51490
## Problem
When `code_actions_on_format` is configured (e.g.,
`source.fixAll.phpcs`) and `formatter` is not explicitly set, code
action edits are applied but then reverted during format-on-save.
The root cause is in the formatting pipeline's error handling. Code
actions and formatters share a single transaction via `.chain()`. When
`Formatter::Auto` resolves to `Formatter::Prettier` (PHP defaults to
`prettier.allowed: true`), and prettier is not installed or fails, the
error propagates via `?` out of the formatter loop, aborting the entire
`format_buffer_locally` function. This causes the formatting transaction
- which already contains the successfully applied code action edits - to
be lost.
The workaround of setting `"formatter": []` works because it removes all
formatters from the chain, so no formatter can fail and trigger the
abort.
## Fix
Change error handling for individual formatters (Prettier, External
command, Language Server) from propagating errors via `?` to logging the
error and continuing to the next formatter. This treats "formatter
failed" as a no-op for that specific formatter rather than aborting the
entire pipeline.
This matches the existing pattern used when `LanguageServer(Current)`
finds no server that supports formatting - it already logs and
`continue`s rather than erroring.
## Testing
- `cargo check -p project` passes
- `cargo fmt -p project -- --check` passes
Release Notes:
- Fixed `code_actions_on_format` edits being reverted when `formatter:
"auto"` resolves to an unavailable formatter.
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Matt Van Horn
,
Matt Van Horn
, and
Kirill Bulatov
created
b39b995
ep: Fix `teacher` and `repair` output parsers (#52213)
Click to expand commit body
In some cases, we were generating a bunch of junk.
Release Notes:
- N/A
Oleksiy Syvokon
created
256135e
open_ai: Enable parallel tool calling for models that support it (#52203)
Click to expand commit body
## Context
We seemed to have disabled it in #28056, because our agent did not
support parallel tool calls at the time.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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 or Added/Fixed/Improved ...
Bennet Bo Fenner
created
45ca651
Fix stale diagnostic error markers in file tree (#49333)
Click to expand commit body
## Summary
Fixes #48289
Closes https://github.com/zed-industries/zed/issues/52021
Diagnostic error markers (red/yellow dots) in the project panel file
tree persisted after errors were resolved. Three root causes:
- **WorktreeUpdatedEntries ignored** — when files changed on disk (e.g.
`yarn install`), stale diagnostic summaries were never cleared. Added
`invalidate_diagnostic_summaries_for_updated_entries()` to clear
summaries for `Removed`/`Updated`/`AddedOrUpdated` paths.
- **Missing DiagnosticsUpdated emission on server stop** —
`stop_local_language_server()` cleared summaries and sent proto messages
but never emitted `LspStoreEvent::DiagnosticsUpdated`, so the project
panel never refreshed.
- **Buffer reload not handled** — reloading a buffer from disk did not
clear stale summaries. Added `BufferEvent::Reloaded` handler.
All three paths also send zeroed `UpdateDiagnosticSummary` proto
messages to downstream collab clients.
## Test plan
- [x] `./script/clippy` passes
- [x] `cargo test -p project -p project_panel -p worktree` passes (319
tests, 0 failures)
- [x] 4 new tests added:
- `test_diagnostic_summaries_cleared_on_worktree_entry_removal`
- `test_diagnostic_summaries_cleared_on_worktree_entry_update`
- `test_diagnostic_summaries_cleared_on_server_restart`
- `test_diagnostic_summaries_cleared_on_buffer_reload`
- [x] Manual testing: error markers clear when files change on disk
- [x] Manual testing: error markers clear on LSP restart
Release Notes:
- Fixed stale diagnostic data persisting after file reloads, server
restarts and FS entry removals
Arthur Jean
created
62cea4e
deepseek: Fix empty text segments causing issues (#52199)
Click to expand commit body
## Context
Deepseek seems to have started to return empty text deltas, which causes
issues cause their upstream API does not like empty text blocks to be
included in their request.
In practice this caused issues like `An assistant message with
'tool_calls' must be followed by tool messages responding to each
'tool_call_id'..., because the payload looked like this:
```
User {
content: "Call the now tool a bunch of times",
},
Assistant {
content: Some(
"",
),
},
Tool {
content: "The current datetime is 2026-03-23T13:21:24.084848+00:00.",
tool_call_id: "call_00_iozCfHXJAPR13XwHiAwJ9OEw",
},
```
Now we filter out that empty text, which seems to fix the issue. This
matches our implementation for OpenAI
Closes #51854
<!-- What does this PR do, and why? How is it expected to impact users?
Not just what changed, but what motivated it and why this approach.
Link to Linear issue (e.g., ENG-123) or GitHub issue (e.g., Closes #456)
if one exists — helps with traceability. -->
## How to Review
<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
- See the review process guidelines for comment conventions -->
## Self-Review Checklist
<!-- Check before requesting review: -->
- [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:
- deepseek: Fixed issue with tool calling (`An assistant message with
'tool_calls' must be followed by tool messages responding to each
'tool_call_id'...`)