A FIFO named `.git` in a project made the worktree scanner block forever
in open(2) while it held its state lock.
Everything waiting on the scanner hung with it: agent file tools,
project search and file opens.
Zed now checks the file type before reads that can stall shared state,
and treats a FIFO there as unreadable:
- the worktree scanner: the `.git` file and `commondir` of every
repository it finds, `.gitignore` and `info/exclude`;
- project settings files, which load as one batch;
- `MERGE_MSG`, the commit template and a linked worktree's `.git` file,
read on a repository's git job queue;
- the agent's rules files and project skills, which build the project
context of every agent thread.
#67426 already added a regular-file check for `objects/info/alternates`
and for the `.git` file and `commondir` reads of
`discover_confirmed_root_repo_metadata`.
Files that the user or the agent opens directly keep the current
behaviour and may wait for a writer, because tools such as 1Password
serve `.env` files as named pipes.
On the git job queue, files that git itself blocks on, such as
`shallow`, get no extra check.
The Cargo registry permalink fallback read `.cargo_vcs_info.json` and
`Cargo.toml` with `std::fs` on the main thread.
It now reads them through `Fs` on a background thread, and in remote
projects it returns no permalink instead of reading the local disk at
the remote path.
Release Notes:
- Fixed certain FS entries stalling agent threads and git scans
## Summary
Closes#65834
In project search, the query text starts a few pixels to the right of
the Include/Exclude text, which makes it look like the query begins with
a space.
The query and replace inputs are `AutoHeight` editors. `Editor::new`
enables `offset_content` for every mode except `SingleLine`, and that
adds a gutter margin (the font's descent) before the text. The
Include/Exclude inputs are `SingleLine` editors and get no margin. Both
sit inside the same `input_base_styles` padding, so the texts end up
misaligned.
I disabled `offset_content` on the query and replacement editors in both
project search and buffer search, so all search inputs now start their
text at the same inset. The doc comment on `set_offset_content` mentions
this case directly (aligning editor text with text above or below it).
Before (from the issue):
https://github.com/user-attachments/assets/a3c6befe-313e-4f55-9cd8-5b826d0898bd
After:
<img width="986" height="164" alt="image"
src="https://github.com/user-attachments/assets/d529b272-2c74-4543-879d-d706a5c705bf"
/>
## Testing
- macOS, debug build: opened project search (`cmd-shift-f`), turned on
the filters, and checked that "Search all files…" and "Include: e.g.
src/**/*.rs" start at the same x position.
- `cargo test -p search` passes (101 tests).
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed project search query text being misaligned with the
Include/Exclude filter inputs.
- Fixed search and replace inputs having extra left padding compared to
other inputs.
## Summary
`search::ReplaceNext` and `search::ReplaceAll` only work while focus is
in the buffer search bar. Bound in the `buffer_search_deployed` context,
they do nothing from the editor, unlike `search::SelectNextMatch`.
Both actions are now registered for the pane, like the other search
actions. Inside and outside the search bar, they run only while the
replace input is visible, so a hidden replacement can't overwrite
matches.
Workspace-level search actions now go to the focused pane instead of the
center pane, so search actions in the terminal panel no longer act on
the editor's search bar. `Workspace::focused_pane` now also finds zoomed
dock panels, which render outside their dock. The debug panel has no
`Panel::pane`, so its Terminal tab still sends them to the editor's
search bar, as on `main`.
With vim mode on, `vim::SearchSubmit` now propagates when the focused
pane has no vim editor or does not contain the focus, so `enter` selects
the next match in the search bars of the terminal panel and the
debugger's Terminal tab.
Closes#66518
## Testing
- To reproduce, bind `ctrl-r` to `search::ReplaceNext` in the
`buffer_search_deployed` context, open the search bar in replace mode,
fill in both fields, focus the editor, and press `ctrl-r`. Nothing
happens.
- Tested on Linux. On `main`, neither action changes the buffer. On this
branch, `search::ReplaceNext` replaces one match per press and
`search::ReplaceAll` replaces the rest.
- The test dispatches both actions from the editor, from the search bar
with the replace input hidden, and from a docked and a zoomed panel with
its own pane and a panel without one, then checks the buffer text and
the replace toggle.
- Each part of `test_replace_with_editor_focused` fails without its fix.
- `test_search_submit_without_vim_editor` presses `enter` in the search
bar of an editor without vim and checks that the next match is selected.
It fails without the fix.
- `test_search_submit_outside_pane` does the same in a search bar
outside the panes, with a vim editor in the center pane.
It fails without the focus check.
- `cargo test -p search -p workspace -p file_finder -p terminal_view -p
vim --lib` and `./script/clippy -p search -p workspace -p vim` pass.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed `search::ReplaceNext` and `search::ReplaceAll` doing nothing
when the editor is focused while the buffer search bar is open, search
actions in the terminal panel acting on the editor's search bar, and
`enter` not selecting the next match in terminal search bars with Vim
mode on
https://github.com/user-attachments/assets/69be3dc7-9fb7-4c45-9aea-e6799db9725d
---------
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
## Summary
Closes#65567
Dev container mounts kept only source, target and type, so `readonly`
was silently dropped and read-only bind mounts ended up writable. All
three mount parsers (`mounts`, `workspaceMount`, image metadata) had
this.
This replaces them with one `MountDefinition::parse` that follows
Docker's `--mount` syntax. Other options are passed to `docker run
--mount` unchanged, like the devcontainers CLI does. Compose gets
`read_only: true`; other options still aren't mapped there, same as the
reference CLI.
Quoting now follows Docker's CSV rules too, so a project path containing
`,` or `"` gets the right workspace mount, and an unquoted
`source=/path/a,b` is rejected by Docker as it is with the devcontainers
CLI.
## Testing
- Added tests for parsing, the `docker run` arguments and the Compose
override. They fail on `main` and pass with this change.
- Built Zed locally, used "Open in Container" with a `readonly` bind
mount and tried writing to it. Before: the write succeeded. After:
"Read-only file system", for both image and Compose configs. Normal
mounts stay writable.
```
$ echo probe > /ro/probe.txt
sh: can't create /ro/probe.txt: Read-only file system
```
To test: create a `data` folder, add `"mounts":
["source=${localWorkspaceFolder}/data,target=/data,type=bind,readonly"]`
to devcontainer.json, open it in a container and run `touch /data/x`.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed dev container `mounts` ignoring `readonly`, which made read-only
bind mounts writable. Existing dev containers must be removed (for
example, `docker rm -f <container>`) to get read-only mounts.
## Summary
On macOS, child processes inherit Zed's Mach exception port.
`crash-handler` 0.8.0 replies to their exceptions as handled, so a child
that faults retries the instruction forever instead of receiving its
signal.
[0.8.1](https://github.com/EmbarkStudios/crash-handling/pull/126) passes
these exceptions on to the kernel.
Closes#67287Closes#60389
## Testing
- To reproduce, run the program from either issue as a task on macOS. It
hangs instead of exiting.
- Tested on macOS 26
[arm64](https://github.com/ptweezy/zed/actions/runs/45244310375/job/137936952458)
and macOS 15
[x86_64](https://github.com/ptweezy/zed/actions/runs/45244310375/job/137936951965)
runners, with a small program that attaches the handler as Zed does and
spawns each issue's program. Not tested in a full Zed build on macOS.
- With 0.8.0, both programs hang until killed.
- With 0.8.1, the Go program prints `<nil>` and the C program exits with
`SIGSEGV`.
- `crash-handler`'s `foreign_task` test fails on 0.8.0 and passes on
0.8.1 on both runners.
- `cargo test -p crashes` and `./script/clippy -p crashes` pass on
Linux.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed programs launched from Zed hanging on macOS when they crash
Closes#66915
## Summary
Zed canonicalizes a folder's path when it opens it, so a worktree root
always has its on-disk spelling. Persisted trusted paths don't. They
keep the casing they had when they were saved. On Windows the two can
drift apart, for example after renaming `Project` to `project`. The
trust check then compares `C:\dev\project` with `C:\dev\Project`, fails,
and the worktree's `.zed/debug.json`, tasks, and settings never load.
The fix happens while a local worktree is created. In
`create_local_worktree`, before `Worktree::local` starts scanning and
before the worktree is added to its store, Zed looks for persisted local
trusted paths that match the worktree path only when case is ignored. It
resolves those through the project's `Fs`, with `Fs::canonicalize` like
the worktree path itself, so mapped drive letters are kept, and trusts
their on-disk spelling in that store. Nothing can check the worktree's
trust before it's added, so the first check already sees the corrected
grant.
What it does and doesn't touch:
- The filesystem decides whether two spellings are the same directory.
In a case-sensitive directory, `safe` and `SAFE` stay separate.
- Path components are checked from the root down, and the lookup stops
at the first symlink or junction, so nothing under a link is looked up.
The check uses a new `Fs::is_symlink`, which neither follows a path nor
needs read access to it, so a parent that can be traversed but not
listed doesn't block the correction. Only local drive paths are
resolved, `C:\` and the extended-length `\\?\C:\` form kept by paths
longer than `MAX_PATH` alike; UNC paths (network shares,
`\\wsl.localhost`) are skipped.
- Only case variants of the new worktree's own ancestors are looked up.
Unrelated saved paths aren't touched, and startup does no extra work.
- It only runs on Windows, only for local stores tracked for trust, and
not when the store's own grants already cover the worktree path.
- Nothing restricted gets lifted, no events are sent, and `can_trust`,
`trust`, and remote hosts are unchanged.
Known limits:
- Only ASCII casing differences are handled. Other paths stay
restricted, the same as today.
- A worktree root that moves after it's opened isn't resolved again,
also the same as today.
- There's a small window between the link check and the lookup. Winning
it requires permission to replace the trusted folder, and with that
permission someone can already put their own folder at the trusted path,
which is trusted today anyway.
## Testing
Windows tests in `crates/project`:
- `test_debug_scenarios_load_with_differently_cased_db_trusted_path`:
the reported symptom. A test-only hook holds the casing resolution while
everything else runs, then releases it: the worktree is never restricted
and its `debug.json` scenario loads. With the lookup placed after
`Worktree::local`, the scan finishes during the hold and the test fails.
- `test_differently_cased_db_trusted_parent_path`: a saved `DEV` parent
trusts `Dev\one` and `Dev\two` opened one after the other in two tracked
stores registered beforehand, but not in a worktree store that isn't
tracked for trust.
- `test_db_trusted_path_in_case_sensitive_directory`: uses `fsutil file
setCaseSensitiveInfo` to make a real case-sensitive directory. Trusting
`safe` doesn't trust `SAFE`, and the junctions `link` -> `LINK` and
`parent` -> `PARENT` (with `project` inside) don't extend trust to their
targets. If the machine can't enable case sensitivity, the test prints a
message and returns early.
- `test_differently_cased_db_trusted_path_longer_than_max_path`: a
project path over 260 characters trusted directly, and a short `\\?\`
parent grant over one, both kept in their `\\?\` form.
- `test_differently_cased_db_trusted_path_under_unlistable_parent`:
denies listing a parent directory with `icacls` and checks that a
differently cased grant still trusts the project below it. It skips if
the deny doesn't apply, e.g. on an admin account.
- `test_db_trusted_paths_on_case_sensitive_fake_fs`: the same cases on a
case-sensitive `FakeFs`, so they run everywhere: distinct `safe`/`SAFE`
directories, a nonexistent `ONLY` spelling, and links to targets
differing only by case, in the leaf and in a parent directory.
- `test_differently_cased_db_trusted_path_on_mapped_drive`: maps a free
drive letter to the temp directory through `\\localhost\C$` (`net use
/persistent:no`) and checks that a differently cased grant on that drive
trusts the worktree. It skips if no drive can be mapped.
Each test fails if I remove the part of the fix it covers: the
respelling, the link check, checking only the last component, or the
tracked-store check. `cargo test -p project` passes on Windows. I
couldn't run Linux or macOS locally, but the new code returns right away
there.
Video: to follow.
Release Notes:
- Fixed project settings, tasks, and debug scenarios not loading on
Windows when a trusted folder's saved path casing differed from the
folder on disk.
## Summary
follow-up on https://github.com/zed-industries/zed/pull/66973,
https://github.com/zed-industries/zed/pull/66990 and
https://github.com/zed-industries/zed/pull/67008.
While working on https://github.com/zed-industries/zed/pull/66973,
https://github.com/zed-industries/zed/pull/66990 and
https://github.com/zed-industries/zed/pull/67008 I noticed that we spend
alot of time in the `watcher_ids_covering` method, which those PR's
already reduced the total time spent from **22.29s** to **11.14s** which
is already **~50%**.
But we can do better ofcourse :), my idea was to reduce the amount of
iterations we do on ancestors that never can get matched because their
path depth is to big compare to the largest registration path. So by
figurering out the the max depth to check for a event path we could skip
not needed work like hashing and normalizing path ancestors if there is
no way we are ever going to match it against a registration.
This PR reduced the total time spent inside the `watcher_ids_covering`
method from **11.14s** to **2.39s** :). It does this by avoiding
attempts to match event path ancestors at depths where no watcher
registrations exist, while also skipping unnecessary case folding of
path suffixes that cannot possibly match.
| Operation | FxHashMap change | ancestor filtering | Reduction |
|---|---:|---:|---:|
| Ancestor matching, including callees | 11.14 s | **2.79 s** |
**75.0%** |
| Map lookups within matching | 7.49 s | **0.40 s** | **94.6%** |
| Path folding within matching | 0.84 s | **0.51 s** | **39.7%** |
| Dispatch batches, including callees | 13.16 s | **4.73 s** | **64.1%**
|
**Before**:
<img width="1277" height="463" alt="Screenshot 2026-11-15 at 17 37 36"
src="https://github.com/user-attachments/assets/402a5ffe-90ff-48a7-a9e9-5905eba3b541"
/>
**After**:
<img width="1278" height="462" alt="Screenshot 2026-11-21 at 00 20 53"
src="https://github.com/user-attachments/assets/757b76ef-dc39-4417-abc6-518b7aa07d6a"
/>
## Testing
I added tests that validate the depth matching works as expected and all
other fs_watcher tests pass. I also don't expect behavior change since
we removed/reduced a path that never could have been matched. So this
should also be a pure performance gain.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Improved responsiveness during heavy filesystem activity by reducing
filesystem watcher path-matching overhead.
## Summary
A tab leaves `\t` in the blank cell where it starts.
The terminal element batches that cell into the next text run, and
shaping advances `\t` to the text system's next tab stop instead of by
one cell.
When that advance is under half a cell, the cell-width snapping in
`apply_force_width_to_layout` takes the next glyph for a combining mark,
so the rest of the run is drawn one column to the left.
On macOS, CoreText puts tab stops every 28 px and gives no advance past
336 px, so this happens to every tab cell that far into a run and to
cells just before a stop.
Tab cells are now laid out as spaces, as Alacritty draws them.
This also covers tab cells with a background color.
Closes#66543
## Testing
The `\r\t` at column 0 from the issue draws correctly on current `main`
on macOS, and #66468 gave Windows tabs their DirectWrite advance after
the build from the issue.
These lines show the shift on `main` on macOS with the default font, and
both pairs line up with this change:
```sh
printf 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa numbering past nine options.\n'
printf 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa numbering past nine options.\r\033[45C\t\n'
printf 'abc numbering past nine options.\n'
printf 'abc numbering past nine options.\r\033[3C\t\n'
```
- The test writes `\r\t` over plain and colored text in a display-only
terminal and checks that no text run contains `\t`.
- `test_layout_grid_draws_tab_cells_as_spaces` fails without this
change.
- `cargo test -p terminal_view --lib` and `./script/clippy -p
terminal_view` pass.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed terminal text being drawn one column to the left after a tab
moves the cursor over it
---------
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
## Summary
`LspStore` keeps per-buffer LSP data, including a snapshot of the
buffer's text and cached results such as document colors and links.
Local projects remove it when the buffer's last language server handle
is released. Remote development projects get the same handles, but
nothing observes their release, so the entries stayed after the buffer
closed.
This change removes a buffer's LSP data and reload task when the buffer
store reports the buffer dropped. Collab guests aren't covered: they
keep every buffer in `shared_with_me` until they leave the project, so
`BufferDropped` never fires for them.
## Testing
- `test_remote_lsp_data_dropped_with_buffer` fails without the change.
- `cargo test -p remote_server --lib` and `./script/clippy -p
remote_server -p project` pass on Windows.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Improved memory usage in remote projects after closing files.
## Summary
`skip_focus_for_active_in_search` only skips the active file when it's a
history match. With `project_panel.hide_root`, a query that matches only
the file's directory isn't a history match, so the active file stays
selected.
The active file is now skipped for search matches too.
Closes#59019
## Testing
- To reproduce, enable `project_panel.hide_root`, open a file in a
folder, and search for the folder's name in the file finder.
- Tested on Linux. On `main`, the active file stays selected. On this
branch, the next file is selected.
- `test_skip_active_file_matched_by_directory` fails without this
change.
- `cargo test -p file_finder --lib` and `./script/clippy -p file_finder`
pass.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed `skip_focus_for_active_in_search` when searching by directory
with `project_panel.hide_root` enabled
https://github.com/user-attachments/assets/d8db07f1-c3d5-4947-8314-cbe6f94890c8
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
Last night Gemini models kept failing right before they finished. A
chunk carried `citationMetadata` without `citationSources`,
deserializing `CitationMetadata` failed, and the response was treated as
a failure. The hosted path is fixed in Cloud; this PR adds the same
default to the field in Zed's client, so requests made directly to the
Gemini API don't fail the same way.
Release Notes:
- Fixed Gemini responses failing when they included citation metadata
without citation sources.
## Summary
`search::ToggleSelection` uses the raw selection. In Vim visual line
mode, the search range then starts and ends at the cursor columns
instead of covering the selected lines.
Search now uses the full lines in line mode.
Closes#42369
## Testing
- To reproduce, enter visual line mode from the middle of a line, select
another line, run `vim::Search` and `search::ToggleSelection`, then
search.
- Tested on Linux. On `main`, matches outside the cursor columns are
skipped. On this branch, they're found.
- `test_find_matches_in_line_mode_selections` fails without this change.
- `cargo test -p search -p editor -p vim --lib` and `./script/clippy -p
editor -p search` pass.
### Showcase
https://github.com/user-attachments/assets/3be687c0-99df-48de-8a57-f43ab924dbf6
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed `search: toggle selection` to select the whole buffer lines when
used within Vim's visual line mode
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
Add Zed-hosted pricing and context limits for Gemini 4 Carbon, Neon, and
Hydrogen and GPT-6.2 Astra and Sol. Clarify how Gemini 4 cache hits are
billed, document the 65,536-token output cap, and note that GPT-6.2 Fast
mode doubles token rates on Zed Pro and Business.
Release Notes:
- N/A
Updates the Docker file icon to match Docker's current logo. The
previous icon used the old whale-and-containers mark; the new one is the
updated whale mark, redrawn as a single black-filled path on the
standard 16x16 viewBox.
Release Notes:
- Improved the Docker file icon to match Docker's new logo.
## Summary
The Amazon Bedrock provider had a hard-coded model list, so every new
model needed a Zed release. It now asks Bedrock which models the account
can reach (`ListInferenceProfiles` and `ListFoundationModels`) and
offers every streamed text model that has an inference profile. Limits
and capabilities come from the public [models.dev](https://models.dev)
catalog. Without the two `List` permissions, or with a custom endpoint,
Zed offers the models that models.dev lists for the Region.
Settings changes (Region, endpoint, authentication method, profile) now
apply without a restart.
Supersedes #65418 and #67212.
Also fixes#59986.
Behavior changes:
- Models are offered under their foundation model id, so saved Bedrock
model selections must be made again.
- Built-in Mantle models and models without an inference profile are no
longer listed. They can be added as custom models.
- The default model is the newest active Claude Sonnet that the account
lists, and the newest active Claude Haiku for the fast default.
- A signed-out provider no longer sends requests.
The first commit upgrades the AWS SDK crates.
## Testing
- `cargo test -p bedrock`, `cargo test -p language_models`, and
`./script/clippy -p bedrock -p language_models`.
- Thinking request shapes checked against a real account in `us-east-1`
with `aws bedrock-runtime converse`.
- To try it: sign in to Amazon Bedrock with credentials that have the
two `List` permissions, then open the model picker.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
## Suggested AGENTS.md additions
- An async `#[gpui::test]` discards a returned `Result`, so a test that
returns `Err` passes. Await a fallible inner future and check its result
instead.
Release Notes:
- Added automatic discovery of Amazon Bedrock models through inference
profiles.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This PR primarily adds a test suite to `gpui::BoundsTree` that uses a
naive implementation of a `BoundsTree` that is a `Vec<T>`, which
iterates each element to find overlaps and maxes. The motivation for
this change is having a clean test suite to test out the performance
optimizations in a follow-up PR.
This PR also fixes two extremely rare bugs within the `BoundsTree`
caused by floats being imprecise after 24 bits and not handling some
`NaN` cases within the `BoundsTree` float comparisons. These bugs are
practically never hit because they rely on primitives overlapping by
~1/30,000th of a pixel (~0.00003 px), but they're necessary to fix to
ensure the test suite will be working when I start working on
performance improvements.
Release Notes:
- [GPUI] N/A
- N/A
## Summary
Removes an `unwrap` call during entity borrows. Realistically this only
happens once in each function where the compiler can optimize the later
calls away, but every new function usually still has one of these
unwraps. I didn't take the time to benchmark though, since the effect
will likely be insignificant.
`DropGuard`, Rust 1.100 new feature, allows writing Drop implementations
inline. The differentiating feature for me, is that the function takes a
owned `self`, instead of `&mut self` as in `impl Drop`, this allows us
to get rid of `Option` in a lot of drop implementations, where the type
needs to be moved out during `Drop`.
## Testing
Trivial change once familiar with `DropGuard`.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- N/A
- [GPUI] Removed an unwrap during Entity borrow
## Summary
`StreamingFuzzyMatcher` compares each complete line of `old_text`
against every line of the buffer. It runs on the main thread while the
edit streams in. For each query line, it walked the whole rope and ran
`strsim::normalized_levenshtein` on every pair of lines with similar
lengths, which is about 10% of the pairs in the files below.
This change:
- Collects the buffer's trimmed lines once per matcher instead of once
per query line.
- Compares ASCII lines with Myers' bit-vector algorithm in Hyyrö's block
formulation. It computes the same Levenshtein distance 64 rows at a time
and stops once the distance can't get back under the threshold.
Non-ASCII lines still use `strsim`.
Matches are unchanged.
Time to stream an `old_text` in 48-byte chunks and call `finish()`, with
a typo in about a third of its lines. Best of 9, release build, Linux:
| File | Lines | 8-line `old_text` | 40-line `old_text` | 150-line
`old_text` |
|---|---|---|---|---|
| `edit_session.rs` | 1,301 | 0.77 ms → 0.25 ms | 3.9 ms → 0.59 ms |
21.5 ms → 2.0 ms |
| `div.rs` | 5,819 | 8.3 ms → 1.3 ms | 49.3 ms → 3.2 ms | 163 ms → 9.5
ms |
| `editor.rs` | 13,443 | 15.2 ms → 2.9 ms | 77.1 ms → 7.1 ms | 316 ms →
21.3 ms |
| `lsp_store.rs` | 18,808 | 33.4 ms → 4.7 ms | 123 ms → 10.0 ms | 486 ms
→ 31.3 ms |
The timings come from a standalone harness that compiles
`streaming_fuzzy_matcher.rs` against the `text` crate. The
`edit_file_tool` benchmark's fixtures are too small for this stage to
show up.
## Testing
- `test_fuzzy_eq_matches_strsim` checks the new comparison against
`strsim` on random ASCII and non-ASCII lines of up to 200 characters. It
fails when a carry, the early exit, or the length check is broken.
- The old and new matchers return identical push results, matches, and
line pairs for 300,000 generated buffers and queries. This comparison
isn't part of the PR.
- `cargo test -p agent --lib edit` and `./script/clippy -p agent` pass.
- Tested on Linux.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Improved responsiveness when the agent edits large files
## Summary
While an app has mouse reporting on, `Terminal::mouse_move` forwards
motion to the app and skips the link lookup, so moving onto a link with
Cmd or Ctrl held doesn't highlight it. Mouse-mode motion now runs the
lookup when `open_links_in_mouse_mode` is enabled, matching
Cmd/Ctrl-click. The same check now gates every hover lookup, so with the
setting off, a Cmd/Ctrl press or a content refresh no longer highlights
a link, and a stale highlight clears.
Closes#64102
## Testing
- To reproduce, run `vim -c 'set mouse=a' <file>` on a file containing a
link, hold Cmd or Ctrl, and move onto the link.
- Tested on Linux with Ctrl. Links highlight on hover and clear when the
pointer leaves.
- `test_ctrl_hover_in_mouse_mode` fails without this change.
- `cargo test -p terminal --lib`, `cargo test -p terminal_view --lib`,
and `./script/clippy -p terminal` pass.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed terminal links not highlighting on Cmd/Ctrl-hover in apps with
mouse reporting on
https://github.com/user-attachments/assets/194cd1f1-c494-42bf-a72d-d29c43d4b7d6
The Windows sandbox starts each command through a console-subsystem
launcher, which it currently finds only as the Zed CLI (`bin/zed.exe` or
`cli.exe` next to the running executable). Applications other than Zed
that use the `sandbox` crate, such as Delta, ship their own console
program, so the launcher check fails and the sandbox reports itself
unavailable. This adds `set_windows_sandbox_launcher_path` so such an
application can name its own launcher, which must call
`run_windows_sandbox_launcher_if_invoked` at the top of `main`. Zed's
behavior is unchanged when it isn't called.
Release Notes:
- N/A
## Summary
When a background parse finishes, `Markdown` calls `cx.notify()` and
then `cx.refresh_windows()`. The refresh makes the next frame of every
window bypass `.cached()` views, so every pane and dock panel in every
window re-renders. While the agent streams a response,
`Markdown::append` reparses on each 16 ms reveal tick, so nearly every
frame rebuilds the whole workspace. The markdown preview does the same
after each reparse.
The refresh came in #31486, when `MarkdownElement` didn't register its
entity as a view, so `cx.notify()` alone didn't redraw it. #31585 fixed
that a day later with `window.set_view_id` in prepaint. `Markdown` now
refreshes windows only when a window's last frame read it without
drawing it as a view: consumers that hide the element while parsing, or
that only measure it. The new `App::is_read_without_view` checks this
against the rendered frame. Otherwise `cx.notify()` redraws the element
and its ancestors. Markdown that no window read in its last frame no
longer triggers a refresh.
In a GPUI test window with a painted `MarkdownElement` and a cached
sibling view, each finished parse re-rendered the sibling. It no longer
does. I didn't time this in a full workspace.
## Testing
- `test_parsing_painted_markdown_does_not_redraw_cached_siblings` is
new. It appends to a painted `Markdown` next to a cached sibling view,
then checks that the new text renders and the sibling doesn't re-render.
It fails without the change.
- `test_parsing_redraws_markdown_shown_only_once_parsed` is new. A
cached view hides the element while parsing, and the test checks that
the text renders after the first parse and after a later reparse. It
fails if the refresh is removed outright.
- `cargo test -p gpui -p markdown -p markdown_preview -p agent_ui -p
editor -p git_ui` passes.
- `./script/clippy -p gpui -p markdown` passes.
- In a Zed dev build, agent text streams from a mock model and the blame
popover renders after its first parse.
- The video covers a reparse that hides the element. No shipped view
does this, so both builds use a temporary patch that hides the markdown
preview while parsing and drops its post-parse search event. Over 3 runs
each, the previous version of this PR left the preview blank for about 1
s after the parse finished. With this version, the text returned within
22 ms.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Improved rendering performance while agent responses stream in
- [GPUI] Added `App::is_read_without_view` to check whether notifying an
entity redraws the views that read it
https://github.com/user-attachments/assets/76be4568-c9cf-49bd-9633-b3f8b46d8058
## Summary
Follow-up to #67332.
#67332 made `SumTree::edit` insert items in place, which made a large
edit that fills an empty tree slower. `edit` now builds an empty tree
with `from_iter` straight from the sorted edits. That skips the two
checks that guard the in-place path and the copy of the items into a
`Vec`.
One `edit` of 1,000,000 items with `u64` keys into an empty tree, time
per item. Release build, the first edit of a new process, median of 9
alternating rounds (15 on the 9800X3D, pinned to one core):
| Machine | Before #67332 | Main | This PR |
|---|---|---|---|
| Ryzen 7 9800X3D | 19.6 ns | 21.8 ns | 13.5 ns |
| `ubuntu-latest`, Xeon Platinum 8573C | 61.2 ns | 69.8 ns | 40.7 ns |
| `ubuntu-24.04-arm`, Neoverse-N2 | 53.6 ns | 59.8 ns | 35.2 ns |
| `windows-latest` | 55.3 ns | 59.9 ns | 39.3 ns |
| `macos-15`, Apple M1 | 28.5 ns | 29.1 ns | 19.4 ns |
| `macos-15-intel`, Core i7-8700B | 105.2 ns | 112.1 ns | 62.5 ns |
With `Arc<str>` keys, the same edit takes 35–44% less time than on main.
Smaller edits of an empty tree take the same path. Against main, edits
of 12, 13, and 48 items take 22–53% less time on every machine, and
edits of 1 and 4 items take 4–34% less on Linux. On Windows and macOS,
edits of 1 and 4 items take 5–24% less with `Arc<str>` keys. With `u64`
keys they take between 12% less and 2% more on Windows, and between 3%
less and 10% more on macOS.
## Testing
- `test_edit` now checks that an edit of an empty tree packs its leaves
as `from_iter` does. It fails if that edit inserts in place.
- `test_inserts_in_place` starts each tree with one item, so its inserts
still take the in-place path. It still fails for each of 19 mutations of
that code.
- `cargo test -p sum_tree -p text -p multi_buffer -p language -p git -p
editor`, `cargo test -p worktree --features test-support`, and `cargo
test -p project --features test-support --test integration` pass.
- `./script/clippy -p sum_tree` passes.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- N/A
## Summary
Restoring a pane adds its items before setting the pinned count. Until
then, `max_tabs` treats the restored pinned tabs as unpinned and closes
them.
The pinned count is now set before the items are added. It counts only
the pinned items that restore, so a pinned tab that fails to restore
doesn't shield the tab that takes its place. This follows the review of
#65898.
Closes#65766
## Testing
- To reproduce, set `max_tabs` to 1, open and pin three files, then
restart Zed.
- Tested on Linux. On `main`, one of the three pinned tabs comes back.
On this branch, all three do.
- `test_restoring_pinned_tabs_past_max_tabs` fails without this change.
- `cargo test -p workspace --lib` and `./script/clippy -p workspace`
pass.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed pinned tabs being closed, and other tabs being pinned in their
place, when a restored pane has more tabs than `max_tabs`
https://github.com/user-attachments/assets/68ef0e4c-ebb0-4985-a512-a8df34a5d6e7
---------
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Frames held back by inactive, low-power or thermal frame pacing no
longer record input or dirty-to-present latency, and GPU scene
animations now count toward present intervals. Frame signals are now
stamped consistently on Wayland and X11 Expose, and Windows treats
DWM-cloaked windows (e.g. on another virtual desktop) as hidden. Frame
and latency reports gain 1 ms and 2 ms buckets.
Release Notes:
- [GPUI] Improved accuracy of frame duration and input latency telemetry
across platforms
Part of #52410
With thousands of changed files open in Uncommitted Changes, scrolling
and typing lag while files keep changing on disk.
One cause is `excerpt_boundaries_in_range`. It skipped excerpts outside
the range but never stopped, so a one-line edit in file k made the block
map walk every excerpt after k. The split diff has two block maps, and
each changed file sends several edit events, so this ran many times per
file.
The skip was there because the walk could begin one excerpt too early.
The setup checked whether the cursor was at the start of a diff
transform, and took that as the start of an excerpt. A range starting on
a transform in the middle of an excerpt then made the walk begin with an
excerpt before the range. The setup now seeks to the excerpt start
before that check, so the walk never sees an excerpt before the range
and can return at the first one outside it.
Measured on a repository with 3,600 changed files, opened over SSH, with
300 files rewritten each second:
| Share of main thread | Before | After |
|---|---|---|
| `excerpt_boundaries_in_range` | 32.3% | 0.1% |
| `BlockMap::sync` | 37.6% | 4.5% |
In a Criterion benchmark with one editor on a 4,000-file diff
multibuffer, changing 16 files and drawing a frame takes 10% fewer
main-thread instructions (370.6M to 333.7M). Editing one character takes
7.8% fewer.
These numbers are from the first version of this PR, which stopped at
the range end but kept the skip. The walk in the final version visits
the same excerpts or one fewer.
Release Notes:
- Improved responsiveness of the Uncommitted Changes view when many
files change at once.
# Objective
Ollama recently added support for exposing available thinking levels in
their API. Previously models such as `qwen3.8:27b` would default to
excessive thinking levels, and the only way to change this was to change
Zed's settings. By adopting the newly exposed values in the API, we can
select thinking levels with the Ollama provider.
https://github.com/ollama/ollama/releases/tag/v0.34.3
## Solution
Adopt the new API and map the exposed values to their Zed equivalents.
Most of the changes are moving around code and adding tests
## Testing
- Tested this to be working locally using Ollama
- Added comprehensive tests for serialization and mapping
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Added thinking level selection support for the Ollama provider
`SandboxNetPolicy::Restricted` gains `allow_system_network_services`,
which lets a caller keep a command that is confined to the proxy from
also reaching the macOS system services for network configuration and
TLS trust evaluation (`configd`, `networkd`, `SecurityServer`, `trustd`,
and `ocspd`).
Those services run outside the sandbox with unrestricted network access,
and `trustd` fetches the issuer URL named in a certificate it is asked
to evaluate. Under the proxy profile, `security verify-cert` on a
certificate whose issuer URL points at a local listener makes `trustd`
connect to it; with the services left out, nothing connects. So today a
command restricted to an allowlist of hosts can still send data to any
host by putting it in a URL. `trustd` appears to rate-limit these
fetches, which slows this down but doesn't prevent it.
Leaving the services out is not free: programs that verify certificates
through the Security framework need them, which is why they were added.
So this is a choice for the caller, and Zed's own callers pass `true`,
which keeps their behavior (and this exposure) exactly as it is. Whether
the agent should pass `false` is a separate decision. The proxy still
reports refused hosts without the services, so a caller can run it with
an empty allowlist purely to learn what a command attempted.
Other platforms have no equivalent services and ignore the field.
Release Notes:
- N/A
## Summary
Without a repository, the Git panel doesn't render its commit editor but
still moves focus to it. `git_panel::ToggleFocus` then leaves the panel
unfocused, and `git_panel::Toggle` can't close it.
Focus now stays on the panel when there is no repository.
Closes#48275Closes#50117
## Testing
- To reproduce, open a folder without a Git repository and run
`git_panel::Toggle` twice.
- Tested on Linux. The second toggle leaves the panel open on `main` and
closes it on this branch.
- `test_toggle_without_repository` fails without this change.
- `cargo test -p git_ui --lib` and `./script/clippy -p git_ui` pass.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed `git_panel::ToggleFocus` and `git_panel::Toggle` in projects
without a Git repository
https://github.com/user-attachments/assets/10061567-9725-4399-b048-6a30b9e662c0
## Summary
`:bd` in a multibuffer also closes the tab for the file under the
cursor. Closing by path treats a multi-file item as the file under its
cursor, so the reverse happens too: `:bd` in a file closes a multibuffer
with its cursor in that file. The tab switcher has the same bug.
Closing by path now matches only single-file items. `:bd` and the tab
switcher close other items by ID. As a result, tabs for files that
failed to open now close individually.
Closes#61985
## Testing
- `test_close_by_path_keeps_multibuffers_and_files_apart` fails if any
of the three changes is reverted.
- `cargo test -p tab_switcher -p workspace -p vim --lib` and
`./script/clippy -p workspace -p tab_switcher` pass.
- In Zed with rust-analyzer, `:bd` in References, `:bd` in a file with
References open, and closing References from the tab switcher each close
an extra tab on `main` and only their target on this branch.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed `workspace: close item in all panes` (and `:bd[elete]` in Vim
mode) also closing the tabs of the file under the cursor in a
multibuffer.
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
Follow-up to https://github.com/zed-industries/zed/pull/67187
After a restart Zed reopens only each window's active workspace, so the
title-bar worktree picker and the sidebar project menu could not switch
to the repository's other checkouts.
The worktree picker now also lists, as closed rows:
- Delta checkouts of the same source repository, found in
`<source>/.delta/worktrees` and in Delta's managed stores.
- The source repository's own checkout, as "main worktree".
- Linked worktrees registered with the source or with its Delta clones.
Enter opens the checkout, or switches to it when it is already open, and
the secondary action opens it in a new window.
The sidebar project menu gets "Switch Worktree…", which opens the same
picker in the group's workspace.
The picker also opens with what the window already knows, instead of a
single row that the rest of the list replaces later:
- The repository scan records the remote default branch from its
existing `git for-each-ref` call, so the create row reads "based on
origin/main" from the first frame instead of switching from "main" after
a git round trip.
- Git rows come from the repository snapshot; the picker still asks git
when it opens and redraws only if the answer differs.
- Closed rows are read from disk when the picker opens and arrive in one
step.
Discovery reads only the store folders and git's worktree registries,
and refuses symlinks and special files.
A store checkout is listed only when its git directory is where Delta
puts that checkout's clone, so a folder Delta renamed aside, or a copy
in another namespace, is not offered.
Git runs only for the "main worktree" row and for reftable HEADs, with
the untrusted-repository options, a 5s timeout and kill on drop.
Known limitations:
- Checkouts mounted into a folder of the user's choosing (`delta
worktree mount <ref> <dir>`) are not listed, because finding them means
reading `.delta/clones`, which tracked content can control.
- A project group with no open workspace after a restart needs Focus
Project before "Switch Worktree…" appears.
- With AI disabled, switching away from the window's starting workspace
drops it without a save prompt, as the existing worktree switch does.
- Closed rows load after the picker opens, so the list grows once when
they arrive.
- The first frame's current-checkout row differs from git's when the
path is spelled differently (symlink, letter case, SSH to Windows), for
an unborn HEAD or orphan branch, and for a `core.bare` folder opened as
the project; the refresh corrects it.
- Collab guests who join after the host's last update see the create
row's base change once, as before.
Release Notes:
- N/A (Nighlty only)
The Windows sandbox in #66918 is built on the Process Security
Environment API, which only exists on recent Windows 11 builds. Our
Windows runner is Windows Server 2022, so the tests that exercise the
sandbox skip themselves there and report a pass. This adds a job that
runs the `sandbox` crate's tests on GitHub's `windows-11-arm` runner,
the only hosted runner with a new enough Windows build, and makes it
part of `tests_pass`.
The job first checks that `processmodel.dll` exports
`CreateProcessSecurityEnvironment` and fails if it doesn't, so a runner
image change can't quietly turn the tests back into skips.
Release Notes:
- N/A
This closes a way around the macOS sandbox's path-based rules. Seatbelt
checks rules against a path at the moment of each access, so a rule for
a path stops applying once a directory above it is something else. A
command that could write a protected path's parent could rename the
parent away, edit the protected file at its new location, and rename it
back, or leave a symlink in its place. For example, `mv .git .x && ln -s
fake .git` replaces `.git/hooks` and `.git/config` in a writable
worktree even though both are protected, and the same works on the Git
directories a linked worktree points at.
The generated profile now denies `file-write-unlink` on every directory
above a protected path or a path disallowing reads, which blocks
renaming those directories away, removing them, or renaming another
directory over them, while leaving writes inside them alone. Paths
disallowing reads need this too, since otherwise their contents can be
read at the renamed location.
Where a directory above a protected path doesn't exist yet, the command
could supply it as a symlink, or as a directory prepared elsewhere and
renamed into place with its own content already at the protected path.
`file-write-create` can't tell those from a new empty directory, so the
profile denies creating such a directory at all. This is a behavior
change: a command can no longer `mkdir` a missing directory above a
protected path. Paths disallowing reads don't get this rule, because
content supplied that way is the command's own.
Normal Git operations (commit, branch, `pack-refs`, `gc`, `git worktree
add`, committing in a linked worktree) still work with `.git/config` and
`.git/hooks` protected. On Linux, bubblewrap's read-only bind mounts
stay attached across an ancestor rename, so this shouldn't apply there.
Release Notes:
- N/A
## Summary
The Java page still asks for JDK 21/23 and a PPA on Ubuntu, but current
JDTLS needs Java 25 to run. Ubuntu ships `openjdk-25-jdk` in its
official archives for 22.04, 24.04 and 26.04, so the PPA isn't needed
anymore. I bumped the versions, the download link and the `java_home`
example to 25.
Closes#67408
## Testing
Docs only. Checked the Java 25 minimum against the eclipse.jdt.ls README
and the zed-extensions/java README, and checked that `openjdk-25-jdk` is
in the jammy, noble and resolute archives.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist). N/A, docs
only.
- [ ] Tests cover the new or changed behavior. N/A, docs only.
Release Notes:
- N/A
With layout nodes kept between frames, a node sized by a measure
function still can't stay cached: the function is a new closure every
frame, so there is no way to tell whether it would measure the same
sizes. That covers every text element, and invalidating one invalidates
its ancestors too.
This adds `Window::request_keyed_measured_layout`, which takes a key
describing everything the measured size depends on. While the key equals
the one the node was last measured with, Taffy's cached sizes are kept
and the measure function isn't called. `request_measured_layout` is
unchanged and still measures every frame. On steady-state frames,
same-type measure contexts are updated in place to avoid allocating and
freeing a `Box` per measured node per frame.
Text elements use it. Their key is the text, runs, text style, font
size, line height, scale factor, and the text system's font generation.
Unchanged text takes over the lines it shaped last frame and paints from
those, so it is neither measured nor shaped again.
- Text is measured from its own inputs alone, and only `PerformLayout`
(not sizing probes) replaces the lines kept for painting.
- The line layout cache keeps layouts that an element still holds even
in frames that don't shape them, and now includes `max_lines`
(`line_clamp`) in its cache key.
- `TaffyLayoutEngine` clears its layout cache when a window's
`scale_factor` changes so device-pixel cached measurements (such as
`list` and `uniform_list`) never go stale across displays.
- `list` and `uniform_list` key their `ListSizingBehavior::Infer`
measurements.
Testing:
- Targeted tests verify that keyed leaves and text elements are measured
again only when their inputs change (including `TextSystem::add_fonts`),
that keyed leaves update on `scale_factor` changes, and that
`LineLayoutCache` distinguishes `max_lines`.
- Expanded `RandomizedElementTree` and
`layout_cache_matches_rebuilding_every_frame` to cover flex, grid,
absolute positioning, `Display::None`, `with_rem_size`, single-field
mutations, root inherited text styles and scope changes, deferred
anchored popups, `StyledText`/`InteractiveText` with mouse moves,
keyed/unkeyed measured leaves, and scrolling `list`/`uniform_list` (128
seeds / 6,144 frames verified locally).
Performance: instructions per frame against `main` in the GPUI
benchmarks (`script/gpui-bench-compare`), including the previous PR.
These are synthetic trees, not Zed scenarios.
| Benchmark | Previous PR | With this PR |
|---|---:|---:|
| Full refresh, trees with paths | −2.2% to −8.2% | −3.0% to −32% |
| Full refresh, trees without paths | −8.3% to −19.6% | −22% to −34% |
| ID churn (no node can be matched) | −1.3% / −3.9% | −1.1% / −2.8% |
| Warm text, 32 panels | −7.3% | −38.6% |
| First populated text frame | −4.3% | −4.1% |
| Scrolling a pane of text rows | −7.9% | −57.2% |
| `uniform_list` scrolling | −5.7% | −27.5% |
| Inspector panel, 500 rows | −7.2% | −52.4% |
Release Notes:
- [GPUI] Added `Window::request_keyed_measured_layout`, which keeps a
measured element's size while its key is unchanged
- Improved layout performance in Zed's renderer
## Summary
When the Git panel is narrow, its header wraps and the top row's hover
background touches the tab bar. The header now has vertical padding. Its
single-row height doesn't change.
Closes#67351
## Testing
- To reproduce, narrow the Git panel until its header wraps, then hover
**Uncommitted**.
- Tested on Linux. The hover background clears the tab bar when the
header wraps, and the unwrapped panel is pixel-identical to `main`.
- `cargo test -p git_ui --lib` and `./script/clippy -p git_ui` pass.
- This is a one-line layout change, so it has no automated test.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.
Release Notes:
- Fixed Git panel header buttons touching the tab bar when the header
wraps
https://github.com/user-attachments/assets/4e9ae182-cb6e-414f-af39-f5e220e15805
## Summary
`Window::defer_draw` documents that its content mask applies during
prepaint and paint, but prepaint doesn't apply it. A deferred element's
hitboxes then extend past its visible area and block clicks on elements
underneath.
Deferred prepaint now applies the mask.
Closes#66079
## Testing
- Tested on Linux with a small GPUI app. On `main`, the clipped part of
a masked overlay blocks the button underneath. On this branch, the
button gets hover and clicks.
- `test_deferred_content_mask_clips_hitboxes` fails without this change.
- `cargo test -p gpui --lib`, `cargo test -p editor --lib --
edit_prediction`, and `./script/clippy -p gpui` pass.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- [GPUI] Fixed deferred element hitboxes ignoring their content mask
https://github.com/user-attachments/assets/1f0918a5-ce0b-4aa7-8f50-d92255be6105
Closes#61472
Picking a model or profile in the Agent Panel also saves it as your
default, so trying a model in one thread changes every new thread. Now a
secondary confirm (`cmd-enter` on macOS, `ctrl-enter` on Linux and
Windows, or a cmd/ctrl-click) in the Zed Agent's model, profile or
thinking effort picker changes only the current thread.
A thread-only pick makes the thread thread-only: nothing you change in
it afterwards is saved as a default. A dot next to the selectors marks
it, and clicking the dot offers Reset to Defaults or Save as Default to
leave the mode.
Also fixes thinking, effort and fast mode changes being saved onto your
default model when the thread was on a different one.
External agents are unchanged; that needs its own design.
Release Notes:
- Added thread-only picks in the Zed Agent's model, profile and thinking
effort pickers: confirm with `cmd-enter`/`ctrl-enter` (or
cmd/ctrl-click) to change just the current thread without changing your
defaults.
Unfortunately, the AppContainer sandbox is enormously buggy when running
packaged apps, so we need to steer clear of the packaged version of
PowerShell until fixes are available.
Release Notes:
- N/A
These queries add substantial startup time cost (for loading the
vendor-specific DLL), just for the sake of a slightly prettier version
number in our crash reporting. Not worth it.
Release Notes:
- N/A
- [GPUI] N/A