Commit log

9d80376 agent investigation

Lukas Wirth created

9bbdff4 Fix double borrow when resizing bottom dock (#52383)

Click to expand commit body
Fixes a double borrow panic when resizing the bottom dock, introduced in
#52276

Release Notes:

- N/A

Max Brunsfeld created

103fa37 Use the most recent serial of kinds KeyPress or MousePress when copying (#52053)

Click to expand commit body
Release Notes:

- Fix copy for some Wayland users

Matthew Chisolm created

a6fa2d4 Don't grow agent panel to fill entire center (#52380)

Click to expand commit body
This PR simplifies the flexible-width agent panel's rendering such that
for now, it will not grow to fill the center area when there are no
files open. The problem with doing that is that it makes the bottom dock
invisible.

We could potentially revisit this, and just shrink the width of the
agent panel when the bottom dock was toggled, but that might feel
unstable, so for now I'm doing a simpler thing and just keeping the
center area visible even when it is empty.

Release Notes:

- N/A

Max Brunsfeld created

0a4269f git_ui: Fix Git Graph button flicker in Git panel (#52285)

Click to expand commit body
Release Notes:

- Fixed Git Graph button flicker in Git panel

Xiaobo Liu created

b5e85c8 gpui_linux: Set _NET_WM_NAME on X11 window creation to support UTF-8 titles (#51909)

Click to expand commit body
Release Notes:

- Fixed window title displaying garbled characters (e.g. "Zed Γ’β–ˆβ–ˆ
Settings") on Linux X11 due to missing UTF-8 encoding for the
`_NET_WM_NAME` property.

Valery Borovsky created

5baec85 Always open microphone track on call join (#52236)

Click to expand commit body
Release Notes:

- Fixed 1-2 seconds of audio silence when unmuting for the first time
during a call with Bluetooth headphones when `mute_on_join` is enabled.

Joseph T. Lyons created

06fabec Fix interleaved subscription operations (#52369)

Click to expand commit body
## Context

Since https://github.com/zed-industries/zed/pull/52232/, there have been
a lot of problems related to panels randomly hiding and showing
themselves. However, the code in that PR is pretty innocuous. It
shouldn't be having that kind of effect. However, it turns out there's a
bug in how GPUI subscriptions work that caused there to be orphaned
observe callbacks firing spuriously. The core sequence is captured in
`test_unsubscribe_during_callback_with_insert`, essentially you have to
have two observers on the same item (`SettingsStore`, in this case),
that both drop themselves. If the first observer _adds_ a callback onto
the _same item_, then the second observer will never successfully drop
itself.

While in there, I also fixed an unrelated bug that @maxbrunsfeld noticed
where if you have two callbacks on the same item, and an earlier
callback drops a later one, then the second callback will spuriously
fire.

I also added a few extra smoke tests to the subscription code, and a
test capturing the observed bug at the workspace level.

## 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: max <max@zed.dev>

Mikayla Maki and max created

58fec75 Add vim/emacs modeline support (#49267)

Click to expand commit body
Many editors such as vim and emacs support "modelines", a comment at the
beginning of the file that allows the file type to be explicitly
specified along with per-file specific settings

- The amount of configurations, style and settings mapping cannot be
handled in one go, so this opens up a lot of potential improvements.
- I left out the possiblity to have "zed" specific modelines for now,
but this could be potentially interesting.
- Mapping the mode or filetype to zed language names isn't obvious
either. We may want to make it configurable.

This is my first contribution to zed, be kind. I struggled a bit to find
the right place to add those settings. I use a similar approach as done
with editorconfig (merge_with_editorconfig). There might be better ways.

Closes #4762

Release Notes:

- Add basic emacs/vim modeline support.

Supersedes #41899, changes:
- limit reading to the first and last 1kb
- add documentation
- more variables handled
- add Arc around ModelineSettings to avoid extra cloning
- changed the way mode -> language mapping is done, thanks to
`modeline_aliases` language config
- drop vim ex: support
- made "Local Variables:" handling a separate commit, so we can drop it
easily
- various code style improvements

---------

Signed-off-by: Marc-AndrΓ© Lureau <marcandre.lureau@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Marc-Andre Lureau , Claude , and Conrad Irwin created

34807eb gpui_macos: Fix stale atlas key causing crash on None texture lookup (#51996)

Click to expand commit body
MetalAtlas::remove() used tiles_by_key.get(key) to look up the texture
ID but only called tiles_by_key.remove(key) when the texture became
fully unreferenced. When a tile was removed while other tiles remained
on the same texture, the key stayed in tiles_by_key as a stale entry.

Once subsequent removals deleted the texture, get_or_insert_with could
return the stale tile referencing a now-deleted texture slot, causing an
unwrap panic in MetalAtlasState::texture().

Fix: change .get(key) to .remove(key) unconditionally, matching the WGPU
and DirectX atlas implementations which already do this correctly.

Closes ZED-5KV

Release Notes:

- N/A or Added/Fixed/Improved ...

Lukas Wirth created

95852d4 workspace: Deduplicate navigation history entries (#44504)

Click to expand commit body
Closes #43545

Remove existing entries for an item before adding new ones to the
navigation history. This prevents Go Back (Ctrl-O) from bouncing between
the same items repeatedly.

Navigation pattern A->B->A->B->C now creates history [A,B,C] instead of
[A,B,A,B,C], making backward navigation more efficient.

Release Notes:

- N/A

Ignacio created

ddc327f gpui: Fix Vim jj keybinding intercepting j key from IME on macOS (#52192)

Click to expand commit body
## Fixes
Closes #28174 
Closes  #30393
Closes #36610
Closes #38616

Updates #31819
Updates #21136

## Context

There was an issue where CJK input could not be entered correctly when
certain keys used during IME composition conflicted with custom
keybindings while the CJK IME was enabled.

(In particular, in Vim mode, the `jj` keybinding in INSERT MODE could
not be entered correctly.)

This issue had already been fixed on Windows, but not on macOS (and
judging from the code, it is likely also present on Linux, although this
has not been verified).

In this change, we aligned the behavior with Windows.

Currently, on Windows, when the CJK ( or other ) IME is enabled, IME
input is prioritized.
Following this behavior, we updated macOS to also prioritize IME input.

| Input source | Source type | ASCII-capable | Result | Behavior |
|---|---|---|---|---|
| Japanese Hiragana | `KeyboardInputMode` | `false` | `true` | IME
handles key first |
| Japanese Romaji | `KeyboardInputMode` | `true` | `false` | Keybinding
matching first |
| Korean | `KeyboardInputMode` | `false` | `true` | IME handles key
first |
| Chinese Pinyin | `KeyboardInputMode` | `false` | `true` | IME handles
key first |
| Armenian | `KeyboardLayout` | `false` | `false` | Keybinding matching
first |
| Ukrainian | `KeyboardLayout` | `false` | `false` | Keybinding matching
first |
| English (ABC) | `KeyboardLayout` | `true` | `false` | Keybinding
matching first |


(Since similar approaches are used in tools like Vim and Neovim, we
consider this policy to be appropriate.)



## Videos
### before fix

https://github.com/user-attachments/assets/9b204220-d0de-4819-8dc4-00ba85169ef6

### after fix


https://github.com/user-attachments/assets/045cc808-8d29-42d2-9de5-f903fcb602db


## How to Review

This change modifies the gpui layer rather than Zed itself, so please
verify the behavior at the gpui level, not just within Zed.

## 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 IME composition on macOS in Vim insert mode with multi-stroke keybindings like `jj`

kouphasi created

954409d Fix crash when moving panels (#52366)

Click to expand commit body
Fixes a crash introduced by removing some defensive code in
https://github.com/zed-industries/zed/pull/52276

Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>

Max Brunsfeld and Mikayla Maki created

fc66e4e ep: Only report shown once prediction is previewed in subtle mode (#52362)

Click to expand commit body
## Context

We currently mark the current prediction as "shown" when the subtle mode
indicator appears. This doesn't really make sense. We make an effort
elsewhere to differentiate between a user rejecting a prediction that
they viewed vs. never saw in order to compute accurate metrics.

## 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

7ccef1d extension_api: Expose preferred_line_length in LanguageSettings (#52175)

Click to expand commit body
Closes #21822

## Context

Exposes `preferred_line_length` from `AllLanguageSettings` to the
Extension
API's `LanguageSettings` struct. Currently only `tab_size` is available
to
extensions, which prevents language extensions (e.g. Dart) from reading
the
user's preferred line length and forwarding it to their language server
(e.g. as `dart.lineLength`).

Related: https://github.com/zed-extensions/dart/issues/2

## How to Review

Small change β€” follow how `tab_size` is plumbed through:
1. WIT definition (`language-settings` record)
2. `extension_api` Rust struct
3. Host-side bridge conversion

The new field follows the exact same pattern.

## Self-Review Checklist

<!-- Check before requesting review: -->
- [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
  - Compile-time verified via WIT bindings; no runtime behavior change
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

Roman Cinis created

c7951fa agent_ui: Add support for pasting external files and directories (#52300)

Click to expand commit body
This PR adds support to paste external files and directories in Agent
Panel, along with the existing image paste path.

  Release Notes:

  - Added support for pasting files and folders into the Agent Panel.

Smit Barmase created

1358e42 title_bar: Display the org name in the user avatar trigger when not the personal (#52356)

Click to expand commit body
Follow up to https://github.com/zed-industries/zed/pull/52343

We'll be experimenting showing the org name in the avatar trigger button
when that's not the personal one.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Danilo Leal and Marshall Bowers created

d0baf21 Make PathList equality ignore display order (#52052)

Click to expand commit body
`PathList` stores both sorted paths and the original insertion order
(for display in the project panel). Previously, `PartialEq`, `Eq`, and
`Hash` were derived, which meant two `PathList` values with the same
paths but different display orderings were considered unequal.

This change replaces the derived impls with manual ones that only
compare
the sorted `paths` field, matching the semantic intent: a `PathList`
identifies a set of directories, and the display order is not part of
that identity.

Release Notes:

- N/A

Eric Holk created

64d4e01 terminal_view: Ensure terminal toggle shortcut appears in tooltip (#52357)

Click to expand commit body
Follow-up to the discussion in #51670.

@ConradIrwin, thanks for the review!

You're right about the other editors. VS Code and JetBrains use
dedicated shortcuts for bottom panel tabs, which exactly mirrors how
`ctrl-`` already behaves in Zed, so we don't need a new keybinding.

The reason I originally proposed `cmd-shift-j` was just to match the UI
pattern of the Debugger, which clearly shows `cmd-shift-d` on hover.
Because of a minor UI discoverability bug, the Terminal button's tooltip
was completely blank, which made it look like it just lacked a shortcut
entirely.

It turns out the Terminal button's internal `toggle_action()` method was
just telling the UI to look up `ToggleFocus` instead of
`terminal_panel::Toggle` (which is what `ctrl-`` is actually bound to).

I've updated this branch with a simple one-word fix that just points the
`toggle_action` to the correct keymap. The existing `ctrl-`` shortcut
now shows up perfectly in the hover tooltip. Good catch on the existing
shortcuts, keeps this much cleaner.

Co-authored-by: Michael Smolkin <msmolkin@users.noreply.github.com>

Michael Smolkin and Michael Smolkin created

d3ab0d9 agent: Mark subagent completions with Subagent intent (#52350)

Click to expand commit body
## Context

Ensure subagent threads build requests with the Subagent intent instead
of UserPrompt. This allows us to properly
attribute this as a tool call for certain providers instead of a user
request.

## 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:

- copilot_chat: Fix subagent requests being marked as user requests.

Ben Brandt created

2b8e9cc ep: Follow-ups for binding changes (#52258)

Click to expand commit body
## Context

- Updates docs for how to update edit prediction bindings
- Walks back how often we use tab to accept prediction where we
previously didn't; now just when in leading whitespace, tab does not
accept completion when completions menu is open
- migration for keymaps using the old `edit_prediction_conflict` key
context

## How to Review

The only code worth reviewing is the migration
<!-- 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 ...

---------

Co-authored-by: Max <max@zed.dev>

Ben Kunkle and Max created

100e543 Bump LiveKit SHA (#52354)

Click to expand commit body
Release Notes:

- N/A

Jakub Konka created

4c3179f Fix flaky terminal test for position / cell conversion (#52351)

Click to expand commit body
This PR fixes test flakiness introduced in
https://github.com/zed-industries/zed/pull/52111

The flakiness was because the test was using its own RNG, rather than
using gpui's built-in support for consistently-seeded RNGs in tests. The
fix was just to adjust the test to use the same logic for computing row
and column count as was introduced in the above PR.

Release Notes:

- N/A

Max Brunsfeld created

5d8c09e terminal_panel: Cmd+N opens new terminal where you are already working (#48609)

Click to expand commit body
Related to #31504

## Problem

If you drag a terminal into the center editor area as a tab, pressing
`Cmd+N` still opens the new terminal in the terminal panel instead of
next to the tab you're looking at.

## Solution

`Cmd+N` now checks whether the center pane is focused and its active tab
is a terminal. If both are true, the new terminal opens there. All other
behavior is unchanged.



https://github.com/user-attachments/assets/01036cb4-5f1f-456e-900e-eed2e53d61f5


## Test plan

- [ ] Drag a terminal into the center editor area. Focus it. Press
Cmd+N. New terminal opens as a center tab.
- [ ] Toggle terminal panel with Ctrl+`. Press Cmd+N. Opens in panel as
before.
- [ ] Focus a regular code file. Press Cmd+N. Opens in panel as before.
- [ ] Have a terminal in the center, but focus the terminal panel. Press
Cmd+N. Opens in panel as before.

Release Notes:

- Improved `terminal: New Terminal` (Cmd+N) to open in the center pane
when a terminal tab there is focused, instead of always opening in the
terminal panel.

Saurabh Singh created

1d5dfe6 cloud_api_types: Add `is_personal` field to `Organization` (#52349)

Click to expand commit body
This PR adds an `is_personal` field to the `Organization` DTO returned
from Cloud.

We're already returning this field in production.

Part of CLO-569.

Release Notes:

- N/A

Marshall Bowers created

9dd588a Allow PRs to not have a newline before the first release note (#52336)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

b1e94da eval: Port over evals for streaming edit tool (#52317)

Click to expand commit body
Setting up the infra for unit evals on the new tool. For now,
replicating the eval setup as close as possible to the old tool.


## 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

bf92d19 Fix switching between helix and vim modes to not require returning to non-modal in between (#51706)

Click to expand commit body
* Update `Vim::register` to correctly re-activate when either `vim_mode`
  or `helix_mode` are enabled, when they were previously disabled.
* Update `settings_ui::page_data::keymap_page` such that, when enabling
  or disabling `vim_mode` or `helix_mode`, the other setting is
  disabled, in case it is set. This ensures that only one mode is
  enabled at a time, as it should be.
  
Closes #51704 

Release Notes:

- Fixed switching between vim and helix mode needing multiple calls to
  have an effect while an editor is already open
- Update Settings UI such that, enabling vim or helix mode, now disables
  the other if it was previously active

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>

Finn Eitreim and dino created

aca5209 Make the agent panel have a flexible width (#52276)

Click to expand commit body
Release Notes:

- The agent panel now has a flexible width, similar to the center panes
of the workspace.

Max Brunsfeld created

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

Ben Kunkle created

da401c4 ep: Automate distillation (#51293)

Click to expand commit body
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

Danilo Leal created

f65ddc6 ui: Clean up unused icons (#52282)

Click to expand commit body
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