Commit graph

37876 commits

Author SHA1 Message Date
buildingvibes
fa0ba05b4c
Fix search bar not closing on escape in Helix keymap (#48847)
Release Notes:

- Fixed an issue where pressing `Escape` in the search bar did not dismiss it when using the Helix keymap, while it worked correctly in Vim mode.

Co-authored-by: buildingvibes <buildingvibes@users.noreply.github.com>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-22 21:20:55 +02:00
Mikhail Pertsev
0800c007c4
editor: Add generic navigation overlays (#52630)
Closes #52629

## Overview

Adds a generic editor-owned navigation overlay primitive for rendering
target ranges, anchored labels, and fade ranges. This gives [Helix amp
jump](https://github.com/zed-industries/zed/pull/43733), [Beam
Jump](https://github.com/zed-industries/zed/pull/45387), and future
jump-style features (like [this
one](https://github.com/zed-industries/zed/issues/14801)) a shared
editor abstraction for overlay layout and paint instead of
feature-specific render paths.


###  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
2026-04-22 19:10:21 +00:00
Peter Tripp
5920187e3a
jsonc: Recognize renovate.json as JSONC (#54527)
Self-Review Checklist:

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

Release Notes:

- N/A
2026-04-22 18:50:15 +00:00
Finn Eitreim
b4d10b8620
helix: Update keymap to support search and similar features with no tabs open (#51434)
Release Notes:

- helix: Fix some commands that you might want use when you have no
panes open, like project or symbol search.

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-22 18:42:57 +00:00
Wuji Chen
2c49900c6a
terminal: Fix heredoc commands failing in agent shell (#49106)
Release Notes:

- Fixed heredoc commands failing with "syntax error: unexpected end of
file" in AI Agent shell execution

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-22 18:19:40 +00:00
Max Brunsfeld
b38e8f17d8
Revert "language: Fix slow Tree-sitter parsing" (#54524)
It's currently not valid to limit the syntax highlighting cursor in this
way, because it prevents us from recognizing important patterns like
`(function_item name:(identifier) @function` if the function exceeds the
context length, which is common. We'll need to think harder about
whether there's a different solution the problem of slow queries in the
presence of large parse errors.

Reverts zed-industries/zed#52674
2026-04-22 18:19:12 +00:00
Chris Biscardi
8e4c679723
Handle git push when there is no remote (#54522)
Previously hitting `Publish` in the git panel would silently fail with
no error message if the git repo was new or didn't have a remote.

Now, when hitting `Publish` or attempting to push when there is no
remote using keyboard shortcuts, or using `Push To` or force push
options, an error message will be displayed.

<img width="1135" height="522" alt="Screenshot 2026-04-22 at 10 02
26 AM"
src="https://github.com/user-attachments/assets/93c5e7ee-371e-4c2c-961b-42501cbd7119"
/>

<img width="1135" height="522" alt="Screenshot 2026-04-22 at 10 02
36 AM"
src="https://github.com/user-attachments/assets/a923e5f2-4099-45b5-8fe2-eb78f4fc9f10"
/>


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 handling of `git push` when there is no remote available to push
to
2026-04-22 11:15:22 -07:00
galuis116
d4163c7031
command_palette: Fix showing keybinding in footer actions on zero matches (#54519)
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 #54517

Release Notes:

- Fixed Command Palette behavior where footer actions could still route
to a fallback hidden command when search returned no matches.
2026-04-22 11:12:32 -06:00
Conrad Irwin
9b8c468d80
Fix auto_save on_focus_change with modals (#54455)
Self-Review Checklist:

Closes #53863

Updates #53920
Updates #51949
Updates #45166

Release Notes:

- Updated auto_save_on_focus_change to handle modals better.
2026-04-22 17:03:34 +00:00
João Soares
828a64c3da
Stop eagerly clearing available code actions on row change (#53571) 2026-04-22 20:03:14 +03:00
Kirill Bulatov
76883bb983
Support code lens in the editor (#54100) 2026-04-22 20:02:45 +03:00
Kirill Bulatov
c92833611e
Handle more already supported image formats across the codebase (#54326) 2026-04-22 20:02:27 +03:00
Cole Miller
7fd07dda55
git: Only show header staging checkboxes when hovering the header itself (#54204)
Previously, we would show these checkboxes whenever hovering anywhere in
the `entries` group, which covers all headers and status entries. This
seems excessive, and also has a problem that the header checkboxes
disappear when the mouse moves over a non-header (status entry)
checkbox, presumably because those have `stop_propagation`. Now, we only
show the checkbox for a header when that specific header is hovered.

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
2026-04-22 12:53:30 -04:00
melocene
2a6ee04013
Add line_ending setting to control line-ending normalization (#54356)
Closes #49581

Adds a `line_ending` language setting that controls how line endings are
handled for new files and during format/save:

- `detect` (default) — detects existing line endings; new files use the
platform default
- `prefer_lf` / `prefer_crlf` — sets LF or CRLF for new files and files
with no existing convention, while preserving existing files
- `enforce_lf` / `enforce_crlf` — normalizes all line endings to LF or
CRLF on every format/save

The setting can be configured globally, per-language, or via
`.editorconfig`'s `end_of_line` property (which maps to `enforce_lf` /
`enforce_crlf`).

Release Notes:

- Added `line_ending` setting to control how line endings are handled
for new files and normalized on save.
- Added support for `.editorconfig` `end_of_line` property to enforce
line endings.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-04-22 22:21:26 +05:30
Conrad Irwin
c97442029a
Fix hang in replace all when the query contains non-ASCII text and regex-special characters (#54422)
Closes #54331
Updates #50848

Release Notes:

- Fixed hang in replace all when the query contained non-ASCII text and
regex-special characters
2026-04-22 10:47:52 -06:00
David Alecrim
bcf4c71fdb
vim: Respect auto_indent setting in o/O commands (#53620)
## Summary

Closes #53570

- `o` and `O` in normal mode were unconditionally copying the current
line's indentation into the new line, ignoring the `auto_indent` setting
entirely
- When `auto_indent: "none"` is set, new lines created by `o`/`O` now
start at column 0 as expected
- When `auto_indent` is `preserve_indent` or `syntax_aware`, behavior is
unchanged

The fix reads `language_settings_at` for the relevant row and splits
edits into two paths: `editor.edit()` (no autoindent) for `None`, and
`editor.edit_with_autoindent()` for everything else — mirroring the
approach already used by the non-vim `Newline` action.

## Test plan

- Added `test_o_auto_indent_none`: verifies `o`/`O` produce column-0
lines with `auto_indent: "none"`, including edge cases (first line,
empty line)
- Added `test_o_preserve_indent`: verifies `o`/`O` copy the current
line's indentation with `auto_indent: "preserve_indent"` (regression
guard)
- Existing neovim-backed tests (`test_o`, `test_insert_line_above`,
`test_o_comment`) continue to pass

Release Notes:

- Fixed vim `o`/`O` commands ignoring the `auto_indent: "none"` setting,
causing new lines to inherit indentation instead of starting at column 0
2026-04-22 16:40:49 +00:00
María Craig
2d30f95676
Add Parallel Agents documentation (#53535)
Adds documentation for the Parallel Agents feature.

## Changes

- **New page** `docs/src/ai/parallel-agents.md`: covers the Threads
Sidebar component, switching threads, the archive and search, importing
ACP threads, running multiple threads, multiple projects, worktree
isolation, and the default layout change
- **`docs/src/ai/overview.md`**: rewrites the Agentic editing section to
lead with the Threads Sidebar, adds Parallel Agents to the Getting
started links
- **`docs/src/ai/agent-panel.md`**: adds a cross-link to the Threads
Sidebar in Creating New Threads, removes the Navigating History section
(now covered in the Threads Sidebar docs)
- **`docs/src/SUMMARY.md`**: adds Parallel Agents between External
Agents and Inline Assistant

Release Notes:

- N/A

---------

Co-authored-by: Katie Geer <katie@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-04-22 13:28:41 -03:00
Tom Houlé
dfb8e3451c
settings: Remove the project_name project setting (#54511)
The `project_name` worktree setting was added in #36713 to let users
override the name shown in the window title. Its description ("The
displayed name of this project. If left empty, the root directory name
will be displayed.") suggests broader coverage, and #46440 reports the
reasonable expectation that it should also apply in the project
switcher. In practice the setting has only ever affected
`Workspace::update_window_title`, so everywhere else (recent projects,
the multi-worktree pane, ...) keeps falling back to the worktree root
name.

Rather than plumb the setting through each of those surfaces, I'm
removing it. Having a project-level setting control how your editor
displays the project has downsides. For example it means a checkout can
dictate UI in someone else's Zed. The natural home for a custom display
name is the workspace DB, set from the UI, which is what we should do if
we want this feature back.

If you want this back, the path forward is to store the display name in
`WorkspaceDb`, expose a UI affordance to edit it, and read it from
`update_window_title`, `recent_projects::get_recent_projects` /
`get_open_folders`, and any other places that currently derive a display
name from the worktree root.

Closes #46440

Release Notes:

- Removed the `project_name` project setting. It only ever affected the
OS window title, and the expectation that it would show up in the
project switcher and elsewhere is better served by a future UI-driven,
per-workspace setting stored locally.
2026-04-22 17:43:16 +02:00
Ben Brandt
58e2b7ecdd
acp: Use new Rust SDK (#52997)
Testing out Niko's new SDK design

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
2026-04-22 15:02:57 +00:00
Joseph T. Lyons
b7a6783f99
Bump Zed to v0.235 (#54508)
Release Notes:

- N/A
2026-04-22 14:39:10 +00:00
Dino
b7d35e528a
settings: Add auto completion to command aliases setting (#54496)
Update the JSON schema generated for the settings file in order to be
able to provide the list of valid actions when editing the values for
the `command_aliases` setting.

While reviewing https://github.com/zed-industries/zed/pull/52892 , I
noticed that, even though we already have support for this in the keymap
file, we don't support it for the `command_aliases` setting, so went
ahead and refactored this a bit such that the existing functionality for
the keymap file JSON schema could also be re-used for the
`command_aliases` setting.

Here's a quick big-picture breakdown of the relevant changes:

* Add `settings_content::ActionName` newtype, representing a simple
named action without arguments. The
`settings_content::ActionName::build_schema` function can be used to
build the schema of all possible action names.
* Add `settings_content::ActionWithArguments` newtype, representing an
action with arguments. This was mostly done so as to keep both action
without arguments and action with arguments newtypes together,
even though we don't have
`settings_content::ActionWithArguments::build_schema`, as it is only
used by the keymap schema generation logic and probably doesn't warrant
moving it here right now.
* Update both
`settings_content::WorkspaceSettingsContent::command_aliases` and
`workspace::workspace_settings::WorkspaceSettings::command_aliases` to
now be of type `HashMap<String, ActionName>` such that, when the json
schema for `command_aliases` is generate, it'll now reference the
`#/$defs/ActionName` schema.
* Update `SettingsStore::json_schema` so as to populate the
`#/$defs/ActionName` schema at runtime, replacing it with the actual
list of valid action names.

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:

- Added support for auto-completing action names on `command_aliases`
setting
2026-04-22 15:09:09 +01:00
Ben Brandt
2eafa6e6aa
language_models: Remove unused language model token counting (#54177)
Drop the `count_tokens` API and related implementations across
providers, and remove the unused `tiktoken-rs` dependency.

I was going to update the dependency becuase they finally released a fix
we needed. But then I realized we only used this api in one place, the
Rules library. And for most models it would have been wildly incorrect
becuase we use tiktoken, i.e. OpenAI tokenizers, for almost every model,
which is going to give incorrect results.

Given that, I just removed these because the difference in how we get
these has caused plenty of confusion in the past.

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
2026-04-22 13:39:48 +00:00
Bennet Bo Fenner
254c27d511
Revert "markdown: Apply theme syntax color to inline code in rendered markdown" (#54504)
Reverts zed-industries/zed#54475

This causes inline code blocks to look strange in some themes
2026-04-22 13:38:18 +00:00
Cavebat Software
8d1fc1a5db
vim: Ensure vgl does not select newline in helix mode (#54238)
Release Notes:

- Fixed Helix vgl now correctly selects to end of line without
including the newline character in the selection.

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-22 13:08:32 +00:00
Ben Kunkle
565f4d07fb
Fix missing V0331SeedModelPy references (#54500)
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 ...
2026-04-22 12:48:01 +00:00
sinder
5e3c762fb0
docs: Improve vim mode's command mnemonics section (#52892)
The "Command menonics" section in Zed's vim mode documentation made it
seem that the mentioned aliases were available, by default, which isn't
the case. These changes update the documentation to make it clearer that
this is meant to be set on the `command_aliases` setting and provides
and example configuration that users can easily copy and paste into
their settings file.

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

Release Notes:

- N/A

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-04-22 12:07:40 +00:00
Ben Kunkle
c90b42c5fb
ep: Add v0331 prompt format alias (#54328)
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 ...
2026-04-22 08:04:22 -04:00
Justin Su
5c5727c90a
Replace terminal SendText ctrl keybinds with SendKeystroke (#51728)
`SendKeystroke` seems to work for all ctrl keybinds. Prefer it over
`SendText` for readability.

showkey reports the same key sequences if I apply these keybinds to my
user keymap.

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] 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: Jakub Konka <kubkon@jakubkonka.com>
2026-04-22 11:00:04 +00:00
Justin Su
71f5dbdf26
Fix ctrl-delete keybind in the terminal (#51726)
showkey in Ghostty, iTerm2, and Terminal.app reports ctrl-delete as
`<ESC>[3;5~`.

I tested this keybind on macOS, where fish_key_reader correctly
interprets it as ctrl-delete.

Closes #51725

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed ctrl-delete keybind in the terminal

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-22 10:50:48 +00:00
Guilherme do Amaral Alves
7b082cbb6f
Add interleaved_reasoning option to openai compatible models (#54016)
Release Notes:

- Added interleaved_reasoning option to openai compatible models

---

This PR adds the interleaved_reasoning option for OpenAI-compatible
models, addressing the issue described in
https://github.com/ggml-org/llama.cpp/issues/20837.

In my testing, enabling interleaved_reasoning not only resolved the
tool-calling issues encountered by Qwen3.5 models in llama.cpp, but also
appeared to improve the model's coding capabilities. I have also
verified the outgoing requests using a proxy to ensure the parameter is
being sent correctly.It is also likely that this change will benefit
other models and providers as well.

Note: While I used AI to assist with the implementation, I have reviewed
and tested the changes. As I am relatively new to Rust and the Zed
codebase, I would appreciate any feedback or suggestions for
improvement. I am happy to make further adjustments if needed.

Thank you all for building such an amazing editor!

Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
2026-04-22 10:40:37 +00:00
Cameron Mcloughlin
8f0efe9f34
editor: Don't render editor behind sticky scroll header (#54465)
Previously, sticky scroll headers were painted on top of the main
editor. This works, but only if the editor background is a solid color

Bad:
<img width="603" height="319" alt="image"
src="https://github.com/user-attachments/assets/bf438003-a416-46a6-85bc-dfa767be067e"
/>


Good:
<img width="603" height="319" alt="image"
src="https://github.com/user-attachments/assets/e644e54a-6667-41e1-86d0-16e659bea844"
/>

Release Notes:

- Fixed: Editor no longer renders behind sticky scroll headers while
using a transparent theme
2026-04-22 11:22:14 +01:00
Joseph T. Lyons
25036ba8bc
Handle new profile form in migrate_settings and migrate_language_setting (#53681)
I noticed that there are helper migration functions that apply settings
transformations to multiple layers (root, platform, release-channel, and
profile):

`migrate_settings`
`migrate_language_setting`

Both of these handle the old settings profile forms, so I've updated
them to handle either form, for usage in historical and future
migrations.

Migration `m_2026_04_10` actually introduced a wrapper function to
provide to `migrate_settings` to handle both forms, which is what clued
me into the fact that I missed these migration helpers when I wrote the
`m_2026_04_01` originally (I didn't know they existed).

Self-Review Checklist:

- [X] I've reviewed my own diff for quality, security, and reliability
- [N/A] Unsafe blocks (if any) have justifying comments
- [N/A] 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

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-04-22 15:43:53 +05:30
Hamza Paracha
eee6b4c56c
project_panel: Allow New File from an empty hidden-root project (#53947)
This fixes #53869.

Creating a new file from the project panel background menu failed when a
single local project was empty and its root was hidden. In that state
there are no visible entries to seed `expanded_dir_ids`, so the action
returned early before opening the filename editor.

This initializes that state lazily from the root entry when creating a
new item, and adds a regression test for the empty hidden-root path.

Release Notes:

- Fixed creating a new file from the project panel context menu in empty
local projects
2026-04-22 10:05:30 +00:00
Kunall Banerjee
6b27522843
terminal: Handle menu::SecondaryConfirm properly (#48764)
Closes #48642.

- [ ] Tests or screenshots needed? - Tests written by AI. Not sure if
the test suite is setup correctly. I’ll come back later and see if the
tests are utter BS or not.
- [ ] Code Reviewed
- [x] Manual QA


Release Notes:

- Handle `menu::SecondaryConfirm` properly in the terminal

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2026-04-22 09:50:01 +00:00
Ben Brandt
2ca94a6032
acp: Register ACP sessions before load replay (#54431)
Insert sessions before awaiting `session/load` so replayed
`session/update` notifications can find the thread.

Self-Review Checklist:

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

Release Notes:

- acp: Fix for some replay events getting dropped when loading a
previous session.
2026-04-22 10:29:34 +02:00
Kento Yamamoto
14f0a254eb
markdown: Apply theme syntax color to inline code in rendered markdown (#54475)
## Summary

Inline code in rendered markdown previously used only the default
foreground color with a subtle background tint, which made it visually
indistinguishable from surrounding prose in some themes.

This change looks up the `text.literal` syntax style from the active
theme and applies its color to inline code, matching the treatment used
for inline code elsewhere in the editor (e.g. syntax highlighting in
source buffers). When the theme does not define `text.literal`, the
color falls back to the previous default.


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 inline code in rendered markdown to use the theme's
`text.literal` syntax color
2026-04-21 22:38:47 -07:00
Cameron Mcloughlin
3cd0f4c419
git: Improve diff performance (#54435)
Previously, passing an empty range to `range_to_buffer_range` would
return no ranges, which would trigger a fallback case in the git diff
that caused the entire multibuffer to be invalidated every frame.

This PR fixes `range_to_buffer_range`, so that it returns a sensible
range if the input range is empty, preventing the fallback behaviour and
edit expansion.

Self-Review Checklist:

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

Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2026-04-22 02:42:11 +00:00
Danilo Leal
310e367448
sidebar: Add scrollbar and max-height to the thread switcher (#54471)
Just a little refinement as I experienced the thread switcher modal
overflowing beyond the viewport if there were enough threads on it.
Additionally, took the opportunity to render a scrollbar inside of it,
too.

Release Notes:

- N/A
2026-04-21 23:16:56 -03:00
Danilo Leal
20afb83234
sidebar: Improve scrollbar overlap with thread item icon buttons (#54469)
This PR removes the overlap between the sidebar scrollbar and the thread
item icon buttons. Now, they don't render on top of each other anymore
:)

Release Notes:

- Agent: Improved the scrollbar overlap with the thread item icon
buttons in the threads sidebar.
2026-04-21 23:16:38 -03:00
saberoueslati
d2ddb4b2d9
markdown: Fix heading sizes and spacing in preview (#54374)
## Context

Heading sizes in the markdown preview were nearly identical to body
text, making `# H1`, `## H2`, and `### H3` visually indistinguishable.
The root cause was in `MarkdownStyle::themed()`: it set a
`heading_level_styles` override with font sizes of `rems(1.05–1.15)`,
which silently replaced the correct sizes applied by
`apply_heading_style` (via GPUI's `text_3xl`/`text_2xl`/`text_xl`
utilities `rems(1.875/1.5/1.25)`). Removing that override restores the
intended hierarchy. A `mt_4()` top margin was also added so consecutive
headings have visual breathing room.

Closes #54358

Video of manual test below :

[Screencast from 2026-04-21
02-22-12.webm](https://github.com/user-attachments/assets/8dd815f9-6f9b-4e88-bebb-28c79f019427)

## How to Review

`crates/markdown/src/markdown.rs` Three changes:
- (1) removed the `heading_level_styles` block from
`MarkdownStyle::themed()` that was overriding heading font sizes with
nearly-body-text values;
- (2) added `mt_4()` to the heading div in `push_markdown_heading` for
better vertical spacing;
- (3) added `test_heading_font_sizes_are_distinct` which renders H1–H3
and a paragraph then asserts that line heights strictly decrease from H1
down to body text.

## 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 heading sizes in the markdown preview to correctly reflect the
H1–H6 size hierarchy, matching standard markdown renderers
2026-04-21 19:03:40 -07:00
saberoueslati
481407479d
markdown: Add "Copy Link" to right-click context menu (#53758)
## Context

Closes #53741

Right-clicking on a link in any Markdown view showed no way to copy the
URL. The right-click handler already detected links for left-click
navigation, but the context menu was never extended to surface a
link-specific action.

Video of the manual test below :

[Screencast from 2026-04-13
00-29-49.webm](https://github.com/user-attachments/assets/fbde09ab-78da-4366-b1e0-e15e0d43442b)

## How to Review

- **`crates/markdown/src/markdown.rs`** — Added a `context_menu_link:
Option<SharedString>` field to `Markdown`. Added
`capture_for_context_menu(link)` (replaces the old
`capture_selection_for_context_menu`) which saves both selected text and
the hovered link together. Added a `context_menu_link()` accessor.
Updated the capture-phase right-click handler to detect the link under
the cursor via `rendered_text.link_for_source_index`. Added a
`event.button != MouseButton::Right` guard to the bubble-phase
`MouseDownEvent` handler to prevent selection logic from running on
right-click.

- **`crates/agent_ui/src/conversation_view/thread_view.rs`** — In
`render_message_context_menu`, after computing `has_selection`, also
reads `context_menu_link` from the same markdown chunks. Adds a "Copy
Link" entry with a separator at the top of the menu when a link URL is
present.

- **`crates/markdown_preview/src/markdown_preview_view.rs`** — Wraps the
markdown element in a `right_click_menu` with a "Copy Link" entry (when
a link is present).

Edit: There was a mention of a "Copy" and "Copy as Markdown" buttons.
After discussion, it was decided that I would re-add them fully fleshed
out in a separate PR

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the UI/UX checklist
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added "Copy Link" to the right-click context menu when clicking on a
  link in Markdown views (agent panel and Markdown preview)
2026-04-21 18:26:45 -07:00
galuis116
80ab748125
agent_ui: Fix inconsistent Rules keybinding in Toggle Agent Menu (#54420)
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 #54419

Release Notes:

- Fixed Agent menu shortcut context handling so Alt-Shift-L consistently
resolves to Rules (and displays correctly) when the Toggle Agent Menu is
open, while preserving existing global/context-specific shortcuts such
as Language Servers and onboarding bindings outside Agent menu context.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-04-21 22:06:59 -03:00
Finn Evers
c8cda37d17
compliance: Account for Zippy commits without PR in report summary (#54461)
The report summary previously assumed that every commit that had a
review would also have an associated PR - this was no longer the case
with Zippy PRs that are allowed without PR. This pull request fixes this
wrong assumption.

Release Notes:

- N/A
2026-04-22 02:01:56 +02:00
Om Chillure
6cdf954e2c
language: Fix slow Tree-sitter parsing (#52674)
#### Context

When tree-sitter parses a file with broken syntax (e.g. a large partial
SQL `VALUES` clause, or any language where a large chunk becomes
invalid), it can produce a single `ERROR` node spanning thousands of
lines. On every render frame, Zed queries this tree for syntax
highlights via `SyntaxMapCaptures`. Previously, only `set_byte_range`
was applied to the query cursor - this limits which captures are
*returned*, but tree-sitter still had to *traverse* the entire ERROR
subtree to find them, causing O(file size) work per frame and making
scrolling/editing visibly laggy.

The fix applies `set_containing_byte_range` to the highlight query
cursor, mirroring what `SyntaxMapMatches` already does for indentation
and bracket queries. This tells tree-sitter to skip subtrees that extend
far beyond the visible window, reducing traversal to the visible range
only.

**Note:** This fix eliminates the main freeze/stall caused by full-tree
traversal. A small amount of lag may still occur on very large broken
files, as tree-sitter still needs to parse the error-recovery structure.
Further improvements would require deeper changes to tree-sitter's query
execution or incremental parsing.


#### Closes #52390

#### How to Review

Small change — focus on
[syntax_map.rs:1119-1123](crates/language/src/syntax_map.rs#L1119) (the
fix) and the `containing_byte_range_for_captures` helper below it.
Compare with the existing `SyntaxMapMatches::new` path (line ~1255)
which uses the same pattern.

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

#### Video 
[Screencast from 2026-03-26
14-19-19.webm](https://github.com/user-attachments/assets/6628492a-f013-438a-836a-2740f6e2f266)


#### Note : Reopens previous work from closed PR #52475 (fork was
deleted)

Release Notes:

- Fixed laggy scrolling and editing in files with large broken syntax
regions (e.g. incomplete SQL `VALUES` clauses or large invalid blocks in
any language)

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-04-21 16:53:49 -07:00
Sandro Meier
bcaa1b5231
dev_container: Resolve compose service build args in Dockerfile expansion (#54270)
For docker-compose-based dev containers, build args live on the primary
compose service's `build.args`, not on `dev_container.build` (which is
`None` in the compose case). `expanded_dockerfile_content` only
consulted the latter, so `${…}` references in the service's Dockerfile —
e.g. `FROM ${BASE_IMAGE}` — were never substituted. Downstream callers
then invoked `docker inspect "${BASE_IMAGE}"` and `docker pull
"${BASE_IMAGE}"`, both of which fail and the dev container fails to
start.

A new unit test `test_expands_compose_service_args_in_dockerfile` mounts
a Dockerfile with `FROM ${BASE_IMAGE}` backed by a compose service whose
`build.args` define `BASE_IMAGE=test_image:latest`, and asserts both
`expanded_dockerfile_content` and `image_from_dockerfile` produce the
resolved reference.

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 dev container startup failing for docker-compose configs whose
service Dockerfile uses build-arg substitution in the FROM line (for
example, `FROM ${BASE_IMAGE}`).
2026-04-21 16:44:44 -07:00
MostlyK
9e18c6a6a1
Bump jupyter-websocket-client to 1.1.0 (#54442)
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
2026-04-21 23:39:53 +00:00
galuis116
5df4e1eaa0
recent_projects: Fix remote projects dialog not showing vertical scrollbar for overflow content (#54425)
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 #54424

Release Notes:

- N/A

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-04-21 20:39:06 -03:00
Finn Evers
4d6311749a
compliance: Allow Zippy version bumps (#54342)
This adds checks for the Zed Zippy version bumps. These are rather
strict, but since we should also be strict with the bumps themselves, I
consider this the better approach.

Note this intentionally only includes the version bumps here for now.

Release Notes:

- N/A
2026-04-22 01:17:21 +02:00
Hitesh Rohira
f8295ffaca
Fix blank git diff view on Windows when working in a subfolder (#52234)
## Context

Fixes a Windows path handling bug in `crates/util/src/paths.rs` when
computing a relative path via `strip_prefix`. (Closes #51758 )

Previously, Windows prefix matching only handled drive-letter
case-insensitivity. It could still fail when the parent and child paths
referred to the same location but used different separator styles (`\`
vs `/`) or different casing in later path segments. That caused valid
Windows paths to return `None` instead of a relative path, which caused
the diff to break.

This change normalizes Windows paths for prefix comparison by
lowercasing any ASCII characters and converting backslashes to forward
slashes before checking the prefix.

Tests were added for mixed-case and mixed-separator Windows paths to
cover the bug and prevent further regressions.

## How to Review

1. Check the `strip_prefix` Windows branch to confirm the new
normalization logic only affects prefix comparison and still rejects
partial-segment matches.
2. Check the added tests for mixed separator and mixed casing cases on
Windows paths.

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

- Fix blank git diff view on Windows when working in a subfolder

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2026-04-21 18:24:49 -04:00
Thomas Jensen
2542b71a24
extension_host: Fix Windows manifest paths when uploading extensions to WSL remote (#50653)
Closes #42731 

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)

<img width="1440" height="900" alt="Screenshot 2026-03-09 at 5 10 46 PM"
src="https://github.com/user-attachments/assets/bf124481-dc10-44e9-aaab-3e562d71e41e"
/>

Release Notes:

- Fixed Windows path handling in extension manifests to ensure
extensions upload correctly to remote environments like WSL.

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2026-04-21 17:32:54 -04:00