Commit graph

36539 commits

Author SHA1 Message Date
Max Brunsfeld
fb87786375
Automatically switch to unified diffs when diff view is narrower than a configurable "minimum split diff width" (#52781)
Release Notes:

- The git diff diff view now automatically switches from split mode to
unified mode when the pane is narrower than a configurable minimum
column count. You can configure this via the new
`minimum_split_diff_width` setting.
2026-03-30 18:47:50 -07:00
Mikayla Maki
e39d5c9908
Remove easily derived sidebar state (#52790)
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
2026-03-31 01:46:08 +00:00
Mikayla Maki
8b0d49f474
Add existing user agent onboarding flow (#52787)
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
2026-03-31 01:39:47 +00:00
Eric Holk
3d29a0641e
sidebar: Add debug action to dump multi-workspace state (#52785)
Add a debug-only (`cfg(debug_assertions)`) action `DumpWorkspaceInfo`
that opens a read-only buffer with a dump of all workspace state. This
is useful for debugging the sidebar's view of workspaces and threads,
since the sidebar is currently the only way to see workspace-related
state.

For each workspace in the MultiWorkspace it shows:

- **Workspace DB ID** — for cross-referencing with persistence
- **All worktrees** with their paths, branches, and visibility
- **Whether each worktree is a git linked worktree** and where it links
to
- **Active agent thread** with title, session ID, status, and entry
count
- **Background agent threads** with the same detail
- **A warning** if the agent panel's workspace ID doesn't match the
workspace

Example output:
```
MultiWorkspace: 3 workspace(s)
Active workspace index: 1

--- Workspace 0 ---
Workspace DB ID: WorkspaceId(42)
Worktrees:
  - /Users/eric/repo/scratch3 [branch: refs/heads/scratch3] [linked worktree -> /Users/eric/repo/scratch]
Active thread: Git Worktree Path Consistency Check (session: 575b4349-...) [idle, 42 entries]

--- Workspace 1 (active) ---
Workspace DB ID: WorkspaceId(57)
Worktrees:
  - /Users/eric/repo/worktrees/zed/my-branch/zed [branch: refs/heads/my-branch] [linked worktree -> /Users/eric/repo/zed]
Active thread: Sidebar Not Displaying Git Worktree (session: 8f337c5c-...) [generating, 17 entries, awaiting confirmation]
Background threads (1):
  - Previous Investigation (session: abc12345-...) [idle, 83 entries]

--- Workspace 2 ---
Workspace DB ID: WorkspaceId(63)
Worktrees:
  - /Users/eric/repo/ex [branch: refs/heads/main]
Active thread: (none)
```

### Implementation

The action and handler live in the `sidebar` crate (close to what they
debug), following the same pattern as `language_tools` owning
`OpenLanguageServerLogs` and `debugger_tools` owning
`OpenDebugAdapterLogs`. The `zed` crate has only a one-line
registration.

Two small public accessors were added to `AgentPanel`:
- `workspace_id()` — exposes the panel's workspace ID for mismatch
detection
- `background_threads()` — exposes retained background conversation
views

Release Notes:

- N/A
2026-03-31 00:47:38 +00:00
Eric Holk
c9e45fe829
sidebar: Represent workspaces with no threads as a New Thread entry (#52778)
Workspaces with no threads weren't being shown in the sidebar which can
make it easy to lose your sense of place. This PR works to address that
by showing these workspaces as a "New Thread" button which also shows
the work trees associated with that workspace.

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-03-31 00:40:21 +00:00
Mikayla Maki
18ebc35c66
agent_settings: Add a way to set the layout settings en-masse (#52777)
Use `AgentSettings::get_layout(cx)` to retrieve the current, exact value of the user's layout settings, and `AgentSettings::set_layout(WindowLayout::agent())` or `AgentSettings::set_layout(cached_user_settings)` to write to 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
2026-03-30 23:50:25 +00:00
Mikayla Maki
6120452e63
Remove follow agent setting (#52775)
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
2026-03-30 22:58:07 +00:00
AltCode
b922ef5704
elixir: Disable Emmet by default (#52769)
The Emmet extension is enabled for Elixir files (`.ex`) because of the
`~H` sigil, but this is a bit unexpected if you work exclusively with
HEEx files (`.heex`) or you don't actually use Phoenix in any capacity

With this change, the user must explicitly opt into Emmet for Elixir
files, just like Tailwind

Release Notes:

- N/A
2026-03-30 22:32:58 +00:00
Joseph T. Lyons
e12d3def3f
Add Xcode Instrument images to troubleshooting doc (#52768)
Merge first: https://github.com/zed-industries/zed.dev/pull/1861

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-03-30 22:19:53 +00:00
Mikayla Maki
807207e27f
Own the workspace list in MultiWorkspace (#52546)
## Context

TODO

## Self-Review Checklist

<!-- Check before requesting review: -->
- [ ] 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

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-03-30 22:06:53 +00:00
Om Chillure
b48dd02d5a
Fix preserve settings during migrations (#52676)
## Context

`update_settings_file` deletes unrelated settings when the settings file
contains deprecated keys that need migration. For example, changing the
model from the Agent Panel overwrites the entire `agent` block instead
of just updating `default_model`.

The root cause is that `edits_for_update` used
`parse_json_with_comments` (strict parser), which returns `Err` on
deprecated/unknown fields. The error is swallowed by `log_err()`,
falling back to `Default::default()` (empty settings). The diff then
sees everything as new and replaces the entire block.

The fix switches to `parse_json` (the fallible/lenient parser), which
returns `Some(parsed_value)` even when deprecated fields are present -
the same pattern already used by `parse_and_migrate_zed_settings`.

## Fixes #41344

## How to Review

Single-file change in `settings_store.rs`, focus on `edits_for_update` .
Compare with `parse_and_migrate_zed_settings` (line 702) which already
uses the same `parse_json` approach.

## 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-21
00-36-12.webm](https://github.com/user-attachments/assets/31bd584a-2674-4c91-bdb2-69ed8fa35e88)


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

Release Notes:

- Fixed settings being overwritten when updating a single setting via UI
while the settings file contains deprecated keys.
2026-03-30 16:14:22 -04:00
Arthur Jean
8dbef08bbb
workspace: Stop middle-click event propagation on tab close (#49305)
## Summary

- On Linux, middle-clicking a tab to close it also triggered a paste of
the primary selection into the editor behind it, because the event
bubbled to the editor's `mouse_up()` handler
- Added `cx.stop_propagation()` in the `on_aux_click` handler in
`pane.rs` after closing the tab, matching the pattern already used by
the editor's own middle-click handler in `element.rs:1037`

Closes #47381

## Test plan

- [x] `cargo test -p workspace` passes (124 tests, 0 failures)
- [x] Select text in editor (filling primary selection), middle-click a
tab to close it → tab closes, no paste in the editor behind
- [x] Middle-click inside the editor area → still pastes from primary
selection as expected

Release Notes:

- Fixed middle-click on a tab to close it also pasting into the editor
on Linux.
2026-03-30 13:57:35 -04:00
Mikayla Maki
d74744a0e9
Swap KVP store used for collab favorites (#52756)
We should generally prefer using the normal key value store

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-03-30 10:20:36 -07:00
Danilo Leal
37cfeae9ec
collab_panel: Fix overlapping list items (#52754)
Small UI tweak post the introduction of the favorite feature so that
list items don't overlap each other.

Release Notes:

- N/A
2026-03-30 14:07:43 -03:00
Bennet Bo Fenner
ce61450984
sidebar: Remove AgentSessionInfo usage (#52732)
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

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-30 18:33:55 +02:00
Dorgan
06b5a150f1
docs: Add instructions for custom Expert builds (#52746)
Adds a section on how to configure Zed to use a custom Expert build.

There's already [*some*
docs](https://zed.dev/docs/configuring-languages#possible-configuration-options)
on how to do this, but I think it's important to make it clear that the
`--stdio` flag is also required for expert.

Release Notes:

- N/A
2026-03-30 16:28:22 +00:00
iam-liam
a46858ac21
gpui: Add dithering to linear gradient shader (#51211)
Linear gradients in dark color ranges (5-15% lightness) show visible
banding due to 8-bit quantization — only ~7 distinct values exist in
that range, producing hard steps instead of smooth transitions. This
affects every dark theme in Zed.

## What this does

Adds triangular-distributed dithering after gradient interpolation in
both the Metal and HLSL fragment shaders. The noise breaks up
quantization steps at the sub-pixel level, producing perceptually smooth
gradients.

## How it works

Two hash-based pseudo-random values (seeded from fragment position x
golden ratio) are summed to produce a triangular probability
distribution. This is added to the RGB channels at +/-1/255 amplitude.

- **Triangular PDF** — mean-zero, so no brightness shift across the
gradient
- **+/-1/255 amplitude** — below perceptual threshold, invisible on
bright gradients where 8-bit precision is already sufficient
- **Deterministic per-pixel** — seeded from position, no temporal
flickering
- **Zero-cost** — a couple of `fract`/`sin` per fragment, negligible vs.
the existing gradient math

### Channel-specific amplitudes

  | Channel | Amplitude | Rationale |

|---------|-----------|----------------------------------------------------------------------------------------------------|
| RGB | ±2/255 | Breaks dark-on-dark banding where adjacent 8-bit values
are perceptually close |
| Alpha | ±3/255 | Alpha gradients over dark backgrounds need stronger
noise — α × dark color = tiny composited steps |

The higher alpha amplitude is necessary because when a semi-transparent
gradient (e.g., 0.4 → 0.0 alpha) composites over a dark background, the
effective visible difference per quantization step is smaller than the
RGB case. ±3/255 is still well below the perceptual threshold on
bright/opaque elements.

## Scope

Two files changed, purely additive:

| File | Change |
|------|--------|
| `crates/gpui_macos/src/shaders.metal` | 13 lines after `mix()` in
`fill_color()` |
| `crates/gpui_windows/src/shaders.hlsl` | 13 lines after `lerp()` in
`gradient_color()` |

No changes to Rust code, no API changes, no new dependencies.

## Screenshots

<img width="1886" height="1003" alt="gradient_dithering_before"
src="https://github.com/user-attachments/assets/f75ae93b-b142-4d0e-9b61-e08f30fe1758"
/>

_Before_

<img width="1902" height="1052" alt="gradient_dithering_after"
src="https://github.com/user-attachments/assets/7aee9a36-f578-4e08-a846-44d092bcf043"
/>

_After_

## Test plan

This is a shader-level fix; no Rust test harness exists for visual
output. Manual testing is appropriate here. Visual regression tests
cover UI layout, not sub-pixel rendering quality.

**Manual (macOS):**

- [x] Dark gradients (5-13% lightness range) — banding eliminated
- [x] Bright gradients — no visible difference (dither amplitude below
precision threshold)
- [x] Oklab and sRGB color spaces — both paths dithered
- [x] Solid colours, pattern fills, checkerboard — unaffected (dither
only applies to LinearGradient case)
- [x] Alpha gradients (semi-transparent over dark bg) — banding
eliminated with alpha dithering
- [x] Path gradients (paint_path) — same fill_colour() function,
dithering applies

**Windows:** HLSL change is identical logic with HLSL built-ins
(`frac`/`lerp` vs `fract`/`mix`) — not tested locally.

Release Notes:

- Improved linear gradient rendering by adding dithering to eliminate
visible banding in dark color ranges

Liam
2026-03-30 16:23:07 +00:00
Piotr Osiewicz
1b9f3833f0
ui: Follow-up to ui crate teardown (#52747)
- **Remove some of the settings types from ui**
- **drag settings-less ui across the line**

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

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2026-03-30 18:04:21 +02:00
Ben Kunkle
c332be88fb
ep: Only fetch experiments if cx.is_staff (#52739)
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
2026-03-30 11:02:09 -04:00
Oleksiy Syvokon
22b71a8205
Fix panic in restore_diff_hunks when base text changes async (#52743)
Read base_text from the `MultiBufferSnapshot` instead of the live
`BufferDiff` entity in `prepare_restore_change`. The live entity's
base_text may already reflect a newer git HEAD while the snapshot still
holds old hunk byte ranges, causing `Rope::slice` to panic.

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 ZED-64P

Release Notes:

- N/A
2026-03-30 16:57:48 +02:00
Max Brunsfeld
8b7cc09457
Allow agent and terminal panels to be either flexible or fixed (#52694)
This PR adds the ability to change both the terminal and agent panels
between fixed and flexible sizing using the status bar button right
click menu. The value persists in your settings, similar to the dock
position.

I've also slightly tweaked the styling of the "Dock Left" and "Dock
Right" items in the right-click menu, adding the current value as an
item with a check beside it, to make it clear that it's a selectable
option.

Release Notes:

- N/A
2026-03-30 07:56:00 -07:00
Cole Miller
564d1fe938
git: Implement branch diff line counts efficiently (#52582)
Previously we were iterating over all hunks across all diffs on every
frame. Now we can read off the required information as a `SumTree`
summary in constant time.

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

Release Notes:

- git: Fixed bad performance in large branch diffs.
2026-03-30 14:23:02 +00:00
Om Chillure
3dde315a13
agent panel: Fix keybindings on Linux (#52672)
## Context

Fixes agent panel keybindings on Linux, mirroring the Windows fix from
#43692.

On Linux, `Ctrl+Y` (the previous `agent::AllowOnce` binding) is
intercepted by the focused text input as "redo", so the shortcut did
nothing when the message editor was focused. This is the same issue
fixed for Windows in #43692.

Changes (Linux and Windows):
- `agent::AllowAlways`: added `shift-alt-q` (was unbound on all
platforms)
- `agent::AllowOnce`: `ctrl-y` → `shift-alt-a` (Linux); already
`shift-alt-a` on Windows
- `agent::RejectOnce`: `shift-alt-x` on both platforms — `shift-alt-z`
conflicted with `agent::RejectAll` bound in other contexts, causing the
keybinding hint to not appear in the UI
- `agent::ToggleNavigationMenu`: `ctrl-shift-j` → `shift-alt-j` (Linux)
- `agent::ToggleOptionsMenu`: `ctrl-alt-i` → `shift-alt-i` (Linux)

Closes #52472

## How to Review

Two files changed: `assets/keymaps/default-linux.json` and
`assets/keymaps/default-windows.json`. Check the `AgentPanel` context
block in each.

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


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

Release Notes:

- Fixed agent panel `Allow`, `Always Allow`, and `Reject` keybindings
not working when the message editor is focused on Linux
e
2026-03-30 16:23:01 +02:00
Om Chillure
f18c963c79
acp_thread: Clarify max token limit error message (#52724)
When generation stops due to the per-response output limit, Zed was
surfacing "Max tokens reached", which implies the full context window
was exhausted. In reality, `max_output_tokens` (the per-response cap)
may have been hit a different condition.

This change distinguishes between the two cases: if `output_tokens >=
max_output_tokens`, it surfaces "Maximum output tokens reached";
otherwise it falls back to "Maximum tokens reached".

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

Closes #50254


Note : Reopens #50372 suggested by @bennetbo 

Release Notes:

- Fixed misleading "Max tokens reached" error by distinguishing between
per-response output token limit and total context window limit.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-30 13:55:03 +00:00
Ben Brandt
8e19c7474e
eval: Remove deprecated eval crate and workflow (#52733)
This is replaced by eval_cli

Release Notes:

- N/A
2026-03-30 13:33:29 +00:00
Ben Brandt
0d5504e3d4
eval_cli: Make things a bit more resilient to different Docker envs (#52731)
Release Notes:

- N/A
2026-03-30 13:18:22 +00:00
Joseph T. Lyons
64315583c8
Add the ability to reorder favorited collab channels (#52649)
Currently, if you try to re-order a favorite, the favorite will not
reorder, but the actual channels will.


https://github.com/user-attachments/assets/1fbab9ea-4ff4-473f-8de3-d3b60696c5a1

Additionally, a new bug seems to be that if you reorder channels, focus
jumps to a favorite:


https://github.com/user-attachments/assets/fa776ad2-8648-4e68-a253-a98f57bd4951

This PR allows for re-ordering of favorites independent of the actual
channels, and fixes the focusing bug


https://github.com/user-attachments/assets/977e575a-055c-4f26-8183-2744ff7f8f56

I didn't feel comfortable adding just the functionality/fixes alone, so
I added a function to represent the state of the collab panel as a list
of strings, like how testing around the project panel is, and wrote a
few tests to ensure the behavior was pinned down.

The tests cover testing:

- Favoriting/unfavoriting
- Reordering favorites without impacting order of channels in the
channels list
- Reordering channels in the channels list without impacting order of
favorites

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:

- Added the ability to reorder favorited collab channels.
2026-03-30 13:07:13 +00:00
Danilo Leal
3aeef321c3
sidebar: Improve remote project icon display (#52726)
Follow up to https://github.com/zed-industries/zed/pull/52720

This PR renders the same icons we do in the title bar depending on the
type of remote connection (SSH, WSL, etc.).

Release Notes:

- N/A
2026-03-30 09:37:58 -03:00
Yara 🏳️‍⚧️
94e90d94c8
docs: Add detailed tracy workflow to performance.md (#52574)
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 performance documentation in "Developing Zed"

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-30 14:33:42 +02:00
Lukas Wirth
8269e98be5
windows: Bump WindowsTerminal (#52562)
Release Notes:

- N/A or Added/Fixed/Improved ...
2026-03-30 14:20:21 +02:00
Om Chillure
9649a72e25
Fix wrong selection in outline panel (#52673)
Fix the outline entry sort order to prefer the entry whose heading
starts at the cursor position.

Closes #52418

Release Notes:

- Fixed Outline Panel selection being off-by-one in Markdown heading boundaries

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-03-30 11:58:48 +00:00
Tom Zaspel
bb14648c74
icons: Add EditorConfig file icon (#52705)
Release Notes:

- Added file icon for EditorConfig (`.editorconfig`)

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-30 08:31:52 -03:00
HuaGu-Dragon
0640e550b8
editor: Merge additional completion edits into primary undo transaction (#52699)
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 #45986

Release Notes:

- Fixed postfix snippets now creating 1 `undo` actions instead of 2.
2026-03-30 11:13:07 +00:00
Florian TREHAUT
2b4c217625
editor: Fix LSP extension commands failing at end of file (#52651)
## Context

Closes #51330

When the cursor is at the very end of a file,
`find_specific_language_server_in_selection` in
`crates/editor/src/lsp_ext.rs` silently skips the selection because the
anchor's `buffer_id` is `None`. This causes `editor: switch source
header` (clangd) and rust-analyzer extension commands (`expand macro`,
`open docs`, `open playground`) to do nothing.

The fix falls back to the singleton buffer's ID when the anchor has no
`buffer_id`.

## How to Review

Single file change in `crates/editor/src/lsp_ext.rs`. The diff is small
— pre-compute the singleton buffer ID, then use it as fallback in the
`filter_map` closure. An integration test verifies the fix.

## Self-Review Checklist

- [x] Reviewed own diff for quality, security, and reliability
- [x] No unsafe blocks
- [x] Tests pass (639 editor tests, 0 failures)
- [x] Manual testing: switch source header works at beginning, middle,
and end of C++ file

## Test Plan

- [x] New integration test: `test_find_language_server_at_end_of_file` —
verifies `find_specific_language_server_in_selection` returns `Some` at
both beginning and end of file
- [x] Confirmed the test fails without the fix (assertion on "should
find language server at end of file")
- [x] Manual: open a C++ file with clangd, place cursor at very end, run
`switch source header` — now correctly opens the header
- [x] Manual: verify it still works at beginning and middle of file
(non-regression)
- [x] `cargo test -p editor` — 639 passed, 0 failed

Release Notes:

- Fixed `editor: switch source header` and other LSP extension commands
not working when the cursor is at the very end of a file.

---------

Co-authored-by: Florian Trehaut <florian.trehaut@hillcode.fr>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-03-30 11:12:32 +00:00
Danilo Leal
4317359bcf
agent_ui: Fix auto-scroll in subagent cards (#52719)
Due to the async nature of markdown parsing, sometimes subagent cards
would not scroll fully to the bottom of the content because the
`scroll_to_bottom` function was being called just while the agent was
running... and sometimes, it'd finish running before the markdown had
fully finished parsing. The solution is to remove the `is_running`
conditional.

Release Notes:

- Agent: Improved auto-scroll of subagent content in preview cards,
ensuring the content is always visible until the end.
2026-03-30 08:09:58 -03:00
Danilo Leal
2c7ce423da
sidebar: Clarify which projects are remote in the UI (#52720)
This PR adds a little server icon to the side of the project label to
clarify that's a remote project. This is particularly useful when having
the remote and non-remote version of a project open in the same
multi-workspace/window.

<img width="400" height="282" alt="Screenshot 2026-03-30 at 7  59@2x"
src="https://github.com/user-attachments/assets/9bb3e02e-a64d-412e-88ef-57b18fb5e13d"
/>

Release Notes:

- N/A
2026-03-30 08:09:49 -03:00
Danilo Leal
63326552b6
collab_panel: Persist favorited channels in the global KV store (#52600)
Follow up to https://github.com/zed-industries/zed/pull/52541

Favorite channels weren't appearing on multiple windows because they
were serialized in a given window's collab panel state. This PR moves
them to the global key value store. Also, solved a little issue with
non-unique ids which was making clicking on the original instance of a
favorite channel do nothing.

Release Notes:

- N/A
2026-03-30 07:34:16 -03:00
Danilo Leal
28b73a1773
agent_ui: Refine the thinking block display design (#52608)
Follow up to https://github.com/zed-industries/zed/pull/51525
Closes https://github.com/zed-industries/zed/issues/52452

This PR further refines the behavior of thinking blocks in the agent
panel. In the PR linked above, I had previously made it auto-expand
while running but then auto-collapse when finished. Although that
reduced the sense of staleness when the model is thinking for too long,
it caused layout shift that many found jarring.

Therefore, this PR changes the behavior so that, by default, thinking
blocks render "almost" fully expanded. They will have a max-height and
will auto-scroll as content streams in. Therefore, this design fully
removes layout shift and still allows you to sort of follow along the
generated thinking content, even though sometimes it can be fast, in
which case you can always fully expand it. Lastly, I'm also adding a
"thinking display" setting that allows to choose between the "automatic"
behavior (what I just described, the default), always expanded, or
always collapsed.

Here's a preview:


https://github.com/user-attachments/assets/c96c89c7-40ed-4e9b-9ffc-f70b0659be47

Release Notes:

- Agent: Refined thinking block display, removing layout shift while
still allowing it to be readable while it streams in. It comes together
with a "Thinking Display" setting to control the behavior
2026-03-30 07:34:05 -03:00
Bennet Bo Fenner
f051677010
sidebar: Rework archive feature (#52534)
## Context

<!-- What does this PR do, and why? How is it expected to impact users?
     Not just what changed, but what motivated it and why this approach.

Link to Linear issue (e.g., ENG-123) or GitHub issue (e.g., Closes #456)
     if one exists — helps with traceability. -->

## How to Review

<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
     - See the review process guidelines for comment conventions -->

## Self-Review Checklist

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

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-30 10:17:48 +00:00
Piotr Osiewicz
b59ae5cf81
Bump Rust version to 1.94 (#51086)
Closes #ISSUE

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
2026-03-30 09:06:59 +00:00
Yao Xiao
7f7520b98e
agent_ui: Fix expanded message editor jitters while typing (#52612)
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 #52132.

*This PR previously also fixes the "expanded message editor not taking
up full height" part, but #52545 has already fixed that. Yet it seems to
leave a new issue (that was previously not revealed) behind, as
follows.*

This PR fixes the `Full + ExcludeOverscrollMargin` editor mode (which
the agent panel message editor uses in expanded mode), which could
jitter while typing because render-time layout and scroll-position
updates were clamping against different effective
`scroll_beyond_last_line` policies. This PR fixes that inconsistency so
the expanded editor stays stable while typing, and adds a regression
test covering `ExcludeOverscrollMargin` scroll clamping.


https://github.com/user-attachments/assets/86abf04d-c1a1-419b-96d0-8ca097c0acb0


https://github.com/user-attachments/assets/03dbdc3c-f58e-4378-8c6a-4bda1ae425c8

Release Notes:

- Fixed the expanded Agent Panel message editor so it no longer jitters
while typing.

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-03-30 08:19:09 +00:00
Max Brunsfeld
501e72dbe7
Fix crash when LSP returns multiple nested definition ranges (#52701)
This fixes a crash when navigating to multiple definitions in a
singleton buffer (https://github.com/zed-industries/zed/pull/51461).

Release Notes:

- N/A
2026-03-30 09:34:29 +02:00
Anas Limem
49ed4dc3fe
Hide cursor in embedded terminal when not focused (#52404)
## Context
Fixes #52063
This change hides the cursor in embedded terminal mode when not focused.
Embedded mode is used for read-only terminal output (like the Agent
panel). Showing a cursor in a read-only context when unfocused is
confusing, so we suppress it.
<img width="549" height="496" alt="Screenshot 2026-03-25 at 12 03 15"
src="https://github.com/user-attachments/assets/20b29c28-85a7-4f5e-87ea-acf47d15d506"
/>

## How to Review

The change is in a single file:
`crates/terminal_view/src/terminal_view.rs:754-761`.
Focus on the `should_show_cursor()` method 
Verify the logic correctly hides the cursor only when both conditions
are met (Embedded mode AND not focused).

## Self-Review Checklist

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

Release Notes:

- Fixed cursor visibility issue in embedded terminal panels
2026-03-30 07:32:42 +00:00
MostlyK
086060558f
gpui: Update animated image timing to pause when inactive (#52685)
- only advance frames and request animation frames while the window is
active.
- Reset last_frame_time to None when inactive to avoid fast catch-up
after resuming focus
- This fixes an issue where if you would have a gif open and lose focus,
the app tries to speedup to catch up the elapsed time


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

Might Close #21563, I shall measure the performance, I originally only
intended the fix to fix the speed up issue as I faced it while working
on gifs.


Release Notes:

- N/A or Added/Fixed/Improved ...
2026-03-30 07:31:22 +00:00
Mohammad Razeghi
ce7512b115
Fix terminal rename not working from context menu on inactive tabs (#50031)
Closes #49939

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

<img width="485" height="58" alt="Screenshot 2026-02-24 at 11 53 57 PM"
src="https://github.com/user-attachments/assets/651db04a-fc52-46ed-b017-ad586c817bdc"
/>

- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fix terminal rename not working from context menu on inactive tabs
2026-03-30 09:24:26 +02:00
Lukas Wirth
8cbcadf196
Make paste a separate undo transaction from preceding edits (#52003)
When undoing a paste, it is really confusing when that actually also
removes what was type right before the paste if the paste happened fast
enough after.

Release Notes:

- Fixed undoing a paste sometimes also undoing edits right before the
paste
2026-03-30 07:17:02 +00:00
Jakub Konka
a17a1c10c8
nix: Fix screen-casting when building Zed with nix (#52690)
Release Notes:

- Fixed screen-casting when building Zed with Nix.
2026-03-30 07:50:20 +02:00
Gustaf Johansson
3060e4170e
gpui: Add middle and right click mouse events for macOS (#49637)
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
  Manual testing performed successfully on Tahoe 26.2.
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed missing right- and middle-mouse button drag on MacOS

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-03-30 00:11:57 +02:00
Ben Brandt
24ea5e98da
eval_cli: Simplify build setup for more datasets (#52686)
Cleans up build setup and simplifies it a bunch so that we can use the
binary in more eval docker containers

Release Notes:

- N/A
2026-03-29 20:58:50 +00:00
Bennet Bo Fenner
46a0262dc5
agent: Remove duplicated description from tool schema (#52678)
Turns out we were including the description of a tool inside the schema
again, which I don't think is needed.
Before:
```
LanguageModelRequestTool {
    name: "web_search",
    description: "Search the web for information using your query.\nUse this when you need real-time information, facts, or data that might not be in your training.\nResults will include snippets and links from relevant web pages.",
    input_schema: Object {
        "required": Array [
            String("query"),
        ],
        "description": String("Search the web for information using your query.\nUse this when you need real-time information, facts, or data that might not be in your training.\nResults will include snippets and links from relevant web pages."),
        "type": String("object"),
        "properties": Object {
            "query": Object {
                "description": String("The search term or question to query on the web."),
                "type": String("string"),
            },
        },
        "additionalProperties": Bool(false),
    },
    use_input_streaming: false,
},
```



After:
```
LanguageModelRequestTool {
    name: "web_search",
    description: "Search the web for information using your query.\nUse this when you need real-time information, facts, or data that might not be in your training.\nResults will include snippets and links from relevant web pages.",
    input_schema: Object {
        "required": Array [
            String("query"),
        ],
        "type": String("object"),
        "properties": Object {
            "query": Object {
                "description": String("The search term or question to query on the web."),
                "type": String("string"),
            },
        },
        "additionalProperties": Bool(false),
    },
    use_input_streaming: false,
},
```


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

Release Notes:

- agent: Reduced amount of tokens consumed by tool descriptions
2026-03-29 20:59:18 +02:00