71667cf
sidebar: Fix workspace and project leaking on window close (#52169)
Click to expand commit body
Release Notes: - n/a
Lukas Wirth created
71667cf
sidebar: Fix workspace and project leaking on window close (#52169)
Release Notes: - n/a
Lukas Wirth created
4466d10
agent_ui: Fix pasted image context showing Image instead of actual filename (#52082)
## What Fix image context mentions always showing the generic label `Image` instead of the actual filename when pasting from Finder or picking via the `+` → Image button in the Agent Panel. ## Why `insert_images_as_context` hardcoded the crease label to `MentionUri::PastedImage.name()` (`"Image"`) for every image, regardless of whether it originated from a named file. Both code paths that load images from file paths — `paste_images_as_context` and `add_images_from_picker` — discarded the filename before passing images to the shared insert function. ## Fix - `agent_ui/src/mention_set.rs`: Changed `insert_images_as_context` to accept `Vec<(gpui::Image, SharedString)>` instead of `Vec<gpui::Image>`, using the provided name as the crease label. In `paste_images_as_context`, extract `file_name()` from each path and pair it with the loaded image. Raw clipboard images (screenshots, copy from image editors) continue to use `"Image"` as there is no filename. - `agent_ui/src/message_editor.rs`: Same fix for `add_images_from_picker` — extract `file_name()` from each selected path and pass it alongside the image. Closes #52079 ## Test Plan - [x] `cargo build -p agent_ui` compiles clean - [x] `cargo fmt --all -- --check` format check - [x] Manual verification of: - [x] Copy an image file in Finder (`Cmd+C`), paste into Agent Panel — mention shows actual filename - [x] `+` → Image → pick a file — mention shows actual filename - [x] Screenshot paste (`Cmd+Shift+4`) still shows `Image` - [x] Regular text paste still works ## Screenshots <img width="638" height="569" alt="image" src="https://github.com/user-attachments/assets/859d852c-66f6-4faa-a5fe-59bd34cd3d85" /> --- Release Notes: - Fixed image context mentions always showing `Image` instead of the actual filename when pasting from Finder or using the image picker in the Agent Panel
Suphachai Phetthamrong created
cf4848d
agent_ui: Focus prompt editor when clicking start in git worktree (#52181)
Release Notes: - N/A
Bennet Bo Fenner created
70d1940
agent_ui: Remove duplicated function from agent panel (#52179)
Release Notes: - N/A
Bennet Bo Fenner created
6f2e4b0
ep: Store cumulative and average log-probabilities of predictions (#52177)
For now, the only source of logprobs is `./run.py infer`, which writes them to under the `.predictions` struct. `ep score` copies these values to `.score`. There is some duplication (same value stored in two places), which is unfortunate, but can't be fixed without reworking how scores are stored. Release Notes: - N/A
Oleksiy Syvokon created
4b1a2f3
search: Fix focus replacement field when opening replace (Ctrl+H) (#51061)
Previously, focus stayed on the search bar because a pre-focus check `handle.is_focused(window)` was always false at deploy time. 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: When opening find-and-replace with `Ctrl+H`, the replacement input is now focused instead of the search bar.
Giorgi Merebashvili created
b1e8473
git_ui: Support side-by-side diff view in clipboard selection diff (#51966)
#### Context Switches `TextDiffView` from using `Editor` directly to `SplittableEditor`, enabling side-by-side diff view support for "Diff Clipboard with Selection". The diff view now respects the user's `diff_view_style` setting. Split out from #51457. This PR contains only the `SplittableEditor` wiring. The multibuffer coordinate fix for non-singleton editors will follow in a separate PR. Closes #50912 (partially) #### How to Review Small PR — all changes are in `crates/git_ui/src/text_diff_view.rs`. Focus on: - `new()`: `SplittableEditor::new` replaces `Editor::for_multibuffer`, editor-specific setup goes through `rhs_editor()` - Item trait delegation: `act_as_type`, `for_each_project_item`, `set_nav_history` updated for `SplittableEditor` - Tests: pinned `DiffViewStyle::Unified` and assertions go through `rhs_editor()` #### 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) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable #### Video : [Screencast from 2026-03-19 23-11-36.webm](https://github.com/user-attachments/assets/c5a2381d-238d-43ef-ac6f-9994996c0c69) #### Release Notes: - Improved "Diff Clipboard with Selection" to support side-by-side diff view style.
Om Chillure created
b4bd3ff
ep: Add new prompt format (#52167)
This PR adds `v0318`, which is just like `v0316` but with bigger blocks. It seems to perform best so far. It also adds heuristics to avoid placing the marker token on closing braces, which results in much nicer blocks. Finally, it fixes a bug with inserting `<|marker_N|>` mid-line in `v0316` and `v0317`. Release Notes: - N/A
Oleksiy Syvokon created
8b822f9
Fix regression preventing new predictions from being previewed in subtle mode (#51887)
## Context
<!-- What does this PR do, and why? How is it expected to impact users?
Not just what changed, but what motivated it and why this approach.
Link to Linear issue (e.g., ENG-123) or GitHub issue (e.g., Closes #456)
if one exists — helps with traceability. -->
Fixes some issues with https://github.com/zed-industries/zed/pull/51842
Namely that the tests were scattered and not well organized (this PR
also makes them more thorough), and a regression where holding the
modifiers for the accept prediction keybind would not cause an incoming
prediction to be immediately previewed.
## 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:
- (Preview v0.229.x only) Fixed a regression where holding the modifiers
for the accept edit prediction keybind would not immediately preview
predictions as they arrived
Ben Kunkle created
fb1a98c
multi_workspace: Add actions to cycle workspace (#52156)
Cameron Mcloughlin created
42e7811
sidebar: Fix highlighting "new thread" element after cmd-n (#52105)
Danilo Leal created
87cf32a
agent: Set message editor language to markdown (#52113)
Cameron Mcloughlin created
e8d2627
Fix incorrect rainbow bracket matching in Markdown (#52107)
## Context Fixes #52022. Rainbow bracket matching could become incorrect when tree-sitter returned ambiguous bracket pairs for the same opening delimiter. The repair path rebuilt pairs using a shared stack across all bracket query patterns, which let excluded delimiters like Markdown single quotes interfere with parenthesis matching. This change scopes that repair logic to each bracket query pattern so ambiguous matches are rebuilt without mixing unrelated delimiter types. It also adds a regression test for the Markdown repro from the issue. <img width="104" height="137" alt="image" src="https://github.com/user-attachments/assets/4318bb4d-7072-4671-8fb5-c4478a179c07" /> <img width="104" height="137" alt="image" src="https://github.com/user-attachments/assets/07a8a0fc-7618-4edb-a14e-645358d8d307" /> ## How to Review Review `crates/language/src/buffer.rs` first, especially the fallback repair path for bogus tree-sitter bracket matches. Then review `crates/editor/src/bracket_colorization.rs`, which adds regression coverage for the issue repro. ## 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: - Fixed rainbow brackets in Markdown when quotes caused parentheses to match incorrectly
Kai Kozlov created
e126857
sidebar: Add another round of refinements (#52101)
- Change the branch button's tooltip to be more accurate given it displays more stuff than only branches - Hide the worktree dropdown menu when in a non-Git repo project - Improve provisioned title truncation - Remove the plus icon from the "view more" item to improve sidebar's overall feel - Remove the always visible "new thread" button but make it visible only when you're in an empty thread state - Add worktree icon in the thread item and tooltip with full path - Space out the worktree name from the branch name in the git picker in the title bar - Swap order of views in the git picker to "worktree | branches | stash" - Improve the "creating worktree" loading indicator --- <!-- 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
Danilo Leal created
4a965d1
Feat unbind (#52047)
## Context
This PR adds an `Unbind` action, as well as syntax sugar in the keymaps
for declaring it
```
{
"unbind": {
"tab: "editor::AcceptEditPrediction"
}
}
```
Is equivalent to
```
{
"bindings": {
"tab: ["zed::Unbind", "editor::AcceptEditPrediction"]
}
}
```
In the keymap, unbind is always parsed first, so that you can unbind and
rebind something in the same block.
The semantics of `Unbind` differ from `NoAction` in that `NoAction` is
treated _as an action_, `Unbind` is treated as a filter. In practice
this means that when resolving bindings, we stop searching when we hit a
`NoAction` (because we found a matching binding), but we keep looking
when we hit an `Unbind` and filter out keystroke:action pairs that match
previous unbindings. In essence `Unbind` is only an action so that it
fits cleanly in the existing logic. It is really just a storage of
deleted bindings.
The plan is to rework the edit predictions key bindings on top of this,
as well as use `Unbind` rather than `NoAction` in the keymap UI. Both
will be done in follow up PRs.
Additionally, in this initial implementation unbound actions are matched
by name only. The assumption is that actions with arguments are bound to
different keys in general. However, the current syntax allows providing
arguments to the unbound actions. Both so that copy-paste works, and so
that in the future if this functionality is added, keymaps will not
break.
## How to Review
- The dispatch logic in GPUI
- The parsing logic in `keymap_file.rs`
## 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:
- Added support for unbinding key bindings from the default keymaps. You
can now remove default bindings you don't want, without having to
re-declare default bindings that use the same keys. For instance, to
unbind `tab` from `editor::AcceptEditPrediction`, you can put the
following in your `keymap.json`
```
[
{
"context": "Editor && edit_prediction",
"unbind": {
"tab": "editor::AcceptEditPrediction"
}
}
]
```
Ben Kunkle created
0f1e8a6
agent: Fix summarization model being cleared by unrelated registry events (#52080)
## Context We were seeing lots of pending title generation, which should only happen if we don't have a summarization model. `handle_models_updated_event` unconditionally overwrote the thread's summarization model on every registry event, even with `None`. We should only setting if explicitly changed by the user or we haven't set it yet, and only if we actually have one. It is hard to reproduce this issue.. but I don't think this code was right in the first place anyway. ## 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
Ben Brandt created
aabc967
Swap arrayvec crate for heapless to use LenT optimization (#47101)
Swaps the `arrayvec` dependency for `heapless`, as the `heapless` library allows changing the type used for the `len` field, which `arrayvec` hard-codes to `usize`. This means that, for all the `ArrayVec`s in Zed, we can save 7 bytes on 64 bit platforms by just storing the length as a `u8`. I have not benchmarked this change locally, as I don't know what benchmarking tools are in this project. As a small bit of context, I wrote the PR to `heapless` to add this `LenT` generic after seeing a PR on the `arrayvec` crate that seems to be dead now. Once I saw some of Zed's blog posts about the `rope` crate and noticed the usage of `arrayvec`, I thought this might be a welcome change. Release Notes: - N/A --------- Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Gnome! and Piotr Osiewicz created
abec0ef
ci: Run clippy for x86_64-apple-darwin target (#52036)
Release Notes: - N/A --------- Co-authored-by: Finn Evers <finn@zed.dev> Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Cole Miller , Finn Evers , and Jakub Konka created
d663dbb
gpui_macos: Fix x86_64 build error in Submenu (#52059)
Missed in #52028. Release Notes: - N/A
Tree Xie created
17e4b49
livekit_client: Screensharing on Niri + NixOS (#52017)
Release Notes: - Fixed a weird niche interaction between niri and nixos that broke screensharing --------- Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Cameron Mcloughlin and Jakub Konka created
b99200f
agent: Add update_plan tool (#52048)
## Context Adds a tool to utilize the UI we already expose to ACP agents. Behind a feature flag for now. ## How to Review Mostly a tool to hook up to all of the plan plumbing we already have in acp thread. ## 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
Ben Brandt created
268f1d2
Ensure that sidebar toggle button works, regardless of focus (#52045)
Previously, the sidebar toggle worked via an action, which is dependent on what is focused. I changed it to directly call a method. Release Notes: - N/A
Max Brunsfeld created
3ee2f5b
acp: Add agent websites to the registry page (#52002)
## 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)
## 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)
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)
## 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)
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)
## 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)
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)
Release Notes: - N/A *or* Added/Fixed/Improved ...
Lukas Wirth created
8f0826f
acp: Set agent server cwd from project paths (#52005)
## 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)
## 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)
Release Notes: - N/A
Jakub Konka created
d30ceba
agent_ui: Update thread metadata on more thread events (#52010)
## 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)
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)
## 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)
## 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)
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)
## 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)
## 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)
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)
## 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)
## 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)
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)
Release Notes: - N/A -
John Tur created
c1cbea1
Fix crash in apply text buffer operations found when opening a channel notes (#51978)
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)
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)
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)
## 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)
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