bd95fc5
Fix the bracket highlights for overly large ranges
Kirill Bulatov created
bd95fc5
Fix the bracket highlights for overly large ranges
Kirill Bulatov created
ad219b1
Add a test
# Conflicts: # crates/editor/src/bracket_colorization.rs
Kirill Bulatov created
6a66760
Fix enclosing brackets not being found for overly large ranges
# Conflicts: # crates/language/src/buffer.rs
Kirill Bulatov created
bf185f7
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 @​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>
renovate[bot] and renovate[bot] created
6d2944b
Stop automatically deleting agent drafts (#53862)
This was leftover from trying to hold the invariant of one empty draft, which was dropped in #53852. Removes all automatic draft deletion: - `retain_running_thread` discarded empty drafts when navigating away - `remove_empty_draft` cleaned up all retained drafts when loading from history - `open_external_thread_with_server` removed empty drafts when opening external threads Release Notes: - Fixed agent drafts being silently discarded when navigating between threads
Nathan Sobo created
fb9415e
sidebar: Click project header row to toggle fold instead of switching worktrees (#53861)
Previously, clicking a project header in the agent sidebar would activate/switch to that worktree's workspace, resuming whatever thread was most recently active. This felt jarring β activating a random thread based on recency isn't that useful when the user can just click the specific thread they want. There's also no clear semantic for clicking the overall group header since each thread maps to a specific workspace and there's no single workspace to activate for the group. This changes the click target for folding from just the chevron to the entire header row. The worktree-switching behavior is removed β clicking anywhere on the row now toggles the fold, which is a more predictable and useful interaction. The hover-only buttons on the right side (ellipsis menu, collapse threads, new thread) continue to work as before, with their own click handlers that stop propagation. Release Notes: - Improved sidebar project headers to toggle fold on click instead of switching worktrees.
Nathan Sobo created
acf5da9
Guard CLI first-run prompt with agents-v2 flag (#53839)
Gates the CLI first-run prompt (from #53663) on the `agent-v2` feature flag, giving us an escape hatch if something goes wrong. ## What this does **Commit 1: Gate on agent-v2 flag** - Adds an `AgentV2FeatureFlag` check at the top of the open behavior resolution. When the flag is off, the prompt is skipped. - Refactors `maybe_prompt_open_behavior` β `resolve_open_behavior`: moves the explicit-flags guard (`-n`, `-e`, `--reuse`) to the caller and drops three parameters from the function signature, since the function was only inspecting those values to decide whether to bail early. **Commit 2: Default to new-window when flag is disabled** - When the flag is off, falls back to the pre-#53254 behavior of opening projects in a new window, rather than silently adding to the sidebar. Release Notes: - N/A
Eric Holk created
b310904
Allow empty project groups in sidebar (#53852)
Previously, the sidebar would automatically create an empty draft thread for any project group that had no threads (via `reconcile_groups`). This added complexity and felt janky β the user would see a phantom "Draft" entry appear for every workspace they opened, even before they intended to start a conversation. Now, project groups can simply be empty. When a group has no threads: - The fold indicator renders as closed and grayed out (disabled β no click handler or tooltip) - The plus button is always visible on the right side of the header (not hidden behind hover) - Keyboard fold toggling is disabled for the group - Clicking the plus button creates the first thread and expands the group Draft threads are no longer auto-created anywhere: - `AgentPanel::load` no longer creates a draft when there is no previously active conversation - Archiving the last thread in a group clears the panel instead of creating a replacement draft - `show_or_create_empty_draft` and `clear_active_thread` are removed This removes a significant amount of supporting infrastructure that only existed to maintain the "no group may be empty" invariant: - `WorkspaceSidebarDelegate` trait and `AgentPanelSidebarDelegate` struct - `reconcile_groups` method and its 12 call sites - `clear_empty_group_drafts` method and its 3 call sites - `show_or_create_empty_draft` and `clear_active_thread` methods - `reconciling` field on `Sidebar` - `sidebar_delegate` field, setter, and getter on `Workspace` Release Notes: - Improved the sidebar to show empty project groups with a visible plus button instead of auto-creating placeholder draft threads. --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nathan Sobo , Zed Zippy , and Max Brunsfeld created
66ac781
Start new git worktrees in detached HEAD state (#53840)
Create worktrees in detached HEAD state, then attempt to check out the requested branch. If the checkout fails (e.g. the branch is already in use by another worktree), log a warning and stay in detached HEAD state instead of showing an error to the user. This simplifies the worktree creation flow by: - Removing the occupied-branch fallback logic that would generate random branch names - Always using `CreateWorktreeTarget::Detached` for worktree creation - Attempting branch checkout as a best-effort post-creation step - Updating the branch picker UI to reflect the new behavior Release Notes: - Threads now start git worktrees in detached HEAD state if branch is in use or unspecified, instead of generating a random branch name. --------- Co-authored-by: Eric Holk <eric@zed.dev>
Richard Feldman and Eric Holk created
549db9f
acp_thread: Make UserMessageId required in AgentConnection::prompt (#53850)
The `user_message_id` parameter on `AgentConnection::prompt` was `Option<UserMessageId>`, but `NativeAgentConnection::prompt` immediately called `.expect()` on it, crashing when the value was `None`. Because the `expect` message said `UserMessageId` was required, this PR makes the parameter not optional which makes the panic impossible. This means we also need to unconditionally generate an ID in `send`, where before we gated this on whether `truncate` returned `Some`. Generating IDs unconditionally should be find, especially because the prompt requires them. Release Notes: - N/A
Eric Holk created
2065099
agent: Block agent v2 feature on stable release channel (#53849)
Based on a partial revert of: 7bcdb12b4c5e9de0e4632c770336799e7c8d13d6 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>
Anthony Eid and Max Brunsfeld created
092fedc
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>
Max Brunsfeld and Anthony Eid created
909dfd0
compliance: Expose some more methods (#53831)
They will again come in handy for the GitHub worker. Release Notes: - N/A
Finn Evers created
15dce9d
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.
Richard Feldman created
25e02cb
project_panel: Always open panel on pane's reveal in project panel (#53539)
Update the way `pane::RevealInProjectPanel` is handled to ensure that, regardless of whether the file belongs to any open project, the project panel is always activated and focused. This refactor is a result of some internal feedback after changing its handling so as to show a notification stating that the item that the user was trying to reveal didn't belong to an open project βΒ https://github.com/zed-industries/zed/pull/51246 . We feel users are probably already used to relying on `cmd-shift-e` (on macOS), in pretty much every context, in order to open the project panel, and so having situations where it doesn't actually happen seems like a bad user experience. Relates to #23967 Release Notes: - Improved `pane: reveal in project panel` to open the project panel, even if working with an unsaved buffer.
Dino created
5f2373b
Skip git worktree removal when archiving threads on main worktrees (#53629)
When archiving a thread that lives on a main worktree (not a linked worktree), `build_root_plan` was still returning a `RootPlan`, which caused the archive flow to call `git worktree remove` on the main working tree. Git rightfully refuses this with: ``` fatal: '/Users/rtfeldman/code/zed' is a main working tree ``` This fix makes `build_root_plan` return `None` for non-linked worktrees, so the archive-to-disk machinery is simply skipped. The thread is marked archived in the metadata store and can be unarchived later β no git operations needed. Since `build_root_plan` now guarantees a linked worktree when it returns `Some`, `RootPlan::worktree_repo` is tightened from `Option<Entity<Repository>>` to `Entity<Repository>`, removing the fallback codepath and the `is_some()` guard in `archive_worktree_roots`. Release Notes: - Fixed a crash when archiving an agent thread that was opened on the main project (not a linked git worktree).
Richard Feldman created
1150c9d
Fix crash when fallback workspace is in the removal set (#53549)
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)
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)
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)
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)
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)
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>
Tom HoulΓ© and Marshall Bowers created
2e8dac6
compliance: Deserialize GraphQL responses better (#53817)
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)
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)
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)
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)
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)
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)
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)
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)
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
Conrad Irwin created
dc3b25a
gpui_wgpu: Fix WGPU panic from unsupported atlas texture formats (#53808)
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
Oleksiy Syvokon created
2ab33bb
Remove ACP onboarding content (#53806)
This is eight months old at this point and we can clean it up! Release Notes: - N/A
Danilo Leal created
d5d6029
agent_ui: Clarify disabled profile selector copy (#53797)
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)
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
3450c48
Unify `dirs` dependency (#53775)
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)
## 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
morgankrey created
70a66c6
sidebar: Fix ordering issue (#53787)
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)
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)
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)
> **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)
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
Kirill Bulatov created
497b6de
editor: Add configurable hover delay (#53504)
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)
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)
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)
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)
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
JoΓ£o Soares created
5a47e98
Skip flakey prop tests (#53677)
Closes #ISSUE Release Notes: - N/A
Conrad Irwin created
9f50765
agent_ui: Fix creating a thread from the toolbar (#53706)
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