Commit graph

658 commits

Author SHA1 Message Date
Danilo Leal
d4bb640555
git_ui: Remove unused ProjectDiffEmptyState component (#51436)
Just cleaning up our component set a bit. This one wasn't used at all.

Release Notes:

- N/A
2026-03-12 21:09:53 -03:00
Danilo Leal
3c82ddf261
git_ui: Fix "resolve with agent" merge conflict notification (#51290)
Follow up to https://github.com/zed-industries/zed/pull/49807

This PR fixes the merge conflict notification by making it appear only
once per a given set of conflicted paths, as opposed to showing every
time the `ConflictsUpdated` or `StatusesChanged` even would fire.

Release Notes:

- N/A
2026-03-11 11:35:59 -03:00
Lukas Wirth
b21f4a3deb
Prevent remote edits from triggering edit predictions when collaborating (#51196)
BufferEvent::Edited had no way to distinguish local edits from remote
(collaboration) edits. This caused edit prediction behavior to fire on
the guest's editor when the host made document changes.

Release Notes:

- Fixed edit predictions triggering on collaboration guests when the
host edits the document.

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-03-10 15:23:49 +00:00
Danilo Leal
f18567c1f0
git: Add the ability to resolve merge conflicts with the agent (#49807)
This PR adds a "Resolve with Agent" button in each merge conflict block,
as well as "Resolve Conflicts with Agents" button on a notification for
resolving conflicts across all the files that have any. When clicking on
either of these buttons, the agent panel opens up with a template prompt
auto-submitted. For the first case, the specific content of the merge
block is already attached as context for the agent to act quickly, given
it's a local and small context. For the second case (all conflicts
across the codebase), the prompt just indicates to the agent which files
have conflicts and then it's up for the agent to see them. This felt
like a simpler way to go as opposed to extracting the content for all
merge conflicts across all damaged files.

Here's how the UI looks like:

<img width="550" height="1964" alt="Screenshot 2026-02-21 at 11  04@2x"
src="https://github.com/user-attachments/assets/96815545-ba03-40e5-9cb0-db0ce9588915"
/>

---

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:

- Git: Added the ability to quickly resolve merge conflicts with the
agent.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-10 11:19:26 -03:00
Kirill Bulatov
d788673f1e
Do not derive symbol highlights if they do not fit into multi buffer (#50948)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-03-09 15:50:44 +00:00
Piotr Osiewicz
97421c670e
Remove unreferenced dev dependencies (#51093)
This will help with test times (in some cases), as nextest cannot figure
out whether a given rdep is actually an alive edge of the build graph

Closes #ISSUE

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](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-09 13:22:12 +01:00
Dino
0a436bec17
git: Introduce restore and next action (#50324)
Add a `git::RestoreAndNext` action that restores the diff hunk at the
cursor and advances to the next hunk. In the git diff view, the default
restore keybinding (`cmd-alt-z` on macOS, `ctrl-k ctrl-r` on
Linux/Windows) is remapped to this action so users can quickly restore
hunks in sequence. Also refactor `go_to_hunk_before_or_after_position`
to accept a `wrap_around` parameter, eliminating duplicated
hunk-navigation logic in `do_stage_or_unstage_and_next` and
`restore_and_next`.

Release Notes:

- Added a `git: restore and next` action that restores the diff hunk at
  the cursor and moves to the next one. In the git diff view, the
  default restore keybinding (`cmd-alt-z` on macOS, `ctrl-k ctrl-r` on
  Linux/Windows) now triggers this action instead of `git: restore`.

---------

Co-authored-by: Afonso <4775087+afonsograca@users.noreply.github.com>
2026-03-09 10:50:43 +00:00
Smit Barmase
ba8f4d839a
git_ui: Fix mouse cursor hiding when clicking git entry in project diff (#51016)
Release Notes:

- Fixed mouse cursor disappearing when clicking a changed file in the Git Changes panel.
2026-03-07 23:38:28 +05:30
David Alecrim
53fca25ba5
git_ui: Add ability to delete git worktrees from picker (#50015)
Adds the ability to delete a git worktree directly from the worktree
picker, inspired by the existing branch delete functionality.


(`cmd-shift-backspace` on macOS, `ctrl-shift-backspace` on
Linux/Windows).

Screenshot:
<img width="1288" height="466" alt="Screenshot 2026-02-24 at 16 01 05"
src="https://github.com/user-attachments/assets/6ca5048d-63fa-4295-a578-358904bb92eb"
/>

Release Notes:

- Added the ability to delete a git worktree from the worktree picker

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-03-04 21:49:06 +00:00
Anthony Eid
5c91ebf1fe
git: Move diff num stat calculation to repository snapshot layer (#50645)
Follow up on: https://github.com/zed-industries/zed/pull/49519

This PR reworks how Zed calculates diff num stats by moving the
calculation to the `RepositorySnapshot` layer, instead of the
`GitPanel`. This has a couple of benefits:

1. Snapshot recalculations are already set up to recompute on file
system changes and only update the affected files. This means that diff
stats don't need to manage their own subscription or states anymore like
they did in the original PR.
2. We're able to further separate the data layer from the UI. Before,
the git panel owned all the subscriptions and tasks that refreshed the
diff stat, now the repository does, which is more inline with the code
base.
3. Integration tests are cleaner because `FakeRepository` can handle all
the data and calculations of diff stat and make it accessible to more
tests in the codebase. Because a lot of tests wouldn't initialize the
git panel when they used the git repository.
4. This made implementing remote/collab support for this feature
streamline. Remote clients wouldn't get the same buffer events as local
clients, so they wouldn't know that the diff stat state has been updated
and invalidate their data.
5. File system changes that happened outside of Zed now trigger the diff
stat refresh because we're using the `RepositorySnapshot`.

I added some integration tests as well to make sure collab support is
working this time. Finally, adding the initial diff calculation to
`compute_snapshot` didn't affect performance for me when checking
against chromium's diff with HEAD~1000. So this should be a safe change
to make.

I decided to add diff stats on the status entry struct because it made
updating changed paths and the collab database much simpler than having
two separate SumTrees. Also whenever the UI got a file's status it would
check its diff stat as well, so this change makes that code more
streamlined as well.

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.

Release Notes:

- N/A
2026-03-04 18:54:23 +00:00
Richard Feldman
7c9a9d40c0
Add "Start Thread in New Worktree" (#49141)
Add the thread target selector in the agent panel behind the
`agent-git-worktrees` flag:

<img width="590" height="121" alt="Screenshot 2026-03-02 at 11 50 47 PM"
src="https://github.com/user-attachments/assets/17ee3303-7e01-4e40-bb84-1e7e748a3196"
/>

- Add a "Start Thread In..." dropdown to the agent panel toolbar, gated
behind `AgentV2FeatureFlag`
- Options: "Local Project" (default) and "New Worktree"
- The "New Worktree" option is disabled when there's no git repository
or in collab mode

Closes AI-34

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: morgankrey <morgan@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Finn Evers <finn@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: MostlyK <135974627+MostlyKIGuess@users.noreply.github.com>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: John Tur <john-tur@outlook.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Wuji Chen <chenwuji2000@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Kasper Nyhus <kanyhus@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Josh Robson Chase <josh@robsonchase.com>
Co-authored-by: ozacod <47009516+ozacod@users.noreply.github.com>
Co-authored-by: ozacod <ozacod@users.noreply.github.com>
Co-authored-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Lena <241371603+zelenenka@users.noreply.github.com>
Co-authored-by: 0x2CA <2478557459@qq.com>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Co-authored-by: Albab Hasan <155961300+Albab-Hasan@users.noreply.github.com>
Co-authored-by: KyleBarton <kjb@initialcapacity.io>
Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: Tom Houlé <13155277+tomhoule@users.noreply.github.com>
Co-authored-by: Nikhil Pandey <nikhil@nikhil.com.np>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: dancer <144584931+dancer@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-03 15:25:36 +00:00
Oliver Azevedo Barnes
f9895c5468
devcontainer: Fix git output (#49230)
Closes #48434

In Dev Containers, failed git operations were surfaced with a generic
failure message, while the useful git output (stderr/stdout) was not
reliably available to users.

This happened because in devcontainers the git operation errors go
through an RPC layer and then got wrapped with `anyhow::Context` (e.g.
“sending pull request”); the toast displayed only that outer context via
`to_string()`, masking the underlying git stderr message.

This change ensures the full git operation output is preserved and
surfaced via Zed’s “See logs” flow in Dev Containers, matching the
information you get when running the same git command in a terminal.

### What you should expect in the UI
- You will see a generic toast like “git pull failed” / “git push
failed”.
- When clicking on the toast’s “See logs”, the log tab now contains the
full git error output (e.g. non-fast-forward hints, merge conflict
details, “local changes would be overwritten”, etc.), which previously
could be missing/too generic.
---

## Manual testing

Run inside a Dev Container and ensure git auth works (SSH keys/agent or
HTTPS credentials).

1. **Dirty-tree pull failure**
   - Make remote ahead by 1 commit (push from another clone).
   - Locally modify the same file without committing.
   - In Zed: **Pull**  
- **Expect:** toast “git pull failed” + **See logs** shows “local
changes would be overwritten…” (or equivalent).

2. **Non-fast-forward push failure**
   - Ensure remote ahead.
   - Locally create 1 commit.
   - In Zed: **Push**  
- **Expect:** toast “git push failed” + **See logs** shows “rejected
(non-fast-forward)” + hint to pull first.

3. **Merge-conflict pull failure**
- Create conflicting commits on the same lines (one local commit, one
remote commit).
   - In Zed: **Pull**  
- **Expect:** toast “git pull failed” + **See logs** shows conflict
output (“CONFLICT…”, “Automatic merge failed…”).

Release Notes:

- Fixed devcontainer git failure toasts so they show the actual git
error

---------

Co-authored-by: KyleBarton <kjb@initialcapacity.io>
2026-03-02 09:10:12 -08:00
Cole Miller
db02d09331
git: Fix conflicted paths not getting cleared (#50327)
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](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed a bug where files would still be marked as having git conflicts
after resolving them.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-02 13:40:34 +00:00
Lukas Wirth
c05e5859c6
Detect leaked entities at the end of test runs (#50400)
This does not yet allow for finding task <-> entity cycles
unfortunately, but at least it does catch entity <-> entity cycles for
the time being

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 12:04:13 +01:00
Tom Houlé
6a749380aa
Add fast mode toggle in agent panel (#49714)
This is a staff only toggle for now, since the consequences of
activating it are not obvious and quite dire (tokens costs 6 times
more).

Also, persist thinking, thinking effort and fast mode in DbThread so the
thinking mode toggle and thinking effort are persisted.

Release Notes:

- Agent: The thinking mode toggle and thinking effort are now persisted
when selecting a thread from history.
2026-02-26 21:19:41 +01:00
Cole Miller
be5763632d
Start removing callers of legacy excerpt APIs (#50144)
Paving the way to remove `ExcerptId`. Done in this PR:

- Unshipped the stack trace view
- Get rid of `push_excerpts`
- Get rid of some callers of `remove_excerpts`

We still need to remove some calls to `remove_excerpts` and other APIs,
especially in `randomly_edit_excerpts` and collaboration.

Release Notes:

- The stack trace multibuffer view has been removed.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-02-26 10:37:43 -05:00
Cameron Mcloughlin
10bbcdfec5
Side by side diff spacer polish (#50182)
Co-authored-by: Cole Miller <cole@zed.dev>
2026-02-26 10:47:10 +00:00
Bob Mannino
bbbe7239af
git: Add diff stats in git_panel (#49519)
This PR adds the small UI change of `git diff --numstat` to the git
panel so you can see the number of additions/deletions per file. There
is an option in the settings UI for this under `git_panel`.`diff_stats`.
This option is set to `false` by default.

<!-- initial version <img width="1648" height="977" alt="Screenshot
2026-02-18 at 18 42 47"
src="https://github.com/user-attachments/assets/b8b7f07c-9c73-4d06-9734-8f1cf30ce296"
/> -->

<img width="1648" height="977" alt="Screenshot 2026-02-18 at 21 25 02"
src="https://github.com/user-attachments/assets/73257854-6168-4d12-84f8-27c9e0abe89f"
/>


Release Notes:

- Added git diff stats to git panel entries

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-02-25 18:32:22 +01:00
Danilo Leal
13eb0f6832
git_ui: Improve connection between the graph and commit views (#50027)
- Enabled opening the Git Graph, with the corresponding commit detail
drawer open, from the commit view
- Redesigned the commit view's header and toolbar to allow addition of
the Git Graph icon button
- Redesigned icons for the Git Graph and commit view


https://github.com/user-attachments/assets/8efef60a-0893-4752-9b40-838da21ceb54

---

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:

- N/A (_Git Graph is still feature flagged, so no release notes for
now_)
2026-02-25 10:45:14 -03:00
Conrad Irwin
cb793a4667
Fix a panic when git askpass triggers during commit (#50057)
Fixes ZED-597

Release Notes:

- Fixed a panic when the askpass dialogue opened while committing.
2026-02-25 05:55:32 +00:00
Danilo Leal
c58d388d94
git_ui: Hide the ReviewDiff action if branch diff view isn't open (#49988)
This PR hides the `git: review diff` action when not in the branch diff
view, because otherwise, that wouldn't do anything.

Release Notes:

- N/A
2026-02-24 12:37:56 -03:00
Jakub Konka
060d0712f8
workspace: Invert dependency on call crate by extracting into a trait (#49968)
Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2026-02-24 11:19:34 +00:00
ᴀᴍᴛᴏᴀᴇʀ
1c7563c241
git_ui: Make stash picker footers button wrap (#49814)
Closes #48383

An alternative approach would be to use `min_w` instead of `w`, but that
would result in inconsistent widths across the three tabs in the git
picker, causing layout jumps when switching between them. It might be
more appropriate to simply increase the width directly.

|Before|After|
|--|--|
|<img width="932" height="290" alt="CleanShot 2026-02-22 at 02 01 20@2x"
src="https://github.com/user-attachments/assets/a0868cf5-86a0-4375-9cf5-6728a6411ff1"
/>|<img width="970" height="274" alt="CleanShot 2026-02-22 at 02 03
50@2x"
src="https://github.com/user-attachments/assets/acee111c-06ff-48d1-b1c7-c118bdddfcf9"
/>|

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 footer buttons clipped in stash picker when vim mode is enabled
on macOS

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-02-24 02:57:44 +00:00
Danilo Leal
a3c62de696
git_graph: Add some design adjustments (#49899)
- Made hover/active styles, as well as clicks, work for the entire row,
capture the graph element, too (needed to make some manual hover and
other states management to pull that off)
- Used the existing `Chip` component for the branch chip instead of a
local recreation
- Adjusted spacing and sizing of commit detail panel, including button
labels truncation and tooltip content
- Added diff stat numbers for the changed files, to match the commit
view
- Standardized the commit avatar component across the git graph, the
commit view, and the file history view
- Added scrollbar to the changed files uniform list
- Removed author name display redundancy (kept only email)
- Made the commit detail UI have a min-width

<img width="750" height="1964" alt="Screenshot 2026-02-23 at 11  31@2x"
src="https://github.com/user-attachments/assets/d1433bd8-5edb-4829-882b-52b1bffbd6db"
/>

--- 

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:

- N/A

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-02-23 17:07:28 +00:00
Dino
61757aa02b
git: Remove unused actions (#49901)
Remove both `git::LoadMoreHistory` and `git::ViewCommitFromHistory`
actions as although both actions were registered in the workspace, they
don't actually have effect when run.

This appears to have been leftover from
https://github.com/zed-industries/zed/pull/42441 , possibly the initial
implementation on how to open a commit and load more commits when the
file history view was open, which is now handled with `Button.on_click`
callbacks instead of relying on actions.

Closes #49288 

Release Notes:

- Removed unused git actions – `git: load more history` and `git: view
commit from history`
2026-02-23 15:23:32 +00:00
Sakthi Santhosh Anumand
162f4b4770
Use title case for UI labels (#49864)
Use title case everywhere.

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:

- Use title case for UI labels

---------

Signed-off-by: Sakthi Santhosh Anumand <mail@sakthisanthosh.in>
Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
2026-02-23 10:20:31 -05:00
Kavi Bidlack
da93e7dbc6
git_ui: Ignore extraneous links in git output (#49817)
Closes #49746 

Previously, the `LinkFinder` looked at all of the lines, which sometimes
includes links unrelated to the pull request, like a post quantum
cryptography warning that links to
[this](https://www.openssh.org/pq.html) article.

Release Notes:

- When searching for pull request links in git output, only lines that
start with `remote:` are searched.
2026-02-21 21:48:39 +01:00
Cole Miller
930d9321dc
git: Fix panic when unstaged diff is recalculated before its primary diff (#49753)
For inverted diff APIs like `hunks_intersecting_base_text_range`, we
need a snapshot of the main buffer to use as context to compare hunk
anchors, convert anchors to points, etc. Previously, we were always
using a snapshot of the main buffer at the time when the diff was
calculated. This worked well for the hunks of the primary `BufferDiff`,
but it's not valid when the diff also has a secondary set of hunks,
because those hunks are recalculated on their own schedule--so it's
possible for the hunks of the secondary diff to contain anchors that are
newer than the original buffer snapshot that was taken at the time the
primary diff hunks were last calculated. This caused a panic when using
these anchors with the original buffer snapshot.

This PR fixes the issue by using the same approach for inverted diffs as
for non-inverted diffs at the multibuffer level: we take a snapshot of
the main buffer at the time when we snapshot the diff state (including
the diff itself), guaranteeing that that snapshot will be new enough to
resolve all the anchors included in both the primary diff and the
secondary diff.

Closes ZED-54J

Release Notes:

- Fixed a panic that could occur when using the branch diff in split
view mode.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2026-02-20 17:11:30 -05:00
Danilo Leal
56fd9da8a7
git_ui: Add diff stat numbers in Branch Diff view (#49716)
This PR adds the diff stat numbers to the `git: branch diff` view
toolbar.

<img width="550" height="1964" alt="Screenshot 2026-02-20 at 10  58@2x"
src="https://github.com/user-attachments/assets/0fc63b64-ce6e-417a-92b5-8008f2561a8f"
/>

--- 

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:

- Git: Added diff stat numbers to the Branch Diff (`git: branch diff`)
view.
2026-02-20 13:42:47 -03:00
Danilo Leal
b1366c38b3
git_ui: Refine display of the "Review Diff" button (#49710)
This PR makes the "Review Diff" button show up only if the multibuffer
_isn't_ empty and if AI is enabled. It was previously just checking for
the AI setting.

Release Notes:

- N/A
2026-02-20 09:27:16 -03:00
Bennet Bo Fenner
24a81d4e85
git_ui: Remove dependency on agent crates (#49599)
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](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-02-19 14:03:41 +01:00
Richard Feldman
5b0a3de01c
Add agent worktree directory setting + worktree info persistence (#49139)
Add `agent_worktree_directory` to `GitSettings` for configuring where
agent worktrees are stored (default: Zed data dir). Remove `Copy` derive
from `GitSettings`/`GitContentSettings` (incompatible with String field)
and fix downstream `.as_ref().unwrap()` call sites.

Define `AgentGitWorktreeInfo` (branch, worktree_path, base_ref) and add
it to `DbThread` + `DbThreadMetadata` for persistence and session list
display.

Closes AI-33

Release Notes:

- N/A
2026-02-18 22:20:31 +00:00
Danilo Leal
423a8c4b29
git_ui: Add "Review Branch" with agent feature (#49513)
This PR adds a button in the `git: branch diff` view that allows to
quickly and easily send the entire diff to your last used agent for a
review. What this does is automatically submits a (pre-written and
generic) prompt to the last agents you were using in the agent panel
with the whole content of your diff.

<img width="750" height="1964" alt="Screenshot 2026-02-18 at 3  35@2x"
src="https://github.com/user-attachments/assets/493d8cf4-4815-4b01-91a0-6a39ad6219fe"
/>

Release Notes:

- Added a "Review Branch" button in the `git: branch diff` view so that
the whole diff can be quickly sent for review to an agent.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-02-18 19:18:15 -03:00
Danilo Leal
4eb1ffa992
Remove older onboarding modals (#49484)
This PR removes onboarding modals for features that were announced, at
this point, a long time ago: Git v1, Debugger, and Agent Panel v1. This
cleans up the actions list a bit when you search for "onboarding". I
left the ACP and Claude Code ones, though; they were the two more recent
ones, but we should be able to remove them soon enough, too.

Release Notes:

- N/A
2026-02-18 12:17:35 -03:00
Lukas Wirth
7d80412cca
Reduce amount of monomorphizations from FnMut closures (#49453)
Replaces a bunch of `impl FnMut` parameters with `&mut dyn FnMut` for
functions where this is the sole generic parameter.
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-18 12:00:02 +01:00
Cameron Mcloughlin
ee9191ecd2
workspace: Add Toggle actions to all the side panels (#49395)
Release Notes:

- Add `toggle` actions to all panels to toggle visibility

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-17 23:06:27 +00:00
Mayank Verma
96c72c252d
git_ui: Fix tree view next selection out of bounds (#49283)
Closes #49259

Release Notes:

- This change ensures that when the last visible collapsed directory is
selected, the selection remains on that directory.
2026-02-17 20:08:28 +01:00
Anthony Eid
a5dee51fd9
sidebar: Serialize after adding/removing workspaces (#49372)
Before this PR we wouldn't always serialize workspaces when a
mutliworkspace adds/removes a workspace. This PR fixes this by adding a
test and calling serialization in remove

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
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-02-17 12:38:03 -05:00
Danilo Leal
671c3e723e
git_ui: Add button for the branch diff action (#49298)
This PR adds a button in the Git Panel to open the `git: branch diff`
view. The button only shows if the staging area is clean/no changes and
if the branch is not main/master. I've been using this action so much
these days and we should expose it on the UI so it's more discoverable.

<img width="500" height="1736" alt="Screenshot 2026-02-16 at 6  30@2x"
src="https://github.com/user-attachments/assets/0b037811-2167-419f-b63f-9bdb12e4352e"
/>

Release Notes:

- N/A
2026-02-16 18:51:35 -03:00
Jakub Konka
9c889c163d
editor: Batch calls to fold_buffer in ProjectDiff::refresh (#49278)
This change improves performance of project diff in that:
* scrolling in split view for very large diffs (think chromium repo with
`git reset HEAD~1000`) is now very smooth on macOS and fairly smooth on
Linux
* switching from split to unified is very smooth on macOS, and fairly
smooth on Linux

There still remains the case of (severe) hangs when switching from
unified to split however, but it will be addressed in a follow-up PR.

Anyhow, here's the screenshot of the Instruments.app capture of opening
chromium repo in Zed in split view, scrolling a little, moving to
unified, scrolling some more, and moving back to split. Prior to this
change, split -> unified would cause a severe hang, whereas now it's a
hang and thus feels much smoother already (without Instruments profiling
is barely visible). Unified -> split severe hangs are still there but
don't last as long.

<img width="2301" height="374" alt="Screenshot 2026-02-16 at 5 46 23 PM"
src="https://github.com/user-attachments/assets/f687f8d4-cffd-47f1-ada1-f6c4d3ac3cd4"
/>

Release Notes:

- Improved project diff performance when opening very large
diffs/repositories.
2026-02-16 20:58:30 +01:00
Xiaobo Liu
909c147b4b
git_ui: Add git init button to empty repository state (#49203)
Release Notes:

- Git: Added `git init` button that quickly allows to turn an empty
repository into a Git repository.


https://github.com/user-attachments/assets/58b0d49f-b813-4d1c-a086-4bd21d226916

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-02-16 13:36:15 +00:00
Danilo Leal
8afc67345f
git_ui: Fix graph icon button design in the panel (#49099)
Adding the Git Graph icon and adjusting button sizing, spacing, and
positioning within the Git panel.

Release Notes:

- N/A
2026-02-13 10:39:30 -03:00
Xiaobo Liu
cabf404bf7
git_graph: Open graph from Git Panel and Commit Historic view from Git Graph rows (#48842)
Release Notes:

- N/A (still featured flag)


Operations as follows:
1. Click to select
2. Double-click to open diff

Operation demo:


https://github.com/user-attachments/assets/15e583c1-37ea-4166-972d-d2247b9c5fff

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-02-12 23:57:19 +00:00
Richard Feldman
ee3f40fe25
Re-add MultiWorkspace (#48800)
Release Notes:

- Added agent panel restoration. Now restarting your editor won't cause
your thread to be forgotten.

---------

Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Cameron Mcloughlin <cameron.studdstreet@gmail.com>
2026-02-12 01:06:23 +00:00
Mikayla Maki
83de8a25e0
Revert PRs for landing in main (#48969)
We're going to re-apply these after landing the multiworkspace branch.

Release Notes:

- N/A
2026-02-12 00:28:17 +00:00
Cole Miller
b53ff3b893
git: Disable some more expensive things for the split diff's left-hand side (#48953)
- Conflict UI
- LSP data
- Runnables

Release Notes:

- Improved performance when opening the split diff view.
2026-02-11 21:58:55 +00:00
Katie Geer
f233ae4c29
Add telemetry for user-facing notifications (#48558)
## Summary

Adds a "Notification Shown" telemetry event that fires whenever a
user-facing notification is displayed in Zed. This helps the team
understand error patterns, notification frequency, and which parts of
the application generate the most notifications.

## Event Schema

| Property | Type | Description |
|----------|------|-------------|
| `notification_type` | `string` | `"error"` or `"notification"` |
| `source` | `string` | Origin category (e.g., `lsp`, `git`, `settings`,
`editor`) |
| `lsp_name` | `string?` | Language server name (only for LSP
notifications) |
| `level` | `string?` | Severity: `"critical"`, `"warning"`, or `"info"`
|
| `has_actions` | `bool` | Whether the notification has action buttons |
| `notification_id` | `string` | Debug string of the NotificationId |
| `is_auto_dismissing` | `bool` | Whether the notification
auto-dismisses |

## NotificationSource Categories

A new `NotificationSource` enum categorizes notifications by origin:

- `lsp` - Language server notifications
- `settings` - Settings/keymap parse errors
- `update` - App updates, release notes
- `extension` - Extension suggestions/errors
- `git` - Git operations, commit errors
- `project` - Project-level issues
- `collab` - Collaboration notifications
- `remote` - SSH/remote project errors
- `file` - File access errors
- `editor` - Editor operations (search, encoding)
- `agent` - AI assistant notifications
- `cli` - CLI installation
- `system` - Generic fallback

## Privacy

**Message content is intentionally not included** in telemetry because:
- LSP messages come from external servers and may contain file paths or
error chains
- Error messages may contain sensitive paths or API-related information
- The metadata alone provides sufficient insight for error tracking

## Implementation

Updated function signatures to include `NotificationSource`:
- `show_notification(id, source, cx, build_fn)`
- `show_toast(toast, source, cx)`
- `show_error(err, source, cx)`
- `show_app_notification(id, source, cx, build_fn)`
- `notify_err(workspace, source, cx)`
- `notify_async_err(source, cx)`
- `notify_app_err(source, cx)`
- `detach_and_notify_err(source, window, cx)`

Release Notes

- N/A (internal telemetry change)

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-11 10:21:37 -08:00
Jakub Konka
975d5acc64
ztracing: Annotate more callsites that invoke TreeSitter (#47522)
Release Notes:

- N/A
2026-02-11 11:24:04 +00:00
Cole Miller
f7314976bd
git: Enable the split diff for everyone (#48912)
Release Notes:

- Added support for viewing diffs in split ("side by side") mode
2026-02-11 06:28:55 +00:00
Cole Miller
c8054cacbd
git: Fix searching in the split diff (#48894)
- Fix panics caused by reusing cached matches for the wrong side
- Highlight matches on the side that was searched only
- Clear matches in non-searched editor when initiating a new search

Release Notes:

- N/A

---------

Co-authored-by: Eric <eric@zed.dev>
Co-authored-by: Jakub <jakub@zed.dev>
2026-02-10 23:29:51 +00:00