Cherry-pick of #54820 to preview
----
Release Notes:
- Added support for GPT 5.5 and GPT 5.5 Pro via the OpenAI provider
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Cherry-pick of #54516 to preview
----
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:
- agent: Fixed an issue where sessions would not immediately be cleaned
up when archiving
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Cherry-pick of #54723 to preview
----
Fixes#54618.
## Summary
After upgrading from `v0.232.x` to `v0.233.5+`, many users reported that
most
of their agent threads "disappeared" from the sidebar. The threads are
still
on disk in the legacy `threads.db` — but they never make it into
`sidebar_threads`, which is the only table the new sidebar UI reads
from, so
they're unreachable from the UI.
The root cause is a race between `ThreadStore::reload` and
`migrate_thread_metadata`:
- `ThreadStore::new` constructs with an empty in-memory `Vec` and kicks
off
`reload()` as a fire-and-forget task.
- `migrate_thread_metadata` runs during `agent_ui::init` and reads
`ThreadStore::global(cx).read(cx).entries()` synchronously, without
awaiting that reload.
- On cold boot the migration observes an empty iterator, early-returns
on
`to_migrate.is_empty()`, and never populates `sidebar_threads`. The
migration runs every launch, so it keeps losing the race forever.
Empirically, the only rows that *did* end up in `sidebar_threads` for
affected users came from `handle_conversation_event` writing rows when
the
user actively interacted with a thread. That's why users would typically
see
a handful of recently-touched threads rather than their full history.
## Fix
1. `ThreadStore` now tracks its current reload as a `Shared<Task<()>>`
and
exposes it via `reload_task()`. `migrate_thread_metadata` awaits this
before reading `entries()`.
2. Move the top-5-per-project unarchive pass out from under the
`is_first_migration` guard. Previously the rescue only ran when
`sidebar_threads` was empty, which meant any user who had even one
pre-existing row (e.g. from interacting with a thread on a prior launch)
got every subsequent batch of migrated threads archived with no rescue.
Running the rescue per-batch is stateless and idempotent — a user who
bounces between older releases and newer ones still gets their top 5 per
project surfaced each time a new batch is migrated.
No new KVP flag or one-shot backfill is needed: because the migration
already dedupes by session_id and runs on every launch, the next cold
boot
on a fixed build picks up any legacy threads that earlier launches
missed.
## Structure
The PR is split into two commits to make the diff easy to verify:
1. **Regression test** — fails on `main`, reproduces the cold-boot race
by
seeding the legacy DB, reinitializing `ThreadStore` to get a fresh empty
cache, and running the migration without parking first.
2. **The fix** — gates entries reads on `reload_task().await`, and
adjusts
the per-batch rescue policy. Updates one existing test's assertions to
match the new per-batch rescue policy.
## Validation
- The regression test fails on `main`, passes after the fix.
- All `agent_ui`, `agent::thread_store`, and `sidebar` lib tests pass.
- `./script/clippy -p agent -p agent_ui` is clean.
- End-to-end repro with a real on-disk data dir: launched `v0.230.2 →
v0.231.2 → v0.232.3 → v0.233.8` as a non-staff user, creating 15 threads
and interacting with one, reproduced the reported state (1 thread in
sidebar, 14 missing). Launched a debug build of this branch against the
same data dir: `Migrating 14 thread store entries` in the log, 15 rows
in
`sidebar_threads` with 6 unarchived (the interacted-with thread plus the
5 most recent), 9 archived and reachable from the archive view.
Release Notes:
- Fixed agent threads appearing to be missing after upgrading to the
parallel-agents sidebar. The thread-metadata migration was racing
against the on-disk thread store's async reload and skipping itself on
every launch. Upgrading to this build runs the migration successfully;
previously-missing threads are surfaced either in the sidebar (5 most
recent per project) or in the archive view.
Co-authored-by: Eric Holk <eric@zed.dev>
Cherry-pick of #54710 to preview
----
- #54632 unintentionally reverted changes introduced in #54681, likely
due to a merge conflict resolution issue.
See the original PR for the changes.
Release Notes:
- N/A
Co-authored-by: Danilo Leal <danilo@zed.dev>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Co-authored-by: Danilo Leal <danilo@zed.dev>
Cherry-pick of #54648 to preview
----
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:
- agent: Fixed an issue where clicking on "New from summary" would not
do anything
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Cherry-pick of #54612 to preview
----
This PR fixes a regression that was likely caused by:
https://github.com/zed-industries/zed/pull/54183 and wasn't caught
because I didn't add a regression test when I originally created the
feature.
The fix was only running the hooks when the worktree was just created,
and I added an integration test to prevent regressions from occurring
again in the future.
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#54598
Release Notes:
- git: Fix create worktree hook tasks running when switching worktrees
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
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:
- git: Fix remote branch picker
Cherry-pick of #54555 to preview
----
Fixes ZED-6Q0
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#54544
Release Notes:
- Fixed a crash that could occur when git worktree creating fails
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Cherry-pick of #54554 to preview
----
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#54547
Release Notes:
- bedrock: Fixed an issue where Opus 4.7 would not work because of an
invalid model ID
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
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
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
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>
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 ...
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 ...
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>
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>
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
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>
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.
## 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
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>
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
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.
## 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
## 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)
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>
#### 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>
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}`).
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
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>
## 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>
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>
The `ReviewBranchDiff`, `ResolveConflictsWithAgent`, and
`ResolveConflictedFilesWithAgent` actions are dispatched from the git UI
(`git_ui/src/project_diff.rs` and `git_ui/src/conflict_view.rs`), not
the agent panel. Their `source` field in the "Agent Thread Started"
telemetry event was set to `"agent_panel"` — this changes it to
`"git_panel"`.
Also threads the `source` parameter through `activate_draft` and
`ensure_draft` so that drafts created from the sidebar correctly report
`source = "sidebar"` instead of `"agent_panel"`.
Release Notes:
- N/A
Fixes an autoscroll bug that sometimes obscures the current row behind a
sticky header.
The bug was caused by `Editor::autoscroll_vertically` using the
`sticky_header_line_count` value that was cached during the previous
render, which isn't necessarily the number of sticky headers that the
scroll target needs, e.g.
- when jumping to a definition
- when pressing the up arrow key when the selection is in the topmost
visible row with `"vertical_scroll_margin": 0`
This fixes that by not caching `sticky_header_line_count` and instead
querying Tree-sitter on the fly to get the number of sticky headers that
the scroll target needs. Performance-wise this seem okay, I measured it
to take less than 200µs on my machine using a very large Rust file (and
there are still some possible ways to optimize this if necessary). In
particular, the pathological huge single-line file case as discussed in
#48450 shouldn't be an issue here because unlike the main sticky header
Tree-sitter query, here we query the outline items that contain a
particular point rather than those that intersect an entire row.
The `ScrollCursorTop` handler is also simplified to use the same shared
function for counting the number of sticky headers, since that action
doesn't rely on autoscroll.
Before:
https://github.com/user-attachments/assets/efb12776-82d9-4b94-baa5-347ec769fb98
After:
https://github.com/user-attachments/assets/236deb9f-fe06-43bd-b167-7bd3ab719e4c
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#50803
Release Notes:
- Fixed sticky headers sometimes obscuring the current row.
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
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
Closes#52352
Release Notes:
- Fixed system clipboard being overwritten when pasting over a visual
selection with Cmd-V/Ctrl-V in vim mode
Special thanks to @lingyaochu for finding out the root cause of the
issue.
Took the test from: https://github.com/zed-industries/zed/pull/54233
The git graph was using `buffer_ui_size` when calculating the canvas row
height and the table row height. This is wrong because elements such as
`Labels` in the graph table were rendered using `ui_font_size`. This PR
normalizes the row height calculation by always using `ui_font_size` for
the canvas and table row height calculation, and taking into account the
scaling factor.
This PR also fixes a bug where the bottom of the canvas could flicker on
its first redraw because the uniform list hadn't cached the viewport
size yet, and we underestimated the visible size of the canvas and
underdrew it. We now fallback to the window height as the viewport size.
This means we'll overdraw for a single frame whenever the uniform list
hasn't cached the last item size, but it avoids the flicker!
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#53492Closes#53469
Release Notes:
- git_graph: Fix misalignment issues between the graph canvas and the
graph table
---------
Co-authored-by: lingyaochu <zx0@mail.ustc.edu.cn>