Commit graph

4727 commits

Author SHA1 Message Date
Eric Holk
a9e7b77672
gpui: Record input-to-frame latency histogram (#53822)
Adds instrumentation to track input-to-frame latency in GPUI windows,
helping diagnose input responsiveness issues.

## What this does

- Records the time between when an input event is dispatched and when
the resulting frame is presented, capturing worst-case latency when
multiple events are coalesced into a single frame.
- Tracks how many input events get coalesced per rendered frame.
- Both metrics are stored in
[HdrHistogram](https://docs.rs/hdrhistogram) instances with 3
significant digits of precision.
- Latency is only recorded when the input event actually causes a redraw
(i.e. marks the window dirty), so idle mouse moves and other no-op
events don't skew the data.
- Adds a `Dump Input Latency Histogram` command that opens a buffer with
a formatted report including percentile breakdowns and visual
distribution bars.

## Example output

The report shows percentile latencies, a bucketed distribution with bar
charts, and a per-frame event coalescing breakdown.

Release Notes:

- N/A

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Cole Miller <cole@zed.dev>
2026-04-16 17:38:58 +00:00
Richard Feldman
eb254be084
vim: Don't steal focus from non-pane panels for search commands (#54012)
When the Agent panel (or any dock panel without its own pane) is focused
and a file is open in the center editor, pressing `/` in vim mode would
steal focus to the buffer's search bar instead of staying on the panel.

## Root cause

`Vim::pane()` calls `workspace.focused_pane()`, which falls back to the
center pane when a dock panel without its own `pane()` method is
focused. Vim search commands then open the `BufferSearchBar` on the
center pane and focus it, stealing focus from the panel.

## Fix

Add a guard in `Vim::pane()` that returns `None` when the resolved pane
doesn't actually contain focus. This prevents all vim search/match
commands (`/`, `?`, `n`, `N`, `*`, `#`, etc.) from stealing focus from
non-pane panels.

All 497 vim tests and 253 agent_ui tests pass.

Release Notes:

- Fixed vim search (`/`) stealing focus from the Agent panel when a file
is open in the editor.
2026-04-16 11:47:59 -04:00
Bennet Bo Fenner
dae1b20289
action_log: Fix race condition when committing changes (#53884)
Sometimes the action log would not auto-accept agent edits when
commiting.

Gpt-5.4 identified this race condition:

This fixes a race where `keep_committed_edits` could run after
`head_commit` changed but before the new git base text had been applied,
leaving committed agent edits marked as unreviewed; `ActionLog` now
waits for an explicit `BufferDiffEvent::BaseTextChanged` instead of
inferring readiness from generic `DiffChanged` activity, so it only
accepts edits after the diff base itself is actually updated.

- `ReloadGitState` updates `head_commit` before `ReloadBufferDiffBases`
finishes loading and applying the new HEAD text.
- In that gap, an unrelated `DiffChanged` can fire from a normal diff
recalculation.
- The old logic treated that event as the commit signal and ran
`keep_committed_edits` too early.
- `keep_committed_edits` then read stale diff base text, so it failed to
match the committed agent edits.
- When the real base-text update arrived later, the HEAD had already
been overwritten (`old_head`), and the edits stayed unreviewed.

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:

- Fixed an issue where committing agent written code would sometimes not
mark edits as accepted
2026-04-16 12:54:17 +00:00
Bennet Bo Fenner
ff108c89d7
acp: Fix close session not found error (#54009)
Follow up to #53999

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-04-16 14:11:06 +02:00
Matthew Chisolm
f9662f484d
feedback: Add action for listing installed extensions (#48664)
Closes #48037

- [X] Tests or screenshots needed? <--- Let me know if tests are needed
- [ ] Code Reviewed
- [X] Manual QA

Release Notes:

- Added action to copy installed extensions to clipboard

<details><summary>Picture of Action</summary><img width="1924"
height="1044" alt="Screenshot from 2026-03-03 01-00-22"
src="https://github.com/user-attachments/assets/6abe9587-968d-48e9-a3b7-80602d26375d"
/></details>
<details><summary>Picture of Modal</summary>
<img width="1920" height="1080" alt="Screenshot from 2026-03-03
01-00-35"
src="https://github.com/user-attachments/assets/b30a743d-3324-4b01-a92c-a0476908e050"
/>
</details>
<details><summary>Picture of Docs</summary>
<img width="1936" height="1066" alt="Screenshot from 2026-03-03
01-19-53"
src="https://github.com/user-attachments/assets/40dab840-c5e2-4248-b7a6-1924f0b6610c"
/>
</details>

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-04-16 07:45:38 +00:00
David Alecrim
0ddc7d0666
Fix crash and enable GIF animation in markdown preview (#53459)
Closes #53426

Fixes a crash when previewing markdown with GIFs, and enables GIF
animation in the preview panel.

Two issues: a partially-decoded GIF could crash the preview, and GIFs in
markdown previews never animated.

The fix for GIFs with empty comment extensions (`21 fe 00`) was
implemented upstream in the `image-gif` crate (image-rs/image-gif#228)
and released as `gif 0.14.2`. This PR bumps the dependency so those GIFs
now render correctly in the markdown preview without any further changes
to Zed itself.

## Screenshot
Left=VS Code
Right=Zed


https://github.com/user-attachments/assets/7950abbc-1a79-4f01-a425-9595aa688325

Release Notes:

- Fixed a crash in certain scenarios when opening Markdown Preview with
GIFs.
- Added GIF animation support for Markdown Preview.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-04-16 10:44:00 +03:00
Danilo Leal
74de476364
Simplify parallel agents onboarding (#53854)
- Adds a status toast to the announcement banner for surfacing the
layout revert option
- Removes the agent panel banner

A good chunk of the diff here was because I touched up the status toast
component API a little bit.

Release Notes:

- N/A
2026-04-15 21:51:15 -03:00
Joseph T. Lyons
13185d68ff
Bump Zed to v0.234 (#53986)
Release Notes:

- N/A
2026-04-15 15:08:53 +00:00
Katie Geer
e69b112755
agent: Add telemetry for parallel agents (#52919)
Track new telemetry:


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: 

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-04-15 12:41:12 +02:00
Eric Holk
bc84d80ea7
settings_ui: Gate CLI open behavior setting on feature flag (#53964)
The `cli_default_open_behavior` setting controls how `zed <path>` opens
directories, but the underlying behavior is gated behind the
`AgentV2FeatureFlag` in `open_listener.rs`. Without the flag enabled,
the setting has no effect — Zed always falls back to `NewWindow`
behavior.

This change gates the settings UI entry behind the same feature flag so
it only appears when the feature is actually active.

**Changes:**
- Converted `general_settings_section()` from a fixed-size array to a
`Vec` so the CLI setting can be conditionally appended
- Added `feature_flags` as a dependency to `settings_ui`

Release Notes:

- N/A
2026-04-15 01:10:36 -07:00
Ben Brandt
a750316275
acp: Initial support for ACP usage (#53894)
Adds initial beta test of ACP usage stats. Behind a flag for now while
we work on standardizing the usage values.

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-14 23:55:08 +02:00
Oleksiy Syvokon
edac6a7b7a
Move edit prediction metrics into shared crate (#53912)
Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-04-14 21:04:10 +03:00
kitt
24a304c140
Set window icon on X11 (#40096)
Closes #30644

Many X11 environments expect a window icon to be supplied [as pixel data
on a window property
`_NET_WM_ICON`](https://specifications.freedesktop.org/wm-spec/1.4/ar01s05.html#id-1.6.13).

I confirmed this change fixes the icon in xfce4 for me, I think its
likely it also fixes https://github.com/zed-industries/zed/issues/37961
but I haven't tested it.

## Questions
* [`image::RgbaImage` is exposed to the public API of
gpui](https://github.com/zed-industries/zed/pull/40096/files#diff-318f166d72ad9476bd0a116446f5db3897fc1a4eb1d49aaf8105608bcf49ea53R1136).
I would guess this is undesirable, but I wasn't sure of the best way to
use gpui's native `Image` type..
* Currently [the icon is embedded into the
binary](https://github.com/zed-industries/zed/pull/40096/files#diff-89af0b4072205c53b518aa977d6be48997e1a51fa4dbf06c7ddd1fec99fc510eR101).
If this is undesirable, zed could alternatively implement [icon
lookup](https://specifications.freedesktop.org/icon-theme-spec/latest/#icon_lookup)
and try and find its icon from the system at runtime.

## Future work
* It might be nice to expose a `set_window_icon` method also (it could
be used for example to show dirty state in the icon somehow), but I'm
unfamiliar with what other platforms support and if this could be beyond
X11 (there is a [wayland
protocol](https://wayland.app/protocols/xdg-toplevel-icon-v1) though!).

Release Notes:

- Fixed missing window icon on X11

---------

Co-authored-by: Yara <git@yara.blue>
2026-04-14 16:21:28 +02:00
renovate[bot]
bf185f7402
Update Rust crate rand to v0.9.3 [SECURITY] (#53855)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rand](https://rust-random.github.io/book)
([source](https://redirect.github.com/rust-random/rand)) |
workspace.dependencies | patch | `0.9.2` → `0.9.3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/15138) for more information.

### GitHub Vulnerability Alerts

####
[GHSA-cq8v-f236-94qc](https://redirect.github.com/rust-random/rand/pull/1763)

It has been reported (by @&#8203;lopopolo) that the `rand` library is
[unsound](https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library)
(i.e. that safe code using the public API can cause Undefined Behaviour)
when all the following conditions are met:

- The `log` and `thread_rng` features are enabled
- A [custom
logger](https://docs.rs/log/latest/log/#implementing-a-logger) is
defined
- The custom logger accesses `rand::rng()` (previously
`rand::thread_rng()`) and calls any `TryRng` (previously `RngCore`)
methods on `ThreadRng`
- The `ThreadRng` (attempts to) reseed while called from the custom
logger (this happens every 64 kB of generated data)
- Trace-level logging is enabled or warn-level logging is enabled and
the random source (the `getrandom` crate) is unable to provide a new
seed

`TryRng` (previously `RngCore`) methods for `ThreadRng` use `unsafe`
code to cast `*mut BlockRng<ReseedingCore>` to `&mut
BlockRng<ReseedingCore>`. When all the above conditions are met this
results in an aliased mutable reference, violating the Stacked Borrows
rules. Miri is able to detect this violation in sample code. Since
construction of [aliased mutable references is Undefined
Behaviour](https://doc.rust-lang.org/stable/nomicon/references.html),
the behaviour of optimized builds is hard to predict.

Affected versions of `rand` are `>= 0.7, < 0.9.3` and `0.10.0`.

---

### Release Notes

<details>
<summary>rust-random/rand (rand)</summary>

###
[`v0.9.3`](https://redirect.github.com/rust-random/rand/compare/0.9.2...0.9.3)

[Compare
Source](https://redirect.github.com/rust-random/rand/compare/0.9.2...0.9.3)

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - ""
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTAuMiIsInVwZGF0ZWRJblZlciI6IjQzLjExMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 05:31:47 +00:00
Anthony Eid
2065099bc8
agent: Block agent v2 feature on stable release channel (#53849)
Based on a partial revert of: 7bcdb12b4c

The main difference is instead of a feature flag we now check
`ReleaseChannel::Stable` != current_release_channel when the UI checks
if agent v2 (sidebar) features should be enabled.

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: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-04-13 16:50:13 -07:00
Max Brunsfeld
092fedc42c
Fix the opening of the agent panel when clicking Try Now in new onboarding notification (#53845)
This fixes an issue reported by @Veykril where the "Try Now" button
would open a different panel than the agent panel. The bug was caused by
us attempting to focus the agent panel before layout settings updates
had been applied.

This should also make all programmatic settings updates more responsive,
because they won't have to wait for FS watchers to take effect.

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2026-04-13 22:51:38 +00:00
Richard Feldman
15dce9de1c
Always remove linked worktree workspaces before archive cleanup (#53672)
When archiving a thread's last reference to a linked worktree, the
worktree workspace must be removed from the MultiWorkspace before the
background cleanup task runs `git worktree remove`. Previously, only the
workspace found via exact PathList match on the thread's `folder_paths`
was removed. This missed cases where the workspace's root paths diverged
from the thread's `folder_paths` (e.g. after folders were added/removed
from the workspace).

Now we also scan `roots_to_archive` for any linked worktree workspaces
that contain the worktree being archived and include them in the removal
set. This ensures all editors are dropped, releasing their
`Entity<Worktree>` references (held through `File` structs in buffers),
so `wait_for_worktree_release` completes and `git worktree remove` can
proceed.

Release Notes:

- Fixed some linked worktree directories not always being cleaned up
from disk when archiving a thread.
2026-04-13 14:02:32 -07:00
Kirill Bulatov
3450c48aa5
Unify dirs dependency (#53775)
Corresponding font-kit commit:
94b0f28166

Before, Zed has 3 different versions of `dirs` crate to compile, this PR
bumps the related dependencies to have one, latest, version of `dirs`
instead.

Release Notes:

- N/A
2026-04-13 13:55:29 +03:00
Nathan Sobo
55e47138e9
agent_ui: Unify draft and background threads into retained threads (#53737)
> **Foundation PRs:** #53732, #53733, #53734 — These three draft PRs
contain the base refactors (retained workspaces, agent panel overlay
split, ThreadId introduction) that this PR builds on.

## Goal

Remove `DraftId` and merge `draft_threads` + `background_threads` into a
single `retained_threads: HashMap<ThreadId, Entity<ConversationView>>`
in `AgentPanel`. A draft is just a thread that hasn't sent its first
message — no separate identity or storage needed.

## Changes

### agent_panel.rs
- Remove `DraftId` / `DraftIdCounter` / the `Global` impl
- Merge the two maps into `retained_threads`
- Add `thread_id: ThreadId` field to `BaseView::AgentThread`
- Rename methods: `create_draft` → `create_thread`, `activate_draft` →
`activate_retained_thread`, `remove_draft` → `remove_thread`, etc.
- Replace `clear_active_thread` with `show_or_create_empty_draft`
- Update `update_thread_work_dirs` to sync `ThreadMetadataStore` paths
when worktrees change
- Keep `load_agent_thread(...)` cleanup so activating a real thread
removes empty retained drafts

### sidebar.rs
- Remove `active_entry` derivation from `rebuild_contents` (was racing
with deferred effects)
- Add `sync_active_entry_from_panel` called from event handlers instead
- Simplify `ActiveEntry` — remove `ThreadActivation` struct, make
`session_id` optional
- Move `seen_thread_ids` to global scope (was per-group, causing
duplicate thread entries)
- Remove dead code: `clear_draft`, `render_draft_thread`
- Generalize `pending_remote_thread_activation` into
`pending_thread_activation` so all persisted-thread activations suppress
fallback draft reconciliation
- Set the activation guard before local persisted-thread activation
switches workspaces
- Make `reconcile_groups(...)` bail while a persisted-thread activation
is in flight
- On `ActiveViewChanged`, clear empty group drafts as soon as a pending
persisted-thread activation resolves

### thread_metadata_store.rs
- Make `ThreadMetadata.title` an `Option<SharedString>` with
`display_title()` fallback
- Add `update_worktree_paths` for batched path updates when project
worktrees change

### Other crates
- Update all `ThreadMetadata` construction sites and title display sites
across `agent_ui` and `sidebar`

## Fallback draft invariant

This PR now tightens the retained-thread invariant around fallback
drafts vs real thread activation/restoration:

- Fallback drafts are always empty
- User-created drafts worth preserving are non-empty
- While a persisted thread is being activated/restored/loaded, sidebar
reconciliation must not create an empty fallback draft for that target
group/workspace
- Once the real thread becomes active, empty fallback drafts in that
target group are removed

This is enforced by the sidebar-side activation guard plus existing
`AgentPanel` empty-draft cleanup after real-thread load.

## Tests

Added and/or kept focused sidebar regression coverage for:

-
`test_confirm_on_historical_thread_in_new_project_group_opens_real_thread`
-
`test_unarchive_into_inactive_existing_workspace_does_not_leave_active_draft`
-
`test_unarchive_after_removing_parent_project_group_restores_real_thread`
- `test_pending_thread_activation_suppresses_reconcile_draft_creation`

Focused test runs:

- `cargo test -p sidebar activate_archived_thread -- --nocapture`
- `cargo test -p sidebar unarchive -- --nocapture`
- `cargo test -p sidebar archive_last_thread_on_linked_worktree --
--nocapture`
- `cargo test -p sidebar
test_confirm_on_historical_thread_in_new_project_group_opens_real_thread
-- --nocapture`
- `cargo test -p sidebar
test_unarchive_into_inactive_existing_workspace_does_not_leave_active_draft
-- --nocapture`
- `cargo test -p sidebar
test_unarchive_after_removing_parent_project_group_restores_real_thread
-- --nocapture`
- `cargo test -p sidebar
test_pending_thread_activation_suppresses_reconcile_draft_creation --
--nocapture`

## Test fix

Fixed flaky `test_backfill_sets_kvp_flag` — added per-App `AppDatabase`
isolation in `setup_backfill_test` so backfill tests no longer share a
static in-memory DB.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2026-04-13 09:07:09 +00:00
Eric Holk
45c0ced8b2
cli: Add first-run prompt for default open behavior and abstract IPC transport (#53663)
This PR adds the `cli_default_open_behavior` setting and a first-run TUI
prompt
that appears when `zed <path>` is invoked without flags while existing
windows are
open and the setting hasn't been configured yet.

## What it does

### Setting and prompt

- Adds a new `cli_default_open_behavior` workspace setting with two
values:
  `existing_window` (default) and `new_window`.
- When the user runs `zed <path>` for the first time with existing Zed
windows
open, a `dialoguer::Select` prompt in the CLI asks them to choose their
  preferred behavior. The choice is persisted to `settings.json`.
- The prompt is skipped when:
  - An explicit flag (`-n`, `-e`, `-a`) is given
  - No existing Zed windows are open
  - The setting is already configured in `settings.json`
- The paths being opened are already contained in an existing workspace

### IPC transport abstraction

- Introduces a `CliResponseSink` trait in the `cli` crate that abstracts
`IpcSender<CliResponse>`, with an implementation for the real IPC
sender.
- Replaces `IpcSender<CliResponse>` with `Box<dyn CliResponseSink>` /
  `&dyn CliResponseSink` across all signatures in `open_listener.rs`:
  `OpenRequestKind::CliConnection`, `handle_cli_connection`,
`maybe_prompt_open_behavior`, `open_workspaces`, `open_local_workspace`.
- Extracts the inline CLI response loop from `main.rs` into a testable
  `cli::run_cli_response_loop` function.
- Switches the request channel from bounded `mpsc::channel(16)` to
`mpsc::unbounded()`, eliminating `smol::block_on` in the bridge thread.

### End-to-end tests

Seven new tests exercise both the CLI-side response loop and the
Zed-side
handler connected through in-memory channels, using `allow_parking()` so
the
real `cli::run_cli_response_loop` runs on an OS thread while the GPUI
executor
drives the Zed handler:

- No flags, no windows → no prompt, opens new window
- No flags, existing windows, user picks "existing window" → prompt,
setting persisted
- No flags, existing windows, user picks "new window" → prompt, setting
persisted
- Setting already configured → no prompt
- Paths already in existing workspace → no prompt
- Explicit `-e` flag → no prompt
- Explicit `-n` flag → no prompt

Existing tests that previously used `ipc::channel()` now use a
`DiscardResponseSink`, removing OS-level IPC from all tests.

Release Notes:

- Added a first-run prompt when using `zed <path>` to choose between
opening
in an existing window or a new window. The choice is saved to settings
and
  can be changed later via the `cli_default_open_behavior` setting.

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2026-04-10 21:37:43 -07:00
renovate[bot]
081081e4f1
Update Rust crate wasmtime to v36.0.7 [SECURITY] (#53553)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [wasmtime](https://redirect.github.com/bytecodealliance/wasmtime) |
workspace.dependencies | patch | `36.0.6` → `36.0.7` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/15138) for more information.

### GitHub Vulnerability Alerts

####
[CVE-2026-34941](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-hx6p-xpx3-jvvv)

### Summary

Wasmtime contains a vulnerability where when transcoding a UTF-16 string
to the latin1+utf16 component-model encoding it would incorrectly
validate the byte length of the input string when performing a bounds
check. Specifically the number of code units were checked instead of the
byte length, which is twice the size of the code units.

This vulnerability can cause the host to read beyond the end of a
WebAssembly's linear memory in an attempt to transcode nonexistent
bytes. In Wasmtime's default configuration this will read unmapped
memory on a guard page, terminating the process with a segfault.
Wasmtime can be configured, however, without guard pages which would
mean that host memory beyond the end of linear memory may be read and
interpreted as UTF-16.

A host segfault is a denial-of-service vulnerability in Wasmtime, and
possibly being able to read beyond the end of linear memory is
additionally a vulnerability. Note that reading beyond the end of linear
memory requires nonstandard configuration of Wasmtime, specifically with
guard pages disabled.

### Impact

This is an out-of-bounds memory access. Any user running untrusted wasm
components that use cross-component string passing (with UTF-16 source
and latin1+utf16 destination encodings) is affected.

- With guard pages: Denial of service. The host process crashes with
SIGBUS/SIGSEGV.
- Without guard pages: Potential information disclosure. The guest can
read host memory beyond its linear memory allocation.

Patches

Wasmtime 24.0.7, 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this
bug. Users are recommended to update to these patched versions of
Wasmtime.
Workarounds

There is no workaround for this bug. Hosts are recommended to updated to
a patched version of Wasmtime.

####
[CVE-2026-34942](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-jxhv-7h78-9775)

### Impact

Wasmtime's implementation of transcoding strings into the Component
Model's `utf16` or `latin1+utf16` encodings improperly verified the
alignment of reallocated strings. This meant that unaligned pointers
could be passed to the host for transcoding which would trigger a host
panic. This panic is possible to trigger from malicious guests which
transfer very specific strings across components with specific
addresses.

Host panics are considered a DoS vector in Wasmtime as the panic
conditions are controlled by the guest in this situation.

### Patches

Wasmtime 24.0.7, 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this
bug. Users are recommended to update to these patched versions of
Wasmtime.

### Workarounds

There is no workaround for this bug. Hosts are recommended to updated to
a patched version of Wasmtime.

####
[CVE-2026-34943](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-m758-wjhj-p3jq)

### Impact

Wasmtime contains a possible panic which can happen when a `flags`-typed
component model value is lifted with the `Val` type. If bits are set
outside of the set of flags the component model specifies that these
bits should be ignored but Wasmtime will panic when this value is
lifted. This panic only affects wasmtime's implementation of lifting
into `Val`, not when using the `flags!` macro. This additionally only
affects `flags`-typed values which are part of a WIT interface.

This has the risk of being a guest-controlled panic within the host
which Wasmtime considers a DoS vector.

### Patches

Wasmtime 24.0.7, 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this
bug. Users are recommended to update to these patched versions of
Wasmtime.

### Workarounds

There is no workaround for this bug if a host meets the criteria to be
affected. To be affected a host must be using `wasmtime::component::Val`
and possibly work with a `flags` type in the component model.

####
[CVE-2026-34944](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-qqfj-4vcm-26hv)

On x86-64 platforms with SSE3 disabled Wasmtime's compilation of the
`f64x2.splat` WebAssembly instruction with Cranelift may load 8 more
bytes than is necessary. When
[signals-based-traps](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.signals_based_traps)
are disabled this can result in a uncaught segfault due to loading from
unmapped guard pages. With guard pages disabled it's possible for
out-of-sandbox data to be loaded, but this data is not visible to
WebAssembly guests.

### Details

The `f64x2.splat` operator, when operating on a value loaded from a
memory (for example with f64.load), compiles with Cranelift to code on
x86-64 without SSE3 that loads 128 bits (16 bytes) rather than the
expected 64 bits (8 bytes) from memory. When the address is in-bounds
for a (correct) 8-byte load but not an (incorrect) 16-byte load, this
can load beyond memory by up to 8 bytes. This can result in three
different behaviors depending on Wasmtime's configuration:

1. If guard pages are disabled then this extra data will be loaded. The
extra data is present in the upper bits of a register, but the upper
bits are not visible to WebAssembly guests. Actually witnessing this
data would require a different bug in Cranelift, of which none are
known. Thus in this situation while it's something we're patching in
Cranelift it's not a security issue.
2. If guard pages are enabled, and
[signals-based-traps](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.signals_based_traps)
are enabled, then this operation will result in a safe WebAssembly trap.
The trap is incorrect because the load is not out-of-bounds as defined
by WebAssembly, but this mistakenly widened load will load bytes from an
unmapped guard page, causing a segfault which is caught and handled as a
Wasm trap. In this situation this is not a security issue, but we're
patching Cranelift to fix the WebAssembly behavior.
3. If guard pages are enabled, and
[signals-based-traps](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.signals_based_traps)
are disabled, then this operation results in an uncaught segfault. Like
the previous case with guard pages enabled this will load from an
unmapped guard page. Unlike before, however, signals-based-traps are
disabled meaning that signal handlers aren't configured. The resulting
segfault will, by default, terminate the process. This is a security
issue from a DoS perspective, but does not represent an arbitrary read
or write from WebAssembly, for example.

Wasmtime's default configuration is case (2) in this case. That means
that Wasmtime, by default, incorrectly executes this
WebAssembly instruction but does not have insecure behavior.

### Impact

If
[signals-based-traps](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.signals_based_traps)
are disabled and guard pages are enabled then guests can trigger an
uncaught segfault in the host, likely aborting the host process. This
represents, for example, a DoS vector for WebAssembly guests.

This bug does not affect Wasmtime's default configuration and requires
[signals-based-traps](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.signals_based_traps)
to be disabled. This bug only affects the x86-64 target with the SSE3
feature disabled and the Cranelift backend (Wasmtime's default backend).

### Patches

Wasmtime 24.0.7, 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this
bug. Users are recommended to update to these patched versions of
Wasmtime.

### Workarounds

This bug only affects x86-64 hosts where SSE3 is disabled. If SSE3 is
enabled or if a non-x86-64 host is used then hosts are not affect.
Otherwise there are no known workarounds to this issue.

####
[CVE-2026-34945](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-m9w2-8782-2946)

### Impact

Wasmtime's Winch compiler contains a bug where a 64-bit table, part of
the memory64 proposal of WebAssembly, incorrectly translated the
`table.size` instruction. This bug could lead to disclosing data on the
host's stack to WebAssembly guests. The host's stack can possibly
contain sensitive data related to other host-originating operations
which is not intended to be disclosed to guests.

This bug specifically arose from a mistake where the return value of
`table.size` was statically typed as a 32-bit integer, as opposed to
consulting the table's index type to see how large the returned register
could be. When combined with details about Wnich's ABI, such as
multi-value returns, this can be combined to read stack data from the
host, within a guest. This information disclosure should not be possible
in WebAssembly, violates spec semantics, and is a vulnerability in
Wasmtime.

### Patches

Wasmtime 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this bug.
Users are recommended to update to these patched versions of Wasmtime.

### Workarounds

Users of Cranelift are not affected by this issue, but users of Winch
have no workarounds other than disabling the `Config::wasm_memory64`
proposal.

####
[CVE-2026-34946](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-q49f-xg75-m9xw)

### Impact

Wasmtime's Winch compiler contains a vulnerability where the compilation
of the `table.fill` instruction can result in a host panic. This means
that a valid guest can be compiled with Winch, on any architecture, and
cause the host to panic. This represents a denial-of-service
vulnerability in Wasmtime due to guests being able to trigger a panic.

The specific issue is that a historical refactoring, #&#8203;11254,
changed how compiled code referenced tables within the `table.*`
instructions. This refactoring forgot to update the Winch code paths
associated as well, meaning that Winch was using the wrong indexing
scheme. Due to the feature support of Winch the only problem that can
result is tables being mixed up or nonexistent tables being used,
meaning that the guest is limited to panicking the host (using a
nonexistent table), or executing spec-incorrect behavior and modifying
the wrong table.

### Patches

Wasmtime 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this bug.
Users are recommended to update to these patched versions of Wasmtime.

### Workarounds

Users of Cranelift are not affected by this issue, but for users of
Winch there is no workaround for this bug. Hosts are recommended to
updated to a patched version of Wasmtime.

####
[CVE-2026-34971](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-jhxm-h53p-jm7w)

### Impact

Wasmtime's Cranelift compilation backend contains a bug on aarch64 when
performing a certain shape of heap accesses which means that the wrong
address is accessed. When combined with explicit bounds checks a guest
WebAssembly module this can create a situation where there are two
diverging computations for the same address: one for the address to
bounds-check and one for the address to load. This difference in address
being operated on means that a guest module can pass a bounds check but
then load a different address. Combined together this enables an
arbitrary read/write primitive for guest WebAssembly when accesssing
host memory. This is a sandbox escape as guests are able to read/write
arbitrary host memory.

This vulnerability has a few ingredients, all of which must be met, for
this situation to occur and bypass the sandbox restrictions:

* This miscompiled shape of load only occurs on 64-bit WebAssembly
linear memories, or when `Config::wasm_memory64` is enabled. 32-bit
WebAssembly is not affected.
* Spectre mitigations or signals-based-traps must be disabled. When
spectre mitigations are enabled then the offending shape of load is not
generated. When signals-based-traps are disabled then spectre
mitigations are also automatically disabled.

The specific bug in Cranelift is a miscompile of a load of the shape
`load(iadd(base, ishl(index, amt)))` where `amt` is a constant. The
`amt` value is masked incorrectly to test if it's a certain value, and
this incorrect mask means that Cranelift can pattern-match this lowering
rule during instruction selection erroneously, diverging from
WebAssembly's and Cranelift's semantics. This incorrect lowering would,
for example, load an address much further away than intended as the
correct address's computation would have wrapped around to a smaller
value insetad.

### Patches

Wasmtime 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this bug.
Users are recommended to update to these patched versions of Wasmtime.

### Workarounds

This bug only affects users of Cranelift on aarch64. Cranelift on other
platforms is not affected. Additionally this only affects 64-bit
WebAssembly linear memories, so if `Config::wasm_memory64` is disabled
then hosts are not affected. Note that `Config::wasm_memory64` is
enabled by default. If spectre mitigations are enabled, which are
enabled by default, then hosts are not affected by this issue.

####
[CVE-2026-34988](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-6wgr-89rj-399p)

### Impact

Wasmtime's implementation of its pooling allocator contains a bug where
in certain configurations the contents of linear memory can be leaked
from one instance to the next. The implementation of resetting the
virtual memory permissions for linear memory used the wrong predicate to
determine if resetting was necessary, where the compilation process used
a different predicate. This divergence meant that the pooling allocator
incorrectly deduced at runtime that resetting virtual memory permissions
was not necessary while compile-time determine that virtual memory could
be relied upon.

Exposing this bug requires specific configuration values to be used. If
any of these configurations are not applicable then this bug does not
happen:

* The pooling allocator must be in use.
* The `Config::memory_guard_size` configuration option must be 0.
* The `Config::memory_reservation` configuration must be less than 4GiB.
* The pooling allocator must be configured with `max_memory_size` the
same as the `memory_reservation` value.

If all of these conditions are applicable then when a linear memory is
reused the VM permissions of the previous iteration are not reset. This
means that the compiled code, which is assuming out-of-bounds loads will
segfault, will not actually segfault and can read the previous contents
of linear memory if it was previously mapped.

This represents a data leakage vulnerability between guest WebAssembly
instances which breaks WebAssembly's semantics and additionally breaks
the sandbox that Wasmtime provides. Wasmtime is not vulnerable to this
issue with its default settings, nor with the default settings of the
pooling allocator, but embeddings are still allowed to configure these
values to cause this vulnerability.

### Patches

Wasmtime 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this bug.
Users are recommended to update to these patched versions of Wasmtime.

### Workarounds

All four conditions above must be met to be vulnerable to this bug, and
users can work around this bug by adjusting any of the above conditions.
For example it is strongly recommended that guard pages are configured
for linear memories which would make this bug not applicable.

####
[CVE-2026-35195](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-394w-hwhg-8vgm)

### Impact

Wasmtime's implementation of transcoding strings between components
contains a bug where the return value of a guest component's `realloc`
is not validated before the host attempts to write through the pointer.
This enables a guest to cause the host to write arbitrary transcoded
string bytes to an arbitrary location up to 4GiB away from the base of
linear memory. These writes on the host could hit unmapped memory or
could corrupt host data structures depending on Wasmtime's
configuration.

Wasmtime by default reserves 4GiB of virtual memory for a guest's linear
memory meaning that this bug will by default on hosts cause the host to
hit unmapped memory and abort the process due to an unhandled fault.
Wasmtime can be configured, however, to reserve less memory for a guest
and to remove all guard pages, so some configurations of Wasmtime may
lead to corruption of data outside of a guest's linear memory, such as
host data structures or other guests's linear memories.

### Patches

Wasmtime 24.0.7, 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this
bug. Users are recommended to update to these patched versions of
Wasmtime.

### Workarounds

There is no known workaround for this issue and affected
hosts/embeddings are recommended to upgrade.

---

### Release Notes

<details>
<summary>bytecodealliance/wasmtime (wasmtime)</summary>

###
[`v36.0.7`](https://redirect.github.com/bytecodealliance/wasmtime/releases/tag/v36.0.7)

[Compare
Source](https://redirect.github.com/bytecodealliance/wasmtime/compare/v36.0.6...v36.0.7)

#### 36.0.7

Released 2026-04-09.

##### Fixed

- Miscompiled guest heap access enables sandbox escape on aarch64
Cranelift.

[GHSA-jhxm-h53p-jm7w](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-jhxm-h53p-jm7w)

- Wasmtime with Winch compiler backend may allow a sandbox-escaping
memory
  access.

[GHSA-xx5w-cvp6-jv83](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-xx5w-cvp6-jv83)

- Out-of-bounds write or crash when transcoding component model strings.

[GHSA-394w-hwhg-8vgm](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-394w-hwhg-8vgm)

- Host panic when Winch compiler executes `table.fill`.

[GHSA-q49f-xg75-m9xw](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-q49f-xg75-m9xw)

- Wasmtime segfault or unused out-of-sandbox load with `f64x2.splat`
operator
  on x86-64.

[GHSA-qqfj-4vcm-26hv](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-qqfj-4vcm-26hv)

- Improperly masked return value from `table.grow` with Winch compiler
backend.

[GHSA-f984-pcp8-v2p7](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-f984-pcp8-v2p7)

- Panic when transcoding misaligned utf-16 strings.

[GHSA-jxhv-7h78-9775](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-jxhv-7h78-9775)

- Panic when lifting `flags` component value.

[GHSA-m758-wjhj-p3jq](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-m758-wjhj-p3jq)

- Heap OOB read in component model UTF-16 to latin1+utf16 string
transcoding.

[GHSA-hx6p-xpx3-jvvv](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-hx6p-xpx3-jvvv)

- Data leakage between pooling allocator instances.

[GHSA-6wgr-89rj-399p](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-6wgr-89rj-399p)

- Host data leakage with 64-bit tables and Winch.

[GHSA-m9w2-8782-2946](https://redirect.github.com/bytecodealliance/wasmtime/security/advisories/GHSA-m9w2-8782-2946)

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - ""
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTAuMiIsInVwZGF0ZWRJblZlciI6IjQzLjExMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-10 09:44:35 +03:00
KyleBarton
bd50418150
Fix dockerfile image and alias parsing (#53538)
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 #52928

Release Notes:

- Fixed handling of multi-stage and stage-specified dockerfiles in dev
container manifests
- Fixed the way we find the base image in a dev container when build
args need expansion
2026-04-09 13:27:29 -07:00
Dino
e25885bbe6
project_panel: Add redo and restore support (#53311)
- Introduce `project_panel::Redo` action
- Update all platform keymaps in order to map
`redo`/`ctrl-shift-z`/`cmd-shift-z` to the `project_panel::Redo` action

### Restore Entry Support

- Update both `Project::delete_entry` and `Worktree::delete_entry` to
return the resulting `fs::TrashedEntry`
- Introduce both `Project::restore_entry` and `Worktree::restore_entry`
to allow restoring an entry in a worktree, given the `fs::TrashedEntry`
- Worth pointing out that support for restoring is not yet implemented
for remote worktrees, as that will be dealt with in a separate pull
request
  
### Undo Manager

- Split `ProjectPanelOperation` into two different enums, `Change` and
`Operation`
- While thinking through this, we noticed that simply recording the
operation that user was performing was not enough, specifically in the
case where undoing would restore the file, as in that specific case, we
needed the `trash::TrashedEntry` in order to be able to restore, so we
actually needed the result of executing the operation.
- Having that in mind, we decided to separate the operation (intent)
from the change (result), and record the change instead. With the change
being recorded, we can easily building the operation that needs to be
executed in order to invert that change.
- For example, if an user creates a new file, we record the
`ProjectPath` where the file was created, so that undoing can be a
matter of trashing that file. When undoing, we keep track of the
`trash::TrashedEntry` resulting from trashing the originally created
file, such that, redoing is a matter of restoring the
`trash::TrashedEntry`.
- Refer to the documentation in the `project_panel::undo` module for a
better breakdown on how this is implemented/handled.

- Introduce a task queue for dealing with recording changes, as well as
undo and redo requests in a sequential manner
- This meant moving some of the details in `UndoManager` to a
`project_panel::undo::Inner` implementation, and `UndoManager` now
serves as a simple wrapper/client around the inner implementation,
simply communicating with it to record changes and handle undo/redo
requests
- Callers that depend on the `UndoManager` now simply record which
changes they wish to track, which are then sent to the undo manager's
inner implementation
- Same for the undo and redo requests, those are simply sent to the undo
manager's inner implementation, which then deals with picking the
correct change from the history and executing its inverse operation
- Introduce support for tracking restore changes and operations
- `project_panel::undo::Change::Restored` – Keeps track that the
file/directory associated with the `ProjectPath` was a result of
restoring a trashed entry, for which we now that reverting is simply a
matter of trashing the path again
- `project_panel::undo::Operation::Restore` – Keeps track of both the
worktree id and the `TrashedEntry`, from which we can build the original
`ProjectPath` where the trashed entry needs to be restored
- Move project panel's undo tests to a separate module
`project_panel::tests::undo` to avoid growing the
`project::project_panel_tests` module into a monolithic test module
- Some of the functions in `project::project_panel_tests` were made
`pub(crate)` in order for us to be able to call those from
`project_panel::tests::undo`
  
### FS Changes

- Refactored the `Fs::trash_file` and `Fs::trash_dir` methods into a
single `Fs::trash` method
- This can now be done because `RealFs::trash_dir` and
`RealFs::trash_file` were simply calling `trash::delete_with_info`, so
we can simplify the trait
- Tests have also been simplified to reflect this new change, so we no
longer need a separate test for trashing a file and trashing a directory
- Update `Fs::trash` and `Fs::restore` to be async
- On the `RealFs` implementation we're now spawning a thread to perform
the trash/restore operation

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

Relates to #5039

Release Notes:

- N/A

---------

Co-authored-by: Yara <git@yara.blue>
Co-authored-by: Miguel Raz Guzmán Macedo <miguel@zed.dev>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2026-04-09 18:49:16 +01:00
Dino
b6562e8afa
fs: Return trashed file location (#52012)
Update both `Fs::trash_dir` and `Fs::trash_file` to now return the
location of the trashed directory or file, as well as adding the
`trash-rs` create dependency and updating the `RealFs` implementation
for these methods to simply leverage `trash::delete_with_info`.

* Add `fs::Fs::TrashedEntry` struct, which allows us to track the
  original file path and the new path in the OS' trash
* Update the `fs::Fs::trash_dir` and `fs::Fs::trash_file` signatures to
  now return `Result<TrashedEntry>` instead of `Result<()>`
* The `options` argument was removed because it was never used by
  implementations other than the default one, and with this change to
  the signature type, we no longer have a default implementation, so the
  `options` argument would no longer make sense
* Update `fs::RealFs::trash_dir` and `fs::RealFs::trash_file`
  implementations to simply delegate to `trash-rs` and convert the
  result to a `TrashedEntry`
* Add `fs::FakeFs::trash` so we can simulate the OS' trash during tests
  that touch the filesystem
* Add `fs::FakeFs::trash_file` implementation to leverage
  `fs::FakeFs::trash`
* Add `fs::FakeFs::trash_dir` implementation to leverage
  `fs::FakeFs::trash`
2026-04-09 17:41:58 +01:00
Lukas Wirth
1391918bc7
Remove storybook and story crates (#53511)
Remove the standalone storybook binary and the story crate, as component
previews are now handled by the component_preview crate.

Also removes the stories features from the ui and title_bar crates.

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-04-09 12:32:27 +00:00
Luca Zani
7e1b636b6f
git_ui: Strip ANSI escape codes from git command output (#53444)
When git commands (push, pull, hooks...) produce output containing ANSI
escape sequences for colors or formatting, Zed was displaying them as
raw escape codes in the output buffer, making the output hard to read.
This simply escapes ANSI from the git output

### Before and After

  <table>
    <tr>
      <th align="center">Before</th>
<th align="center">After</th>
    </tr>
    <tr>
  <td>
<img width="882" height="862" alt="Screenshot 2026-04-08 at 21 13 07"
src="https://github.com/user-attachments/assets/58731e80-d864-47ca-8983-d0e86e924843"
/>
</td>
      <td>
<img width="882" height="862" alt="Screenshot 2026-04-08 at 21 15 14"
src="https://github.com/user-attachments/assets/7649200a-2d82-4442-88da-e231304911a8"
/>
</td>
    </tr>         
  </table>        

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

Related to #43817. This PR only addresses the escaping of the ANSI
codes; colors and other stuff are not handled

Release Notes:

- Fixed ANSI escape codes being displayed as raw text in git command
output
2026-04-09 07:21:54 +00:00
Eric Holk
d812adc833
sidebar: Better handling for threads in remote workspaces (#53451)
This PR greatly improves our handling of remote threads in the sidebar.

One primary issue was that many parts of the sidebar were only looking
at a thread's path list and not its remote connection information. The
fix here is to use `ProjectGroupKey` more consistently throughout the
sidebar which also includes remote connection information.

The second major change is to extend the MultiWorkspace with the ability
to initiate the creation of remote workspaces when needed. This involved
refactoring a lot of our remote workspace creation paths to share a
single code path for better consistency.

Release Notes:

- (Preview only) Fixed remote project threads appearing as a separate
local project in the sidebar

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-04-09 06:56:28 +00:00
Ben Kunkle
7597666c08
Track additional metrics in settled (#52938)
Stacked on https://github.com/zed-industries/zed/pull/50566.

Begin collecting kept chars rate, as well as the count of tree-sitter
errors in the code before and after applying the prediction.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [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-08 18:39:17 -04:00
Richard Feldman
2169ebaf4b
Wire up worktree archival on thread archive and restoration on unarchive (#53215)
Connect the git API and archived worktree data model to the sidebar's
archive/unarchive flow:

- Add `thread_worktree_archive` module: orchestrates the full archive
cycle (WIP commits, DB records, git refs, worktree deletion) and restore
cycle (detached worktree creation, reset to recover staged/unstaged
state, branch restoration)
- Integrate into sidebar: `archive_thread` now persists worktree state
before cleanup; `activate_archived_thread` restores worktrees via git
with targeted path replacement for multi-root threads
- Add pending worktree restore UI state with spinner and cancel button
- Show toast on restore failure instead of silent log
- Switch to surviving workspace when archiving active thread whose
workspace will be deleted
- Deserialize persisted `project_group_keys` on window restore
- Guard `cleanup_empty_workspaces` against dropped entities
- Await rollback DB operations instead of fire-and-forget

Part 3 of 3 in the persist-worktree stack. Stacked on #53214. This wires
up parts 1 and 2.

Release Notes:

- Added worktree state preservation when archiving agent threads,
automatically restoring staged and unstaged changes when the thread is
unarchived

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-04-08 17:04:52 -04:00
Ben Brandt
d81b73f3d6
acp: Better handling of terminal auth on remote connections (#53396)
We were incorrectly wrapping new terminal auth methods in double ssh
calls.

Only affected ACP beta users, but important for testing and stabilizing
the feature.

We moved the ssh wrapping to be only added in the acp process creation
where it was needed.

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: Bennet Bo Fenner <bennetbo@gmx.de>
2026-04-08 18:21:02 +00:00
Dino
3f5823267f
Bump Zed to v0.233 (#53404)
Release Notes:

- N/A
2026-04-08 17:54:51 +00:00
Danilo Leal
a0d0195ca9
Add onboarding for parallel agents (#52940)
Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Katie Geer <katie@zed.dev>
2026-04-07 22:05:43 -03:00
Mikayla Maki
7bcdb12b4c
Remove Agent V2 feature flag (#52792)
It's happening.

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-08 00:34:54 +00:00
João Soares
972731cb1a
theme_selector: Preserve selected theme after empty filter (#52461)
When filtering themes with a query that matches nothing (e.g., "zzz"),
`show_selected_theme` returned `None` and overwrote `selected_theme`.
Clearing the filter then lost track of the previous selection and
defaulted to index 0.

The fix only updates `selected_theme` when `show_selected_theme` returns
`Some`. Same change in both the theme selector and the icon theme
selector.

## Context

When `update_matches` runs a filter that yields zero results,
`show_selected_theme` returns `None`. The old code unconditionally
assigned that back to `selected_theme`, wiping out the previous
selection. When the user clears the filter, the selector falls into the
`query.is_empty() && selected_theme.is_none()` branch and resets to
index 0 instead of restoring the original pick.

## Demo

### Before:


https://github.com/user-attachments/assets/62b1531b-d059-4f30-b1f4-a830f2d13a09


### After:



https://github.com/user-attachments/assets/72348666-8dbb-4f35-9446-fa2618340b6c




## How to review

The fix is the same one-line change in two files:
1. `crates/theme_selector/src/theme_selector.rs` — line 458
2. `crates/theme_selector/src/icon_theme_selector.rs` — line 272

The rest is test infrastructure:
3. `crates/theme/src/registry.rs` — `register_test_themes` /
`register_test_icon_themes` helpers
4. Tests in both selector files covering the empty filter → clear filter
flow

## 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 theme selector losing the selected theme after filtering with a
query that matches nothing and then clearing the filter.
2026-04-07 23:41:34 +00:00
Anthony Eid
c5845ec04c
Remove notification panel (#50204)
After chat functionality was removed, this panel became redundant. It
only displayed three notification types: incoming contact requests,
accepted contact requests, and channel invitations.

This PR moves those notifications into the collab experience by adding
toast popups and a badge count to the collab panel. It also removes the
notification-panel-specific settings, documentation, and Vim command.

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

- Removed the notification panel from Zed
2026-04-07 12:12:02 -04:00
Agus Zubiaga
98c17ca160
language_models: Refactor deps and extract cloud (#53270)
- `language_model` no longer depends on provider-specific crates such as
`anthropic` and `open_ai` (inverted dependency)
- `language_model_core` was extracted from `language_model` which
contains the types for the provider-specific crates to convert to/from.
- `gpui::SharedString` has been extracted into its own crate (still
exposed by `gpui`), so `language_model_core` and provider API crates
don't have to depend on `gpui`.
- Removes some unnecessary `&'static str` | `SharedString` -> `String`
-> `SharedString` conversions across the codebase.
- Extracts the core logic of the cloud `LanguageModelProvider` into its
own crate with simpler dependencies.


Release Notes:

- N/A

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2026-04-07 12:28:19 -03:00
Bhuminjay Soni
93438829c7
Add fuzzy_nucleo crate for order independent file finder search (#51164)
Closes #14428 

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


https://github.com/user-attachments/assets/7e0d67ff-cc4e-4609-880d-5c1794c64dcf


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

- Adds a new `fuzzy_nucleo` crate that implements order independent path
matching using the `nucleo` library. currently integrated for file
finder.

---------

Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
2026-04-07 12:05:02 +02:00
Piotr Osiewicz
bc4d25ca76
lsp: Do not pass in null diagnostic identifiers (#53272)
This fixes a crash with new Preview versions of tsgo after
https://github.com/microsoft/typescript-go/pull/3313

Self-Review Checklist:

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

Closes #ISSUE

Release Notes:

- N/A
2026-04-06 21:38:51 +00:00
Ben Kunkle
f0df39311d
Consolidate prompt formatting logic into zeta_prompt (#53079)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [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-06 16:29:37 -04:00
Finn Evers
d2257dbc39
compliance: Initialize compliance checks (#53231)
Release Notes:

- N/A
2026-04-06 22:24:33 +02:00
Ahmet Kaan Gümüş
fd4d8444cf
markdown_preview: Add search support to markdown preview (#52502)
Context

The markdown preview had no search functionality — pressing Ctrl+F did
nothing. This PR implements the SearchableItem trait for
MarkdownPreviewView, enabling in-pane text search with match
highlighting and navigation.

  Changes span four crates:

- project: Added SearchQuery::search_str() — a synchronous method to
search plain &str text, since the existing search() only works on
BufferSnapshot.
- markdown: Added search highlight storage to the Markdown entity and
paint_search_highlights to MarkdownElement. Extracted the existing
selection painting into a reusable paint_highlight_range helper to avoid
duplicating quad-painting logic.
- markdown_preview: Implemented SearchableItem with full match
navigation, active match tracking, and proper SearchEvent emission
matching Editor behavior.
- Keymaps: Added buffer_search::Deploy bindings to the MarkdownPreview
context on all three platforms.
  
The PR hopefully Closes
https://github.com/zed-industries/zed/issues/27154

  How to Review

1. crates/project/src/search.rs — search_str method at the end of impl
SearchQuery. Handles both Text (AhoCorasick) and Regex variants with
whole-word and multiline support.
  2. crates/markdown/src/markdown.rs — Three areas:
    - New fields and methods on Markdown struct (~line 264, 512-548)
- paint_highlight_range extraction and paint_search_highlights (~line
1059-1170)
    - The single-line addition in Element::paint (~line 2003)
3. crates/markdown_preview/src/markdown_preview_view.rs — The main
change. Focus on:
- SearchEvent::MatchesInvalidated emission in schedule_markdown_update
(line 384)
    - EventEmitter<SearchEvent> and as_searchable (lines 723, 748-754)
- The SearchableItem impl (lines 779-927), especially active_match_index
which computes position from old highlights to handle query changes
correctly
  4. Keymap files — Two lines each for Linux/Windows, one for macOS.

  Self-Review Checklist

- [ x ] I've reviewed my own diff for quality, security, and reliability
- [ x ] Unsafe blocks (if any) have justifying comments (no unsafe)
- [ x ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
(should be 😄 )
- [ - ] Tests cover the new/changed behavior (not sure)
- [ - ] Performance impact has been considered and is acceptable (I'm
not sure about it and it would be nice to see experienced people to
test)


Release Notes:
- Added search support (Ctrl+F / Cmd+F) to the markdown preview

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-04-06 16:42:20 +00:00
zed-zippy[bot]
d0a61a42d9
proto: Bump to v0.3.2 (#53235)
This PR bumps the version of the Proto extension to v0.3.2.

Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-04-06 12:51:13 +00:00
zed-zippy[bot]
9a967b4d5a
glsl: Bump to v0.2.3 (#53234)
This PR bumps the version of the GLSL extension to v0.2.3.

Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-04-06 12:45:25 +00:00
Dino
c0f01c4278
Update futures to 0.3.32 (#52910)
As part of the work that is being developed for the Project Panel's Undo
& Redo system, in
https://github.com/zed-industries/zed/tree/5039-create-redo , we're
implementing an asynchronous task queue which simply receives a message
with the operation/change that is meant to be carried out, in order to
ensure these run in a sequential fashion.

While trying to use `futures_channel::mpsc::Receiver`, it was noted that
`recv` method was not available so this Pull Request updates the
`futures` crate to `0.3.32`, where it is available.

This version also deprecates `try_next` in favor of `try_recv` so this
Pull Request updates existing callers of `try_next` to use `try_recv`,
which was mostly updating the expected return type from
`Result<Option<T>>` to `Result<T>`.

Co-authored-by: Yara <git@yara.blue>
2026-04-05 23:05:35 +01:00
Max Brunsfeld
5ae174fa5f
Rework sidebar rendering to use MultiWorkspace's project groups (#53096)
Release Notes:

* [x] It's possible to get into a state where agent panel shows a thread
that is archived

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2026-04-03 23:02:55 +00:00
Jakub Konka
29609d3599
language_model: Decouple from Zed-specific implementation details (#52913)
This PR decouples `language_model`'s dependence on Zed-specific
implementation details. In particular
* `credentials_provider` is split into a generic `credentials_provider`
crate that provides a trait, and `zed_credentials_provider` that
implements the said trait for Zed-specific providers and has functions
that can populate a global state with them
* `zed_env_vars` is split into a generic `env_var` crate that provides
generic tooling for managing env vars, and `zed_env_vars` that contains
Zed-specific statics
* `client` is now dependent on `language_model` and not vice versa

Release Notes:

- N/A
2026-04-02 17:06:57 -03:00
Anthony Eid
7892b93279
git_graph: Remove feature flag (#52972)
After #52953 gets merged the git graph will be ready for it's preview
release, so we can finally remove the feature flag! AKA this PR releases
the git graph

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:

- Add Git Graph. Can be accessed through the button on the bottom of the
git panel or the `git graph: Open` action
2026-04-02 15:26:37 +00:00
Oleksiy Syvokon
b05a2404ef
ep: Add the predicted kept characters metric [WIP] (#50566)
Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-04-01 19:31:21 -04:00
Jakub Konka
6663a60876
language_model: Refactor crate structure and dependencies (#52857)
A couple of things that this PR wants to accomplish:
* remove dependency on `settings` crate from `language_model`
* refactor provider-specific code into submodules - to be honest, I
would go one step further and put all provider-specific bits in
`language_models` instead but I realise we have cloud logic in
`language_model` which uses those too making it tricky
* move anthropic-specific telemetry into `language_models` crate - I
think it makes more sense for it to be there

Anyhow, I would very appreciate if you could have a look @mikayla-maki
and @maxdeviant and lemme know what you think, if you would tweak
something, etc.

Release Notes:

- N/A
2026-04-01 17:44:25 +02:00
Joseph T. Lyons
82a64932b0
Bump Zed to v0.232 (#52903)
Release Notes:

- N/A
2026-04-01 11:37:55 -04:00
KyleBarton
3eadd41b5d
Dev containers native implementation (#52338)
## Context

Closes #11473

In-house Zed implementation of devcontainers. Replaces the dependency on
the [reference implementation](https://github.com/devcontainers/cli) via
Node.

This enables additional features with this implementation:
1. Zed extensions can be specified in the `customizations` block, via
this syntax in `devcontainer.json:
```
...
  "customizations": {
    "zed": {
      "extensions": ["vue", "ruby"],
    },
  },

```
2.
[forwardPorts](https://containers.dev/implementors/json_reference/#general-properties)
are supported for multiple ports proxied to the host

## How to Review

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

## Self-Review Checklist

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

Release Notes:

- Improved devcontainer implementation by moving initialization and
creation in-house
2026-04-01 08:16:27 -07:00
Ian Chamberlain
971775e3b2
gpui: Implement audible system bell (#47531)
Relates to #5303 and
https://github.com/zed-industries/zed/issues/40826#issuecomment-3684556858
although I haven't found anywhere an actual request for `gpui` itself to
support a system alert sound.

### What

Basically, this PR adds a function that triggers an OS-dependent alert
sound, commonly used by terminal applications for `\a` / `BEL`, and GUI
applications to indicate an action failed in some small way (e.g. no
search results found, unable to move cursor, button disabled).

Also updated the `input` example, which now plays the bell if the user
presses <kbd>backspace</kbd> with nothing behind the cursor to delete,
or <kbd>delete</kbd> with nothing in front of the cursor.

Test with `cargo run --example input --features gpui_platform/font-kit`.

### Why
If this is merged, I plan to take a second step:
- Add a new Zed setting (probably something like
`terminal.audible_bell`)
- If enabled, `printf '\a'`, `tput bel` etc. would call this new API to
play an audible sound

This isn't the super-shiny dream of #5303 but it would allow users to
more easily configure tasks to notify when done. Plus, any TUI/CLI apps
that expect this functionality will work. Also, I think many terminal
users expect something like this (WezTerm, iTerm, etc. almost all
support this).

### Notes
~I was only able to test on macOS and Windows, so if there are any Linux
users who could verify this works for X11 / Wayland that would be a huge
help! If not I can try~

Confirmed Wayland + X11 both working when I ran the example on a NixOS
desktop

Release Notes:

- N/A
2026-04-01 02:50:01 +00:00
Max Brunsfeld
3b6252ca80
Bump tree-sitter for fix to wasm loading of grammars w/ reserved words (#52856)
This PR bumps Tree-sitter for this crash fix
https://github.com/tree-sitter/tree-sitter/pull/5475

Release Notes:

- Fixed a crash that could occasionally occur when parsing files using
certain language extensions
2026-03-31 18:14:18 -07:00
Remco Smits
7455021afc
git_graph: Allow having multiple git graphs open for different repositories (#50401)
Before this PR you could only have the git graph open for the active
repository, this PR changes that.
So you can have 1 git graph open per repository, allowing you to open
multiple different graph at the same time.

**Example**:


https://github.com/user-attachments/assets/9775108f-826a-476f-95de-46abcc1777a6

**Example Persistence**


https://github.com/user-attachments/assets/dbcf6692-7a67-46d9-a7ae-43a7c9a35818

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)

cc @Anthony-Eid I removed the switch repo test since it's no longer a
thing.

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2026-03-31 17:57:53 +00:00
Finn Evers
7123238690
Remove slash-commands-example extension (#52835)
Follow-up to https://github.com/zed-industries/zed/pull/52757

Release Notes:

- N/A
2026-03-31 18:27:38 +02:00
Ben Brandt
76c6004b27
Remove text thread and slash command crates (#52757)
🫡

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:

- Removed legacy Text Threads feature to help streamline the new agentic
workflows in Zed. Thanks to all of you who were enthusiastic Text Thread
users over the years ❤️!

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-31 17:55:05 +02:00
Nathan Sobo
121e2bbe84
Extract syntax_theme crate (#52798)
Extract `SyntaxTheme` into its own lightweight crate so that downstream
consumers can use syntax highlighting colors without pulling in the full
`theme` crate and its transitive dependencies.

## Changes

**Commit 1 — Extract SyntaxTheme into its own crate**

Move `SyntaxTheme`, `SyntaxThemeSettings`, `HighlightStyle`, and
supporting types from `theme/src/styles/syntax.rs` into a new
`syntax_theme` crate that depends only on `gpui`. The `theme` crate
re-exports everything for backward compatibility — no call-site changes
needed.

**Commit 2 — Add `bundled-themes` feature with One Dark**

Add an optional `bundled-themes` feature that bundles `one_dark()`, a
`SyntaxTheme` loaded from the existing One Dark JSON theme file. This
lets consumers get a usable syntax theme without depending on the full
theme machinery.

Release Notes:

- N/A
2026-03-31 08:06:37 -06:00
Mikayla Maki
2e44664ab8
Implement sidebar serialization (#52795)
This PR implements basic sidebar deserialization. When the
multiworkspace decides to save itself, it causes the sidebar to
serialize as well. The sidebar can trigger this as well via an event.

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 04:16:35 +00:00
Mikayla Maki
dfafd62afc
Implement non-macos titlebars for the new sidebar (#52794)
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


Icons aren't showing because I'm forcing the UI to be visible on macOS,
but things look ok on the right sidebar:

<img width="389" height="955" alt="Screenshot 2026-03-30 at 7 36 06 PM"
src="https://github.com/user-attachments/assets/269fe9c9-1212-4c1e-b8d9-1694db70adf3"
/>


Release Notes:

- N/A
2026-03-31 02:46:07 +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
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 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
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
Max Brunsfeld
4aa0ed1e54
Bump tree-sitter-rust for string literal fixes (#52606)
This PR bumps tree-sitter-rust for this fix:
https://github.com/tree-sitter/tree-sitter-rust/pull/307

Release Notes:

- N/A
2026-03-27 14:32:14 -07:00
Eric Holk
9fe2a602b9
Add VecMap and use it in ProjectGroupBuilder (#52596)
This adds a collection that has a map-like API but is backed by vectors.
For small collections, this often outperforms a HashMap because you
don't have the overhead of hashing things and everything is guaranteed
to be contiguous in memory.

I hand-rolled one of these in `ProjectGroupBuilder` but this factors it
into its own collection. This implements the API that
`ProjectGroupBuilder` needed, but if this becomes more widely used we
can expand to include more of the `HashMap` API.

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-27 20:09:47 +00:00
Piotr Osiewicz
257712e90b
ui: Make UI independent from settings crate (#52578)
This will allow us to use UI crate on the web

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: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-27 15:31:49 +00:00
Anthony Eid
852b4fc5f4
git_graph: Implement basic search functionality (#51886)
## Context

This uses `git log` to get a basic search working in the git graph. This
is one of the last blockers until a full release, the others being
improvements to the graph canvas UI.

## Self-Review Checklist

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

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-27 11:10:01 -04:00
Piotr Osiewicz
93e641166d
theme: Split out theme_settings crate (#52569)
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
2026-03-27 14:41:25 +01:00
Neel
3b66f9076e
client: Persist last used organization (#52505)
## Context

Persists last used organization through restart. Opted to do this via
`kvp` instead of `settings.json` since the value could change often, and
we would have to persist an ID rather than a friendly name.

Closes CLO-568.

## 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: -->
- [ ] 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
2026-03-27 10:26:52 +00:00
Martin Pool
a92283111b
Don't preallocate 600MB for GPUI profiler (#45197)
Previously, the GPUI profiler allocates one CircularBuffer per thread,
and `CircularBuffer<N>` always preallocates space for N entries. As a
result it allocates ~20MB/thread, and on my machine about 33 threads are
created at startup for a total of 600MB used.

In this PR I change it to use a VecDeque that can gradually grow up to
20MB as data is written. At least in my experiments it seems that this
caps overall usage at about 21MB perhaps because only one thread writes
very much usage data.

Since this is fixed overhead for everyone running Zed it seems like a
worthwhile gain.

This also folds duplicated code across platforms into the common gpui
profiler.

Before:

<img width="4804" height="2192" alt="Image"
src="https://github.com/user-attachments/assets/7060ee5b-ef80-49cb-b7be-de33e9a2e7a5"
/>

After:

<img width="5052" height="1858" alt="image"
src="https://github.com/user-attachments/assets/513494df-0974-4604-9796-15a12ef1c134"
/>

I got here from #35780 but I don't think this is tree-size related, it
seems to be fixed overhead.

Release Notes:

- Improved: Significantly less memory used to record internal profiling
information.

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-27 10:20:21 +00:00
Finn Evers
79347e8ca5
Restore language query watcher in dev builds (#52543)
The watcher had been broken for some time, but became even more broken
after the recent move of the queries.

This PR restores the reloading behavior for debug builds so that
languages are reloaded once a scheme file is changed.

Release Notes:

- N/A
2026-03-27 11:10:57 +01:00
Lukas Wirth
354bc35974
Cut fs dependency from theme (#52482)
Trying to clean up the deps here for potential use of the ui crate in
web

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-03-27 08:17:30 +00:00
Alan P John
5197cb4da9
gpui: Fix emoji rendering in SVG preview (#51569)
Closes #50483 

## Findings

As reported in the original issue, emojis in SVG preview were not
rendering consistently with the editor.

The SVG renderer uses `usvg`/`resvg` for parsing and rendering SVG
files. The first problem was that emoji fonts were not rendering at all,
which was fixed by enabling the `raster_images` on `resvg`.

Beyond that it was observed that the default font fallback mechanism in
`usvg` searches through the font database alphabetically without
prioritizing emoji fonts. This caused emojis to sometimes render in
non-emoji fonts that happened to contain glyph mappings for those
characters.

For example, on Linux systems with the default
`uvsg::FontResolver::default_fallback_selector()`:
- The character  would fall back to `FreeSerif` (monochrome)
- Instead of `Noto Color Emoji` (full color)

Log output showed the inconsistent behavior:
```
WARN  [usvg::text] Fallback from FreeSans to Noto Color Emoji.
WARN  [usvg::text] Fallback from FreeSans to FreeSerif.
WARN  [usvg::text] Fallback from FreeSans to Noto Color Emoji.
```

<img width="480" height="480" alt="Image"
src="https://github.com/user-attachments/assets/e065608f-a98b-4e67-9429-4aed16810c2c"
/>


This created a jarring inconsistency where the same emoji character
would render differently in:
- The editor (correct, using platform emoji fonts)
- SVG preview (incorrect, using arbitrary fallback fonts)
## Solution

If the specified font in SVG is available on the system, we should show
that. If not, we should fallback to what editors show today for that
emoji.

This PR implements emoji-aware font fallback that:

1. **Enabled `raster_images` build feature** to render emojis in SVG.
2. **Detects emoji characters** using Unicode emoji properties (via
`\p{Emoji}` regex pattern), consistent with how we check for emoji in
the Editor as well.
3. **Preserves user-specified fonts** by only intervening when the
default font resolver would use a non-emoji font for emoji characters

### Font Family Selection

I avoided completely reusing/rebuilding the logic for emoji font
selection used by the editor as `uvsg` internally does quite a bit of
the job and it felt like overcomplicating the solution. Instead using
hard coded platform specific font family names.
The hardcoded emoji font families are sourced from Zed's existing
platform-specific text rendering systems:

- **macOS**: `Apple Color Emoji`, `.AppleColorEmojiUI`  
Source:
db622edc8b/crates/gpui_macos/src/text_system.rs (L353-L359)
- **Linux/FreeBSD**: `Noto Color Emoji`, `Emoji One`  
Source:
db622edc8b/crates/gpui_wgpu/src/cosmic_text_system.rs (L642-L646)
- **Windows**: `Segoe UI Emoji`, `Segoe UI Symbol`  
  Source: Standard Windows emoji font stack

These match the fonts the editor uses for emoji rendering on each
platform.
To break down further into the similarity and differences in the emoji
font resolution:
**Similarities:**
- Both now use the regex based emoji detection logic
- Both prioritize the same platform-specific emoji font families
- Both support color emoji rendering
**Differences:**
- **Editor**: Uses platform-native text shaping (CoreText on macOS,
DirectWrite on Windows, cosmic-text on Linux) which handles fallback
automatically
- **SVG**: Uses custom fallback selector that explicitly queries emoji
fonts first, then falls back to default usvg behavior
## Testing

- Added unit tests for `is_emoji_character` in `util` crate
- Tested emoji detection for various Unicode characters
- [ ] Verified platform-specific font lists compile correctly (Only
linux done)
- [ ] Manual testing with SVG files containing emojis on all platforms
(Only linux done)

Release Notes:

- Fixed SVG preview to render emojis consistently with the editor by
prioritizing platform-specific color emoji fonts

---------

Signed-off-by: Alan P John <alanpjohn@outlook.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-03-27 12:49:49 +05:30
Smit Barmase
9efe3c5a21
markdown_preview: Refactor to use shared markdown crate (#52008)
We now use the parser and renderer from the `markdown` crate for
Markdown Preview, instead of maintaining two separate code paths.

How it works:

`markdown_preview_view.rs` is now a consumer of `MarkdownElement`. It
acts as a thin wrapper, handling things like resolving URL clicks and
image URLs, which can vary between consumers. It also handles syncing
the editor selection with the active block in the preview. The APIs for
this are provided by `MarkdownElement`.

All the heavy lifting like parsing HTML, rendering block markers on
hover, handling the active block, etc. is done by `MarkdownElement`.
Everything is opt-in. For example, markdown in the Agent Panel can
choose not to enable block marker rendering or HTML parsing, while
Markdown Preview opts into those features.

Final outcome:

For Markdown Preview View:

- Added:
  - Selection support in the preview

- Stays:
  - Syncing between editor and preview
  - Autoscroll
  - Hover and active block markers
  - Checkbox toggling
  - Image rendering
  - Mermaid rendering

For the `markdown` crate:

- No changes for existing consumers like the Agent Panel
- Consumers can now opt into:
  - HTML rendering
  - Block marker rendering
  - Click event handling
  - Custom image resolvers
  - Mermaid rendering

Release Notes:

- N/A
2026-03-26 12:27:39 +05:30
Mikayla Maki
8eb86241f6
Add a setting for moving the sidebar to the right (#52457)
## Context

This adds a setting for controlling the sidebar side

## Self-Review Checklist

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

Release Notes:

- N/A

---------

Co-authored-by: Eric <eric@zed.dev>
2026-03-26 01:35:10 +00:00
Nathan Sobo
3ce0cd11ec
Extract language_core and grammars crates from language (#52238)
This extracts a `language_core` crate from the existing `language`
crate, and creates a `grammars` data crate. The goal is to separate
tree-sitter grammar infrastructure, language configuration, and LSP
adapter types from the heavier buffer/editor integration layer in
`language`.

## Motivation

The `language` crate pulls in `text`, `theme`, `settings`, `rpc`,
`task`, `fs`, `clock`, `sum_tree`, and `fuzzy` — all of which are needed
for buffer integration (`Buffer`, `SyntaxMap`, `Outline`,
`DiagnosticSet`) but not for grammar parsing or language configuration.
Extracting the core types lets downstream consumers depend on
`language_core` without pulling in the full integration stack.

## Dependency graph after extraction

```
language_core   ← gpui, lsp, tree-sitter, util, collections
grammars        ← language_core, rust_embed, tree-sitter-{rust,python,...}
language        ← language_core, text, theme, settings, rpc, task, fs, ...
languages       ← language, grammars
```

## What moved to `language_core`

- `Grammar`, `GrammarId`, and all query config/builder types
- `LanguageConfig`, `LanguageMatcher`, bracket/comment/indent config
types
- `HighlightMap`, `HighlightId` (theme-dependent free functions
`highlight_style` and `highlight_name` stay in `language`)
- `LanguageName`, `LanguageId`
- `LanguageQueries`, `QUERY_FILENAME_PREFIXES`
- `CodeLabel`, `CodeLabelBuilder`, `Symbol`
- `Diagnostic`, `DiagnosticSourceKind`
- `Toolchain`, `ToolchainScope`, `ToolchainList`, `ToolchainMetadata`
- `ManifestName`
- `SoftWrap`
- LSP data types: `BinaryStatus`, `ServerHealth`,
`LanguageServerStatusUpdate`, `PromptResponseContext`, `ToLspPosition`

## What stays in `language`

- `Buffer`, `BufferSnapshot`, `SyntaxMap`, `Outline`, `DiagnosticSet`,
`LanguageScope`
- `LspAdapter`, `CachedLspAdapter`, `LspAdapterDelegate` (reference
`Arc<Language>` and `WorktreeId`)
- `ToolchainLister`, `LanguageToolchainStore` (reference `task` and
`settings` types)
- `ManifestQuery`, `ManifestProvider`, `ManifestDelegate` (reference
`WorktreeId`)
- Parser/query cursor pools, `PLAIN_TEXT`, point conversion functions

## What the `grammars` crate provides

- Embedded `.scm` query files and `config.toml` files for all built-in
languages (via `rust_embed`)
- `load_queries(name)`, `load_config(name)`,
`load_config_for_feature(name, grammars_loaded)`, and `get_file(path)`
functions
- `native_grammars()` for tree-sitter grammar registration (behind
`load-grammars` feature)

## Pre-cleanup (also in this PR)

- Removed unused `Option<&Buffer>` from
`LspAdapter::process_diagnostics`
- Removed unused `&App` from `LspAdapter::retain_old_diagnostic`
- Removed `fs: &dyn Fs` from `ToolchainLister` trait methods
(`PythonToolchainProvider` captures `fs` at construction time instead)
- Moved `Diagnostic`/`DiagnosticSourceKind` out of `buffer.rs` into
their own module

## Backward compatibility

The `language` crate re-exports everything from `language_core`, so
existing `use language::Grammar` (etc.) continues to work unchanged. The
only downstream change required is importing `CodeLabelExt` where
`.fallback_for_completion()` is called on the now-foreign `CodeLabel`
type.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-03-25 23:41:09 +00:00
Finn Eitreim
3684b5a42f
vim/helix: Use grapheme count on replace (#51776)
Update vim and helix replace to repeat based on grapheme count instead of
byte length or Unicode scalar count.

This fixes cases where a single visible character is made up of multiple
bytes or scalars, such as decomposed characters like `e\u{301}` and emoji.

Closes #51772 

Release Notes:

- Fixed vim/helix's replace action to take into consideration grapheme
count

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-03-25 23:19:55 +00:00
Finn Evers
e63bd1ab32
language: Improve highlight map resolution (#52183)
This PR refactors the highlight map capture name resolution to be faster
and more predictable. Speficically,
- it changes the capture name matching to explicit prefix matching
(e.g., `function.call.whatever.jsx` will now be matched by only
`function`, `function.call`, `function.call.whatever` and
`function.call.whatever.jsx`). This matches the behavior VSCode has
- resolving highlights is now much more efficient, as we now look up
captures in a BTreeMap as opposed to searching in a Vector for these.

This substantially improves the performance for resolving capture names
against themes. With the benchmark added here for creating the
HighlightMap, we see quite some improvements:
```
Running benches/highlight_map.rs (target/release/deps/highlight_map-f99da68650aac85b)
HighlightMap::new/small_captures/small_theme
                        time:   [161.90 ns 162.70 ns 163.55 ns]
                        change: [-39.027% -38.352% -37.742%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
HighlightMap::new/small_captures/large_theme
                        time:   [231.37 ns 233.02 ns 234.70 ns]
                        change: [-91.570% -91.516% -91.464%] (p = 0.00 < 0.05)
                        Performance has improved.
HighlightMap::new/large_captures/small_theme
                        time:   [991.82 ns 994.94 ns 998.50 ns]
                        change: [-50.670% -50.443% -50.220%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  5 (5.00%) high mild
HighlightMap::new/large_captures/large_theme
                        time:   [1.6528 µs 1.6650 µs 1.6784 µs]
                        change: [-91.684% -91.637% -91.593%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) low mild
```

For large themes and many capture names, the revised approach is much
faster.

With that in place, we can also add better fallbacks whenever we change
tokens, since e.g. a change from `@variable` to `@preproc` would
previously cause tokens to not be highlighted at all, whereas now we can
add fallbacks for such cases more efficiently. I'll add this later on to
this PR.


## Self-Review Checklist

<!-- Check before requesting review: -->
- [X] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] 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 resolution speed of theme highlight capture names. This might
change highlighting in some rare edge cases, but should overall make
highlighting more predicatable. Theme captures will now follow a strict
prefix matching, so e.g. function.call.decorator.jsx` will now be
matched by only `function`, `function.call`, `function.call.decorator`
and `function.call.decorator.jsx` with the most specific capture always
taking precedence.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
2026-03-25 17:01:17 +01:00
Joseph T. Lyons
a48bcf2e7a
Bump Zed to v0.231 (#52420)
Release Notes:

- N/A
2026-03-25 15:21:01 +00:00
Ben Kunkle
f31b0690e7
Remove Sweep Integration (#52348)
Closes #52115

## Context

Removes the third party edit prediction integration for Sweep AI ahead
of their servers shutting down.

This PR will not affect those who are already use or plan to use their
open weighted models. The code removed by this PR was required for
integrating with their proprietary API.


## Self-Review Checklist

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

Release Notes:

- Removed support for using the Sweep AI edit prediction provider
through their proprietary API, as the servers are shutting down
https://discord.com/channels/1100625416022138902/1100625417272045639/1480644297903575142,
https://x.com/wwzeng1/status/2033302698360180949
2026-03-25 10:23:05 -04:00
Ben Brandt
d09cc53527
acp: Clean up archive download code (#52331)
Follow up to bzip support to clean up some of this code


## Self-Review Checklist

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

Release Notes:

- N/A
2026-03-25 08:09:12 +00:00
Vincenzo Palazzo
3d5ec540f3
Add .tar.bz2 archive support for ACP agent server downloads (#52188)
## Summary

- Added `TarBz2` variant to `AssetKind` enum for `.tar.bz2` / `.tbz2`
archives
- Implemented `extract_tar_bz2` using the `bzip2` feature of
`async-compression` (already a workspace dependency, just enabled the
feature flag)
- Wired up both streaming and file-based extraction paths in
`github_download.rs`
- Added `.tar.bz2` / `.tbz2` URL detection in both
`LocalExtensionArchiveAgent` and `LocalRegistryArchiveAgent`

This unblocks ACP registry entries (like Goose) that only ship
`.tar.bz2` archives.

Reference: https://github.com/block/goose/issues/8047

## Test plan

- [ ] Verify `cargo check` and `clippy` pass (confirmed locally)
- [ ] Test downloading an ACP agent that ships a `.tar.bz2` archive
(e.g., Goose)
- [ ] Verify existing `.tar.gz` and `.zip` agent downloads still work

Release Notes:

- Added support for `.tar.bz2` archives in ACP agent server downloads,
unblocking registry entries like Goose that only ship bzip2-compressed
tarballs.

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-25 07:54:23 +00:00
Marshall Bowers
72bc4dc534
cloud_llm_client: Move CompletionIntent to language_model (#52359)
This PR moves the `CompletionIntent` enum from the `cloud_llm_client`
crate to the `language_model` crate, as it is no longer part of the
Cloud interface.

Release Notes:

- N/A
2026-03-25 08:39:17 +01:00
Smit Barmase
c7951fa368
agent_ui: Add support for pasting external files and directories (#52300)
This PR adds support to paste external files and directories in Agent
Panel, along with the existing image paste path.

  Release Notes:

  - Added support for pasting files and folders into the Agent Panel.
2026-03-25 04:17:45 +05:30
Jakub Konka
100e543b16
Bump LiveKit SHA (#52354)
Release Notes:

- N/A
2026-03-24 23:09:31 +01:00
Max Brunsfeld
aca5209761
Make the agent panel have a flexible width (#52276)
Release Notes:

- The agent panel now has a flexible width, similar to the center panes
of the workspace.
2026-03-24 18:45:43 +00:00
Ben Brandt
1f5d280870
eval_cli: Improve setup for the eval_cli args (#52209)
## Context

Fixes some issues I ran into when running this on a remote machine.

## Self-Review Checklist

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

Release Notes:

- N/A
2026-03-24 11:53:08 +00:00
Chris Biscardi
6d3ebd4ffe
Upgrade tree-sitter-rust, de-list bsn (#52251)
## Context

Recently, we put bsn in the list of "macros to not reparse as rust"
(#51353).

We have since updated tree-sitter-rust to better handle the `@"string"`,
`:"string"`, etc cases, and can un-list bsn from the special casing.

on main, the highlighting currently looks like this for `bsn` and for
`not` (represents "other macros"). Note the `:"player.bsn"` string is
re-parsed as rust tokens.

<img width="1728" height="1084" alt="Screenshot 2026-03-23 at 9 33
35 AM"
src="https://github.com/user-attachments/assets/94ea5a6d-228b-44dd-857b-c41edcbd9af0"
/>

This pr, plus the tree-sitter-rust updates results in better handling by
default.

<img width="1728" height="1084" alt="Screenshot 2026-03-23 at 11 38
47 AM"
src="https://github.com/user-attachments/assets/fb6f71e3-7bcf-4c06-8e84-ce0823010b2e"
/>

Release Notes:

- N/A
2026-03-23 17:29:01 -07:00
Piotr Osiewicz
28687ff9d1
audio: Remove rodio audio backend (#51945)
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>

We've decided to remove rodio backend for audio as we didn't have time
to get it to a nice spot. I personally believe we should eventually
re-land it (the composable pipelines are quite nice!), but given that we
need audio to work, this seems like the best way forward. We won't have
to worry about all the ways in which the legacy pipeline interoped with
rodio's.

## Self-Review Checklist

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

Release Notes:

- audio: Experimental rodio audio backend has been removed.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Yara <git@yara.blue>
2026-03-24 00:58:09 +01:00
grim
adb3533890
agent: Add Opencode Zen provider (#49589)
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)

Per Opencode's website:
> Zen gives you access to a curated set of AI models that OpenCode has
tested and benchmarked specifically for coding agents. No need to worry
about inconsistent performance and quality, use validated models that
work.
> - [x] Testing select models and consulting their teams
> - [x] Working with providers to ensure they're delivered properly
> - [x] Benchmarking all model-provider combinations we recommend

There are so many models available, but only a few work well with coding
agents. Most providers configure them differently with varying results.

The models under the Zen umbrella typically have a more reliable
token(s) per second speed with minimal outages. The opencode ecosystem
has improved my workflow if not many others' !

Release Notes:
- Added [Opencode Zen](https://opencode.ai/zen) to list of providers

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-23 12:48:49 +00:00
Tom Houlé
302aa859f7
MCP remote server OAuth authentication (#51768)
Closes #43162

Implements the OAuth 2.0 Authorization Code + PKCE authentication flow
for remote MCP servers using Streamable HTTP transport, as specified by
the [MCP auth
specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization).

Previously, connecting to a remote MCP server that required OAuth would
silently fail with a timeout — the server's 401 response was never
handled. Now, Zed detects the 401, performs OAuth discovery, and guides
the user through browser-based authentication.

Step-up authentication and pre-registered clients are not in scope for
this PR, but will be done as follow-ups.

## Overview

- **401 detection** — When the HTTP transport receives a 401 during
server startup, it surfaces a typed `TransportError::AuthRequired` with
parsed `WWW-Authenticate` header info.
- **OAuth discovery** — Protected Resource Metadata (RFC 9728) and
Authorization Server Metadata (RFC 8414) are fetched to locate the
authorization and token endpoints.
- **Client registration** — Zed first tries CIMD (Client ID Metadata
Document) hosted at `zed.dev`. If the server doesn't support CIMD, falls
back to Dynamic Client Registration (DCR).
- **Browser flow** — A loopback HTTP callback server starts on a
preferred fixed port (27523, listed in the CIMD), the user's browser
opens to the authorization URL, and Zed waits for the callback with the
authorization code.
- **Token exchange & persistence** — The code is exchanged for
access/refresh tokens using PKCE. The session is persisted in the system
keychain so subsequent startups restore it without another browser flow.
- **Automatic refresh** — The HTTP transport transparently refreshes
expired tokens using the refresh token, and persists the updated session
to the keychain.

## UI changes

- Servers requiring auth show a warning indicator with an
**"Authenticate"** button
- During auth, a spinner and **"Waiting for authorization..."** message
are shown
- A **"Log Out"** option is available in the server settings menu for
OAuth-authenticated servers
- The configure server modal handles the auth flow inline when
configuring a new server that needs authentication.

Release Notes:

- Added OAuth authentication support for remote MCP servers. Servers
requiring OAuth now show an "Authenticate" button when they need you to
log in. You will be redirected in your browser to the authorization
server of the MCP server to go through the authorization flow.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-23 12:54:08 +01:00
Gnome!
aabc967b1c
Swap arrayvec crate for heapless to use LenT optimization (#47101)
Swaps the `arrayvec` dependency for `heapless`, as the `heapless`
library allows changing the type used for the `len` field, which
`arrayvec` hard-codes to `usize`. This means that, for all the
`ArrayVec`s in Zed, we can save 7 bytes on 64 bit platforms by just
storing the length as a `u8`.

I have not benchmarked this change locally, as I don't know what
benchmarking tools are in this project.

As a small bit of context, I wrote the PR to `heapless` to add this
`LenT` generic after seeing a PR on the `arrayvec` crate that seems to
be dead now. Once I saw some of Zed's blog posts about the `rope` crate
and noticed the usage of `arrayvec`, I thought this might be a welcome
change.

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2026-03-21 14:05:30 +01:00
Cameron Mcloughlin
17e4b492c6
livekit_client: Screensharing on Niri + NixOS (#52017)
Release Notes:

- Fixed a weird niche interaction between niri and nixos that broke
screensharing

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-03-21 07:42:55 +01:00
Jakub Konka
702b5ddf4b
livekit: Remove obsolete separate thread for frame feeder (#51993)
Release Notes:

- N/A
2026-03-20 15:04:21 +01:00
Ben Brandt
d1177dc43c
acp: Support terminal auth methods (#51999)
## Context

Brings in support for the new terminal auth methods. Currently behind
AcpBeta feature flag while the RFD stabilizes

## Self-Review Checklist

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

Release Notes:

- N/A
2026-03-20 10:12:00 +00:00
Cameron Mcloughlin
0570f6f68c
wgpu: Fix surface validation error (#51935)
Release Notes:

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

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2026-03-20 06:32:49 +00:00
John Tur
1dfe836d3d
Remove settings dependency from anthropic (#51979)
Release Notes:

- N/A
-
2026-03-19 19:48:30 -04:00
Marshall Bowers
0b557a5f5c
workspace: Only suppress auto-save on focus transfer for the Vim/Helix command palette (#51949)
This PR adjusts the logic that was added in #45166 to just apply to the
specific case of interacting with the command palette in Vim and Helix
modes (hereafter referred to collectively as "Vim mode").

In that PR, we would suppress the auto-save on focus change for _any_
modal in the workspace, regardless of whether we were actually in Vim
mode or not. This would cause issues where moving between files some
other way—such as the tab switcher or the file finder—would cause the
buffers to never be saved.

We now only suppress the auto-save on focus loss behavior when in Vim
mode and the active modal is the command palette. In all other cases, we
save the file.

Closes https://github.com/zed-industries/zed/issues/47968.

Supersedes https://github.com/zed-industries/zed/pull/51801 and
https://github.com/zed-industries/zed/pull/51802.

Note: the way we are identifying the active modal as the command palette
isn't the best, but @bennetbo and I didn't have any other cleaner
solutions. It's a bit tricky, as the logic lives in the `workspace`,
which isn't able to know about the `CommandPalette` due to
`command_palette` depending on `workspace`. There may be some other way
we could achieve this with more indirection, but it's unclear whether it
would be worth it at this time.

Release Notes:

- Changed `{ "autosave": "on_focus_change" }` to now always save on
focus loss, except for when activating the command palette when in
Vim/Helix mode.

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-19 12:53:26 -04:00
Tom Houlé
e5ab982413
client: Upgrade tiny_http (0.8.2 -> 0.12.0) (#51940)
Used only for the sign in callback. I've made sure it still works as
expected with a local build.

Release Notes:

- N/A
2026-03-19 16:58:21 +01:00
João Soares
0238d2d180
search: Fix deleted files persisting in project search results (#50551)
Closes #50524

When a file is deleted while project search results are displayed, the
deleted file's buffer was kept alive by the search multibuffer and would
reappear on re-search.

**Root cause:** `Search::into_handle()` treated buffers without a
`project_entry_id()` (which happens when `DiskState::Deleted`) as
"unnamed buffers" and fed them
directly into the search pipeline. The multibuffer's strong
`Entity<Buffer>` reference kept the buffer alive.

**Fix:**
- Filter deleted-file buffers from search candidates in `into_handle()`
and `all_loaded_buffers()`
- Subscribe to `FileHandleChanged` events on the search multibuffer to
proactively remove deleted files from existing results

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
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

### Video:

https://drive.google.com/file/d/1pEz6JywFcZlz8aiXbLOxIdj84SQWLIiF/view?usp=sharing

Release Notes:

- Fixed deleted files persisting in project search results
2026-03-19 16:09:15 +01:00
Oleksiy Syvokon
c907d5d912
ep: Initialize AppDatabase (#51922)
Follow up to #51809

Without it, ep_cli panics when initializing headless Zed.

Release Notes:

- N/A
2026-03-19 14:28:44 +02:00
Danilo Leal
b9beb94d36
sidebar: Move toggle to the status bar instead (#51916)
- [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-19 07:41:10 -03:00
John Tur
a7c9c24f40
Update to wgpu v29 (#51889)
This release includes the OpenGL fixes which were sent upstream.

Release Notes:

- N/A
2026-03-19 07:57:57 +01:00
Max Brunsfeld
2cc7d17f34
Fix usability issues with automatically-created git worktrees (#51775)
* [x] Display original project name as root folder in project panel,
titlebar
* [x] When manually creating worktrees, ensure final path component is
original project name
* [x] Display original project name, worktree name, and branch name in
titlebar
* [x] Only show main checkout in project switcher

Release Notes:

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

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-03-18 22:49:16 +00:00
Marco Mihai Condrache
7baf5dc04e
Add basic undo in project panel (#47091)
- Add `project_panel::undo::UndoManager` with a bounded operation stack
  to track and revert project panel operations
- Support undoing file and directory creation, renaming, moving, pasting
  and drag-and-drop operations
- Revert batch operations sequentially in reverse order to handle
  dependencies between them
- Show an error notification when one or more undo operations fail
- Add "Undo" entry to the project panel context menu, disabled when
  there is nothing to undo
- Gate the feature behind the `project-panel-undo-redo` feature flag

Ref: #5039

Release Notes:

- N/A

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-03-18 22:37:21 +00:00
Finn Evers
de4522ed8f
title_bar: Fix share button being hidden when any modal is open (#51862)
This check was initially added in
https://github.com/zed-industries/zed/pull/19885/changes but has
regressed since. Making it explicit here again to stop this from
happening.

Release Notes:

- N/A
2026-03-18 19:29:58 +00:00
Mikayla Maki
67d7f99891
Fix shared database test isolation (#51809)
All of the important changes are in
[`db.rs`](https://github.com/zed-industries/zed/pull/51809/changes#diff-2f644eab943bfa58feec29256281a3d9e8d4d7784cd34783e845af8beb15b16d).
Consider reading the commit log in order to review this work.

The DB crate's macro and API was changed to fix flakiness observed in
the MultiWorkspace tests when run locally. This flakiness was caused by
a shared `static LazyLock`, that caused concurrent test runs to interact
with the same underlying in-memory database. This flakiness wasn't
possible on CI due to it's usage of `cargo nextest`, whose
process-per-test approach masked this problem.

Essentially, I've changed the `static_connection` macro to remove the
static database variable and redone the internal model. Now, all
database types are thin wrappers around a generic `AppDatabase`. The
`AppDatabase` collects all of the individual table's migrations via the
`inventory` crate, and so only runs the migrations once on startup,
rather than a dozen times on startup.

The new API requires a `cx` so that we can replace the database returned
at runtime, rather than relying exclusively on a process-global
thread-local. However, we are still using a `static LazyLock` so that we
only need to take an `&App`, instead of an `&mut App`. These databases
types are `Clone + Send + Sync`, so you can easily capture-and-move the
database into background tasks and other places that don't have a `cx`.

For tests that require database isolation, it is now possible to set
their own database in init. See
[`workspace::init_test`](https://github.com/zed-industries/zed/pull/51809/changes#diff-041673bbd1947a35d45945636c0055429dfc8b5985faf93f8a8a960c9ad31e28R13610),
for the flakiness fix.

Best part, this change should be entirely compiler driven, so the Zed
agent was able to make the app-wide refactor easily.

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)

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-03-18 12:05:57 -07:00
Pratik Karki
092cf0b3ca
Bump fancy-regex to v0.17.0 (#51549)
This fixes "Error compiling regex: Look-behind assertion without
constant size" when using variable-length lookbehinds in search, such as
`(?<=^(?:\s{4})*)\s{4}`.

fancy-regex 0.17.0 adds support for variable-length lookbehinds using
regex-automata's DFA reverse search commit:
https://github.com/fancy-regex/fancy-regex/commit/b58fb31

Closes #50219 

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)

Release Notes:

- Fixed the error message on compilation of regular expressions
containing variable length lookbehind assertions

Previously:
<img width="1582" height="1377" alt="image"
src="https://github.com/user-attachments/assets/3e275891-aef5-482e-87f0-c47b9eac3c2a"
/>


Now:
<img width="1323" height="1015" alt="image"
src="https://github.com/user-attachments/assets/8638cd08-fcd0-40f9-8749-32e6352e89b7"
/>


Thanks to @vorahardik7 for helping out with a test example and
@AmaanBilwar for suggesting a fix!

Signed-off-by: Pratik Karki <pratik@prertik.com>
2026-03-18 20:38:20 +02:00
Cameron Mcloughlin
c842fb55dd
sidebar: Keyboard nav improvements (and vim mode) (#51856) 2026-03-18 17:53:04 +00:00
Jakub Konka
7ba5315329
collab_ui: Add call diagnostics (#51816)
Release Notes:

- Added call diagnostics when collaborating with other Zed users in
collab.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Co-authored-by: Danilo Leal <danilo@zed.dev>
2026-03-18 16:25:06 +01:00
Joseph T. Lyons
f823601c6c
Bump Zed to v0.230 (#51837)
Release Notes:

- N/A
2026-03-18 14:44:52 +00:00
Xin Zhao
46596a2570
python: Upgrade pet to improve toolchain discovery in WSL (#51749)
This PR updates the pet dependency to incorporate performance
improvements from upstream.

Related Upstream Changes:
- Issue: microsoft/python-environment-tools#369
- PR: microsoft/python-environment-tools#370

Updating pet reduces toolchain discovery time in WSL environments,
specifically when Conda is installed on the host Windows system. In my
testing, the time from clicking the toolchain button to the list
appearing was reduced by approximately 2 seconds.

While this is a notable improvement, discovery in WSL remains slightly
slower than in native development or remote Linux environments, where
toolchains are typically loaded near-instantaneously.

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 (no need)
- [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:

- Improved python toolchain discovery under WSL environment
2026-03-18 07:18:29 +01:00
Danilo Leal
9f3e3be65f
agent: Improve sidebar design and behavior (#51763)
- Selection/focus improvements (reduces flickers, move selection more
correctly throughout the list)
- Adds open folder button in the sidebar header
- Fixes sidebar header design, including the thread view one, too
- Fixes behavior of cmd-n when focused in the sidebar
- Changes the design for the "new thread" button in the sidebar and adds
a preview of the prompt on it
- Rename items in the "start thread in" dropdown

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2026-03-17 20:44:20 -03:00
Jakub Konka
5920e2218a
livekit: Bump livekit version (#51771)
Release Notes:

- Fixed segfault at runtime on aarch64-linux when running static
constructors.
2026-03-17 19:23:56 +01:00
Max Brunsfeld
977cd6ac7e
Move sidebar back out of the panel (#51723)
Reverts https://github.com/zed-industries/zed/pull/51241

Release Notes:

- N/A
2026-03-17 03:48:20 +00:00
zed-zippy[bot]
8d79dd7688
glsl: Bump to v0.2.2 (#51682)
This PR bumps the version of the GLSL extension to v0.2.2.

Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-16 16:17:56 +00:00
loadingalias
e5bb2c6790
Fix non-ASCII path:line:column navigation (#51238)
Closes #43329

## Summary
This fixes `path:line:column` navigation for files containing non-ASCII
text.

Before this change, open path flows were passing the external column
directly into `go_to_singleton_buffer_point`. That happened to work for
ASCII, but it was wrong for Unicode because external columns are
user-visible character positions while the editor buffer stores columns
as UTF-8 byte offsets.

This PR adds a shared text layer conversion for external row/column
coordinates and uses it in the affected open-path flows:
 - file finder navigation
 - recent project remote connection navigation
 - recent project remote server navigation

It also adds regression coverage for the Unicode case that originally
failed.

As a small - necessary - prerequisite, this also adds
`remote_connection` test support to `file_finder`'s dev-deps so the
local regression test can build and run on this branch. That follows the
same feature mismatch pattern previously fixed in #48280. I wasn't able
to locally verify the tests/etc. w/o the addition... so I've rolled it
into this PR. Tests are green.

The earlier attempt in #47093 was headed in the right direction, but it
did not land and did not include the final regression coverage requested
in review.

## Verification
 - `cargo fmt --all -- --check`
 - `./script/clippy -p text`
 - `./script/clippy -p file_finder`
 - `./script/clippy -p recent_projects`
 - `cargo test -p file_finder --lib --no-run`
- `cargo test -p file_finder
file_finder_tests::test_row_column_numbers_query_inside_file -- --exact`
- `cargo test -p file_finder
file_finder_tests::test_row_column_numbers_query_inside_unicode_file --
--exact`
- `cargo test -p text
tests::test_point_for_row_and_column_from_external_source -- --exact`

## Manual

I reproduced locally on my machine (macOS) w/ a stateless launch using a
Unicode file (Cyrillic)

Before:
 - `:1:5` landed too far left
 - `:1:10` landed around the 4th visible Cyrillic character

After:
 - `:1:5` lands after 4 visible characters / before the 5th
 - `:1:10` lands after 9 visible characters / before the 10th

Release Notes:
- Fixed `path:line:column` navigation so non-ASCII columns land on the
correct character.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-03-16 15:35:59 +00:00
zed-zippy[bot]
ee24bef3a1
html: Bump to v0.3.1 (#51518)
This PR bumps the version of the HTML extension to v0.3.1.

Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-16 15:31:16 +01:00
Jongchan
c54fe0f3e5
git_ui: Add file and folder icons to the Git panel (#51000)
Closes https://github.com/zed-industries/zed/discussions/49740

Adds optional file and folder icons to the Git panel so its file list is
easier to scan, especially in larger repositories.

- add folder icons for Git panel entries
- add Git panel settings for file and folder icon visibility

---

Release Notes:

  - Made the Git Panel aware of icon themes.
  - Added the ability to render file type icons in the Git panel.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-16 11:06:37 -03:00
Jakub Konka
be4d38a56e
livekit: Use our build of libwebrtc.a (#51433)
Closes #51339

This should address issues with too new libstdc++.so on older/more
conservative distros such as RHEL9.

Release Notes:

- Relaxed requirement for libstdc++.so available on Linux distros.
2026-03-16 10:47:36 +01:00
Lukas Wirth
a93c66e794
markdown_preview: Prevent stackoverflows in markdown parsing (#51637)
Fixes ZED-5TR

Release Notes:

- Fixed a stack overflow when parsing deeply nested html in markdown
files
2026-03-16 07:43:56 +00:00
Alex Mihaiuc
cbc39669b4
Remove std::fs::read_link in fs (#50974)
Closes #46307

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
- [X] 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:

- Improved compatibility with mounted VHDs on Windows.

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2026-03-14 20:02:34 -04:00
Neel
ee8ecfa47c
language_models: Make subscription text exhaustive (#51524)
Closes CLO-493.

Release Notes:

- N/A
2026-03-13 20:18:30 +00:00
Danilo Leal
b63a2aba48
agent_ui: Fix new thread in location setting renderer and flag (#51527)
Follow up to https://github.com/zed-industries/zed/pull/51384

This PR fixes the settings UI rendering of this setting by adding a
default value and also wraps it in the feature flag (only the settings
UI rendering), given it's not widely available just yet.

Release Notes:

- N/A
2026-03-13 17:00:48 -03:00
zed-zippy[bot]
08abc48f1d
glsl: Bump to v0.2.1 (#51517)
This PR bumps the version of the GLSL extension to v0.2.1.

Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-13 19:31:40 +01:00
Finn Evers
ccb2674a77
extension_ci: Add infrastructure for this repository (#51493)
This will allow us to also use the workflows for this repository, which
will especially come in handy once we revisit provider extensions.

Not perfect, as we will trigger some failed workflows for extensions
that were just added

Release Notes:

- N/A
2026-03-13 18:17:29 +01:00
Lukas Wirth
e4b6286a63
file_finder: Show collab channels in file search (#51120)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-13 07:48:35 +00:00
Joseph T. Lyons
bee94e7392
Bump Zed to v0.229 (#51292)
Release Notes:

- N/A
2026-03-11 14:41:31 +00:00
Bennet Bo Fenner
8d4913168c
acp: Update to 0.10.2 (#51280)
Updates to `0.10.2`, most notable change is implementing
`session/close`.

Release Notes:

- N/A
2026-03-11 12:52:03 +00:00
Max Brunsfeld
b5666319b4
Move threads sidebar into agent panel (#51241)
* [x] Put back persistence of sidebar open state
* [x] when agent panel is docked right, put sidebar on the right side
* [x] remove stale entries from `SidebarsByWindow`

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2026-03-10 23:45:55 -07:00
Conrad Irwin
f0e301cea0
Redact string panics (#51248)
String panics are a non-trivial percentage of the crashes we see at Zed,
and
doubly unfortunately they may incidentally include the contents of a
user's
buffer.

Although this hasn't happened yet (to my knowledge), I don't want to be
in the position of having received sensitive information this way.

See also https://github.com/rust-lang/rust/pull/153677

Release Notes:

- N/A
2026-03-11 03:08:39 +00:00
Danilo Leal
a26f0f8b60
sidebar: Adjust design for the "Open Project" button (#51145)
This PR makes the "Open Project" button in the sidebar also open the
"Recent Projects" popover, while also anchoring that popover to the the
button on the sidebar instead.

Release Notes:

- N/A
2026-03-09 22:01:40 -03:00
Max Brunsfeld
2bd5c21855
zeta: Allow the server to select the editable and context ranges more flexibly (#50975)
Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-03-09 19:58:31 -04:00
Bennet Bo Fenner
ef08470d2f
Remove unused rich_text crate (#50950) 2026-03-09 18:08:33 +01:00
Piotr Osiewicz
97421c670e
Remove unreferenced dev dependencies (#51093)
This will help with test times (in some cases), as nextest cannot figure
out whether a given rdep is actually an alive edge of the build graph

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-09 13:22:12 +01:00
Finn Evers
8475280eb1
extension_cli: Add tests for semantic token rules and language tasks (#50750)
This adds checks to the extension CLI to ensure that tasks and semantic
token rules are actually valid for the compiled extensions.

Release Notes:

- N/A
2026-03-09 11:47:12 +01:00
John Tur
dde76cd5f8
Enable extended reasoning for Anthropic models in Copilot (#46540)
Fixes https://github.com/zed-industries/zed/issues/45668

https://github.com/microsoft/vscode-copilot-chat used as a reference for
headers and properties we need to set

| Before | After | 
| --- | --- |
| <img width="300"
src="https://github.com/user-attachments/assets/d112a9ef-52d2-42ff-a77b-4b4b15f950fe"
/>| <img width="300"
src="https://github.com/user-attachments/assets/0f1d7ae0-bee1-46f7-92ef-aea0fa6cde7a"
/> |

Release Notes:

- Enabled thinking mode when using Anthropic models with Copilot
2026-03-08 09:34:46 +00:00
John Tur
c841b48e4f
Fix OpenGL initialization on Intel HD 4000 (#50983)
Almost there!

Release Notes:

- N/A
2026-03-07 03:22:49 +00:00
Jakub Konka
a216f9d0e0
crashes: Bump minidumper crate to 0.9 (#50937)
Release Notes:

- N/A
2026-03-06 17:06:35 +01:00
Cameron Mcloughlin
33e5301946
gpui: Add property_test macro (#50935)
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-03-06 14:03:45 +00:00
Danilo Leal
e95b5c3c71
sidebar: Add some refinements (#50923)
- Make clicking on the project header collapse/expand the group as
opposed to activating the workspace
- Added the "threads" label close to the sidebar toggle button
- Made the open folder icon button open the file finder directly as
opposed to the recent projects popover

Release Notes:

- N/A
2026-03-06 09:20:54 -03:00
Ben Brandt
2457e27437
eval: Add eval_cli crate (#50922)
Very much wip

Release Notes:

- N/A
2026-03-06 11:12:38 +00:00
John Tur
ca5027c4d6
Fix OpenGL initialization on Intel HD 4000 (#50891)
I think we might just get it working this time

Release Notes:

- N/A
2026-03-06 02:06:27 +00:00
Mikayla Maki
9afeb4e11d
Implement new Multi Agent UI (#50534)
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)

Release Notes:

- N/A

---------

Co-authored-by: Eric <eric@zed.dev>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: John Tur <john-tur@outlook.com>
2026-03-05 20:22:28 +00:00
João Soares
94154aae6f
picker: Prevent clicking non-selectable entries from confirming selection (#50705)
Closes #50627

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
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)


### Videos:
Before:

https://drive.google.com/file/d/1PahGhfx-wq9cyNqqMlctb9Np7M1Meo71/view?usp=sharing
After:

https://drive.google.com/file/d/135W6MQ9hKBurw5Z7YpHQQhoQwkh1NvUb/view?usp=sharing


Release Notes:

- Fixed clicking on non-selectable picker entries (e.g. section headers)
confirming the currently selected item.
2026-03-05 18:59:01 +00:00
Kunall Banerjee
0be32ba939
markdown_preview: Enable parser options individually (#50440)
Closes #50170.

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)

Release Notes:

- Enable parser options individually to avoid rendering issues
2026-03-05 14:00:08 +00:00
John Tur
3959921c2e
Fix OpenGL initialization on Intel HD 4000 (#50772)
For real this time?

Release Notes:

- N/A
2026-03-05 02:35:29 +00:00
Finn Evers
1fec1cabff
ci: Clean up some of our workflows (#50499)
Release Notes:

- N/A
2026-03-04 22:27:54 +00:00
Conrad Irwin
9316c4aa55
Fix crash metrics ID (#50728)
Before this change the crash handler uploaded crashes before sign-in had
happened.

Now we get the metrics_id correctly. This allows for us to tie crashes
reported
on Github to users who have opted into telemetry (users who have opted
into
crash reporting but not telemetry will not have a metrics_id).

Release Notes:

- Fixed crash reporter metadata collection

---------

Co-authored-by: Miguel Raz Guzmán Macedo <miguel@zed.dev>
2026-03-04 13:04:48 -07:00
Anthony Eid
5c91ebf1fe
git: Move diff num stat calculation to repository snapshot layer (#50645)
Follow up on: https://github.com/zed-industries/zed/pull/49519

This PR reworks how Zed calculates diff num stats by moving the
calculation to the `RepositorySnapshot` layer, instead of the
`GitPanel`. This has a couple of benefits:

1. Snapshot recalculations are already set up to recompute on file
system changes and only update the affected files. This means that diff
stats don't need to manage their own subscription or states anymore like
they did in the original PR.
2. We're able to further separate the data layer from the UI. Before,
the git panel owned all the subscriptions and tasks that refreshed the
diff stat, now the repository does, which is more inline with the code
base.
3. Integration tests are cleaner because `FakeRepository` can handle all
the data and calculations of diff stat and make it accessible to more
tests in the codebase. Because a lot of tests wouldn't initialize the
git panel when they used the git repository.
4. This made implementing remote/collab support for this feature
streamline. Remote clients wouldn't get the same buffer events as local
clients, so they wouldn't know that the diff stat state has been updated
and invalidate their data.
5. File system changes that happened outside of Zed now trigger the diff
stat refresh because we're using the `RepositorySnapshot`.

I added some integration tests as well to make sure collab support is
working this time. Finally, adding the initial diff calculation to
`compute_snapshot` didn't affect performance for me when checking
against chromium's diff with HEAD~1000. So this should be a safe change
to make.

I decided to add diff stats on the status entry struct because it made
updating changed paths and the collab database much simpler than having
two separate SumTrees. Also whenever the UI got a file's status it would
check its diff stat as well, so this change makes that code more
streamlined as well.

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.

Release Notes:

- N/A
2026-03-04 18:54:23 +00:00