Commit Graph
38231 Commits
Author SHA1 Message Date
Ben KunkleandNbarry 797cba7276 ep: Add accepted and explicit reject fetching (#58434)
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 or Added/Fixed/Improved ...

Co-authored-by: Nbarry <nbarry@zed.dev>
2026-06-03 20:51:15 +00:00
Danilo Leal 0dfe328a23 Improve markdown preview styles (#58465)
Closes https://github.com/zed-industries/zed/issues/58364

This PR adjusts heading and body text font size (mostly reducing them a
bit), as well as colors (making the body text slightly darker than
headings), and content separation, through adding a bottom border to
headings until H3.

| Before | After |
|--------|--------|
| <img width="2620" height="2044" alt="Screenshot 2026-06-03 at 5 
01@2x"
src="https://github.com/user-attachments/assets/d10c7916-e4cb-4999-8be1-08e26793fd35"
/> | <img width="2622" height="2044" alt="Screenshot 2026-06-03 at 5 
02@2x"
src="https://github.com/user-attachments/assets/13105982-283d-436b-973e-b6198cd2503b"
/> |

Release Notes:

- Improved markdown preview styles, making it more legible and easier to
parse.
2026-06-03 20:38:23 +00:00
MartinYe1234 fb7e3ec7b1 Fix external tool call locations (#58367)
Summary:

- Allow agent tool-call locations outside visible worktrees to resolve
as local buffers.
- Fall back to opening absolute paths from the tool-call click handler.

Tests:

- cargo test -p acp_thread
test_tool_call_location_resolves_external_file
- cargo check -p agent_ui

Closes AI-362
Release Notes:

- Fixed opening agent-created files outside the current project, such as
global skill files.
2026-06-03 19:48:08 +00:00
Henrique FerreiroandDanilo Leal 77429dc4ce Add Gerrit icon for Chromium hosting provider (#57713)
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

Improves [#44738](https://github.com/zed-industries/zed/pull/57500) by
including an icon for the Chromium code review remote. The Gerrit SVG
icon was created by Claude, using
https://commons.wikimedia.org/wiki/File:Gerrit_icon.svg#/media/File:Gerrit_icon.svg
as source.

<img width="167" height="66" alt="Screenshot 2026-05-26 at 11 48 46"
src="https://github.com/user-attachments/assets/d6a85751-3b86-4e30-a090-632f8b97d925"
/>

Release Notes:

- Added icon for the Chromium code review remote provider.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-06-03 19:29:26 +00:00
Marshall Bowers 0f0d942959 collab: Only access github_user_id and github_login columns in tests (#58457)
This PR marks the `github_user_id` and `github_login` columns on the
`User` database model as only being accessible in tests.

Closes CLO-829.

Release Notes:

- N/A
2026-06-03 19:20:14 +00:00
morgankrey c1331d7605 Document Billing Manager role (#58447)
- add Billing Manager to the organization roles docs with a capability
matrix
- update Business and billing docs to explain non-paid-seat billing
access
- update billing docs for self-serve tax ID updates

Release Notes:
- N/A
2026-06-03 18:17:18 +00:00
Lena 9e40b36e56 Only notify slack on confirmed and common P0/P1s (#58399)
Release Notes:

- N/A
2026-06-03 16:18:41 +00:00
Danilo Leal 64e8e75a9b Fix update version button stuck on "Downloading" step (#58435)
Very often, I'd wake up, to which point there's a new Nightly release
out, and the update button would be stuck in the "Downloading..." step.
It'd only immediately change its state to "Restart" once I quit the app
and re-open it again. Turns out we were just missing a cx.notify in the
callback to trigger a re-render.

Release Notes:

- Fixed a bug where the update version button would be stuck in the
"Downloading..." step.
2026-06-03 16:06:15 +00:00
Ben KunkleandOleksiy 0bc571b903 Fix jump capture (#58430)
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 or Added/Fixed/Improved ...

---------

Co-authored-by: Oleksiy <oleksiy@zed.dev>
2026-06-03 15:50:50 +00:00
Anthony Eid 0e559e5519 agent: Fix a UTF-8 boundary panic in the agent streaming parser (#58432)
The parser stores emitted byte offsets between partial tool-call parses.
Because partial JSON can be repaired differently as more bytes arrive, a
byte offset that was valid in an earlier string can land inside a
multibyte character in a later string. We now normalize those offsets
with `find_char_boundary` before slicing.

Added property tests covering boundary-sensitive write/edit streaming
sequences to prevent regressions.

Fixes Sentry ZED-8Y1 / 7523469866.

Self-Review Checklist:

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

Release Notes:

- Fixed a crash that could occur while streaming agent edits containing
multibyte characters.
2026-06-03 15:49:01 +00:00
Bennet Bo FennerandRichard Feldman 7a1d4e670b agent: Fix compaction limit (#58431)
Release Notes:

- N/A

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-06-03 15:39:50 +00:00
zed-zippy[bot] da058f33aa Bump Zed to v1.7.0 (#58427)
Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-06-03 15:28:33 +00:00
Danilo Leal 576b8b79e4 settings_ui: Make skills page UI more consistent with others (#58425)
Mainly around ensuring the section dividers are visible and placing the
link/share button in the same place as the other items in the
regular/main settings UI page.

<img width="600" alt="Screenshot 2026-06-03 at 11  57@2x"
src="https://github.com/user-attachments/assets/69233da6-e743-435b-911a-6dd70c079560"
/>

Release Notes:

- N/A
2026-06-03 15:08:29 +00:00
Lena a49d6161d7 Stop stalebot from nagging on the same issues (#58418)
We've been doing it manually when the stalebot keeps coming back to
deep-sitting bugs that we'll pretty much never fix accidentally / in
passing, now we're automating it: the stalebot will lay off the bugs
that have already gone through the cycle of “reported — stalebot asks to
confirm — the users confirm” once.
This might need to be complemented with a yearly sweep of the `never
stale` issues as a sanity check, but first we just shed the manual work.

Release Notes:

- N/A
2026-06-03 14:18:29 +00:00
Cameron Mcloughlin 6d20698eef mermaid: The other half of #57967 (#58419)
I was a silly goose didn't notice my `git push` failed, so merged #57967
without a critical commit, and some follow-ups.

This PR just cherry-picks those commits.

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-03 14:10:43 +00:00
Matei Opreaanddino 5282cffff6 theme_selector: Mark the active theme with a check icon (#58404)
While browsing themes in theme selector, the currently active theme will
always be marked with a check icon so you can always have a reference of
where you started from.

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

Here's a preview: 
<img width="950" height="806" alt="Screenshot 2026-06-03 at 13 09 46"
src="https://github.com/user-attachments/assets/2081d9ec-b56d-4542-be58-e59e3569bc7a"
/>
<img width="958" height="818" alt="Screenshot 2026-06-03 at 13 09 52"
src="https://github.com/user-attachments/assets/134d933f-c9de-4b2c-80f5-ed5be4fb2844"
/>


Release Notes:

- Improved the theme and icon selectors to display a check next to the
active theme

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-06-03 13:56:42 +00:00
d178767443 sidebar: Add right-click menu to thread items (#58232)
Closes AI-286

This PR adds a right-click menu to thread items in the sidebar. A big
motivation for this addition was surfacing the "regenerate thread title"
action. And because this action and the "open thread as markdown" action
previously only worked on the already-loaded agent panel, there was a
load of plumbing needed to make that work even for threads in workspaces
that haven't been loaded, mostly using the thread metadata store. At the
end of the day, the title regeneration feature is only possible for the
Zed agent, so this is gated from external agents. But I believe it's now
in a slightly nicer spot due to some refactors to better expose the
state in which the title regeneration can fall into.

Release Notes:

- Agent: Added a right-click menu to thread items in the sidebar,
allowing to regenerate a thread title, rename a thread title, open the
thread as markdown, and archive it.

---------

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-06-03 13:44:48 +00:00
Ben Brandt 201ad02662 git_ui: Make git_ui call support optional (#58413)
Broke the headless builds for evals. Open to cleaner ways of doing
this...

Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-03 13:18:45 +00:00
Latias94andcameron e4893e74d1 markdown: Update merman renderer to 0.6 (#57967)
Following up on #57644 by @cameron1024, this PR updates `merman` to
v0.6.

With merman 0.6's new raster-safe SVG pipeline, Zed can move generic
`usvg`/`resvg` cleanup passes out of this crate and rely on merman for
them instead.

**What's moved to merman:**
- `foreignObject` fallback text generation
- Unsupported CSS cleanup
- Invalid SVG attribute cleanup

**What's kept in Zed:**
- Theme CSS injection and accent color assignment
- Zed-specific fallback overlay handling

**Integration note:**
In merman v0.6, fallback overlay groups are marked with
`data-merman-foreignobject="fallback"` and preserve source classes like
`node` or `section-*`, so host CSS can still style fallback text. This
PR updates Zed's accent tracker to check for this marker, ensuring
fallback overlays are not treated as real layout nodes.

I also added a render-stage test for the new contract: the SVG output
from `render_mermaid` is already raster-safe before Zed-specific
post-processing runs.

---

### 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:
- Improved rendering of Mermaid diagrams in Markdown previews.

### Tests:
- `cargo +1.95 fmt --check -p mermaid_render`
- `cargo +1.95 test -p mermaid_render`
- `cargo +1.95 clippy -p mermaid_render --all-targets -- -D warnings`
- `git diff --check HEAD~1..HEAD`

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2026-06-03 13:10:54 +00:00
Oleksiy Syvokon c2d63e32b8 Clear LLM token and model list on sign out (#57724)
Closes #FR-20

Release Notes:

- Fixed Zed provider models remaining available after sign-out
2026-06-03 12:45:17 +00:00
Oleksiy Syvokon d1b5716958 ep: Back off Zeta requests after Cloud timeout (#58394)
Pause edit prediction requests for 10 seconds after receiving a 408
timeout response. This should help Cloud to recover from spikes.


Release Notes:

- N/A
2026-06-03 12:27:09 +00:00
Oleksiy Syvokon f4a83cfdd4 ep: Make retrieved context limit configurable (#58405)
The `--related-context-limit` param controls how many tokens can we
allocate for editable context. Useful for evaluation primarly.


Release Notes:

- N/A
2026-06-03 12:19:27 +00:00
6635ea690c agent: Improve compaction UI (#58409)
Reworked the UI so we can actually see the compaction output. Design
pass TBD


https://github.com/user-attachments/assets/89108398-476b-493f-a5eb-d20159fc6830



Release Notes:

- N/A

---------

Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-06-03 12:18:28 +00:00
Lukas Wirth a94841f2c8 Fix panic in uncommitted_diffs_for_events (#58410)
nightly only i believe so no rel notes
Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-03 12:14:44 +00:00
2f8a37e907 vim: Fix increment/decrement for negative numbers without gaps (#58327)
Finally continuing from PR #35200:

I adapted the fix to the changed find_target() logic and added more
tests for version strings like `0.82.46`.
This is a different but similar fix compared to #47356 for helix mode -
not sure if this can and should be unified?

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)
(should not affect UI at all)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #35193 

Release Notes:

- Fixed vim's increment (`ctrl-a`) and decrement (`ctrl-x`) commands
skipping the number under the cursor in dotted strings like version
numbers (e.g. `0.81.46`) and hyphened date strings (e.g. `2015-02-01`)

---------

Co-authored-by: Stefan Bethge <kjyv@users.noreply.github.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-06-03 11:31:38 +00:00
Lukas Wirth c7035afc30 agent_ui: Cache cross-channel thread import check off the render loop (#58402)
channels_with_threads opened a fresh SQLite connection per
release-channel database on every call, and the sidebar called it twice
per frame from its render path, blocking the render loop on disk I/O.

Run the per-channel checks on a background thread and cache the
resulting channel names once at sidebar construction, since the
per-channel databases cannot change while this process runs.

Release Notes:

- Fixed a cause of stutters in the agent panel sidebar rendering
2026-06-03 11:29:40 +00:00
Lena 2c0992dfc2 Add AI Policy to CONTRIBUTING.md (#58397)
Release Notes:

- N/A
2026-06-03 11:07:23 +00:00
Smit Barmase 3d241b0e7b go: Fix table test detection in large files (#57277)
Closes #46881

Depends on #57276.

Implements `GoRunnableResolver` to post-process table test matches. The
resolver picks the correct string field by comparing against the field
used in `t.Run(tc.<field>, ...)`.

Release Notes:

- Fixed Go table tests not showing run buttons in files with many test
cases.
2026-06-03 10:53:22 +00:00
Oleksiy SyvokonandEric Holk 49764bd5c9 ep: Editable context collectors and metrics (#58400)
This change adds metrics for evaluating editable context collectors and
the collectors themselves:

- `cursor excerpt`: small area around the cursor.
- `current-file`: the full file that contains the cursor.
- `edit-history`: excerpts around edit history edits.
- `edit-history-file`: full files referenced by the edit history.
- `git-log`: files related to the cursor file according to recent git
co-change history.
- `oracle-file`: full files referenced by the expected patches. This is
an oracle/evaluation-only source because it uses the target patch.

Individual collectors can be enabled by passing a comma-separated list
like this: `ep context --type=edit-history,current-file`. There's also a
preset, `--type=editable`, which will enable all collectors except
oracle.

This change also adds the
`.prompt_input.related_files[0].excerpts[0].context_source` field.

Editable context is only accessible via ep-cli for now.

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
2026-06-03 10:10:34 +00:00
Tom Houlé de1effbd56 cloud_api_client: Add a few helpers for response handling (#58346)
This centralizes some repeated logic across `cloud_api_client`, to map
generic request failures (`ConnectionFailed`, 401s) to errors and read
response bodies, handling failures there too.

Closes CLO-759.

Release Notes:

- N/A
2026-06-03 09:18:14 +00:00
Wanten 2991e00e5e gpui: Anchor IME candidate window to the start of the visual line (#55876)
## Summary

This PR fixes horizontal jumping of the IME candidate window during text
composition.

On the shared `selected_bounds` path used by Windows, the candidate
window no longer follows the preedit caret character-by-character.
Instead, it anchors to the start of the current visual line, which keeps
the candidate window stable while typing.

Linux Wayland uses a different IME positioning path, so it was not
affected by the original implementation in this PR. This PR now also
includes a Wayland-specific adjustment so that Wayland uses the same
visual-line anchoring behavior.

## Changes

1. **Shared / Windows path**
Updated `selected_bounds` in `crates/gpui/src/platform.rs` to use a
visual-line-aware anchor for preedit text.

This removes the distracting horizontal movement of the candidate window
while typing and keeps the anchor aligned with the active visual line.

2. **Linux Wayland path**
Updated the Wayland IME area calculation in
`crates/gpui_linux/src/linux/wayland/window.rs` to use the same
visual-line-start anchoring strategy for preedit text.

This brings Linux Wayland in line with the Windows behavior while
preserving Wayland's platform-specific IME handling.

## Notes

I had previously tried a separate Wayland-specific fix in
24f7bb6e27, but later reverted it in
8cfe7a2a54441f89c170fbdd165a49b3e787b3c4 because the behavior was not
good enough and it regressed the original positioning behavior.

The current Wayland implementation is a new, simpler approach that keeps
the original behavior intact while also removing horizontal
candidate-window jumping.

## Visuals

### Windows / shared path

* **Before the fix:** (The candidate box moves along with the preedit
text, which is distracting)
    
<img width="918" height="675" alt="before"
src="https://github.com/user-attachments/assets/29cb05e4-3e99-4b54-9ce3-78710b307ce6"
/>

<img width="478" height="682" alt="before_1"
src="https://github.com/user-attachments/assets/cff38b65-96dd-4ed7-b06b-7fbcd448fab9"
/>

* **After the fix:** (Candidate box stays fixed at the line start during
typing, correctly jumps to new lines or follows active segments)

<img width="918" height="675" alt="after"
src="https://github.com/user-attachments/assets/4f50a710-dc0d-4959-a313-1184122ab759"
/>

<img width="478" height="683" alt="after_1"
src="https://github.com/user-attachments/assets/8e9df121-ffcc-45ad-ba0b-f1ad3cef87bc"
/>

### Linux Wayland

*  **Before / previous behavior**

<img width="552" height="796" alt="before"
src="https://github.com/user-attachments/assets/e3e84312-c626-41cb-945f-66c13aa96df6"
/>


*  **After / current implementation**

<img width="546" height="772" alt="after"
src="https://github.com/user-attachments/assets/a01ab6d7-a3b6-4d56-a1cb-b2b112b6b914"
/>


---

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

Release Notes:

- N/A
2026-06-03 08:36:05 +00:00
Anthony Eid bc5e58ecc0 agent_panel: Fix mention pasting crash (#58375)
This crash occurred because metion crease were using raw text ranges
that were precomputed before calling editor.edit(), and didn't take into
account that editor normalizes text inserted

The fix is normalizing the text first, then using the normalize text
range for the crease

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:

- Fix a crash that could occur when adding a crease to the agent panel
2026-06-03 03:45:35 +00:00
Anthony Eid ab913c96c6 helix: Fix paste crash (#58373)
Closes [#58343](<https://github.com/zed-industries/zed/issues/58343>)

This crash happened because Helix paste restored selection using the raw
clipboard text length, but buffer edits normalize CRLF line endings to
LF before inserting. When pasting CRLF text at or near EOF, the restored
selection could extend past the normalized snapshot length and panic in
`MutableSelectionsCollection::select_ranges`. The fix normalizes the
text before measuring it for selection restoration and adds regression
coverage for CRLF paste in 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:

- Fixed a crash that could occur when pasting at the end of a file in
Helix mode
2026-06-03 03:45:31 +00:00
saberoueslati 195ae0893e git_ui: Fix Enter key selecting branch in commit modal branch picker (#58366)
## Context

When the "Switch branch" picker is opened from the git commit modal and
the user presses Enter, a `\n` character was inserted into the input
instead of confirming the branch selection.

The `"GitCommit > Editor"` keymap context bound `enter` to
`editor::Newline`. This context matches *any* `Editor` descended from
`GitCommit` in the element tree, including the single-line search editor
inside the branch picker popover. Because a context-path binding is more
specific than the global `enter: menu::Confirm` binding, it took
precedence and the picker never received the confirm action.

The commit message editor uses `EditorMode::AutoHeight` (reported in key
context as `mode == auto_height`); the picker's search editor uses
`EditorMode::SingleLine`. Narrowing the context to `"GitCommit > Editor
&& mode == auto_height"` restricts the `editor::Newline` binding to the
commit message editor only. Single-line editors inside the same modal
now fall through to the global `enter: menu::Confirm`, which correctly
confirms the selection.

Closes #58022

## How to Review

Three identical one-line changes, one per platform keymap
(`default-linux.json`, `default-macos.json`, `default-windows.json`):

- `"GitCommit > Editor"` → `"GitCommit > Editor && mode == auto_height"`

Video of manual test after fix :

[Screencast from 2026-06-02
23-16-32.webm](https://github.com/user-attachments/assets/67652cc5-4f8d-42f4-a5a9-ade3499ee880)

## 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 Enter key inserting a newline instead of selecting a branch in
the commit modal branch picker
2026-06-03 02:39:55 +00:00
Anthony Eid da41cecb05 git: Fix a regression introduced with removing gitlib2 dep (#58359)
The regression introduced in #53453 where selecting a remote branch from
the branch picker checked out the remote tracking ref directly, leaving
the repository in detached HEAD state. Instead of creating a local
branch that set the remote branch as it's upstream.

The fix was reverting the old checks we did before #53452 was merged to
figure out if the branch was valid, remote only, local, or local without
the upstream set. Depending on the type of reference it is Zed will
check it out, or create/set the branch with remote tracking to its
upstream branch.

I also added a regression test to prevent this from happening again in
the future

Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-02 23:29:55 +00:00
Xiaobo Liu d14b1f4ed5 agent_ui: Restore hover previews for image mentions (#58165)
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 https://github.com/zed-industries/zed/issues/58153

Release Notes:

- Agent: Fixed image previews not being displayed after submitting a
prompt and then hovering the mentioned image.
2026-06-02 23:28:54 +00:00
Danilo Leal 5e799a2b77 title_bar: Expose the panel layout toggle as actions (#58281)
Closes AI-354

The "Panel Layout" submenu available in the user menu exposed two quick
menu items to switch between the classic and agentic workspace layout.
These will now also be available as actions, reachable through the
command palette.

<img width="600" alt="Screenshot 2026-06-01 at 8  28@2x"
src="https://github.com/user-attachments/assets/c468b958-9588-4646-a689-6e661a8f6e5a"
/>

Release Notes:

- Exposed actions to switch between the classic and agentic workspace
layout in the command palette.
2026-06-02 23:01:15 +00:00
6d5ab261b9 editor: Stop re-requesting hover and definitions for the same position (#58244)
Holding the go-to-definition modifier (`cmd`/`ctrl`) and moving the
mouse re-issued a `textDocument/definition` request on every mouse-move
event for the same cursor position, because the request deduplication
guard had gone stale, namely:

* `HoveredLinkState::last_trigger_point` was only set when the state was
first created, so the guard for the checking the same position stopped
matching after the first request. It's now refreshed whenever a
definition request is issued, so keeping the mouse on a symbol queries
once instead of on every move. This matters for servers that return a
bare `Location` without an `originSelectionRange` (e.g. phpactor), where
the other guard (`symbol_range`) stays empty and deduplication relies
entirely on `last_trigger_point`.
* The `HoverState::triggered_from` field was dead code, as it was never
written to, so these changes also remove it. The hover-popover path is
already throttled by its show delay, so each mouse move cancels the
pending request before it is sent, with no extra guard needed.

Closes #56193

Release Notes:

- Fixed go to definition repeatedly querying the language server for the
same cursor position

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-06-02 22:00:27 +00:00
Ruslan KiyanchukandMartin Ye 97ac6f280d agent_ui: Add selection to terminal thread (#57301)
## **NOTE:**
I'm new both to Rust and Zed, so it's mostly vibecoded alleged fix for
#57295, just as a PoC of expected behavior that works on macOS. So
please be critical and skeptical of the code, as it may not account for
many nuances and behavior on other platforms.

## Summary

- Fixes #57295: the `Add to Agent Thread` action (or `cmd->`) was a
silent
no-op when a terminal thread was the active conversation in the agent
panel.
- The action's deferred handler only routed through
`active_conversation_view()`,
which returns `None` for `BaseView::Terminal`, so the selection was
dropped.
- Extends the handler with an `else if` branch that, when a terminal
thread is
active, formats the selection as `@<rel-path>:<start>-<end>` (matching
the
  mention syntax CLI agents already understand) and pastes it into the
  terminal, then focuses the terminal so the user can edit/submit.

## Test plan

- [x] Select a range of lines in a buffer, open a terminal thread in the
agent
panel, invoke `Add to Agent Thread` from the context menu → the
formatted
      mention is pasted into the terminal.
- [x] Same flow via the `cmd->` keybinding on macOS.
- [x] Multiple selections in one buffer produce space-separated
mentions.
- [x] `cargo check -p agent_ui` and `./script/clippy -p agent_ui` pass.

## Demo

<img width="2928" height="1920" alt="ScreenShot 2026-05-20 at 21 03 27"
src="https://github.com/user-attachments/assets/dc29f380-a864-4c12-b454-bdb4201f5b8d"
/>


https://github.com/user-attachments/assets/9d3914d8-8ba2-4bcb-be43-78efb342d8a8


## Release Notes:

- Fixed `Add to Agent Thread` being a no-op when a terminal thread is
the active conversation in the agent panel

---------

Co-authored-by: Martin Ye <martin@zed.dev>
2026-06-02 21:22:09 +00:00
Anant GoelandMartin Ye 2465269b05 agent_ui: Improve sandbox write-path authorization UI (#58358)
Updates the sandbox authorization prompt for terminal write-path
requests to show a compact, collapsible list of the requested paths. The
list now matches the edited-files disclosure style, sorts paths for
stable scanning, and uses existing file icons plus muted parent
directories so users can quickly see which locations the command wants
to write to.

This is a UI-only change; sandbox permission behavior remains unchanged.

Release Notes:

- Improved agent sandbox permission prompts by showing requested write
paths in a clearer file list

---------

Co-authored-by: Martin Ye <martin@zed.dev>
2026-06-02 21:06:20 +00:00
Danilo Leal b9dfcae0f9 git_ui: Fix scroll in commit view header (#58360)
Follow up to https://github.com/zed-industries/zed/pull/58274 — this PR
limits the height of the commit description in the header so that it
doesn't grow indefinitely pushing the diff multibuffer out of view.

Release Notes:

- N/A
2026-06-02 20:43:20 +00:00
Albert Bogusz ddf752c410 Fix traffic light padding on macOS SDK 26+ builds (#58245)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] ~~Unsafe blocks (if any) have justifying comments~~ (N/A)
- [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

Corrects the value used for traffic light clearance/padding when
building with the macOS 26 SDK (or later). This was originally fixed in
#45351 but regressed in #48800 where `TRAFFIC_LIGHT_PADDING` was moved
to `ui/src/utils/constants.rs` but the local `build.rs` in `title_bar`
did not apply to the `ui` crate.

Release Notes:

- N/A
2026-06-02 19:59:51 +00:00
Mikhail PertsevandAnthony Eid 9abfeab186 git_ui: Move git_graph into git_ui (#57503)
cc @Anthony-Eid

## Why

This is the first step in moving the Git Graph work into the Git UI
crate before continuing with follow-up refactors and feature work. The
goal is for Git UI components and shared Git UI helpers to live in one
crate, so future changes to the Git Graph can reuse existing `git_ui`
code instead of duplicating it.

This PR is not only a filesystem move. While moving `git_graph` into
`git_ui`, a few small dependency and helper boundaries had to change:

- `git_graph` and `git_ui` both needed the same remote parsing and
commit tooltip construction behavior, so those pieces are now shared
from `git_ui`.
- `git_graph` previously depended on `project_panel` to resolve
file-history actions from the project panel selection. After moving
`git_graph` into `git_ui`, keeping that dependency would create an
undesirable `git_ui` -> `project_panel` relationship. The
project-panel-specific action forwarding now lives in `project_panel`,
and calls into exported `git_ui::git_graph` helpers instead.
- `git_graph` initialization now happens through `git_ui::init`, so
downstream crates only need to initialize `git_ui`.

This prepares the codebase for the next planned PRs: splitting the large
`git_graph.rs` implementation into smaller pieces, then adding Git Graph
features such as keeping the main branch lane at index `0`.

## License removal

The removed `crates/git_graph/LICENSE-GPL` file was a symlink to the
repository root `LICENSE-GPL`. The moved code is now inside `git_ui`,
which is also licensed as `GPL-3.0-or-later` and has its own
`LICENSE-GPL` symlink to the same root license file. The code did not
move to a differently licensed crate; it remains covered by the same GPL
license.

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: Anthony Eid <anthony@zed.dev>
2026-06-02 19:13:17 +00:00
Mikhail Pertsev b369cc24b1 editor: Reduce redundant invalidations (#56234)
So, I am building the "GPUI re-render devtools" in [this
branch](https://github.com/zed-industries/zed/pull/55825)

And while running the new devtools I found a few low-risk
over-invalidation sources and included the easy fixes here:

- Avoid notifying for sticky headers when the computed sticky header
result has not changed.
- Avoid repeated `cx.notify()` calls while overscrolling at the top of
the editor when the scroll position is clamped.
- Give `Button::loading` a keyed animation id so repeat animation frame
requests can be attributed to the concrete loading button instance.

The attached video shows the workflow I used to find these with the new
devtools.


https://github.com/user-attachments/assets/852c64a9-ae91-4878-bbf8-21cc23763c42


Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-02 18:26:18 +00:00
2f6b1a6997 Improve sandbox write-path handling (#58283)
Follow-up hardening on top of #57972 (granular sandbox write
permissions), based on a review of that branch. The most important fix
is that model-requested `fs_write_paths` were joined but never
normalized, so a path containing `..` could pass the lexical
subtree-containment checks while seatbelt canonicalized it to somewhere
else entirely — causing skipped approval prompts and silent runtime
write denials. Write paths are now lexically normalized (via
`util::paths::normalize_lexically`) at the point they enter the system,
both for model requests and for hand-edited persistent grants, so the
containment check, the approval prompt, and the enforced sandbox policy
all operate on the same path.

The subtree insert/prune and containment logic had drifted into roughly
five near-identical copies across `agent`, `agent_settings`, and
`settings_content`; these now share `util::paths::insert_subtree` and
`path_within_subtree`. The dead `SandboxPermissions::covers` (only ever
exercised by its own tests, duplicating the production
`covers_with_persistent`) is removed, and its tests rewritten to cover
the real settings-compilation path including `..` normalization.

The remaining changes reduce brittleness: the sandbox permission option
ids (`allow`, `allow_thread`, `allow_always`, `deny`) are now shared
constants in `acp_thread` instead of bare string literals scattered
across the agent and UI, `persist_sandbox_always_permission` logs
instead of silently doing nothing when no filesystem is available, and a
comment documents why replay always resolves the terminal tool to the
non-sandboxed variant.

Release Notes:

- N/A

---------

Co-authored-by: Martin Ye <martin@zed.dev>
Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
2026-06-02 18:15:07 +00:00
Warya Wayne c7e610011c git_ui: Add total diff stats to git panel (#58018)
Self-Review Checklist:

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

Hello Zed Team, this is my first contribution. I use Zed every day and
have always wanted to see the total for the plus/minus counts in the Git
diff panel. Here is my attempt to make that happen. Please let me know
if there are any issues and I will fix them. Thank you.

Adds git diff stats to the Git panel so users can see the total number
of added and removed lines while reviewing changes.

Verified locally by compiling and running Zed, then confirming the Git
panel displays the diff count as expected.

Release Notes:

- Improved Git panel diff visibility by showing total added and removed
line counts.

<img width="1540" height="1098" alt="zed-add-git-diff-plus-minus-count"
src="https://github.com/user-attachments/assets/5051944e-7cf5-4bb0-81d3-10228e619690"
/>
2026-06-02 17:35:37 +00:00
Dino 92c03633c7 fs: Avoid resolving symlinks when trashing (#58339)
Use `std::path::absolute` instead of `RealFs::canonicalize` to make the
path absolute in `RealFs::trash` as `canonicalize` also resolves
symlinks, so trashing a symlink moved its target to the trash and left
the link dangling.

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
- Not applicable as we don't have a good infrastructure for testing
`RealFs` changes without hitting the machine's actual filesystem and
testing this on `FakeFs` implementation wouldn't prevent a future
regression, unfortunately.
- [x] Performance impact has been considered and is acceptable

Closes #54900 

Release Notes:

- Fixed trashing of symlinks in project panel to actually trash the link
and not its target.
2026-06-02 16:40:34 +00:00
Yara 🏳️‍⚧️ e714e7f97d Remove audio denoiser crate (#57923)
Why: denoise was used on the "new" removed audio pipeline. While we will
(hopefully) reintroduce that later it is currently dead code! Worse dead
code causing issues as the denoise crate breaks compilation on old arm
targets.

denoise (through candle-core) eventually depends on gemm which does not
compile on older arm targets. This is a known issue in gemm (see
sarah-quinones/gemm#31).

Hopefully this will be addressed in gemm before we re-land denoise/new
audio. If it is not we can always compile denoise only for supported
platforms.

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

Release Notes:

- Fixed Zed not compiling on pre ARMv8.2-A machines
2026-06-02 15:49:57 +00:00
Ben Brandt 71f975e514 acp: Update agent-client-protocol sdk to 0.13.1 (#58308)
Brings stable logout and additional directories support as well as
removing dep on rmcp + tokio

This also removed the unstable model selector (replaced awhile ago by
session config options) so it removes all of that code.

Native agent still uses it because we have a special model selector that
would need more work to rip out

Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-02 15:30:37 +00:00
e25ce9e8a0 agent: Implement compaction (experimental) (#58315)
Release Notes:

- N/A

---------

Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-06-02 15:11:58 +00:00