1150c9d
Fix crash when fallback workspace is in the removal set (#53549)
Click to expand commit body
When removing a project group, the fallback closure calls
`find_or_create_local_workspace` which searches `self.workspaces` for an
existing match. Because the workspaces to be removed haven't been
removed yet at that point, `workspace_for_paths` can return a doomed
workspace, hitting the `assert!` in `MultiWorkspace::remove` and
crashing the app.
Fix by adding an `excluding` parameter to
`find_or_create_local_workspace` so callers inside removal fallbacks can
skip workspaces that are about to be removed. Both
`remove_project_group` and `sidebar::archive_thread` now pass the
appropriate exclusion set.
Adds a regression test that deterministically reproduces the crash (the
assert fires without the exclusion, passes with it).
Release Notes:
- Fixed a crash when closing a project group whose fallback workspace
matched one being removed.
Richard Feldman
created
1c1f2d6
agent_ui: Fix worktree naming regression when using existing branches (#53669)
Click to expand commit body
When creating a new git worktree from an existing branch (e.g. `main`),
the worktree directory was incorrectly named after the branch instead of
getting a random adjective-noun name. Additionally, if a directory with
that name already existed, the rollback logic could destructively delete
the pre-existing worktree.
Changes:
- Generate a random adjective-noun name for worktree directories when no
explicit name is provided
- Collect existing worktree directory names to avoid collisions
- Check generated paths against known worktree paths before creating
- Reduce random name retry count from 100 to 10
- Add regression test
Release Notes:
- Fixed a regression where creating a git worktree from an existing
branch would name the worktree directory after the branch (instead of
generating a random name)
Richard Feldman
created
d0c8109
Add more harness to the CI scripts (#53816)
Click to expand commit body
Fixes
<img width="1238" height="520" alt="image"
src="https://github.com/user-attachments/assets/5e6c0d93-660f-4d1a-ab8c-c9c269292eaa"
/>
If a parent script with `-euo pipefail` invokes a script, that does not
inherit the `-euo pipefail` option. Fix that by adding the flags to the
scripts needed and adjust the curl command to fail too.
Release Notes:
- N/A
Kirill Bulatov
created
850c94c
title_bar: Hide plan badge next to username when there are organizations (#53826)
Click to expand commit body
This PR makes it so we hide the plan badge next to the username in the
user menu when there are organizations.
We instead show the plans next to each organization:
<img width="257" height="317" alt="Screenshot 2026-04-13 at 1 29 26 PM"
src="https://github.com/user-attachments/assets/0111e7ff-af09-48ba-a043-9e25c2dd24bd"
/>
Closes CLO-649.
Release Notes:
- N/A
Marshall Bowers
created
cf69756
agent_ui: Fix empty agent panel state after startup (#53823)
Click to expand commit body
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Bennet Bo Fenner
created
4d025b4
edit_prediction_ui: Enforce org configuration to disable Zed provider (#53655)
Click to expand commit body
The Zed provider is now disabled in the selection dropdown when the
current organization has disabled edit predictions. It is also
unselected when you switch organizations to one such organization.
This is also already enforced server side.
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: Marshall Bowers <git@maxdeviant.com>
This will help a lot when dealing with this in the context of the Zed
Zippy bot.
Release Notes:
- N/A
Finn Evers
created
b1f8bd6
Add automatic syntax highlighting for TopoJSON files (#53546)
Click to expand commit body
TopoJSON is an extension of the geospatial data interchange format,
GeoJSON. Although it is not as widely popular, it is frequently used in
web maps, where its smaller file size is advantageous.
More information about TopoJSON can be found here:
https://github.com/topojson/topojson-specification
This change adds `topojson` as a recognised path suffix, so TopoJSON
files automatically open as JSON and get the standard JSON syntax
highlighting.
This PR is similar to @flother’s PR for GeoJSON:
https://github.com/zed-industries/zed/pull/49261
Closes (my own) discussion:
https://github.com/zed-industries/zed/discussions/32963
PS: This is my first PR. I'd appreciate any feedback or suggestions for
improvement
Self-Review Checklist:
- [X] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable
Release notes:
- Added automatic syntax highlighting for TopoJSON files
Jonas
created
9264f7f
git: Add missing `language_changed` notification for branch diffs (#53757)
Click to expand commit body
We need to reparse the base text using the same language as the main
buffer, whenever the main buffer's language changed. We already do this
for the uncommitted diff, but it was missing for the branch (OID-based)
diffs. (We don't need it for the unstaged diff because we don't
currently show you that base text anywhere in the UI, so its language is
immaterial.)
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
Cole Miller
created
9adff86
sidebar: Move to new window, going through sqlite (#53513)
Click to expand commit body
Re-adds the `multi_workspace::MoveProjectToNewWindow` action
It serializes, then closes, then re-opens the project to avoid issues
with pending tasks
Release Notes:
- N/A or Added/Fixed/Improved ...
Cameron Mcloughlin
created
bd78089
git: Use repo snapshot to fetch picker branch list instead of spawning a job (#53661)
Click to expand commit body
This should fix a delay where the thread_branch_picker and git_picker
would take a while to load the branch list while other git jobs are
being processed before hand.
I also added a subscription in both pickers to repository so they
refresh their matches when the repo snapshot branch list changes.
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
Anthony Eid
created
0272aab
Do not open the sidebar when opening a directory in a new window (#53815)
Click to expand commit body
Follow-up to https://github.com/zed-industries/zed/pull/53778
Covers another case when opening a directory via the file picker _from a
blank project_
<img width="865" height="539" alt="image"
src="https://github.com/user-attachments/assets/43eb035b-4f0f-4e8c-bfa3-fbcd7b4beb13"
/>
resulted in
<img width="1072" height="1162" alt="image"
src="https://github.com/user-attachments/assets/59c588b9-8925-41bb-b9fb-e4906c43c723"
/>
Release Notes:
- Fixed the sidebar opening when a new directory in a new window was
opened
Kirill Bulatov
created
ea42a19
git_ui: Improve design in branch, stash, and worktree pickers (#53798)
Click to expand commit body
Mainly improving label truncation as well as making date/time display
consistent between the branch and stash pickers. In the list item, we
display relative timestamps, while in the tooltip, we display it in
absolute for more details.
Release Notes:
- N/A
Danilo Leal
created
51dffe4
git_graph: Add some design adjustments (#53803)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/53524
- Improve overall colors
- Fix chip truncation
- Better highlight which branch is currently checked out
| Truncation | Checked out branch |
|--------|--------|
| <img width="2774" height="2158" alt="Screenshot 2026-04-13 at 9
40@2x"
src="https://github.com/user-attachments/assets/176cbe72-a757-4b83-b8c1-9fcbda16a5a8"
/> | <img width="2774" height="2158" alt="Screenshot 2026-04-13 at 9
41@2x"
src="https://github.com/user-attachments/assets/cf4a3863-9dae-4891-b93a-443e4d7ca5a2"
/> |
Release Notes:
- Git Graph: Improved visibility of the currently checked out branch and
fixed branch name truncation.
Danilo Leal
created
cbd856f
Revert "Fix duplicate window when opening from CLI on macOS (#48146)" (#53814)
Click to expand commit body
This reverts commit 5be9dc1781ef6d2cbfbdbcd417edd0935cbb83a8.
This change breaks dragging directories onto the App icon (or using the
directories listed in the menu on the app icon in the doc)
Release Notes:
- N/A
We were assuming that `Bgra8Unorm` always works, which was causing the
panic on configurations that don't support it ("wgpu-hal invariant was
violated: Requested feature is not available on this device")
This change makes a proper fallback to `Rgba8Unorm`. In the worst case,
if a device doesn't support that as well (highly unlikely), we return a
proper error instead of a panic.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes ZED-69S
Release Notes:
- Fixed panic on devices that don't support BGRA8
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [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
After fix:
https://github.com/user-attachments/assets/7a9b7947-e222-4839-a46d-078b6aec8f18
Closes #53749
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Fuad Hasan
and
Danilo Leal
created
beb0b02
agent_ui: Show full branch name in thread branch picker aside (#53791)
Click to expand commit body
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Summary
- Display the full branch name in the DocumentationAside panel for
thread branch picker entries, so users can see truncated branch names in
full
- Add a separator between the branch name and descriptive text, matching
the pattern used by the model selector's DocumentationAside
Release Notes:
- Agent: Improved branch picker by displaying the full branch name in
the documentation aside.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
XiaoYan Li
,
Claude Opus 4.6 (1M context)
, and
Danilo Leal
created
Corresponding font-kit commit:
https://github.com/zed-industries/font-kit/commit/94b0f28166665e8fd2f53ff6d268a14955c82269
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
Kirill Bulatov
created
4b3a048
Fix docs preprocessor not running on CI (#53755)
Click to expand commit body
## Summary
The docs preprocessor was configured with `renderer = ["html"]`, but the
actual output renderer is `zed-html`. This mismatch caused mdbook to
skip the preprocessing step, leaving YAML frontmatter unprocessed in the
rendered HTML.
**Symptoms:**
- YAML frontmatter (`---\ntitle: ...\n---`) leaked into rendered HTML
- `---` rendered as `<hr />`
- Frontmatter fields appeared as `<h2>` headings (setext heading
interpretation)
- Meta description tags showed default values instead of page-specific
descriptions
## Root Cause
The `renderer = ["html"]` config was introduced in August 2024 (#16883)
when the preprocessor was first added. At that time, the output was the
standard `html` renderer.
In July 2025 (#35112), the `[output.zed-html]` custom renderer was added
for frontmatter/postprocessing support, but the preprocessor's
`renderer` filter wasn't updated to match.
**Why it broke now (April 12, 2026):**
The mismatch was latent - it worked inconsistently depending on CI
environment conditions. Comparing two deploys from the same day:
| Deploy | Network Errors | Preprocessing |
|--------|---------------|---------------|
| 19:00 UTC | 0 | ✓ Runs correctly |
| 21:54 UTC | Many (`static.crates.io` connection failures) | ✗ Skipped
|
The 21:54 deploy had network errors during `cargo run -p
docs_preprocessor`. mdbook appears to have silently skipped the
preprocessor and proceeded directly to the renderer. The postprocessor
still ran (via the renderer's separate cargo command), but without
preprocessing, frontmatter wasn't converted to metadata.
**The fix:** Change `renderer = ["html"]` to `renderer = ["html",
"zed-html"]` to support both the custom renderer and any fallback to the
standard html renderer (e.g., during local development or if mdbook
commands internally use html).
## Test plan
- [x] Local build produces correct HTML without frontmatter leaking
- [x] Meta descriptions correctly populated from frontmatter
- [x] CI `check_docs` shows all 3 preprocessor steps running:
- `docs_preprocessor supports zed-html`
- `docs_preprocessor` (preprocessing)
- `docs_preprocessor postprocess`
Release Notes:
- N/A
Follow up to #53737, that introduced an ordering issue where we would
override the existing thread metadata in the case of loading a session
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
Bennet Bo Fenner
created
4035186
Fix a reachability bug in the sidebar (#53785)
Click to expand commit body
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #ISSUE
Release Notes:
- N/A
Mikayla Maki
created
38e1d19
agent_ui: Simplify thread scrolling with keyboard (#53547)
Click to expand commit body
This change allows using simple navigation keys (PageDown / PageUp /
Ctrl-Home / Ctrl-End) when the message editor is focused, but only if
the cursor is at the beginning/end of the message, where pressing these
keys would normally result in no-op.
One important corollary is that when the cursor is in an empty message,
navigation keys scroll the thread.
We already have this behavior for Up/Down and this change just expands
it for other navigation keys.
Demo:
[Demo](https://github.com/user-attachments/assets/ff540c8c-a223-417b-b16a-b0d08599b1ae)
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
Oleksiy Syvokon
created
55e4713
agent_ui: Unify draft and background threads into retained threads (#53737)
Click to expand commit body
> **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>
Nathan Sobo
,
Mikayla Maki
, and
Mikayla Maki
created
c771663
Do not open the sidebar when opening a new project in a new window (#53776)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/53466
Release Notes:
- Fixed the sidebar opening when a new project in a new window was
opened
follow up #47471
As described in #47471, we introduced a direction-aware strategy to
improve user experience when interacting with hover popovers. In this
follow-up, we are adding `hover_popover_sticky` and
`hover_popover_hiding_delay` to control whether the feature introduced
in 47471 enabled, and to let users configure the delay to balance
responsiveness . Also `hover_popover_sticky` can now be imported from
`editor.hover.sticky`, as well as `hover_popover_hiding_delay` from
`editor.hover.hidingDelay` in VSCode.
Also this PR adds several tests:
- `test_hover_popover_cancel_hide_on_rehover`: when the cursor returns
to the hover after leaving once within the hiding delay, the hover
should persist while canceling the existing hiding timer.
- `test_hover_popover_enabled_false_ignores_sticky` : when
`hover_popover_enabled` is false, the `hover_popover_sticky` and
`hover_popover_hiding_delay` have no effect(since no hover is shown).
- `test_hover_popover_sticky_delay_restarts_when_mouse_gets_closer`:
when mouse gets closer to hover popover, we expect the timer to reset
and the hover remains visible.
- `test_hover_popover_hiding_delay`: check if the delay(in test, that's
500ms) works.
- `test_hover_popover_sticky_disabled`: when hover_popover_sticky is
false, the hover popover disappears immediately after the cursor leaving
the codes.
- VSCode import test in `settings_store.rs`
Release Notes:
- Added `hover_popover_sticky` and `hover_popover_hiding_delay` settings
to balance responsiveness of hover popovers.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
daydalek
and
Copilot
created
8e0005c
Fix a bug where worktree creation would apply to nested git repos (#53771)
Click to expand commit body
Saw this while manually testing other stuff.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Mikayla Maki
created
c512c72
git_ui: Toggle directory expansion with Enter key in tree view (#52965)
Click to expand commit body
Semantics and code was mostly taken from the existing behaviour of the
Left/Right arrow keys.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #51986
Release Notes:
- Added ability to toggle tree collapse in git panel
Erin van der Veen
created
60a8b6f
ci: Use GitHub context for artifact name (#53559)
Click to expand commit body
Missed this yesterday in
https://github.com/zed-industries/zed/pull/53433, because in the `with`
level, we need to use the proper context syntax.
Release Notes:
- N/A
Finn Evers
created
a86de48
editor: Fix semantic tokens missing when opening buffer from multibuffer (#53712)
Click to expand commit body
Summary
Semantic token highlighting was missing when opening a file from
multibuffer search results (Ctrl+Shift+F). Which file got hit depended
on window size and scroll offset.
## Root cause
Two async tasks race to write `post_scroll_update`:
1. `set_visible_line_count` (scroll.rs:682) fires on first render and
spawns a task that calls `register_visible_buffers` + `update_lsp_data`
(requests semantic tokens).
2. `open_buffers_in_workspace` (editor.rs:25049) calls
`change_selections` with autoscroll right after creating the editor.
This emits `ScrollPositionChanged`, whose handler (editor.rs:2655)
replaces `post_scroll_update` with a task calling
`update_data_on_scroll`.
3. `update_data_on_scroll` (editor.rs:26099) has a singleton guard: `if
!self.buffer().read(cx).is_singleton()` that skips `update_lsp_data` for
single-file buffers. This is a scroll optimization, singleton buffers
don't change their visible buffer set on scroll.
4. The initial task gets dropped, the replacement skips
`update_lsp_data`, semantic tokens are never requested.
## Fix
Added a `needs_initial_lsp_data` flag to the Editor struct, set to
`true` on creation. `update_data_on_scroll` checks this flag alongside
the singleton guard, so `update_lsp_data` runs at least once even for
singletons. The flag flips to `false` right after, so subsequent scrolls
behave exactly as before. No perf impact after the first render.
## 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 #53051
## Demo
Before:
https://github.com/user-attachments/assets/77d07d95-cb4a-44ff-842d-1f7a46653ca9
After:
https://github.com/user-attachments/assets/2c942f52-4ec3-459f-a97b-93919e4bfb3d
## Release notes
- Fixed semantic token highlighting missing when opening a buffer from
multibuffer search results
9f50765
agent_ui: Fix creating a thread from the toolbar (#53706)
Click to expand commit body
Follow up to https://github.com/zed-industries/zed/pull/53574
Closes https://github.com/zed-industries/zed/issues/53705
In the draft feature PR, we didn't update the new thread creation from
the agent panel's toolbar to _also_ create a corresponding draft item in
the sidebar. Additionally, the draft feature exposed a
previously-existing bug where the toolbar wouldn't get synced with the
currently selected agent; and as you navigated between them, we would
fall back to the native agent, as well as when you hit cmd-n.
cc @mikayla-maki just a quick FYI here for the revamp! Will push this
forward in the meantime given it's a bit of a bad bug.
Release Notes:
- N/A
Danilo Leal
created
6af5ca3
editor: Fix breadcrumb syntax colors not updating when theme changes (#53185)
Smit Chaudhary
created
6213f06
agent_ui: Add some general UI fixes (#53696)
Click to expand commit body
A note-worthy thing I'm adding in this PR to fix an agent panel problem
is a trait method allowing to set a min-width in panels. I think some of
them—if not all—could benefit from it, because there is a certain width
these panels can get in that we just can't ensure they will work; things
will break. So we either accept that and let the user's common sense
understand that, or we don't allow them to reach that state... Surely, a
small enough _window_ size can still break things, but then it's out of
the realms of solution...
Release Notes:
- Agent: Fixed multi-line queued messages getting cut-off when the agent
panel is in full screen.
- Agent: Fixed agent panel getting auto-closed after submitting a queued
message when the panel is in full screen.
- Agent: Added a min-width to the agent panel, preventing it from
reaching a small enough width where it would be essentially unusable.
Danilo Leal
created
45c0ced
cli: Add first-run prompt for default open behavior and abstract IPC transport (#53663)
Click to expand commit body
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>
Eric Holk
and
Nathan Sobo
created
93e36aa
Always open agent panel when selecting a thread or draft (#53664)
Click to expand commit body
When clicking a draft placeholder ("New Agent Thread" tab) or confirming
one via keyboard, the agent panel now always opens. Previously it only
focused the panel if it was already visible.
Regular threads and drafts with IDs already opened the panel through
`activate_draft` and `load_agent_thread_in_workspace`. The project
header click continues to activate the workspace without forcing the
panel open.
cc @danilo-leal
Release Notes:
- N/A
Nathan Sobo
created
86f5549
sidebar: Add a new thread draft system (#53574)
Danilo Leal
,
Mikayla Maki
, and
Nathan Sobo
created
f447724
Do not include non-existent folders in recent projects, while retaining them for a one week grace period (#53662)
Click to expand commit body
Fixes a regression introduced in
https://github.com/zed-industries/zed/issues/49603
Supersedes https://github.com/zed-industries/zed/pull/52638
We want to leave these non-existent workspaces in the database for up to
7 days, in case they are on external drives that are restored later, but
we do *not* want to show them in the UI if they don't exist.
Release Notes:
- Fixed an issue where deleted folders appeared in the recent project
picker
---------
Co-authored-by: ojpro <contact@ojpro.me>
Max Brunsfeld
and
ojpro
created
b5e1aea
Add callout communicating about multi-root setups in ACP agents (#53660)
Click to expand commit body
This PR adds a callout in the agent panel communicating about the lack
of support for multi-root workspaces within ACP agents.
Release Notes:
- N/A
Danilo Leal
created
ed2f21a
agent_ui: Fix scroll area in zoomed-in panel (#53657)
Click to expand commit body
When the agent panel is zoomed-in, or if it's wide enough to the point
you see a lot of horizontal padding due to the max-width, it wasn't
previously possible to scroll the thread in that padding while your
mouse was resting in that area.
Release Notes:
- Agent: Fixed scroll behavior when the agent panel is zoomed-in.
Danilo Leal
created
cca6552
Open new remote projects in the same window via sidebar (#53654)
Click to expand commit body
Previously, when opening a remote project via the sidebar, and picking a
new project path via the path picker, it would incorrectly open in a new
window.
Release Notes:
- N/A
Max Brunsfeld
created
4e0022c
agent_ui: Replace raw error messages with user-friendly copy in the agent panel (#53099)
Click to expand commit body
Replaces raw provider error strings in the agent panel with specific,
user-friendly error callouts. Each error now has a clear title,
actionable copy, and appropriate buttons instead of the generic "An
Error Happened" fallback.
Error variants added:
Variant | Title | Body | Trigger |
|---|---|---|---|
| `RateLimitExceeded` | Rate Limit Reached | {Provider}'s rate limit was
reached. Zed will retry automatically. You can also wait a moment and
try again. | Provider rate limit exhausted after retries |
| `ServerOverloaded` | Provider Unavailable | {Provider}'s servers are
temporarily unavailable. Zed will retry automatically. If the problem
persists, check the provider's status page. | Provider server overloaded
or internal server error |
| `PromptTooLarge` | Context Too Large | This conversation is too long
for the model's context window. Start a new thread or remove some
attached files to continue. | Conversation exceeds model's context
window |
| `NoApiKey` | API Key Missing | No API key is configured for
{Provider}. Add your key via the Agent Panel settings to continue. | No
API key configured for a direct provider |
| `StreamError` | Connection Interrupted | The connection to
{Provider}'s API was interrupted. Zed will retry automatically. If the
problem persists, check your network connection. | Stream dropped or I/O
error during generation |
| `InvalidApiKey` | Invalid API Key | The API key for {Provider} is
invalid or has expired. Update your key via the Agent Panel settings to
continue. | API key present but invalid or expired |
| `PermissionDenied` | Permission Denied | {Provider}'s API rejected the
request due to insufficient permissions. Check that your API key has
access to this model. | API key lacks access to the requested model |
| `RequestFailed` | Request Failed | The request could not be completed
after multiple attempts. Try again in a moment. | Upstream provider
unreachable after retries |
| `MaxOutputTokens` | Output Limit Reached | The model stopped because
it reached its maximum output length. You can ask it to continue where
it left off. | Model hit its maximum output token budget |
| `NoModelSelected` | No Model Selected | Select a model from the model
picker below to get started. | No model configured when a message is
sent |
| `ApiError` | API Error | {Provider}'s API returned an unexpected
error. If the problem persists, try switching models or restarting Zed.
## Approach
- Added typed errors (`NoModelConfiguredError`, `MaxOutputTokensError`)
where previously raw strings were used, so they can be reliably downcast
- Extended `From<anyhow::Error> for ThreadError` to downcast
`LanguageModelCompletionError` variants before falling through to the
generic `Other` case
- Each variant has a dedicated `render_*` function with appropriate
buttons (retry icon, New Thread, or none)
- Telemetry events updated with specific `kind` labels for each new
variant
Release Notes:
- Improved error messages in the agent panel to show specific,
actionable copy instead of raw provider error strings
Self-Review Checklist:
- [ x] I've reviewed my own diff for quality, security, and reliability
- [n/a] 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)
- [n/a ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
Improved error messages in the agent panel to show specific, actionable
copy instead of raw provider error strings
Katie Geer
created
b159690
Set active repository when picking a root folder in recent project menu (#53645)
Click to expand commit body
This changes the behavior of the recent project picker in multi-folder
projects, so that when you select a folder that is a repository, it sets
the active repository in the Git panel as well.
Release Notes:
- N/A
Max Brunsfeld
created
6143af1
Use stored home_dir in Docker struct, not literal $HOME (#53642)
Click to expand commit body
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #ISSUE
Release Notes:
- N/A
KyleBarton
created
eb76db4
edit_prediction: Disable training data collection based on organization configuration (#53639)
Click to expand commit body
This PR makes it so we disable training data collection for Edit
Prediction based on the organization's configuration.
Closes CLO-641.
Release Notes:
- N/A
Marshall Bowers
created
7f73e38
ci: Use Zed Zippy configuration for creating cherry-pick branch (#53640)
Click to expand commit body
We hope this fixes an issue with permissions
Release Notes:
- N/A
Finn Evers
created
4c63fb1
compliance: Reduce noisiness when checks were successful (#53515)
Click to expand commit body
This will ensure we do not post a second Slack message in case the first
check was successful. We still _run_ the second check, but do not notify
Release Notes:
- N/A
This PR adds the `correctly_deleted_chars` field and updates `kept_rate`
to account for it, not just inserted chars.
It also adds `recall_rate` to measure coverage of reference
insertions/deletions.
Finally, it renames "final" to "reference" and "prediction" to
"candidate".
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
Oleksiy Syvokon
created
2d3f49e
dev_container: Handle devcontainer.metadata label as JSON object or array (#53557)
Click to expand commit body
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Details
- The [devcontainer CLI writes the `devcontainer.metadata` label as a
bare JSON object](https://github.com/devcontainers/cli/issues/1054) when
there is only one metadata entry (e.g. docker-compose devcontainer with
a Dockerfile and no features)
- Zed's `deserialize_metadata` only accepted a JSON array, causing
deserialization to fail with `invalid type: map, expected a sequence`
- This made it impossible to attach to existing docker-compose
devcontainers created by the devcontainer CLI or VS Code
The fix tries parsing as an array first, then falls back to parsing as a
single object wrapped in a vec. This mirrors how the [devcontainer CLI
itself reads the
label](https://github.com/devcontainers/cli/blob/main/src/spec-node/imageMetadata.ts#L476-L493).
An upstream fix has also been submitted:
https://github.com/devcontainers/cli/pull/1199
## Reproduction
1. Create a docker-compose devcontainer with a Dockerfile and no
features:
`.devcontainer/devcontainer.json`:
```json
{
"name": "repro",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"remoteUser": "root"
}
```
`.devcontainer/docker-compose.yml`:
```yaml
services:
app:
build:
context: .
dockerfile: Dockerfile
command: sleep infinity
volumes:
- ..:/workspace
```
`.devcontainer/Dockerfile`:
```dockerfile
FROM ubuntu:24.04
```
2. `devcontainer up --workspace-folder .`
3. Open the folder in Zed, fails with metadata deserialization error
Release Notes:
- Fixed attaching to a devcontainer that has a single metadata element
which was started with `devcontainer-cli`