Commit log

634e91b editor: Enable diagnostics underlines in split editors (#54295)

Click to expand commit body
Release Notes:

- Enabled diagnostic underlining in the split editor views

Lukas Wirth created

5301958 ep: Don't throw away model version in reject events (#54159)

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

Closes #ISSUE

Release Notes:

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

Ben Kunkle created

db7bc73 Fix ep preview closing menus (#54194)

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

Closes #52559

Release Notes:

- Fixed an issue where holding the modifiers used in
`editor::AcceptEditPrediction` would cause the code action menu to
dissapear

Ben Kunkle created

1e04818 editor: Hide run button in gutter for unsaved buffers (#53195)

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

Closes #52942


## Demo:
### Before:


https://github.com/user-attachments/assets/fd3b69fc-468a-4fd1-82c9-4f1aa83c6474




### After:


https://github.com/user-attachments/assets/0a6c70a9-0a4a-4657-9fe8-21988fff9e80



## Release Notes:

- Fixed play button appearing in gutter for unsaved buffers where
clicking it was a no-op.

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>

João Soares and Lukas Wirth created

4d78f26 Add support for Netpbm image previews (#54256)

Click to expand commit body
This PR adds support for rendering **Netpbm** image formats (`.pbm`,
`.ppm`, `.pgm`) within Zed's built-in image viewer.

These formats are particularly useful for projects that want minimal
external dependencies, a common scenario in academic environments and
low-level graphics programming.

Since the underlying `image` crate and `GPUI` already provide support
for these codecs, this change explicitly exposes the `Pnm` variant
within `gpui::ImageFormat` by mapping it to `image::ImageFormat::Pnm`.

## Screenshots/Examples

Below is an example of `.pbm`, `.ppm`, and `.pgm` files being rendered
correctly in the image preview (images taken from
https://filesamples.com):
<img width="1917" height="1012" alt="pnm_example"
src="https://github.com/user-attachments/assets/0056133f-908c-4c91-ba9d-53aef0657b05"
/>



Release Notes:
  - Added support for PNM image previews (`.pbm`, `.ppm`, `.pgm`).

Vinícius Dutra created

b204582 Add NewFile keybinding to Welcome context (#52463)

Click to expand commit body
## Context

`ctrl-n` / `cmd-n` doesn't work on the Welcome tab. The global binding
lives under `Workspace && !Terminal` (macOS) and similar contexts that
don't include Welcome. The fix just adds the same binding to the Welcome
context block on all three platforms — same approach the font-size and
recent-project shortcuts already use there.

Closes #52426

## Demo

### Before:




https://github.com/user-attachments/assets/69becde8-25d2-45e3-9e7c-416b7937bd17

### After:




https://github.com/user-attachments/assets/6d9ede76-7adb-4527-bfef-c18d5b8a4fb4









## How to review

One line added per platform keymap file. Check that `ctrl-n` / `cmd-n`
maps to `workspace::NewFile` in the `Welcome` block of:
- `assets/keymaps/default-macos.json`
- `assets/keymaps/default-linux.json`
- `assets/keymaps/default-windows.json`

## 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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed `ctrl-n` / `cmd-n` (New File) not working on the Welcome tab

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>

João Soares and Danilo Leal created

4854ad9 Improve button keybinding alignment in workspace switcher (#54300)

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

Closes #54299 

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>

galuis116 , Danilo Leal , and Danilo Leal created

7ca737f git_graph: Fix pluralization of "Changed Files" in commit details (#54284)

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

Closes #54283 

Release Notes:

- Fixed: Git graph commit detail header now uses “1 Changed File” when
exactly one file changed, and “N Changed Files” otherwise, instead of
always saying “Changed Files”.

---------

Co-authored-by: Kunall Banerjee <hey@kimchiii.space>

galuis116 and Kunall Banerjee created

11b8980 outline_panel: Fix inconsistent keybinding label casing (#54307)

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

Closes #54305 
Release Notes:

- Fixed inconsistent keybinding hint casing in the outline panel
(“Toggle Panel With …”) by using standard keybinding rendering.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>

galuis116 , Danilo Leal , and Danilo Leal created

3323581 outline_panel: Fix Pin/Unpin tooltip does not update after state changes (#54310)

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

Closes #54309 

Release Notes:

- Fixed an outline panel issue where the pin/unpin tooltip could show
stale text after toggling.

galuis116 created

a7ca17f edit_prediction_ui: Add configure providers menu item to Copilot and Codestral (#53691)

Click to expand commit body
Codestral and copilot has a custom menu being built out. While the
common menu has the configure provider quick setting, the custom menu
doesn't have them. however it is a neat feature to have and quickly
switch it out.

Furthermore, copilot has an option of "Use zed AI" when copilot isn't
signed in. Instead add the complete list and configure provider when it
is not signed in

Before
<img width="256" height="588" alt="Screenshot 2026-04-11 at 4 46 47 PM"
src="https://github.com/user-attachments/assets/7de1c09c-a7a0-46d1-9572-fa5e970c77a8"
/>
<img width="230" height="480" alt="Screenshot 2026-04-11 at 4 47 00 PM"
src="https://github.com/user-attachments/assets/7075538f-1966-4ece-985f-b5e0d1d50f4a"
/>

After
<img width="259" height="663" alt="Screenshot 2026-04-11 at 5 02 48 PM"
src="https://github.com/user-attachments/assets/31094f7b-8efa-488a-87d8-1998e554ec74"
/>
<img width="242" height="580" alt="Screenshot 2026-04-11 at 5 03 21 PM"
src="https://github.com/user-attachments/assets/aba8ba09-1fbd-4c43-ba1f-af7ed51551a4"
/>
<img width="224" height="253" alt="Screenshot 2026-04-11 at 5 03 44 PM"
src="https://github.com/user-attachments/assets/108e7b6f-1216-4a2c-b0c0-7be3dc5438b0"
/>


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

Closes NA

Release Notes:

- added configure provider menu item to copilot and codestral

---------

Signed-off-by: Pranav <pranav10121@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>

Pranav Nedungadi and Ben Kunkle created

10cf73f agent_ui: Add setting for turning off content max-width (#54316)

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

This PR adds a boolean setting `limit_content_width` in the Agent Panel
settings that allows turning off the content max-width entirely, which
was added for better readability. We had a handful of requests for it,
so it feels fair.

<img width="500" alt="Screenshot 2026-04-20 at 8  57@2x"
src="https://github.com/user-attachments/assets/d2540b35-3fa8-4424-895d-dc499ac4839c"
/>

Release Notes:

- Agent: Added a new `limit_content_width` setting in the agent panel
that allows turning off the content max-width limit.

Danilo Leal created

6854196 fuzzy_nucleo: Add strings module and route several pickers through it (#54123)

Click to expand commit body
Stacked on top of #54112
This is part 2 of 3 towards #51197
More details from the original PR #53551

This PR includes the changes from #54112 , im not sure how to avoid
that, my understanding is that after that one is merged, this PR can be
rebased onto main and everything will be correct. You can also view the
version of this that does reflect the changes more directly here:
https://github.com/feitreim/zed/pull/1

## Changes

In this PR I added a more general string matching functionality to
`fuzzy_nucleo`, in order to have proper testing for this, I also changed
the command palette, tab switching picker, branch picker, and recent
projects picker to use this new implementation. I think the command
palette change in particular is awesome, just super nice to vaguely
gesture at the command i want and have it pop right up.

The main change here and departure from
https://github.com/zed-industries/zed/pull/37123 is realizing that the
primary reason for the regressions is actually how nucleo handles smart
case, the old `fuzzy` crate only uses the smart case argument to score
things differently, while nucleo actually filters on the case, eg. with
smart case query "Apple" wouldnt match "apple". To get around this we
always pass `CaseMatching::Ignore` to nucleo and implement the same
score modifications from fuzzy in our code.

There is a performance cost to that, of course, but from my testing it
is fairly static, not growing as the size increases, so maybe a query
takes 35 µs instead of 25 µs, but a query that takes 800 µs will only
take 820 µs.

Benchmark:
| kind | query | size | nucleo | fuzzy | nucleo/fuzzy |
  |---|---|---:|---:|---:|---:|
  | string | 1-word | 100 | 9.15 µs | 24.6 µs | 0.37× |
  | string | 1-word | 1000 | 150.2 µs | 207.2 µs | 0.72× |
  | string | 1-word | 10000 | 1.34 ms | 2.07 ms | 0.65× |
  | string | 2-word | 100 | 5.16 µs | 2.94 µs | 1.75× |
  | string | 2-word | 1000 | 29.0 µs | 11.0 µs | 2.63× |
  | string | 2-word | 10000 | 210.6 µs | 55.5 µs | 3.79× |
  | string | 4-word | 100 | 2.57 µs | 2.33 µs | 1.10× |
  | string | 4-word | 1000 | 6.98 µs | 5.85 µs | 1.19× |
  | string | 4-word | 10000 | 20.0 µs | 12.0 µs | 1.66× |

When I added the 4-word queries to the benchmarks I was actually really
concerned that the performance would be awful, making it unsuitable for
the command palette especially. However, I think due to the CharBag
pre-filtering when the query is longer, the performance is actually way
better than the 2 word case.

Video:


https://github.com/user-attachments/assets/3cd7221b-424f-4fd3-8df1-5543dcc340a3

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:

- Improved fuzzy matching in the command palette, branch picker, tab
switcher, and recent projects picker to support multi-word queries.

---------

Co-authored-by: Yara <git@yara.blue>

Finn Eitreim and Yara created

1115f76 copilot: Wire up reasoning tokens for GPT models (#53313)

Click to expand commit body
Fix two issues with reasoning support in the Copilot provider:

- Responses API path: use the user's thinking_effort setting instead of
hardcoding Medium effort
- Chat Completions path: compute and pass thinking_budget when thinking
is enabled, instead of unconditionally setting it to None

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

Closes #52140

Release Notes:

- Fixed a bug where copilot wouldn't use the thinking level the user's
have set

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>

Abhishek Tripathi , Bennet Bo Fenner , and Bennet Bo Fenner created

34dae65 editor: Cancel blame popover task when opening modal (#52525)

Click to expand commit body
Update all direct calls to `Editor::inline_blame_popover::take` to now
be calls to `Editor::hide_blame_popover` as this ensures that the
popover is also not shown in case its task still hasn't finished.

This fixes a bug where the inline git blame popover could be shown even
after the user had opened a modal. 

Release Notes:

- Fixed the inline Git blame popover sometimes appearing after opening a
modal.

---------

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

Tim Vermeulen and dino created

4fbac78 sidebar: Open project header ellipsis menu on right-click (#54317)

Click to expand commit body
This is just a refinement given it's pretty common for menus under
ellipsis icon buttons to also open as a context-menu through the mouse's
right-button click. This should make it slightly more convenient to
interact with this menu.

Release Notes:

- N/A

Danilo Leal created

c95b41c agent_ui: Add `show thread metadata` action (#54314)

Cameron Mcloughlin created

72b4126 ep: Change kept_rate definition to a more intuitive one (#54306)

Click to expand commit body
This change contains a number of fixes to make kept_rate more intuitive.
It also adds a CLI utility to print debug info on how the metric is
computed.

Release Notes:

- N/A

Oleksiy Syvokon created

f92178e theme: Associate .mlx extensions with OCaml (#54197)

Click to expand commit body
See:
https://github.com/zed-extensions/ocaml/blob/626cf8e76103fb2d8ea62fc06095df669aca4441/languages/mlx/config.toml#L3

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)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Release Notes:

- Associate .mlx extensions with OCaml

Gianni Chiappetta created

559fcff recent_projects: Show project name in dev container suggestion notification (#54297)

Click to expand commit body
Closes #52587

Release Notes:

- Improved the Dev Container suggestion notification to include the
project name, with the full path shown as a tooltip.

Smit Barmase created

9daf886 Move the worktree picker to the title bar + make it always visible (#54183)

Click to expand commit body
This PR makes Zed only have one worktree picker, as opposed to a flavor
of it in the title bar and another in the agent panel. It then moves it
to the title bar, making it always present, so that its trigger is
separate from the branch picker (which now contains only two views:
branches and stashes). For the worktree picker, I'm mostly favoring the
behavior we've introduced in the agent-panel-flavored version.

It also updates the title bar settings migration to use the JSON
`migrate_settings` helper instead of a shallow Tree-sitter rewrite, so
old `show_branch_icon = true` values are promoted to
`show_branch_status_icon = true` across root, platform, release-channel,
and profile settings scopes.

- [x] Move worktree creation logic to the `git_ui` crate to make this
more generic and less agent-specific
- [x] Double-check the remote use case and ensure nothing broke there
- [x] Improve the UX for the detached HEAD state; better invite people
to create a branch
- [x] Migrate `show_branch_icon = true` to `show_branch_status_icon =
true` across nested settings scopes

Suggested .rules additions

When migrating renamed settings keys that can appear in platform
overrides, release-channel overrides, or profiles, prefer the JSON
`migrations::migrate_settings` helper over shallow Tree-sitter key
rewrites unless tests explicitly cover every nested scope that can
contain the key.

Release Notes:

- Improved migration of the title bar branch status icon setting.

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>

Danilo Leal , Nathan Sobo , Zed Zippy , and Ben Brandt created

9e2c493 Fix info colors used for hint diagnostics (#54046)

Click to expand commit body
Super small update changing two instances where
`DiagnosticSeverity::HINT` was set to use the color for "info".

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

Closes #45637

Release Notes:

- Fixed various instances of hint level diagnostics using the color
designated for info

Malin von Matern created

32fa091 workspace: Skip read-only paths when choosing default save location (#53100)

Click to expand commit body
Fixes #42787

## Summary

- When "Go to Definition" navigates into a dependency (e.g. `.venv/`,
`node_modules/`), the save dialog for new files defaulted to that
directory
- `most_recent_active_path` now checks the `read_only_files` setting and
skips matching paths, falling back to the next eligible path, the
worktree root, or the home directory

## Design tradeoffs

We considered three approaches:

1. **Filter by `is_ignored`/`is_hidden`/`is_external` on worktree
entries** — catches `.venv` when gitignored or when it's a dotfile, but
also false-positives on directories like `.github/workflows/` that users
intentionally edit.

2. **Use preview tab status** — "Go to Definition" opens files as
preview tabs, so skipping preview paths targets the right intent. But it
doesn't work when preview tabs are disabled, and the signal is transient
(preview status changes as you interact with tabs).

3. **Use `read_only_files` setting** (this PR) — an explicit user
declaration of "I never want to edit files here." If you can't edit
them, you don't want to save new files next to them either. This is the
clearest signal of intent and respects user configuration. The tradeoff
is that `read_only_files` is empty by default, so users need to
configure it. But the kind of user bothered by the save dialog
defaulting to a dependency directory is the same kind of user who
already configures `read_only_files` (see
[#46827](https://github.com/zed-industries/zed/discussions/46827) for an
example).

## Test plan

- [x] Manual test: configured `read_only_files: ["**/.venv/**"]`, opened
project, Go to Definition into `.venv`, created new file — save dialog
defaults to project root
- [x] Added `test_most_recent_active_path_skips_read_only_paths`
- [x] All existing workspace tests pass

Release Notes:

- Fixed save dialog defaulting to dependency directories (e.g. `.venv/`,
`node_modules/`) after using Go to Definition, when those directories
are configured as `read_only_files`.

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>

Pedro Guedes and Lukas Wirth created

82e7917 diagnostics: Hide Inline Assist toolbar button when agent is disabled (#52706)

Click to expand commit body
### 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
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

#### Closes #52702

### Video 

[Screencast from 2026-03-30
13-17-08.webm](https://github.com/user-attachments/assets/8b0f6927-04d2-406b-b7fd-064a730b2f86)

Release Notes:

- Fixed the Inline Assist button showing in the Project Diagnostics
toolbar when the agent is disabled.

Om Chillure created

03414d8 languages: Fix Python LSP workspace folder detection in uv workspaces (#53781)

Click to expand commit body
Closes #47926

  ## Summary

When using a uv (or Poetry/PDM) workspace with multiple subprojects,
Python LSP servers (Pyright, Ruff, ty, etc.) are initialized with the
subproject directory as their workspace folder instead of the workspace
root. This happens because `PyprojectTomlManifestProvider::search()`
returns the first (innermost)
  `pyproject.toml` found walking up the directory tree.

  For example, in a uv workspace like:

  main-project/
  ├── pyproject.toml       # workspace root with [tool.uv.workspace]
  ├── uv.lock
  ├── packages/
  │   └── project-api/
  │       └── pyproject.toml   # subpackage
  └── projects/
      └── project-a/
          └── pyproject.toml   # subpackage

Opening a file in `packages/project-api/` would register
`packages/project-api/` as the LSP workspace folder instead of
`main-project/`.

  ## Approach

The fix uses lockfile existence as a heuristic to detect workspace
roots. The updated `search()` method walks all ancestors (similar to
`CargoManifestProvider`) and:

  - Tracks the **innermost** `pyproject.toml` as a fallback
- Tracks the **outermost** `pyproject.toml` that has a sibling lockfile
(`uv.lock`, `poetry.lock`, `pdm.lock`, or `Pipfile.lock`)
- Returns the outermost workspace root if found, otherwise falls back to
the innermost

This works within the existing `ManifestDelegate` interface (existence
checks only, no file content reading).

  | Scenario | Result |
  |---|---|
| uv workspace (root `pyproject.toml` + `uv.lock`) | Returns workspace
root |
| Poetry workspace (root `pyproject.toml` + `poetry.lock`) | Returns
workspace root |
| Simple project (single `pyproject.toml`, no lockfile) | Returns
project dir (unchanged) |
| Independent subprojects (no lockfile at any level) | Returns each
project's own dir (unchanged) |

Since the manifest provider is set at the Python **language** level,
this fix applies to all Python LSP servers (Pyright, Ruff, ty, etc.).

  ## Test plan

- [x] Added unit tests for `PyprojectTomlManifestProvider` covering all
scenarios above
- [x] Existing integration test
`test_running_multiple_instances_of_a_single_server_in_one_worktree`
passes (independent subprojects without lockfiles)
  - [x] `cargo check -p languages` compiles cleanly
- [x] Manual testing with a real uv workspace (Pyright and Ruff both
receive correct workspace root)

Release Notes:

- Fixed Python LSP servers (Pyright, Ruff, etc.) using the wrong
workspace folder in uv/Poetry/PDM workspaces with multiple subprojects.

Arthur Fournier created

c6772f8 editor: Immediately cancel popover task if the hover ends before the popover is shown (#53168)

Click to expand commit body
Hover popovers aren't immediately dismissed when the hover ends, but
this delay mechanism is currently causing popovers to sometimes still
briefly appear when the hover lasted too short to have triggered it.
Fixed by immediately cancelling the popover task when the hover ends
before the popover is displayed.

Most easily reproduced when setting the hover popover delay to a value
lower than the default 300ms (but it still happens sometimes with the
default value), because the popover hide delay is also 300ms. Here's it
with `"hover_popover_delay": 200`:


https://github.com/user-attachments/assets/6415d112-d8e0-4a87-9a79-a7ab559f20f2

After the fix:


https://github.com/user-attachments/assets/34782389-de4c-4a25-bd6e-4858b55028de

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:

- Fixed hover popovers sometimes briefly appearing after the hover
already ended.

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>

Tim Vermeulen and Lukas Wirth created

b22b149 terminal_element: Skip contrast adjustment for 24-bit color (#52162)

Click to expand commit body
## Context

Red and blue have inherently low perceptual luminance in APCA — pure
default Lc 45 threshold. This caused ensure_minimum_contrast to lighten
them, washing out the color to pink/lavender.

When an application explicitly specifies an RGB value via
ESC[38;2;R;G;Bm,
that color should be rendered as-is. Named and indexed colors continue
to be contrast-adjusted since they come from theme mappings



[zed-colors-before.webm](https://github.com/user-attachments/assets/1adb8c95-5dec-4744-b6f8-38f085602ef4)


[zed-colors-after.webm](https://github.com/user-attachments/assets/1968db26-9c02-48cf-9542-86a6c39899c0)


Closes: #50396 

<!-- 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. -->

## 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 true-color render in terminal

Nihal Kumar created

1db292d docs: Remove contradictory statements in edit prediction docs (#53714)

Click to expand commit body
Remove statements that imply that `subtle` edit prediction mode can only
be used if Zed is set as an edit provider, despite this not being the
case.

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

Release Notes:

- N/A

---------

Co-authored-by: morgankrey <morgan@zed.dev>

dastarruer and morgankrey created

554f5c6 Fix tsgo LSP (#54201)

Click to expand commit body
Bumps the `lsp-types` rev which contains patch for breaking change
introduced by upstream `typescript-go` repo

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:
- Fixed tsgo LSP

neo773 created

ec9be5c Feature flag overrides (#54206)

Click to expand commit body
This PR revamps our feature flag system, to enable richer iteration. 

Feature flags can now:
- Support enum values, for richer configuration
- Be manually set via the settings file
- Be manually set via the settings UI

This PR also adds a feature flag to demonstrate this behavior, a
`agent-thread-worktree-label`, which controls which how the worktree tag
UI displays.

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

Mikayla Maki created

8c5dfe5 Fix remote projects not appearing in the sidebar after adding them to the window (#54198)

Click to expand commit body
Release Notes:

- N/A

Max Brunsfeld created

34ae8bd Add list of open workspaces to the project group menu in the sidebar (#54207)

Click to expand commit body
This adds a list of open workspaces to the project group dropdown menu,
to make sure it's possible to understand what workspaces are open, might
be running language servers, etc. It also allows you to close a specific
workspace.

Single folder project:
<img width="229" height="170" alt="Screenshot 2026-04-17 at 4 13 39 PM"
src="https://github.com/user-attachments/assets/86fca86a-73f1-4295-97b0-e97951102139"
/>

Multi folder project:
<img width="381" height="193" alt="Screenshot 2026-04-17 at 2 26 14 PM"
src="https://github.com/user-attachments/assets/b3c0c299-adf9-45d1-a314-feee8a993ea8"
/>

Release Notes:


- N/A

Max Brunsfeld created

38270bc Fix Alt modifier stuck after Alt-Tab on Windows (#52220)

Click to expand commit body
## Context

Fixes a bug on Windows where the Alt modifier key becomes stuck in the
pressed state after using Alt-Tab to switch away from and back to the
Zed application.

### Root Cause
In `crates/gpui_windows/src/events.rs`, when the window loses focus
during Alt-Tab, the WM_KEYUP event for the Alt key is never delivered to
the application. The pending modifier state in GPUI remains as
`alt=true`. When the window regains focus, there is no synchronization
point to reset this stale state.

## How to Review

In `handle_activate_msg()` (WM_ACTIVATE handler), when the window is
activated:
1. Reset the cached modifier tracking state (`last_reported_modifiers`
and `last_reported_capslock` set to `None`)
2. Query the actual current modifier state from Windows using
`GetKeyState()` APIs
3. Dispatch a `ModifiersChanged` event with the true state to
synchronize GPUI

## 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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

I think it's difficult to add tests for this because it's
platform-dependent, but I recorded a video for comparison — sorry I only
have an anime‑style app to show the key presses.

<details>
  <summary>Video</summary>
  


https://github.com/user-attachments/assets/b545178c-b360-4e2b-8d60-d6f95a0b4b79



https://github.com/user-attachments/assets/bc4d41eb-6f42-4040-a588-0fc46c576db7


</details>

Closes #45485

Release Notes: 

- Fixed Alt modifier key stuck after Alt-Tab on Windows. Modifier state
is now synchronized when the window regains focus, ensuring correct key
interpretation after window switching.

HuaGu-Dragon created

555326a editor: Fix soft-wrap in auto-height editors (#54051)

Click to expand commit body
We had an internal report of soft wrap not working in git panel's commit
editor. Given the following settings:
```json
{
  "languages": {
    "Git Commit": {
      "preferred_line_length": 80,
      "soft_wrap": "preferred_line_length",
    },
  },
}
```
We would not soft-wrap in narrow viewports. As it turned out, the
problem was that we were always prefering a `preferred_line_length` as
our soft wrap boundary over the actual width of the editor.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] 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
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- Fixed git commits editor not respecting soft wrap boundaries.
- settings: Removed `"soft_wrap": "preferred_line_length"` in favour of
`"soft_wrap": "bounded"`. Soft wrap now always respects editor width
when it's enabled.

Piotr Osiewicz created

513ffaf agent: Clean up old remove worktree manage folder code (#54205)

Click to expand commit body
This is a follow up to: #54202 

`thread_worktree_archive.rs` had its own
walk-up-and-remove-empty-parents pass that ran after archiving a Zed
managed git worktree. It duplicated logic that #54202 moved into
`Repository::remove_worktree` (which also adds remote support for this)

This PR deletes the dead code path and its associated tests.

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

7b0f59b Clean up empty zed-created ancestor dirs of deleted worktrees (#54202)

Click to expand commit body
Release Notes:

- N/A

Max Brunsfeld created

1f3469c Fix YAML custom tags incorrectly showing as errors (#54148)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/49568

Read more: https://github.com/zed-industries/lsp-types/pull/14

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:

- Fixed YAML language server settings (like `customTags`) being ignored,
causing valid tags to show as errors.

Smit Barmase created

e454844 Fix latent race conditions in extension test (#54167)

Click to expand commit body
Hit a flake in this test in
https://github.com/zed-industries/zed/actions/runs/24555985980/job/71792549618.
Ran for 1000 iterations and hit a second race, now also hopefully fixed.

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 or Added/Fixed/Improved ...

Ben Kunkle created

4b1a456 Re-add reversal tracking tests (#54169)

Click to expand commit body
Reversal tracking tests were removed in
https://github.com/zed-industries/zed/pull/53912. This PR re-adds them

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 or Added/Fixed/Improved ...

Ben Kunkle created

76aab0c Fix RefCell panic in cloud model token counting (#54188)

Click to expand commit body
Fixes #54140

When `RulesLibrary::count_tokens` calls
`CloudLanguageModel::count_tokens` for Google cloud models, it does so
inside a `cx.update` closure, which holds a mutable borrow on the global
`AppCell`. The Google provider branch then called
`token_provider.auth_context(&cx.to_async())`, which created a new
`AsyncApp` handle and tried to take a shared borrow on the same
`RefCell` — causing a "RefCell already mutably borrowed" panic.

This only affects Google models because they are the only provider that
counts tokens server-side via an HTTP request (requiring
authentication). The other providers (Anthropic, OpenAI, xAI) count
tokens locally using tiktoken, so they never call `auth_context` during
`count_tokens`.

The fix makes `CloudLlmTokenProvider::auth_context` generic over `impl
AppContext` instead of requiring `&AsyncApp`. This allows the
`count_tokens` call site to pass `&App` directly (which reads entities
without re-borrowing the `RefCell`), while all other call sites that
already pass `&AsyncApp` (e.g. `stream_completion`, `refresh_models`)
continue to work unchanged.

Release Notes:

- Fixed a crash ("RefCell already mutably borrowed") that could occur
when counting tokens with Google cloud language models.

Richard Feldman created

87b47a4 Add Claude Opus 4.7 BYOK (#54077)

Click to expand commit body
<img width="767" height="428" alt="Screenshot 2026-04-16 at 11 29 13 AM"
src="https://github.com/user-attachments/assets/e8b450fa-aefc-4dec-a286-b211bd492011"
/>

Add Claude Opus 4.7 (`claude-opus-4-7`) to the anthropic, bedrock, and
opencode provider crates.

Key specs:
- 1M token context window
- 128k max output tokens
- Adaptive thinking support
- AWS Bedrock cross-region inference (global, US, EU, AU)

Release Notes:

- Added Claude Opus 4.7 as an available language model

Richard Feldman created

294feb9 agent_ui: Only surface the regenerate title item for the Zed agent (#54187)

Click to expand commit body
We currently, unfortunately, don't support title summarization and/or
regeneration for external agents, so we should hide that menu for them
so it's not misleading.

Release Notes:

- N/A

Danilo Leal created

722f308 fuzzy_nucleo: Optimize path matching with CharBag prefilter and add benchmarks (#54112)

Click to expand commit body
This PR was originally a part of
https://github.com/zed-industries/zed/pull/53551 so theres more info
about its motivation there.

- Add a CharBag prefilter on path candidates to skip irrelevant entries
before invoking nucleo's matcher.
- Use binary_search on sorted matched char indices when reconstructing
byte positions (perf improvement).
- Add a criterion benchmark comparing `fuzzy_nucleo` path matching
against the existing fuzzy crate.

Performance Chart:

| Benchmark | Size | Nucleo (before) | Nucleo (after) | Fuzzy |
Before/Fuzzy | After/Fuzzy |

|-----------|-----:|----------------:|---------------:|------:|-------------:|------------:|
  | 1-word | 100 | 14.14 µs | 9.12 µs | 9.06 µs | 1.56x | 1.01x |
  | 1-word | 1,000 | 164.37 µs | 114.11 µs | 110.43 µs | 1.49x | 1.03x |
  | 1-word | 10,000 | 1.83 ms | 1.39 ms | 1.41 ms | 1.30x | 0.99x |
  | 2-word | 100 | 12.83 µs | 3.51 µs | 979 ns | 13.10x | 3.59x |
  | 2-word | 1,000 | 131.65 µs | 33.46 µs | 6.37 µs | 20.67x | 5.25x |
  | 2-word | 10,000 | 1.24 ms | 338.84 µs | 52.46 µs | 23.64x | 6.46x |o

Exact Current State:
| query | size | nucleo | fuzzy | nucleo/fuzzy |
  |---|---:|---:|---:|---:|
  | 1-word | 100 | 8.62 µs | 9.22 µs | 0.93× |
  | 1-word | 1000 | 102 µs | 111 µs | 0.92× |
  | 1-word | 10000 | 1.13 ms | 1.28 ms | 0.88× |
  | 2-word | 100 | 3.48 µs | 0.98 µs | 3.55× |
  | 2-word | 1000 | 29.9 µs | 6.39 µs | 4.68× |
  | 2-word | 10000 | 271 µs | 53.4 µs | 5.08× |
  | 4-word | 100 | 0.85 µs | 0.53 µs | 1.60× |
  | 4-word | 1000 | 2.99 µs | 1.66 µs | 1.80× |
  | 4-word | 10000 | 20.1 µs | 9.14 µs | 2.20× |

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:

- fuzzy_nucleo: improved the performance of path matching

Finn Eitreim created

80a053e sidebar: Fix sidebar thread times (#54173)

Click to expand commit body
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>

Cameron Mcloughlin and Ben Brandt created

2c00c97 agent_ui: Fix UI issues with activity bar (#54178)

Click to expand commit body
- Ensures the activity bar properly reacts to the shrinking of the agent
panel's width
- Removes horizontal scroll from plan entries and instead add a tooltip
to display the full content when not fully visible

Release Notes:

- N/A

Danilo Leal created

73126dc editor: Introduce Bookmarks (#54174)

Click to expand commit body
Adds basic bookmark functionality to the editor, allowing users to mark
lines and later navigate between them. This is an MVP and will later be
expanded with a picker, vim marks integration and syntax tree based
bookmark positions. In this MVP bookmarks shift under external edits.

# UI
## Adding/Removing bookmarks
To add a bookmark:
- run the toggle bookmark action 
- hold secondary and click in the gutter
- open the context menu by right clicking in the gutter and select add
bookmark To remove a bookmark:
- run the toggle bookmark action 
- click on the bookmarks icon in the gutter
- open the context menu by right clicking in the gutter and select
remove bookmark

remove all bookmarks with `workspace: clear bookmarks`


# Implementation
This mirrors the implementation of breakpoints. The rendering of the
gutter was refactored to make place for bookmark icons and buttons:
- Code was extracted to a `Gutter` struct
- Runnables, breakpoints and bookmarks are now collected ahead of
layouting. Just before layouting we remove the items that collide and do
not have priority.
- The `phantom_breakpoint` is replaced by a `gutter_hover_button`

## In depth phantom breakpoint discussion:
This was phantom_breakpoint. It worked as follows:
 - A fake breakpoint was added to the list of breakpoints.
- While rendering the breakpoints it a breakpoint turned out to be fake
it would get a different description and look.
- The breakpoint list was edited run_indicators ("play buttons")
rendering to removes the fake breakpoint if it collided.

This would not scale to more functionality. Now we only render
breakpoints, bookmarks and run indicators. Then we render a button if
there is not breakpoint, bookmark or run indicator already present. We
can do so since the rendering of such "gutter indicators" has been
refactored into two phases:
 - collect the items.
 - render them if no higher priority item collides.

This is far easier and more readable which enabled me to easily take the
phantom_breakpoint system and use it for placing bookmarks as well :)

Note: this was previously merged but it needed a better squashed commit
message. For the actual PR see: 51404. This reverts commit
7e523a2d2b23b464e49d5db7c1bb452af3b19b1d.

Release Notes:

- Added Bookmarks

Co-authored-by: Austin Cummings <me@austincummings.com>

Yara 🏳️‍⚧️ and Austin Cummings created

7b01267 Improve edit prediction button sign in copy (#54063)

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

Closes #ISSUE

Release Notes:

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

Ben Kunkle created

e3718e5 ep: Send preferred experiment in a header (#54154)

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

Closes #ISSUE

Release Notes:

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

Ben Kunkle created

7e523a2 Revert "editor: Bookmarks MVP" to update its description (#54163)

Click to expand commit body
Reverts zed-industries/zed#51404 because I forgot to updated the
squashed commits description ....

Yara 🏳️‍⚧️ created

79473da editor: Bookmarks MVP (#51404)

Click to expand commit body
Closes #4526

Adds basic bookmark functionality to the editor, allowing users to mark
lines and later navigate between them.

### What's new

**Toggling bookmarks**
Users can toggle a bookmark on the current line(s) via the `editor:
toggle bookmark` action. A bookmark icon appears in the gutter for each
bookmarked line.

**Navigation**
Two new actions, `editor: go to next bookmark` and `editor: go to
previous bookmark`, navigate between bookmarks in the current buffer,
wrapping around at the ends of the buffer.

**Viewing all bookmarks**
`editor: view bookmarks` opens all bookmarks across the project in a
multibuffer, similar to how references and diagnostics are surfaced.

**Clearing bookmarks**
`workspace: clear bookmarks` removes all bookmarks in the current
project.

**Persistence**
Bookmarks are persisted to the workspace database and restored when the
workspace is reopened. They are stored as `(path, row)` pairs and
resolved back to text anchors. Out of range or unresolvable bookmarks
are skipped with a logged warning.

**Gutter rendering**
Bookmark icons are rendered in the gutter using the existing gutter
button layout system, consistent with breakpoints. They are suppressed
on lines that already show a breakpoint or phantom breakpoint indicator.
A new `gutter.bookmarks` setting (defaulting to `true`) controls their
visibility.

### What's left

- [x] Lazily load buffers that have bookmarks
- [x] Clean up test boilerplate
- [ ] Assign default keybindings
- [ ] Compare line of saved bookmarks with current buffer (gray out the
"stale" bookmarks)

### What's next (and nice to haves)
- [ ] Resilience against external edits
- [ ] Save column position with the bookmark
- [ ] Bookmarks attached to syntactic structures?
- [ ] Labeled bookmarks?

---

Release Notes:

- Added bookmarks: toggle bookmarks on lines with `editor: toggle
bookmark`, navigate with `editor: go to next bookmark` / `editor: go to
previous bookmark`, view all bookmarks with `editor: view bookmarks`,
and clear with `workspace: clear bookmarks`. Bookmarks are shown in the
gutter and persisted across sessions.

---------

Co-authored-by: Yara <git@yara.blue>

Austin Cummings and Yara created