Commit log

76c6004 Remove text thread and slash command crates (#52757)

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:

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

Ben Brandt and Bennet Bo Fenner created

11efe82 sidebar: Add some design adjustments (#52832)

Click to expand commit body
- Adjust thread item and gradient fade colors for themes that define
transparent colors for the tokens we use on them
- Make the entire project header clickable area activate the workspace
instead of collapsing the group. The chevron is now an icon button that
does that, which makes it consistent with the collab panel and settings
UI.

Release Notes:

- N/A

Danilo Leal created

f7ab907 Fix agent servers loading environment from home dir instead of project dir (#52763)

Click to expand commit body
All local agent server types were calling `local_directory_environment`
with `paths::home_dir()`, causing direnv and shell environment to be
loaded from `~` rather than the project's worktree directory. This meant
project-specific `.envrc` variables (e.g. Google Vertex credentials)
were never picked up by external agents like Claude.

Added `default_environment()` on `ProjectEnvironment` that resolves the
default visible worktree path and uses it for environment loading,
falling back to home_dir() only when no worktree is available.

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 default environment variable context for external agents

Derek Parker created

0f173eb Remove deprecated 1M context beta header for Sonnet 4.5 (#52767)

Click to expand commit body
The `CONTEXT_1M_BETA_HEADER` (`context-1m-2025-08-07`) is deprecated for
Sonnet 4 and 4.5. This removes the constant from the anthropic crate and
the match arm in `beta_headers()` that sent it for
`ClaudeSonnet4_5_1mContext`.

Note: The bedrock crate still has its own copy of this constant, used
when the user-configurable `allow_extended_context` setting is enabled.
That may warrant a separate cleanup.

Closes AI-114

Release Notes:

- N/A

Richard Feldman created

d24480b nix: Update flake.lock (#52766)

Click to expand commit body
- update flake.lock with the 1.94.1
- Fixes nix build not working.


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

MostlyK created

121e2bb Extract `syntax_theme` crate (#52798)

Click to expand commit body
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

Nathan Sobo created

8ef64d9 agent_ui: Update work dirs for all conversation threads (#52825)

Click to expand commit body
Propagate work directory changes through `ConversationView` instead
of only updating active and generating root threads.

This makes sure that all subagents are in sync, as well as any currently
"active" threads in the agent panel.

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>

Ben Brandt and Bennet Bo Fenner created

ef42f9d gpui_wgpu: Add surface lifecycle methods for mobile platforms (#50815)

Click to expand commit body
## Summary

- Add `unconfigure_surface()` and `replace_surface()` methods to
`WgpuRenderer` for mobile platform window lifecycle management
- Prefer `PresentMode::Mailbox` (triple-buffering) over `Fifo` to avoid
blocking during lifecycle transitions
- Early return in `draw()` when surface is unconfigured to prevent
driver hangs

## Motivation

On Android, the native window (`ANativeWindow`) is destroyed when the
app goes to the background and recreated when it returns to the
foreground. The same happens during orientation changes. Without surface
lifecycle methods, the only option is to destroy the entire
`WgpuRenderer` and create a new one on resume.

The problem: GPUI's scene cache holds `AtlasTextureId` references from
the old renderer's atlas. A new renderer has an empty atlas, so those
cached IDs cause index-out-of-bounds panics.

The fix: Keep the renderer (device, queue, atlas, pipelines) alive
across surface destruction. Only the wgpu `Surface` needs to be
replaced.

### `unconfigure_surface()`
Marks the surface as unconfigured so `draw()` skips rendering via the
existing `surface_configured` guard. Drops intermediate textures that
reference the old surface dimensions. The renderer stays fully alive.

### `replace_surface()`
Creates a new `wgpu::Surface` from fresh window handles using the
**same** `wgpu::Instance` that created the original adapter/device.
Reconfigures the surface and marks it as configured so rendering
resumes. All cached atlas textures remain valid.

### PresentMode::Mailbox
`Fifo` (VSync) blocks in `get_current_texture()` and can deadlock if the
compositor is frozen during a lifecycle transition (e.g.
`TerminateWindow` β†’ `InitWindow` on Android). Mailbox (triple-buffering)
avoids this. Falls back to `AutoNoVsync` β†’ `Fifo` if unsupported.

### draw() early return
Some drivers (notably Adreno) block indefinitely when acquiring a
texture from an unconfigured surface. The early return prevents this.

## Context

This is needed by
[gpui-mobile](https://github.com/itsbalamurali/gpui-mobile), a project
bringing GPUI to Android and iOS. The Android implementation needs these
methods to handle:

1. **Background/foreground transitions** β€” `TerminateWindow` destroys
the native window, `InitWindow` recreates it
2. **Orientation changes** β€” Surface is destroyed and recreated with new
dimensions
3. **Split-screen transitions** β€” Similar surface recreation

Without this change, we maintain a local fork of `gpui_wgpu` with just
these additions. Upstreaming them would let mobile platform
implementations use the official crate directly.

## Test plan

- [x] Tested on Android (Motorola, Adreno 720 GPU) β€” 3 consecutive
background/foreground cycles, zero panics, atlas textures preserved
- [x] Tested orientation changes (portrait→landscape→portrait) — surface
replacement completed in <40ms per rotation
- [x] Verified `draw()` correctly skips rendering when surface is
unconfigured
- [x] Verified no regression on desktop β€” methods are additive, existing
code paths unchanged
- [x] PresentMode fallback chain works on devices that don't support
Mailbox

## Release Notes

- N/A

Balamurali Pandranki created

080e80d agent_ui: Prevent race conditions inside thread metadata store (#52819)

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

---------

Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>

Bennet Bo Fenner and Gaauwe Rombouts created

809e701 acp: Notify when we receive new versions from the registry (#52818)

Click to expand commit body
Wires up the missing version notifications for registry + extension
agents.
The UI part of this is already setup, we were just never triggering it.

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: Smit Barmase <heysmitbarmase@gmail.com>

Ben Brandt and Smit Barmase created

f548125 workspace: Allow disabling tab cycles when using keyboard navigation (#51253)

Click to expand commit body
Add a `wrap_around` field, defaulting to `true`, to both
`pane::ActivatePreviousItem` and `pane::ActivateNextItem` actions to
optionally disable wrapping when cycling past the first or last tab.

Release Notes:

- Added a `wrap_around` option to both `pane::ActivatePreviousItem` and
`pane::ActivateNextItem` actions to optionally disable wrapping when
cycling past the first or last tab.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>

Win Cheng , Claude Opus 4.6 , and dino created

eec3302 ui: Adjust tree view item alignment (#52776)

Click to expand commit body
Adjusting the alignment of things in the tree view item given it got
affected after I took out the square shape from the disclosure button in
https://github.com/zed-industries/zed/pull/52322. Now, the indent line
and the labels are back to being fully aligned.

Release Notes:

- N/A

Danilo Leal created

9526861 sidebar: Adjust thread switcher modal (#52788)

Click to expand commit body
This PR makes use of the `ThreadItem` component for the thread switcher,
as opposed to recreating it locally. Added some additional methods to it
so as to nicely fit in the switcher modal. Am also rendering the project
name, given that it felt like a major piece of context, given that
without the sidebar open, you'd potentially feel a bit lost without it.

Release Notes:

- N/A

Danilo Leal created

b7f166a Fix FormatSelections to only format selected ranges, not entire document (#51593)

Click to expand commit body
When `editor: format selections` get invoked, the Prettier and external
formatter branches in `format_buffer_locally` ignored the selection
ranges entirely, causing the whole document to be formatted.

- Thread selection ranges as UTF-16 offsets through to Prettier via
`rangeStart/rangeEnd` options in the format request.
- Skip external formatters when ranges are present, since they have no
mechanism for range formatting.
- Create diff edits and apply them for JSON-like languages. For
single-expression languages like JSON, it wasn't respecting the range
commands from Prettier. So, filter the diff edits returned by Prettier
to retain only those overlapping with the user's selection byte ranges,
ensuring changes outside the selection are never applied.

Part of #25796 

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 FormatSelections to only format selected ranges, not the entire
document where prettier is supported.

Current Behaviour:

[original
behaviour.webm](https://github.com/user-attachments/assets/d5f0cb48-4c3f-44aa-89a9-975f31fce92d)

New Behaviour:

[new
behaviour.webm](https://github.com/user-attachments/assets/41e04b90-f37f-43e1-b8ed-4622684454b1)

---------

Signed-off-by: Pratik Karki <pratik@prertik.com>

Pratik Karki created

bc2d08c sidebar: Unarchive 5 most recent threads when migrating (#52807)

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

65e445a languages: Mark `.json.dist` as a JSON file (#52473)

Click to expand commit body
## Context

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

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

## How to Review

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

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] 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:

- Marked `.json.dist` as a `json` file

William Desportes created

55fa875 languages: Mark `.jshintrc` as a JSONC file (#52474)

Click to expand commit body
## Context

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

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

## How to Review

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

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] 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:

- Marked `.jshintrc` as a `jsonc` file

William Desportes created

361428a editor: Limit `CopyHighlightJson` to selection (#46555)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/36618

I'm not sure if there is a specific issue for this, but I noticed it
while working on some other PRs, as have some other people:
https://github.com/zed-industries/zed/issues/20525#issuecomment-2469507157

Cause: when running `copy highlight JSON` from the command palette,
input was disabled due to the modal, and the selection method call
always returns `None`. This most likely works as expected when bound to
a keyboard shortcut, but since there is no default shortcut most people
probably don't execute this action that way.

Fix: just grab the selection directly; I don't think this command needs
to be IME-aware, so it doesn't need to use `selected_text_range`.

NOTE: There still seems to be an issue where `VISUAL LINE` mode doesn't
select anything, even when I called `selections.newest_adjusted`, so I
opted to try and keep the implementation closest to what it was doing
before. (edit: actually this might just be the same as #45799?).

Release Notes:

- Fixed `editor: copy highlight JSON` not limiting to the current
selection

Ian Chamberlain created

ebb451e agent_ui: Improve onboarding to the import threads feature (#52748)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Danilo Leal and Bennet Bo Fenner created

6a95e29 git_panel: Fix space key being swallowed in branch picker (#52779)

Click to expand commit body
## Context

Fixes a regression where typing a space in the Git Panel's "Switch
Branch" picker would make no response at all instead of inserting the
character. The same picker in the title-bar Git Switcher was unaffected.

Root cause: `PopoverMenu` links the opened menu's focus handle into the
parent element's dispatch tree so that `contains_focused` returns `true`
on the parent while the popover is open. `GitPanel::dispatch_context`
uses
`contains_focused` to decide whether to add the `ChangesList` key
context, so that context is active while the branch picker is open.
Because `Picker` and `Editor` have no binding for a bare `space`,
dispatch fell through to
the `"GitPanel && ChangesList"` binding, which maps `space` to
`git::ToggleStaged`, consuming the keystroke before it could reach the
text input.

The fix narrows the context guard to `"GitPanel && ChangesList &&
!GitBranchSelector"`,
so those bindings are skipped whenever the branch picker (or any other
`GitBranchSelector` context) is focused inside the panel.

The same change is applied to the vim keymap, which would have similarly
intercepted `k`,
`j`, `x`, and other letter keys typed in the picker, this behavior was
observed in https://github.com/zed-industries/zed/issues/52617 and I
made the same fix in https://github.com/zed-industries/zed/pull/52687

Closes #52771 and potentially
https://github.com/zed-industries/zed/issues/52617

Video of the manual test of the fix below :

[Screencast from 2026-03-31
00-01-54.webm](https://github.com/user-attachments/assets/76f64507-4f5a-4a8e-8582-4cdb9bec584c)

## How to Review

- `assets/keymaps/default-linux.json`, `default-windows.json`,
`default-macos.json`, `vim.json` : identical one-line change in each: I
added `&& !GitBranchSelector` to
  the `"GitPanel && ChangesList"` 
. No Rust changes needed.

## Self-Review Checklist

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

Release Notes:

- Fixed space and other keys being swallowed when typing in the Git
Panel branch picker

saberoueslati created

7315aad git_ui: Fix branch picker stealing vim keys in Git panel (#52687)

Click to expand commit body
## Context

When `vim_mode` is enabled, opening the branch selector popover in the
Git panel and pressing `i`, `j`, `k`, or `x` triggered Git panel actions
(`FocusEditor`, `SelectNext`, `ToggleStaged`, etc.) instead of reaching
the picker's search field.

The `"GitPanel && ChangesList"` keybinding block in `vim.json` matched
whenever _any_ child of the git panel's focus handle was focused β€”
including the branch picker popover β€” because
`GitPanel::dispatch_context()` adds `ChangesList` based on
`focus_handle.contains_focused()`, which is true for all children, not
just the changes list itself.

The branch picker's root element already sets
`.key_context("GitBranchSelector")` (branch_picker.rs). GPUI's `Not`
predicate evaluates against the entire context path, so adding `&&
!GitBranchSelector` to the block's context suppresses all those bindings
whenever the picker is open, and restores them exactly as before once
it's closed.

Closes #52617

Video of the manual test of the fix below :

[Screencast from 2026-03-29
22-01-11.webm](https://github.com/user-attachments/assets/217e8e31-9bee-4e77-a7aa-0c094874ed9a)

## How to Review

- `assets/keymaps/vim.json` : changed the `"GitPanel && ChangesList"`
context string ,I added`&& !GitBranchSelector`.

## Self-Review Checklist

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

Release Notes:

- Fixed branch picker in the Git panel stealing vim keystrokes (`i`,
`j`, `k`, `x`) when vim mode is enabled

saberoueslati created

d22a39f Hide other panels when clicking on sidebar threads (#52804)

Click to expand commit body
This PR makes it so that clicking on sidebar threads behaves the same as
the "focus agent panel" keybinding, namely it hides zoomed panels and
brings focus to the agent panel.

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

24613f5 Fix resizing bottom-docked terminal panel (#52803)

Click to expand commit body
The terminal panel is now flexible by default, but only when in a left
or right panel. This PR fixes a bug where resizing the terminal panel
was incorrectly setting the flex value instead of the fixed size when
the terminal panel was in the bottom dock and flexible.

Release Notes:

- N/A

Max Brunsfeld created

3e0a0e1 markdown: Skip linkify inside code blocks (#52762)

Click to expand commit body
Profiling streamed agent responses showed `parse_markdown_with_options`
consuming ~50% of CPU cycles. The hot path is `LinkFinder` scanning
every `Text` event, including code block content, where detected URLs
are never rendered as links.

In the profiled case, the markdown had 235k+ URLs inside code blocks,
making linkify extremely costly per-parse. This PR short-circuits the
text-merging + linkify path for code block content.

Release Notes:

- N/A

Smit Barmase created

0857b41 docs: Update guide to remove user data on macOS when uninstalling Zed (#52631)

Click to expand commit body
I recently encountered some issue on my mac and I tried to uninstall Zed
completely. However the current guide to remove user data does not cover
some configs that Zed uses. There are also some directories that should
be removed according to the doc but never exist. So I have this pull
request to make the user data directories more accurate, according to my
own experience.

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: doc update

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>

Yifan Ruan and Christopher Biscardi created

7719d29 Simplify sidebar active state (#52799)

Click to expand commit body
This changes the terminology from "focused entry" to "active entry", and
adds 4 properties that rebuild_contents should maintain for the active
entry:

- We should always have an active_entry after rebuild_contents
- The active entry's workspace should always be == to the active
multiworkspace
- If there's a thread, the active entry should always reflect that
thread
- There should always be exactly 1 active entry

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

2e44664 Implement sidebar serialization (#52795)

Click to expand commit body
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

Mikayla Maki created

f3e672c Implement work dir updating for active and background threads (#52793)

Click to expand commit body
This PR changes things so that when the user mutates their current
project (e.g. adding a folder), the thread entries now update the
currently running threads to be pointing at this new set of folders.

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

TODO:
- [x] Manually test this case

Release Notes:

- N/A

Mikayla Maki created

dfafd62 Implement non-macos titlebars for the new sidebar (#52794)

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


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

Mikayla Maki created

fb87786 Automatically switch to unified diffs when diff view is narrower than a configurable "minimum split diff width" (#52781)

Click to expand commit body
Release Notes:

- The git diff diff view now automatically switches from split mode to
unified mode when the pane is narrower than a configurable minimum
column count. You can configure this via the new
`minimum_split_diff_width` setting.

Max Brunsfeld created

e39d5c9 Remove easily derived sidebar state (#52790)

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

8b0d49f Add existing user agent onboarding flow (#52787)

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

3d29a06 sidebar: Add debug action to dump multi-workspace state (#52785)

Click to expand commit body
Add a debug-only (`cfg(debug_assertions)`) action `DumpWorkspaceInfo`
that opens a read-only buffer with a dump of all workspace state. This
is useful for debugging the sidebar's view of workspaces and threads,
since the sidebar is currently the only way to see workspace-related
state.

For each workspace in the MultiWorkspace it shows:

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

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

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

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

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

### Implementation

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

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

Release Notes:

- N/A

Eric Holk created

c9e45fe sidebar: Represent workspaces with no threads as a New Thread entry (#52778)

Click to expand commit body
Workspaces with no threads weren't being shown in the sidebar which can
make it easy to lose your sense of place. This PR works to address that
by showing these workspaces as a "New Thread" button which also shows
the work trees associated with that workspace.

Self-Review Checklist:

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

Release Notes:

- N/A

Eric Holk created

18ebc35 agent_settings: Add a way to set the layout settings en-masse (#52777)

Click to expand commit body
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

Mikayla Maki created

6120452 Remove follow agent setting (#52775)

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

b922ef5 elixir: Disable Emmet by default (#52769)

Click to expand commit body
The Emmet extension is enabled for Elixir files (`.ex`) because of the
`~H` sigil, but this is a bit unexpected if you work exclusively with
HEEx files (`.heex`) or you don't actually use Phoenix in any capacity

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

Release Notes:

- N/A

AltCode created

e12d3de Add Xcode Instrument images to troubleshooting doc (#52768)

Click to expand commit body
Merge first: https://github.com/zed-industries/zed.dev/pull/1861

Self-Review Checklist:

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

Release Notes:

- N/A

Joseph T. Lyons created

807207e Own the workspace list in MultiWorkspace (#52546)

Click to expand commit body
## Context

TODO

## Self-Review Checklist

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

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>

Mikayla Maki and Max Brunsfeld created

b48dd02 Fix preserve settings during migrations (#52676)

Click to expand commit body
## Context

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

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

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

## Fixes #41344

## How to Review

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

## Self-Review Checklist

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

## Video
[Screencast from 2026-03-21
00-36-12.webm](https://github.com/user-attachments/assets/31bd584a-2674-4c91-bdb2-69ed8fa35e88)


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

Release Notes:

- Fixed settings being overwritten when updating a single setting via UI
while the settings file contains deprecated keys.

Om Chillure created

8dbef08 workspace: Stop middle-click event propagation on tab close (#49305)

Click to expand commit body
## Summary

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

Closes #47381

## Test plan

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

Release Notes:

- Fixed middle-click on a tab to close it also pasting into the editor
on Linux.

Arthur Jean created

d74744a Swap KVP store used for collab favorites (#52756)

Click to expand commit body
We should generally prefer using the normal key value store

Self-Review Checklist:

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

Release Notes:

- N/A

Mikayla Maki created

37cfeae collab_panel: Fix overlapping list items (#52754)

Click to expand commit body
Small UI tweak post the introduction of the favorite feature so that
list items don't overlap each other.

Release Notes:

- N/A

Danilo Leal created

ce61450 sidebar: Remove `AgentSessionInfo` usage (#52732)

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

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Bennet Bo Fenner , Ben Brandt , and Danilo Leal created

06b5a15 docs: Add instructions for custom Expert builds (#52746)

Click to expand commit body
Adds a section on how to configure Zed to use a custom Expert build.

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

Release Notes:

- N/A

Dorgan created

a46858a gpui: Add dithering to linear gradient shader (#51211)

Click to expand commit body
Linear gradients in dark color ranges (5-15% lightness) show visible
banding due to 8-bit quantization β€” only ~7 distinct values exist in
that range, producing hard steps instead of smooth transitions. This
affects every dark theme in Zed.

## What this does

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

## How it works

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

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

### Channel-specific amplitudes

  | Channel | Amplitude | Rationale |

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

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

## Scope

Two files changed, purely additive:

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

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

## Screenshots

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

_Before_

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

_After_

## Test plan

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

**Manual (macOS):**

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

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

Release Notes:

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

Liam

iam-liam created

1b9f383 ui: Follow-up to ui crate teardown (#52747)

Click to expand commit body
- **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>

Piotr Osiewicz and Lukas Wirth created

c332be8 ep: Only fetch experiments if `cx.is_staff` (#52739)

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

Ben Kunkle created

22b71a8 Fix panic in restore_diff_hunks when base text changes async (#52743)

Click to expand commit body
Read base_text from the `MultiBufferSnapshot` instead of the live
`BufferDiff` entity in `prepare_restore_change`. The live entity's
base_text may already reflect a newer git HEAD while the snapshot still
holds old hunk byte ranges, causing `Rope::slice` to panic.

Self-Review Checklist:

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

Closes ZED-64P

Release Notes:

- N/A

Oleksiy Syvokon created

8b7cc09 Allow agent and terminal panels to be either flexible or fixed (#52694)

Click to expand commit body
This PR adds the ability to change both the terminal and agent panels
between fixed and flexible sizing using the status bar button right
click menu. The value persists in your settings, similar to the dock
position.

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

Release Notes:

- N/A

Max Brunsfeld created