Commit log

3ee2f5b acp: Add agent websites to the registry page (#52002)

Click to expand commit body
## Context

The registry now distinguishes between websites and repos, so we can
show either or both if available.

## Self-Review Checklist

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

Release Notes:

- N/A

Ben Brandt created

5b0af8d sidebar: Only migrate some threads (#52018)

Click to expand commit body
## Context

We now only migrate up to 10 threads per project to the sidebar and also
ignore threads that do not have a workspace

## How to Review

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

## Self-Review Checklist

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

Release Notes:

- N/A

Bennet Bo Fenner created

22a33b7 vim: Add helix alias `reflow` for vim rewrap (#51788)

Click to expand commit body
Add support for Helix's `:reflow` command when vim or helix mode is
enabled.

Release Notes:

- Add support for helix's `:reflow` command

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>

Brandon Elam Barker and dino created

f586129 Terminal permissions: Per-command pipeline UI (#49547)

Click to expand commit body
## Summary

Adds a new permission UI for terminal pipeline commands (e.g. `cargo
test | tail`) that lets users selectively always-allow individual
commands in the pipeline, rather than only offering a blanket
always-allow for the first command.

## Screenshot

<img width="464" height="293" alt="Screenshot 2026-03-18 at 3 27 48β€―PM"
src="https://github.com/user-attachments/assets/e027eeec-c2b3-4f73-a596-95f42a9adad2"
/>

Release notes:
- The terminal permissions UI now allows you to select individual
subcommands independently.

---------

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

Eric Holk , Danilo Leal , and Ben Brandt created

66f3b32 Allow the keymap and settings UI to be opened without an active window (#49527)

Click to expand commit body
Closes #49155. 

<img width="470" height="304" alt="image"
src="https://github.com/user-attachments/assets/80d696ef-fabf-4745-b6e3-83315a84c8d0"
/>

Release Notes:

- UI: Allow the keymap and settings UI to be opened without an active
window

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
Co-authored-by: Finn Evers <finn.evers@outlook.de>

claire , MrSubidubi , and Finn Evers created

53db889 agent_ui: Smarter logic for when we drop background threads (#52016)

Click to expand commit body
## Context

Previously we were very eagerly dropping threads from memory. However,
reloading threads has a cost:
- For our agent, we have to replay events, which is lossy
- It's slower for external agents
- Some agents don't support reloading

So we keep the most recent 5 idle threads (or all threads who can't be
reloaded) and clean up our list after every insertion.


## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] 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

b04e7f0 gpui_macos: Fix compilation on x86_64 (#52028)

Click to expand commit body
Release Notes:

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

Lukas Wirth created

8f6e939 git_ui: Do not show "resolve with agent" as a collab guest (#51676)

Click to expand commit body
Release Notes:

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

Lukas Wirth created

8f0826f acp: Set agent server cwd from project paths (#52005)

Click to expand commit body
## Context

Add Project::default_path_list and reuse it for agent session work
directories and ACP server startup so agent processes start in the
project context by default

We previously removed all cwd from this hoping to have a global process
shared, but it doesn't work for remote projects. Since we're at the
project boundary anyway, we might as well start it up in a similar spot
as a new thread.


## Self-Review Checklist

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

Release Notes:

- acp: Make sure the agent server is started in a project directory

Ben Brandt created

073d8d7 acp_thread: Handle session info title updates (#52011)

Click to expand commit body
## Context

Clear provisional titles and emit `TitleUpdated` when an agent provides
a new title.


## Self-Review Checklist

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

Release Notes:

- N/A

Ben Brandt created

702b5dd livekit: Remove obsolete separate thread for frame feeder (#51993)

Click to expand commit body
Release Notes:

- N/A

Jakub Konka created

d30ceba agent_ui: Update thread metadata on more thread events (#52010)

Click to expand commit body
## Context

Two reasons:
1. We need to update updated_at in more cases
2. We weren't refreshing the sidebar often enough with status updates.

Release Notes:

- N/A

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

Ben Brandt and Bennet Bo Fenner created

61c2a43 gpui: Add `disabled` state to app menu items (#44191)

Click to expand commit body
Continue #39876 to add `disabled` state to `MenuItem`.

Make this change for #44047 ready to have disabled state.

1. Add `disabled` state to `MenuItem`.
2. Add some builder methods to `Menu` and `MenuItem`.
3. Improve `set_menus` method to receive a `impl IntoIterator<Item =
Menu>`.

Release Notes:

- N/A

--

<img width="294" height="204" alt="image"
src="https://github.com/user-attachments/assets/688e0db8-6c4e-4f9b-a832-8228db0e95d8"
/>

```bash
cargo run -p gpui --example set_menus
```

Jason Lee created

d1177dc acp: Support terminal auth methods (#51999)

Click to expand commit body
## Context

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

## Self-Review Checklist

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

Release Notes:

- N/A

Ben Brandt created

b45534a helix: Unflip default split binds (#51962)

Click to expand commit body
## Context

Closes #51955 

Some super easy helix parity. I checked and helix uses these binds for
splitting the editor, given these binds are helix specific, it would be
weird to just keep them being wrong.

## How to Review

just changed the default keymap for helix mode.

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

- helix: fixed binds for splitting window

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

Finn Eitreim and Bennet Bo Fenner created

283bab5 gpui_tokio: Fix `child task panicked: JoinError::Cancelled` panics (#51995)

Click to expand commit body
This panic stemmed from us dropping the tokio runtime before dropping
wasm tasks which then could attempt to spawn_blocking, immediately
failing and panicking on unwrap inside wasmtime.

Closes ZED-5DE

Release Notes:

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

Lukas Wirth created

2839676 git_ui: Fix multibuffer coordinate conversion in clipboard diff (#51985)

Click to expand commit body
## Context

Fixes the visual selection update in `TextDiffView::open` to properly
convert between buffer-local and multibuffer coordinates using
`buffer_point_to_anchor`. Previously, raw multibuffer Points were used
directly for line expansion, which produced incorrect regions when
expanded deleted diff hunks shifted multibuffer row numbers.

This provides a single unified code path for both singleton and
non-singleton multibuffers, as suggested in [#51457 review
feedback](https://github.com/zed-industries/zed/pull/51457#issuecomment-4091134303).

Follow-up to #51457.

## How to Review

Small PR - all changes are in `crates/git_ui/src/text_diff_view.rs`.
Focus on:

- `open()`: The visual selection update block now uses
`buffer_point_to_anchor` + `to_point` instead of raw multibuffer
coordinate math
- No more assumption that multibuffer Points == buffer-local Points
- Existing tests validate both singleton and non-singleton multibuffer
paths

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

Release Notes:

- Fixed incorrect diff region when using "Diff Clipboard with Selection"
with expanded diff hunks in the editor.

Om Chillure created

fdf144f language_models: Fix the partial json streaming to not blast `\` everywhere (#51976)

Click to expand commit body
## Context

This PR fixes one of the issues in #51905, where model outputs are full
of errant `\` characters.

heres the problem: As the response is streamed back to zed, we
accumulate the message chunks and and need to convert those chunks to
valid json, to do that we use `partial_json_fixer::fix_json`, when the
last character of a chunk is `\`, the `fix_json` has to escape that
backslash, because its inside of a string (if it isn't, its invalid json
and the tool call will crash) and other wise you would end up escaping
the end `"` and everything would be messed up.

why is this a problem for zed:
T_0 is the output at some step.
T_1 is the output at the next step.

the `fix_json` system is meant to be used by replacing T_0 with T_1,
however in the editor, replacing the entirety of T_0 with T_1 would be
slow/cause flickering/etc.. so we calculate the difference between T_0
and T_1 and just add it to the current buffer state. So when a chunk
ends on `\`, we end up with something like `... end of line\\"}` at the
end of T_0,
in T_1, this becomes `... end of line\n ...`. then when we add the new
chunk from T_1, it just picks up after the \n because its tracking the
length to manage the deltas.


## How to Review

utils.rs:
fix_streamed_json => remove trailing backslashes from incoming json
streams so that `partial_json_fixer::fix_json` doesn't try to escape
them.
other files: call fix_streamed_json before passing to `serde_json`

I had claude write a bunch of tests while I was working on the fix,
which I have kept in for now, but the end functionality of
fix_streamed_json is really simple now, so maybe these arent really
needed.

## Videos
Behavior Before:


https://github.com/user-attachments/assets/f23f5579-b2e1-4d71-9e24-f15ea831de52

Behavior After:


https://github.com/user-attachments/assets/40acdc23-4522-4621-be28-895965f4f262


## Self-Review Checklist

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

Release Notes:

- language_models: fixed partial json streaming

Finn Eitreim created

0570f6f wgpu: Fix surface validation error (#51935)

Click to expand commit body
Release Notes:

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

---------

Co-authored-by: John Tur <john-tur@outlook.com>

Cameron Mcloughlin and John Tur created

93a226d Add an action dedicated to closing the sidebar (#51982)

Click to expand commit body
## Context

This PR adds an action that only closes the sidebar, rather than always
toggling.

## Self-Review Checklist

<!-- Check before requesting review: -->
- [X] I've reviewed my own diff for quality, security, and reliability
- [N/A] Unsafe blocks (if any) have justifying comments
- [N/A] 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
- [N/A] Performance impact has been considered and is acceptable

Release Notes:

- Added a `multi workspace: close workspace sidebar` action.

Joseph T. Lyons created

690d5af sidebar: Add several refinements (#51980)

Click to expand commit body
## Context

- Improve how we detect when the sidebar should render the empty state.
It was previously wrong using `content.entries.is_empty`, which would
also happen if there are no search matches.
- Improved archive view keyboard nav and design. Not using the ListItem
here anymore so as to avoid confusing hover and active states.
- Move archive and open folder buttons to the bottom of the sidebar.
- Add a new flavor of the recent projects for the sidebar that only
serves as a way to _add_ projects.
- Add the ability to add (and remove) folders to a given project group
in the sidebar through a dropdown menu
--- 
- [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

Danilo Leal created

2d7c720 multiworkspace: Don't destroy workspace when git worktree is detached head (#51977)

Click to expand commit body
When a git worktree is in a detached HEAD state (e.g. after `git
checkout --detach`), the workspace for that worktree would disappear
from the sidebar UI, and if the workspace was currently open your UI
would just disappear.

This happened because `parse_worktrees_from_str` silently dropped any
worktree entries without a `branch` line in the porcelain output, which
cascaded through the `linked_worktrees` list and caused
`prune_stale_worktree_workspaces` to remove the workspace.

This PR:
- Makes `Worktree::ref_name` an `Option<SharedString>` so detached
worktrees can be represented
- Renames `Worktree::branch()` to `Worktree::display_name()`, which
returns the branch name when available or the short SHA as a fallback
(mirroring how the title bar already handles detached HEAD for
repositories)
- Updates `parse_worktrees_from_str` to include detached and bare
worktree entries instead of dropping them
- Filters detached worktrees out of the worktree picker UI, preserving
the existing product decision to only show branch-based worktrees there

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

1dfe836 Remove `settings` dependency from `anthropic` (#51979)

Click to expand commit body
Release Notes:

- N/A
-

John Tur created

c1cbea1 Fix crash in apply text buffer operations found when opening a channel notes (#51978)

Click to expand commit body
To do

* [x] turn the operations from collab into a failing test
* [x] fix the crash
* [ ] turn the huge set of operations into a succinct test that can be
checked in on main

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>

Max Brunsfeld and Ben Kunkle created

01fe4f6 Add screen-sharing support on Wayland/Linux (#51957)

Click to expand commit body
Release Notes:

- Added screen-sharing support on Wayland/Linux.

---------

Co-authored-by: Neel Chotai <neel@zed.dev>

Jakub Konka and Neel Chotai created

55a59ca gpui: Treat typographic apostrophes as word characters for line wrapping (#51973)

Click to expand commit body
The line wrapper's `is_word_char` function included the ASCII apostrophe
(U+0027) but not the typographic right single quotation mark `'`
(U+2019) or left single quotation mark `'` (U+2018). When Markdown
rendering produces curly quotes, words like `won't` were being split at
the apostrophe during line wrapping, producing `won` at the end of one
line and `'t` at the start of the next.

This adds both typographic quote characters to `is_word_char` so they
are treated the same as the ASCII apostrophe.

Release Notes:

- Fixed line wrapping splitting words at typographic apostrophes (e.g.
"won't" breaking as "won" / "'t").

Eric Holk created

d344d7f Split size check into compute + label workflows for fork PR support (#51972)

Click to expand commit body
## Context

Fork PRs receive a read-only `GITHUB_TOKEN`, causing 403 errors on all
label and comment writes
([example](https://github.com/zed-industries/zed/pull/51878)). This
splits the single workflow into two:

- **pr-size-check.yml** (`pull_request`): computes size and guided tour
detection, uploads a JSON artifact β€” read-only, works for forks
- **pr-size-label.yml** (`workflow_run`): downloads the artifact,
applies labels and comments β€” runs on the base repo with full write
access

### Security

- Artifact treated as untrusted data: fields are cast and validated
(`Number()`, `String()` + prefix check, `Boolean()`) before use
- No artifact content is executed or interpolated into shell
- Missing artifact handled gracefully (steps skip via output flag)

### Also included

- Structural guided tour detection: extracts "How to Review" section,
strips HTML comment placeholders, checks for actual author content
(fixes false positive in #51957)
- Softer confirmation: "appears to include guidance"

Tested locally end-to-end against 4 real PRs
(XL/small/medium/false-positive).

## How to Review

1. `pr-size-check.yml` β€” the compute half. Compare against the previous
version: all write operations removed, artifact upload added at the end.
2. `pr-size-label.yml` β€” new file. Download artifact, validate, apply
labels/comments. Same label logic as before, just in a `workflow_run`
context.

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

John D. Swanson created

2051578 editor: Fix rewrapping with an empty selection (#51742)

Click to expand commit body
Closes #43043

Rewrapping logic for when there was nothing selected was desynced from
the code that handles selections.
The desired wrapping can be achieved when you selected the markdown
paragraph and use the rewrap action.

This PR moves the logic that selects lines for the case where there is
no selection further up to reuse the existing rewrapping logic

<img width="862" height="553" alt="image"
src="https://github.com/user-attachments/assets/87f7c6cb-7855-4193-b17a-f938f8c9a210"
/>

- [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 rewrapping paragraphs in markdown when you have nothing selected

---------

Co-authored-by: Tom HoulΓ© <tom@tomhoule.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>

Kurian Jojo , Tom HoulΓ© , Antonio Scandurra , and Anthony Eid created

ff2e5d4 settings_ui: Fix edit predictions and tool permissions for narrow windows (#51878)

Click to expand commit body
Closes #51865 

The Tool Permissions and Edit Prediction Providers pages have settings
that do not conform very well to the usual setup, because of this they
are specially defined in .../settings_ui/src/pages . Due to this setup,
they do not benefit from the same automatic responsive setup as the
other parts of the settings ui. This was causing issues w/ narrow
windows, where fields and text were extending past the side of the
window or just not displaying.
All that was needed to fix it was some tweaks to the structure and css
of those pages, and its smooth sailing. Maybe in the future
`render_settings_item` can be made broader and support these use cases
as well so this doesn't have to be handled manually.

Behavior Before:


https://github.com/user-attachments/assets/283df746-e1bb-4791-b259-085dc83f3292

Behavior After:


https://github.com/user-attachments/assets/154c8fcf-8a02-49c8-910a-a69dc11b144f

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:

- Settings Editor: Fixed the display issue with narrow windows on the
Edit Prediction configuration page.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Finn Eitreim and Danilo Leal created

0f1f0f9 cloud_llm_client: Add derives for edit prediction fields (#51968)

Click to expand commit body
## Context

This PR adds some derives which make tracing easier on cloud side.

## Self-Review Checklist

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

Release Notes:

- N/A

Neel created

278e81b Improve guided tour detection to use structural check (#51969)

Click to expand commit body
## Context

Follow-up to #51964. The previous fix (stripping HTML comments) still
had a false positive: the `## How to Review` heading itself matched the
`how to review` alternative in the regex. Every PR using the template
would trigger the "guided tour detected" message.

Replace the regex with structural detection: extract the "How to Review"
section, strip template placeholders, and check if the author actually
wrote content there. Also softens the confirmation message to "appears
to include guidance."

## How to Review

- Single file: `.github/workflows/pr-size-check.yml`, lines 147-154
- The `rawBody.match(...)` extracts content between `## How to Review`
and the next `##` heading
- Confirmed: PR #51957's body returns `false`, a PR with actual content
returns `true`

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

John D. Swanson created

b786872 Fix guided tour false positive in PR size check (#51964)

Click to expand commit body
## Context

The size check workflow's guided tour detection matches text inside HTML
comment placeholders in the PR template (e.g., `<!-- provide a guided
tour β€” numbered list of files/commits to read in order -->`), producing
false positives like the one on #51957.

Fix: strip `<!-- -->` comments from the PR body before running the
regex.

## How to Review

- Single file: `.github/workflows/pr-size-check.yml`, lines 148-151
- The `.replace(/<!--[\s\S]*?-->/g, '')` runs in `actions/github-script`
JS, not shell

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

John D. Swanson created

9ee198d Remove one-off fix-size-check workflow (#51960)

Click to expand commit body
## Context

Cleanup of the one-off workflow added in #51958. Both affected PRs
(#51897, #50372) now have passing checks and correct size labels.

## How to Review

- Single file deletion: `.github/workflows/fix-size-check.yml`

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

John D. Swanson created

5645d87 Add one-off workflow to fix PRs with failed size checks (#51958)

Click to expand commit body
## Context

The permissions ceiling bug (fixed in #51948) left two open PRs (#51897,
#50372) with failed `check-size` runs. The Check Runs API requires
GitHub App auth, so we can't post passing checks from the CLI β€” it needs
to run inside Actions with `checks: write`.

This adds a `workflow_dispatch` workflow that takes comma-separated PR
numbers, computes sizes, applies labels, and posts passing check runs.
Delete after use.

## How to Review

- Single file: `.github/workflows/fix-size-check.yml`
- Uses the same size logic and ignored patterns as `pr-size-check.yml`
- Input is `pr_numbers` (comma-separated integers), accessed via JS API,
not shell interpolation

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

John D. Swanson created

dbfde8f agent_ui: Fix redundant check after #51953 (#51956)

Click to expand commit body
Follow up to #51953

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Bennet Bo Fenner and Marshall Bowers created

b0e35b6 Allow search/replace to span multiple lines (#50783)

Click to expand commit body
Closes #49957 

Also adds `start_of_input` context, and modifies both
`{start,end}_of_input` to work for both single line and auto height
editor modes.


https://github.com/user-attachments/assets/e30f2b20-a96c-49d5-9eb6-3c95a485d14a

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:

- Added support for multi-line search and replace input in Buffer Search
and Project Search

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>

claire and Nathan Sobo created

a3173c4 agent_ui: Fix `@fetch` mention if URL contains `@` character (#51953)

Click to expand commit body
## Context

Closes #47111

Release Notes:

- Fixed an issue where using `@fetch` in the agent panel would break if
URL contained an `@` character

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Bennet Bo Fenner and Marshall Bowers created

ed42b80 editor: Fix Accessibility Keyboard word completion corrupting text (#50676)

Click to expand commit body
When typing with the macOS Accessibility Keyboard and clicking a word
completion suggestion, text was corrupted in several ways.

macOS sends `insertText:replacementRange:` when a completion is
selected. The replacement range was passed to
`selection_replacement_ranges` using the wrong offset type, causing
incorrect delta calculation for multi-cursor scenarios. Additionally,
`backspace` was called unconditionally even when the replacement range
was empty (as with the trailing space the Accessibility Keyboard
appends), deleting the last character of every completed word. Finally,
an empty replacement range in a multi-cursor context carries a stale
cursor position from macOS's single-cursor view of the buffer, so it is
now ignored and text is inserted at each cursor's actual position
instead.

Closes #38052

Release Notes:

- Fixed text corruption when using macOS Accessibility Keyboard word
completion.

Sagnik Mandal created

5fb6ead gpui: Fix nested deferred support (#47770)

Click to expand commit body
Release Notes:

- N/A

To fix crash when use `deferred` in a `deferred`.

```
thread 'main' (4024343) panicked at /Users/jason/.cargo/git/checkouts/zed-a70e2ad075855582/83ca310/crates/gpui/src/window.rs:2411:9:
assertion `left == right` failed: cannot call defer_draw during deferred drawing
  left: 1
 right: 0
```

### When we need use nested deferred?

#### Case 1

- A Popover (used `deferred`) with a form.
- An Input element in the Popover form.
- Input have ContextMenu that used `deferred`.
- User right click Input to open menu.


<img width="539" height="331" alt="image"
src="https://github.com/user-attachments/assets/98c03b1e-58fd-4863-8bcd-0141252d1c51"
/>

#### Case 2

- A Popover (`deferred`) with some content.
- There have a `info` icon in the content to show some tip by open
another Popover.

### Test by `examples/popover.rs`

<img width="916" height="373" alt="image"
src="https://github.com/user-attachments/assets/7ed6a511-6d60-40fb-837b-ebab8f0cba37"
/>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>

Jason Lee , Claude Sonnet 4.5 , and Lukas Wirth created

0b557a5 workspace: Only suppress auto-save on focus transfer for the Vim/Helix command palette (#51949)

Click to expand commit body
This PR adjusts the logic that was added in #45166 to just apply to the
specific case of interacting with the command palette in Vim and Helix
modes (hereafter referred to collectively as "Vim mode").

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

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

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

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

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

Release Notes:

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

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

Marshall Bowers and Bennet Bo Fenner created

68d9607 anthropic: Add support for thinking toggle (#51946)

Click to expand commit body
This adds support for the thinking toggle + reasoning effort for the
Anthropic provider

Release Notes:

- anthropic: Added support for selecting reasoning effort

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Bennet Bo Fenner and Marshall Bowers created

8a467a5 Update PR size check workflow (#51948)

Click to expand commit body
## Context

The PR size check workflow has been failing with `403 Resource not
accessible by integration` on every run
([example](https://github.com/zed-industries/zed/actions/runs/23281894554/job/67698634490)).
The root cause is a workflow-level `permissions` block that set a
read-only ceiling, silently preventing the job-level `issues: write` and
`pull-requests: write` grants from taking effect.

This also adds an idempotency improvement: when a new push doesn't
change the PR's size bracket, the workflow now skips the label
remove/re-add cycle, eliminating unnecessary timeline noise.

## How to Review

- Focus on `.github/workflows/pr-size-check.yml` β€” that's the only file
changed
- Lines 17-23: workflow-level `permissions` block removed, job-level
retained
- Lines 81-112: new `alreadyCorrect` check wraps the label mutation
block

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

John D. Swanson created

6cbb3b9 agent: Don't render Markdown for file names in tool calls (#49668)

Click to expand commit body
Closes #44184
Closes #45729

Before (incorrect; __init__ is bold):
<img width="391" height="87" alt="image"
src="https://github.com/user-attachments/assets/f453dbf1-224f-49fe-9d94-d0d83ad68ac5"
/>

After (\_\_init\_\_ renders correctly):
<img width="385" height="80" alt="image"
src="https://github.com/user-attachments/assets/1f7892f1-559a-436b-bde1-00c5c3bce8de"
/>

Release Notes:

- Agent: Fix rendering of filenames in edit tool header

Kavi Bidlack created

d94aa26 editor: Fix multi-line cursor expansion when multi-byte characters are involved (#51780)

Click to expand commit body
Closes #51740 

The multi-line cursor expansion operates off of byte offsets, instead of
character offsets, so multi-byte characters like the umlaut cause the
multi-line cursors to be weirdly offset. To fix we just convert the
expansion logic to rely on utf16 characters instead of bytes.

before behavior:


https://github.com/user-attachments/assets/320e24e9-0fdd-4d16-a9e8-ca17c9e21ff2

after behavior: 


https://github.com/user-attachments/assets/c4f0334b-dffc-4530-91ee-577b4fab75dd

+ test to verify functionality.

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:

- editor: fixed multi-line cursor expansion dealing with multi-byte
characters.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>

Finn Eitreim and Kirill Bulatov created

e314c02 gpui: Add `grid_cols_max_content`for content-based column widths (#50839)

Click to expand commit body
Summary
Add a new grid_cols_max_content GPUI styling API that uses minmax(0,
max-content) for grid column sizing. This allows columns to
automatically size based on their content width while remaining
responsive when the container shrinks.

Applied the fix to both markdown preview (markdown_renderer.rs) and
agent panel (markdown.rs) table rendering. Table borders now wrap
tightly around content instead of stretching to full container width.

Fixes #50044

Approach
A new grid_cols_max_content API is added (as discussed with
@MikaylaMaki):

style.rs β€” New grid_cols_max_content: Option<u16> field
styled.rs β€” New .grid_cols_max_content(cols) builder method
taffy.rs β€” New to_grid_repeat_max_content() using minmax(0, max-content)
markdown_renderer.rs β€” Swapped .grid_cols() β†’ .grid_cols_max_content(),
moved border to grid div, wrapped in v_flex().items_start() so border
hugs content
markdown.rs β€” Applied same fix for agent panel tables:
grid_cols_max_content, border on grid div, wrapped in
div().flex().flex_col().items_start() container
Screenshots
Before (equal-width columns, border stretches full width):

<img width="1386" height="890" alt="Screenshot 2026-03-06 at 2 17 54β€―PM"
src="https://github.com/user-attachments/assets/42cf76c4-6eba-4919-9b16-78c7fc823315"
/>

<img width="2555" height="1308" alt="original issue"
src="https://github.com/user-attachments/assets/22b0fc02-5203-48bb-8f03-7aa8255197cc"
/>



After β€” Markdown Preview and Agent Panel
<img width="2554" height="1317" alt="Screenshot 2026-03-07 at 2 29
28β€―PM"
src="https://github.com/user-attachments/assets/8849988e-9ba8-4388-9c29-a255e0ecc52b"
/>


Before you mark this PR as ready for review, make sure that you have:

Added a solid test coverage and/or screenshots from doing manual testing
 Done a self-review taking into account security and performance aspects
 Aligned any UI changes with the UI checklist
Release Notes:

Fixed markdown table columns to use content-based auto-width instead of
equal-width distribution in both markdown preview and agent panel
(#50044).

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>

Abhiraj Damodare and Mikayla Maki created

783ec44 project: Don't send context.only for generic code action requests (#50979)

Click to expand commit body
Closes #48917

## Summary
- Stop sending `context.only` for generic `textDocument/codeAction`
requests.
 - Keep explicit kind filtered requests unchanged.
- Add regression coverage for generic code action requests so actions
like `source.addTest` remain visible.

## Root Cause
`GetCodeActions::to_lsp` populated `context.only` even when the caller
requested all code actions (`kinds == None`). That turned the normal
code actions menu into a filtered request. With `gopls`, this filtered
out `source.addTest`, so `Add test for ...` never appeared.

## Verification
 - `cargo fmt --all -- --check`
 - `./script/clippy -p project`
 - `cargo nextest run -p project --no-fail-fast --no-tests=warn`
- `cargo test -p editor
editor_tests::test_organize_imports_manual_trigger -- --exact`
- `cargo test -p editor
editor_tests::test_context_menus_hide_hover_popover -- --exact`

## Manual Testing
- Repro'd the protocol level behavior against `gopls`: unfiltered
requests return `source.addTest`, filtered requests excluding it do not.
 - Opened `zed_guild/testing_projects/act/pkg/artifactcache/handler.go`
 - Triggered `Show Code Actions` on `StartHandler`
 - Confirmed `Add test for StartHandler` appears


Release Notes:

- Fixed Go `gopls` code actions so `Add test for ...` appears in the
generic code actions menu.

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

loadingalias and Kirill Bulatov created

e5ab982 client: Upgrade tiny_http (0.8.2 -> 0.12.0) (#51940)

Click to expand commit body
Used only for the sign in callback. I've made sure it still works as
expected with a local build.

Release Notes:

- N/A

Tom HoulΓ© created

806a72c title_bar: Prefer most specific repository for nested git repos (#51898)

Click to expand commit body
## Context

I have a project with a nested git repo inside a parent repo (separate
`.git` directory, not a submodule). The title bar shows the parent's
branch instead of the nested repo's own branch.

The issue is in `get_repository_for_worktree()` β€” it iterates
`git_store.repositories()` (an `FxHashMap`) and returns the first
`starts_with` match. Both the parent and nested repo match, and
whichever one FxHashMap iterates first wins. There's no reason it should
be one or the other.

The fix already exists elsewhere in the codebase β€”
`GitStore::repository_and_path_for_project_path()` at
`git_store.rs:1826` uses `.max_by_key()` to pick the most specific
(longest path) match. This PR applies the same approach to three
functions that have the same problem:

- `TitleBar::get_repository_for_worktree()` β€” branch display in title
bar
- `resolve_active_repository()` in `git_ui` β€” repository selection for
the git panel
- `get_branch_for_worktree()` in `recent_projects` β€” branch display in
the project switcher

Two other locations use a similar `starts_with` pattern
(`effective_active_worktree()` in `title_bar.rs` and worktree selection
in `recent_projects.rs`) but those iterate worktrees against a single
known repo, not repos against a worktree β€” so first-match and
longest-match give the same result. Left those unchanged.

Closes #7566

## How to Review

All three changes are the same transformation: first-match loop (or
`.find()`) β†’ `.filter().max_by_key()` on path length. The reference is
at `crates/project/src/git_store.rs:1826`.

The primary fix is `get_repository_for_worktree()` in `title_bar.rs`.
The other two are the same pattern.

One difference from the reference: I used `.as_os_str().len()` instead
of `.clone()` for the `max_by_key` key β€” avoids cloning an `Arc<Path>`
per comparison. Among prefix-related paths (which is all that passes the
filter), the longer path is always the more specific match, so length
comparison is equivalent.

`title_bar` has no existing test infrastructure. Happy to add a test if
you'd like β€” the setup would follow the pattern in
`test_git_traversal_with_nested_repos`
(`crates/project/tests/integration/git_store.rs`).

```
cargo test -p title_bar -p git_ui -p recent_projects
./script/clippy
```

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

- Fixed branch picker showing parent repository's branch instead of the
nested repository's branch when working in submodules or nested git
repos.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>

Caio Raphael , Piotr Osiewicz , and Smit Barmase created

bb769b9 markdown: Render checkboxes in markdown table cells (#50595)

Click to expand commit body
Render `[x]` and `[ ]` as checkbox widgets when they appear as the sole
content of a markdown table cell. Previously these were displayed as raw
text. List-item checkboxes were already rendered correctly; this extends
the same treatment to table cells.

Fixes #50045.

## What this does

- Table cells containing only `[x]`, `[X]`, or `[ ]` now render as
visual checkboxes instead of plain text
- Both markdown rendering paths are covered: the `markdown` crate (agent
panel, chat) and the `markdown_preview` crate (file preview)
- Checkboxes are display-only, matching the existing list-item checkbox
behavior

## How it works

pulldown-cmark splits `[x]` in table cells into three separate `Text`
events (`[`, `x`, `]`) rather than emitting a `TaskListMarker` event
(which only fires for list items per the GFM spec). The fix operates at
each crate's natural interception point:

- **`markdown` crate**: After all text events for a table cell have been
buffered, `replace_pending_checkbox()` checks the accumulated text
before the cell div is finalized. If it matches the checkbox pattern,
the pending text is replaced with a `Checkbox` widget.
- **`markdown_preview` crate**: In `render_markdown_text()`, text chunks
whose trimmed content matches the checkbox pattern are rendered as
`MarkdownCheckbox` widgets instead of `InteractiveText`.

## Scope

Three files, purely additive:

- `crates/markdown/src/markdown.rs` β€” `replace_pending_checkbox()` on
builder, called at `TableCell` end
- `crates/markdown_preview/src/markdown_renderer.rs` β€” checkbox
detection in `render_markdown_text()`
- `crates/markdown_preview/src/markdown_parser.rs` β€” test only

No changes to parser data models, GPUI, or any shared infrastructure.

## What's not in scope

- **HTML `<input type="checkbox">`** β€” pulldown-cmark strips these as
raw HTML. Supporting them requires HTML tag parsing, which is a separate
concern.
- **Interactive (click-to-toggle) checkboxes in tables** β€” table
checkboxes are display-only. List-item checkboxes in Zed support
Cmd+click toggling, but extending that to table cells would require
tracking source ranges across the split parser events, which is a
separate enhancement.

## Follow-up

Table checkbox interactivity (Cmd+click toggle) is straightforward to
add as a follow-up β€” the source ranges are already available in
`markdown_preview`, and the `markdown` crate would need minor callback
plumbing.

## Screenshots

**Markdown checkbox before**

<img width="1603" height="863" alt="md-checkbox-before-1"
src="https://github.com/user-attachments/assets/8539d79d-c74f-4d14-a3e5-525e4d0083aa"
/>

<img width="1599" height="892" alt="md-checkbox-before-2"
src="https://github.com/user-attachments/assets/7badfab1-651f-4fab-8879-deb109c56670"
/>

**Markdown checkbox after**

<img width="1832" height="889" alt="md-checkbox-after-1"
src="https://github.com/user-attachments/assets/463b6334-9f50-41c0-ab7e-24d238244873"
/>

<img width="1795" height="886" alt="md-checkbox-after-2"
src="https://github.com/user-attachments/assets/57d3d9de-1d23-42ba-bc0a-5aa0c699b13d"
/>

## Test plan

**Unit tests** (2 new):
- `test_table_with_checkboxes` (markdown_preview) β€” parser delivers
`[x]`/`[ ]` text into table cell structures
- `test_table_checkbox_detection` (markdown) β€” parser events accumulate
checkbox text in table cells, confirming `replace_pending_checkbox`
detection logic

**Automated**:
- [x] `cargo test -p markdown` β€” 27 tests pass (26 existing + 1 new)
- [x] `cargo test -p markdown_preview` β€” 61 tests pass (60 existing + 1
new)

**Manual** (verified against `test-checkbox-table.md`):
- [x] Basic `[x]`/`[ ]` in a status column
- [x] Checkbox-only column alongside text
- [x] Multiple checkbox columns in one table
- [x] Left, center, and right column alignments
- [x] Uppercase `[X]` variant
- [x] Leading/trailing whitespace in cell
- [x] Checkboxes alongside other inline elements (links, bold text)
- [x] Single-column and minimal two-column tables
- [x] Normal table text unaffected by detection
- [x] List checkboxes still render correctly (regression)
- [x] Agent panel: asked agent to output table with checkbox columns

Release Notes:

- Fixed `[x]` and `[ ]` checkboxes not rendering in markdown table cells
(#50045)

iam-liam created

945f642 bedrock: Make thinking toggle toggle thinking (#50673)

Click to expand commit body
Release Notes:

- Support for Native Thinking toggle instead of model variants

---------

Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Shardul Vaidya , Ona , Bennet Bo Fenner , and Marshall Bowers created