mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 06:59:22 +01:00
a57e2fdc389a3e513a6d5f5a7564ebe2fd33fc88
40858 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a57e2fdc38 |
Unifying agent instructions to AGENTS.md (#66716)
## Summary Closes #66715 It's a follow-up of #45939 ## Testing This PR includes two commits. The first commit only removes CLAUDE.md and GEMINI.md, and the second involves changes to [dangerfile.ts](https://github.com/zed-industries/zed/blob/main/script/danger/dangerfile.ts). Reset the second if not favored. ## 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 --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
053d91cb14 |
agent_ui: Check for an empty message without copying the text (#67020)
## Summary `MessageEditor::is_empty` copied the whole draft with `text(cx)` to check whether it was blank. It now reads characters from the buffer until one isn't whitespace. `str::trim` removes exactly the characters that `char::is_whitespace` matches, so the result is the same. The thread view calls it on every render, through `render_send_button`. The thread view's observer on the message editor also copied the text each time the editor notified, to check for an empty draft. It now uses `Editor::is_empty`, which reads the buffer length. Both `is_empty` checks timed on a `rope::Rope` in a release build, median per call: | Draft size | Before | After | Speedup | |---|---|---|---| | 1 KB | 112 ns | 22 ns | 5x | | 16 KB | 1.1 µs | 24 ns | 46x | | 256 KB | 16.6 µs | 28 ns | 590x | | 4 MB | 271 µs | 33 ns | 8,200x | ## Testing - `cargo test -p agent_ui --lib message_editor` passes. - `cargo test -p agent_ui --lib conversation_view` passes. - `./script/clippy -p agent_ui` 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 |
||
|
|
125ca8672e |
util: Avoid allocating when sorting paths by extension (#67019)
## Summary With `"sort_order": "extension"`, `compare_rel_paths_by` compared extensions with `to_lowercase()`, which allocates two `String`s for each pair of file names it compares. `compare_lowercase` compares ASCII strings by their lowercased bytes and falls back to `to_lowercase()` otherwise. For ASCII, `to_lowercase()` only lowercases each byte, so the order is unchanged. The project panel sorts its visible entries with this comparator, on a background thread, each time it rebuilds them. `cargo bench -p project_panel --bench sorting`, which sorts 96k entries from a Linux checkout, in extension order: | Sort mode | Before | After | |---|---|---| | `DirectoriesFirst` | 39.7 ms | 14.7 ms | | `Mixed` | 38.6 ms | 12.4 ms | | `FilesFirst` | 35.4 ms | 11.6 ms | The other sort orders don't run this code. They measured 1 to 3% faster, as did Unicode order, which this change can't affect, so that difference is noise. ## Testing - `cargo test -p util --lib paths` passes. - `cargo test -p project_panel` passes. - `./script/clippy -p util` passes. - Outside Zed, `compare_lowercase` matched `a.to_lowercase().cmp(&b.to_lowercase())` on 6 million random pairs of ASCII and non-ASCII strings, and on every pair of the 252 extensions in the benchmark snapshot. ## 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 |
||
|
|
310bba2f2f |
util: Return early from natural_sort for equal strings (#67016)
## Summary `compare_rel_paths_by` compares paths one component at a time. In the default `DirectoriesFirst` mode it calls `natural_sort` on each pair of components, including the parent directories the two paths share. `natural_sort` walked equal strings character by character before returning `Equal`. It now checks `a == b` first. For equal strings the loop already returned `Equal`, so results are unchanged. The project panel sorts its visible entries with this comparator, on a background thread, each time it rebuilds them. `cargo bench -p project_panel --bench sorting`, which sorts 96k entries from a Linux checkout, in `DirectoriesFirst` mode: | Sort order | Before | After | |---|---|---| | Default | 12.5 ms | 10.1 ms | | Upper | 11.8 ms | 9.5 ms | | Lower | 13.2 ms | 10.7 ms | | Extension | 40.0 ms | 36.9 ms | | Unicode | 8.4 ms | 8.3 ms | Unicode order doesn't call `natural_sort`. `Mixed` and `FilesFirst` are unchanged, because they go through `natural_sort_no_tiebreak`, which already returns early for names that are equal ignoring ASCII case. ## Testing - `cargo test -p util --lib paths` passes. - `cargo test -p project_panel` passes. - `./script/clippy -p util` 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 |
||
|
|
6b72097302 |
terminal_view: Avoid cloning text runs before shaping (#67013)
## Summary `BatchedTextRun::paint` passed `self.text.clone().into()` to `shape_line`. That cloned the `String`, then copied it again into the `SharedString`. `self.text.as_str().into()` copies it once. Runs of 23 bytes or less are stored inline and no longer allocate. `TerminalElement::paint` calls it for every text run. A run is a span of adjacent cells on one line with the same style. The two expressions timed outside Zed in a release build, median per call including the drop: | Run length | `text.clone().into()` | `text.as_str().into()` | |---|---|---| | 8 bytes | 13.5 ns | 4.8 ns | | 16 bytes | 13.2 ns | 4.5 ns | | 40 bytes | 22.6 ns | 12.8 ns | | 80 bytes | 22.0 ns | 13.0 ns | | 200 bytes | 22.6 ns | 13.2 ns | That is about 9 ns per run. Paint time in the terminal was not measured. ## Testing - `cargo test -p terminal_view --lib terminal_element` passes. - `./script/clippy -p terminal_view` 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 |
||
|
|
021c7d4c4f |
language: Split buffer operations in linear time (#67014)
## Summary `split_operations` took each 100-operation chunk with `Vec::drain(..n)`, which shifts every remaining operation, so splitting was quadratic in the number of operations. This iterates the operations once. The chunks are unchanged, including the trailing empty chunk that `create_buffer_for_peer` sends as the last one. `create_buffer_for_peer` splits a buffer's full operation history when a guest or remote client opens the buffer. Reconnecting projects and channel buffers split the operations the other side is missing. Time to split one list of edit operations, outside Zed in a release build: | Operations | Before | After | |---|---|---| | 10,000 | 192 µs | 12 µs | | 100,000 | 25.8 ms | 123 µs | | 250,000 | 171 ms | 502 µs | ## Testing - `cargo test -p language --lib` passes. - `cargo test -p remote_server --lib` passes. - The collab `integration_tests`, `channel_buffer_tests` and `remote_editing_collaboration_tests` pass. - `./script/clippy -p language` 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 |
||
|
|
24d3772111 |
fs: Fix wrong cfg guard for fast path for macos only (#67006)
## Summary In https://github.com/zed-industries/zed/pull/66973 I introduced a faster path for matching on macos, but I actually guarded it for linux also, but that is not correct. Since the following code (what expensive is on macos) was only guarded on macos. So we should make the parent also guard for macos only.. this was a mistake from me. https://github.com/zed-industries/zed/blob/596dfdcf32d85d4d8d17a8887b4d0979ec7c5e14/crates/fs/src/fs_watcher.rs#L561-L577 ## Testing This changes nothing for macos, just so we don't also do the same path for 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: - N/A |
||
|
|
596dfdcf32 |
language: Reset max start depth on pooled query cursors (#66983)
## Summary `QueryCursorHandle` returns its cursor to a shared pool on drop. It reset the cursor's byte and point ranges but not `max_start_depth`, and tree-sitter keeps that setting across executions. Only `SyntaxMapMatches` sets a depth, and it sets one on every query. The other pool users never set it: highlight captures, injection queries, `SyntaxLayer::override_id`, and `with_query_cursor`. After a depth-limited matches query, the next of those to take the same cursor matched only nodes within that depth. `Drop` now clears it. The depth-limited queries are the text object queries behind Vim's method, section, and comment motions (`] m`, `] ]`, `] /`), with depths of 3 to 6. Missing highlights after those motions are inferred from the code; only the syntax map is tested. ## Testing `cargo test -p language --lib` passes. `test_max_start_depth_does_not_carry_over_to_later_queries` is new and fails without the fix. ## 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 syntax highlighting sometimes going missing after Vim method, section, and comment motions |
||
|
|
5f27a0a02a |
fuzzy: Move segment results instead of cloning them (#66982)
## Summary The string and path-set matchers in `fuzzy` and `fuzzy_nucleo` collect matches per segment. They merged the segments with `segment_results.concat()`, which clones every element. Each match was copied (a `String` and a `Vec` for `fuzzy::StringMatch`) and the original dropped, before the results were truncated to `max_results`. This moves the matches. `cargo bench -p fuzzy_nucleo --bench match_benchmark`, string matching with 1-word queries: | Benchmark | Before | After | |---|---|---| | `1-word/fuzzy/1000` | 67.9 µs | 58.4 µs | | `1-word/fuzzy/10000` | 532 µs | 444 µs | | `1-word/nucleo/1000` | 67.2 µs | 62.0 µs | | `1-word/nucleo/10000` | 472 µs | 406 µs | The 2- and 4-word groups match fewer candidates and improved by 2% to 22%. The path groups in that benchmark use `match_fixed_path_set`, which this does not change. A copy of the merge step outside Zed, merging 10,000 `StringMatch` values from 16 segments: 412 µs before, 75 µs after. ## Testing `cargo test -p fuzzy --features path/test-support`, `cargo test -p fuzzy_nucleo`, and `cargo test -p file_finder --lib` 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: - Improved fuzzy matching performance when many candidates match |
||
|
|
fb62376caa |
agent: Read buffer length without copying the text (#66981)
## Summary `get_buffer_content_or_outline` chooses between a file's full text and its outline by size. It measured the size with `buffer.text().len()`, which copies the whole buffer into a `String`. `buffer.len()` reads the same length from the rope's summary. This runs on the main thread when the read file tool reads a file without a line range and when a file is mentioned as context. Both expressions timed on a `text::Buffer` in a release build: | Buffer size | `text().len()` | `len()` | |---|---|---| | 16 KB | 1.8 µs | < 0.1 µs | | 256 KB | 25 µs | < 0.1 µs | | 4 MB | 398 µs | < 0.1 µs | | 64 MB | 22 ms | < 0.1 µs | ## Testing `cargo test -p agent --lib outline` 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 |
||
|
|
e2f00a41ac |
Fix antialiased outline compositing on Windows (#66972)
## Summary Antialiased rounded outlines can show dark spots on Windows when the quad background is transparent black. The shader interpolates straight-alpha colors at the inner edge, which mixes the transparent background's RGB into partially covered border pixels. Apply inner-edge coverage to the border alpha before compositing. Handle zero combined alpha without dividing by zero. ## Testing Windows 11 at 100% display scaling. I compared screenshots from the original and patched Direct3D shaders using agent-desktop. **Zed** The built-in onboarding page was pixel-identical before and after the fix with the normal renderer configuration. To reproduce the affected path in Zed, I applied the same temporary probe to both shaders to set the RGB of transparent bordered backgrounds to black. I then measured the default state of the two outlined buttons under **Import Settings**. | Button | Corner pixels darker than both the straight border and the page background | | --- | ---: | | VS Code | 8 → 0 | | Cursor | 16 → 0 | The top and bottom borders remained one physical pixel wide. This check used an existing Zed debug build, which compiles the HLSL at startup. **Material Gallery** On the **Loading indicator** page, I compared the **Start loading** outlined button at rest and while held down. For the held state, a temporary Gallery build dispatched a mouse-down event and captured the rendered frame before mouse-up. | State | Corner pixels darker than the straight border | | --- | ---: | | Default | 68 → 0 | | Held | 24 → 0 | All four straight edges remained one physical pixel wide in both states. The held state retained its smaller corner radius and darker fill. The Windows quad shaders also compiled successfully with Direct3D. Release Notes: - [GPUI] Fixed dark spots on antialiased rounded outlines. --------- Co-authored-by: John Tur <john-tur@outlook.com> |
||
|
|
703b5ac3f4 |
Update ACP SDK to 5.3.0 and follow schema 1.18 rule changes (#66979)
Updates `agent-client-protocol` to 5.3.0 (schema 1.18.0) and brings what Zed already implements in line with the rules that changed. - **Plan operations: the `file` plan type is removed.** Markdown plans carry an optional absolute `path` instead, and the client always renders `content`. A markdown plan with a `path` keeps the collapsible plan row and gets an "Open Plan File" button. A relative `path` is ignored, so the plan has no file. Naming or changing the file counts as a change to the plan, so it re-shows a dismissed plan, as a new URI did for file plans. - **Unknown v2 command types are no longer offered as slash commands.** The spec used to let a client show a command type it doesn't understand as a plain command. It now says the client must not. The composer only offers `command` entries for completion, input hints, validation, and the "/ for commands" placeholder. `AcpThread` still keeps the full list. This also covers the new `skill` entries, which Zed doesn't advertise support for. - **The new `speed` config option category converts from v1.** The `unstable` SDK feature now parses `speed` as a known category. The v1 conversion rejected categories it didn't list, so one `speed` option would have failed the agent's whole option list. Checked against the 1.18 docs, no change needed: - `replay_complete` (v2) is ignored. Zed still treats the `session/resume` response as the end of replay and discards the thread when a resume fails, and the RFD keeps the subagent freshness boundary at the response. - The subagent clarifications already hold. An `unknown` state shows as unconfirmed, and a session message without a sender renders as a message from another session. - Zed doesn't send `tool_call/cancel` or `terminal/cancel` once the tool call is final or the terminal has exited. - Zed doesn't call `session/options` or `session/fork`, so the new rules for them don't apply. Not adopted yet: prompt suggestions, Agent Skills, placing `speed` options next to the model selector, and using `replay_complete` to show replayed history before the resume response. Release Notes: - N/A |
||
|
|
15d136bf8e |
Fix R extension recommendations for unsupported file types (#66928)
Remove `.qmd`, `.Rmd`, and `.rmd` from the R extension recommendation table, retaining `.r` and `.R`. ## Root cause #63211 expanded the recommendation table using the language configurations in extension source repositories. For R, those sources already included a separate RMarkdown language with `path_suffixes = ["Rmd", "rmd", "qmd"]`, introduced in ocsmit/zed-r#42 and included in version 0.2.6. However, the extension registry still publishes R 0.2.5, which only registers `.r` and `.R`. The recommendation therefore offers an extension that cannot provide a language for the file that triggered it. The source configuration was ahead of the published package; the mappings were not valid for the version users could install. The registry update in https://github.com/zed-industries/extensions/pull/7288 remains blocked on extension CI. Remove these recommendations for now rather than suggest unavailable support. They can be restored once a working release with RMarkdown support is published. Release Notes: - Fixed incorrect R extension installation suggestions for Quarto and R Markdown files. --------- Co-authored-by: Finn Evers <finn@zed.dev> |
||
|
|
56a157e5b0 |
language: Reset unused-code state when seeking buffer chunks (#66977)
## Summary `BufferChunks::seek` rebuilds the diagnostic endpoints and zeroes the severity depths, but it left `unnecessary_depth` alone. After a seek from inside an unnecessary-code diagnostic, every later chunk reported `is_unnecessary`. `initialize_diagnostic_endpoints` now zeroes it with the other depths. `FoldChunks` seeks when it skips a fold, so text after a fold that starts in unused code could render faded. That symptom is inferred from the code; only the iterator is tested. `seek` also called `initialize_diagnostic_endpoints` twice when the iterator used cached highlights. The first call is removed. A standalone release binary linked against `language` timed `seek` on an iterator with cached highlights. The buffer is 4,000 lines of Rust with a diagnostic on each of the first 2,000 lines. Each seek stays inside the iterator's current range so highlights are not re-fetched. Median time per seek: | Diagnostics in seek range | Before | After | |---|---|---| | 0 | 210 ns | 114 ns | | 1 | 0.77 µs | 0.40 µs | | 10 | 1.28 µs | 0.68 µs | | 100 | 6.7 µs | 3.4 µs | | 1,000 | 59 µs | 29 µs | ## Testing `cargo test -p language -- chunk diagnostic` passes. `test_chunks_seek_out_of_unnecessary_diagnostic` is new and fails without the fix. ## 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 unused-code fading sometimes extending past the unused code |
||
|
|
62cb1ac7b1 |
editor: Avoid cloning line text before shaping (#66978)
## Summary `LineWithInvisibles::from_chunks` passed `line.clone().into()` to `shape_line` at each line break. That cloned the `String`, then copied it again into the `SharedString`. `line.as_str().into()` copies it once, as the other `shape_line` call in this function already does. The two expressions timed outside Zed in a release build, median per call including the drop: | Line length | `line.clone().into()` | `line.as_str().into()` | |---|---|---| | 16 bytes | 11 ns | 7 ns | | 40 bytes | 25 ns | 11 ns | | 80 bytes | 17 ns | 12 ns | | 120 bytes | 17 ns | 12 ns | | 400 bytes | 22 ns | 15 ns | That is 4 to 14 ns per row, about 1 µs per 100 rows laid out. Layout time in the editor was not measured. ## Testing `cargo test -p editor --lib element::tests` 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 |
||
|
|
4cc3e27d9d |
editor: Build completion sort keys once per match (#66959)
## Summary The completions menu sorts its matches on the main thread on every keystroke while it is open. `sort_unstable_by_key` builds the sort key twice per comparison, and the key clones the match positions and scans the candidate. `sort_by_cached_key` builds each key once. The sort is now stable: ties keep the fuzzy matcher order. A copy of the key function outside Zed, sorting 1000 synthetic matches: 1.75 ms before, 0.13 ms after (about 20,500 key builds down to 1,000). ## Testing `cargo test -p editor --lib completion` passes, including the sort-order tests in `code_completion_tests.rs`. ## Self-review - [x] I have 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 of the completions menu with many matches |
||
|
|
99c890d39d |
fs: Optimize filesystem watcher path matching (#66973)
## Summary While working on https://github.com/zed-industries/zed/pull/66835 and https://github.com/zed-industries/zed/discussions/66325 I noticed some `ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped"` error messages. While looking into the root cause which is hard to find because there is no known reason the `user dropped` message occurs, I noticed with some profiling code & the `dev: debug filesystem watching` panel that while you are doing a clean `cargo build` the **FS** queue builds up to around **68.000** events which is bad, because Zed should be able to keep up with those FS events that are produced by **cargo**. So I went ahead and looked into this performance issue, and found that one major bottleneck was filesystem event routing repeatedly normalizing and lowercasing the same path prefixes for every ancestor lookup. This was particularly expensive for deeply nested build output paths, that cargo produces when you do a cargo build for the Zed repo. By processing each event path once and reusing its ancestors for case-insensitive lookups, average routing time per event dropped by approximately **76%** across three before-and-after clean `cargo build` runs, substantially reducing the event backlog :). | Metric | Before 1 | Before 2 | Before 3 | After 1 | After 2 | After 3 | Average performance gain | |---|---:|---:|---:|---:|---:|---:|---:| | Notifications received | 213,209 | 213,237 | 213,222 | 213,613 | 213,507 | 213,603 | Comparable (+0.16%) | | Average routing/event | 562 µs | 559 µs | 565 µs | 143 µs | 130 µs | 135 µs | **75.8% lower** | | Total routing wall time | 119.85 s | 119.16 s | 120.46 s | 30.48 s | 27.66 s | 28.90 s | **75.8% lower** | | Total dispatch wall time | 123.30 s | 122.56 s | 124.13 s | 33.34 s | 30.32 s | 31.71 s | **74.2% lower** | | Observed queue peak | 67,122 | 68,058 | 67,933 | 6,269 | 1,566 | 4,653 | **93.9% lower** | | Average queue wait | 16.58 s | 16.96 s | 17.35 s | 132 ms | 23 ms | 104 ms | **99.5% lower** | | Maximum queue wait | 47.57 s | 46.95 s | 50.43 s | 1.45 s | 339 ms | 983 ms | **98.1% lower** | ## Testing **Note**: I didn't add a test since there is already tests covering this part and there should be no behavior changes, just a pure performance gain :). You can test the performance gain by opening Zed via a second a Zed repo clone, remove the **target** folder & its files and run cargo build inside the build in terminal, and open the `dev: debug filesystem watching` notice the **before** and **after** peak queue size for example. ## 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. |
||
|
|
2568d560f1 |
settings_content: Fix outdated defaults in setting doc comments (#66974)
## Summary > In the doc comments inside Zed's settings code, there were 11 settings where the default value written after "Default:" differs from the actual default value (`default.json`). > > For `terminal.bell`, the description of the PR that added it (#53752) says it is "enabled by default", but the merged value is `"off"`, and the release note also says "can be enabled by setting `terminal.bell` to `"system"`", so I judged that `"off"` is correct. > > This is related to #53323, but I did not fix the settings mentioned in that issue (such as `proxy`), so I did not use "Closes". (Machine-translated from Japanese. Original:) Zed の設定のコード内にある説明コメントで、「Default:」に書かれた既定値が、実際の既定値(`default.json`)と違うものが11個ありました。 `terminal.bell` は、追加したPR(#53752)の本文に「既定で有効」とありますが、マージされた値は `"off"`、リリースノートも「`"system"` にすると有効になる」となっていたので、`"off"` が正しいと判断。 #53323 に関連しますが、この issue で挙げられている設定(`proxy` など)は直していないので、Closes にはしていない。 | Setting | Doc comment said | `default.json` | | --- | --- | --- | | `expand_excerpt_lines` | `3` | `5` | | `diagnostics_max_severity` | `warning` | `all` | | `terminal.line_height` | `comfortable` | `standard` | | `terminal.bell` | `"system"` | `"off"` | | `pane_split_direction_horizontal` | `"up"` | `"down"` | | `pane_split_direction_vertical` | `"left"` | `"right"` | | `tabs.show_close_button` | `false` | `hover` | | `git.branch_picker.show_author_name` | `false` | `true` | | `file_finder.prefill_query_from_selection` | `true` | `false` | | `base_keymap` | `VSCode` | `Zed` | | `agent.thinking_display` | `automatic` | `auto` | ## Testing > In the installed Zed, when I wrote `"expand_excerpt_lines": 5` in settings.json and hovered over it, it showed "Default: 3" even though the actual default is 5. For settings with a fixed set of values (such as `bell`), hovering only shows the description of the value, so the `Default:` line is only visible for number and true/false settings. (Machine-translated from Japanese. Original:) インストール版の Zed で settings.json に `"expand_excerpt_lines": 5` を書いてホバーすると、実際の既定値は 5 なのに「Default: 3」と表示された。選択肢の設定(`bell` など)はホバーで値の説明しか出ないので、`Default:` の行が見えるのは数値や true/false の設定だけだった。 <img width="890" height="223" alt="zed-hover-default" src="https://github.com/user-attachments/assets/d43170df-610c-4d74-bd5c-3e1e5391ad9f" /> Doc comments only; no code changes. ## 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). - [ ] Tests cover the new or changed behavior. Release Notes: - N/A |
||
|
|
0cfc4a483d |
Switch async-task back to upstream (#66968)
Replace the Zed fork of `async-task` with upstream now that https://github.com/smol-rs/async-task/pull/108 has merged. Pin the upstream merge commit `41fd3359c75e221bd8b187a8ee361aa309c1714c` to preserve the task waker identity fix. The latest crates.io release is still 4.7.1 and does not include the fix, so retain the crates.io patch until a release is available. Update the lockfile without changing other dependencies. Release Notes: - N/A |
||
|
|
0d3c40e1b9 |
worktree: Sort removed entry ids once (#66962)
## Summary `remove_path_from_snapshot` kept `removed_ids` sorted by inserting each id at its sorted position. Entries are visited in path order but ids are assigned in scan order, so most inserts shift part of the `Vec`, and removing a large subtree is quadratic. This pushes the ids and sorts once and the resulting `Vec` is the same. The function runs under the scanner state lock whenever a path is removed or recursively refreshed. For a directory, that is its whole loaded subtree. Times for just the loop: | Entries | Ids | Before | After | |---|---|---|---| | 17,645 | from the scanner | 8.8 ms | 0.19 ms | | 20,018 | synthetic | 9.1 ms | 0.20 ms | | 100,010 | synthetic | 195 ms | 1.1 ms | | 500,005 | synthetic | 5.0 s | 7.0 ms | The scanner ids were dumped in path order from a scan in a test. The synthetic ids are assigned breadth-first to a random tree. ## Testing - The `worktree` integration tests pass - `./script/clippy -p worktree` passes. ## Self-review - [x] I have 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 worktree scanner performance when large directories are removed or rescanned |
||
|
|
f53c9ae3d6 |
proto: Split worktree updates in linear time (#66961)
## Summary `split_worktree_update` took each 256-entry chunk with `Vec::drain(..n)`, which shifts every remaining entry, so splitting was quadratic in the number of entries. The first update for a worktree carries every entry. It is split when a project is shared or served by a remote server, and by collab when a guest joins. This iterates the entries once, as `split_repository_update` already does. The chunks are unchanged. Time to split one update: | Entries | Before | After | |---|---|---| | 100,000 | 71 ms | 2.8 ms | | 500,000 | 1.6 s | 22 ms | | 1,000,000 | 7.2 s | 46 ms | ## Testing - The four `worktree` integration tests that relay chunked updates into a remote worktree pass. - `./script/clippy -p proto` passes. ## Self-review - [x] I have 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 the time to share or remotely open projects with very many files |
||
|
|
d0400aaf03 |
gpui: Match keystrokes before context predicates (#66634)
## Summary `Keymap::resolve_bindings_for_input` now matches keystrokes before evaluating context predicates. Keystroke matching is cheaper and rejects most bindings. Both checks are just pure filters so lookup results are identical. Avg time per `Keymap::bindings_for_input` call over 48 common keystrokes in editor context. Windows 11 Ryzen 7 9800X3D. | Keymap | Before | After | |---|---|---| | Linux | 15.5 µs | 1.26 µs | | Linux + vim (normal mode) | 41.4 µs | 3.05 µs | | Windows | 14.6 µs | 1.20 µs | | Windows + vim (normal mode) | 41.5 µs | 2.97 µs | ## Testing Windows 11, with and without vim mode: typing, `ctrl-s`, `ctrl-shift-p` hints, `ctrl-k ctrl-c`, `ctrl-k z`, buffer search `enter` and `escape`, and vim `i`, `escape`, `dd`, `gg`, `G`, `ciw`, `v d`. No issues found. - `cargo test -p gpui --features test-support`: pass. - `cargo test -p vim -p which_key`: pass. - `cargo test -p zed -- keymap emacs keybinding`: pass. - Lookup results match before and after for every bound keystroke sequence and prefix, across 13 context stacks and the Linux, Windows, and macOS keymaps, with and without vim. ## 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] Improved keybinding lookup performance. |
||
|
|
f0fa51bb51 |
gpui: Fix unused import warning with bench-support (#66905)
## Summary
Building gpui with `bench-support` alone without `test-support`, as
`cargo check -p gpui --features bench-support` and
script/gpui-bench-compare do, warns:
warning: unused import: `DisplayId`
--> crates/gpui/src/platform/test/platform.rs:7:32
Fix gates the import on `test-support`, like the neighboring imports
that are only used by `test-support` code.
#63039 added `bench-support` as a test dependency, and then #65059 added
the `DisplayId` imports without the same `#[cfg(...)]` its users have.
## Testing
Before
# cargo check -p gpui --features bench-support
[...]
warning: unused import: `DisplayId`
--> crates/gpui/src/platform/test/platform.rs:7:32
|
7 | CursorStyle, DevicePixels, DisplayId, DummyKeyboardMapper,
ForegroundExecutor, Keymap,
| ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by
default
warning: `gpui` (lib) generated 1 warning (run `cargo fix --lib -p gpui`
to apply 1 suggestion)
After
# cargo check -p gpui --features bench-support
Checking gpui v0.2.2 (/home/josh/Source/zed/crates/gpui)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.14s
## 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] N/A
|
||
|
|
5bd59e2e43 |
open_ai: Add GPT-6.1 Terra (#66659)
## Summary Make GPT-6.1 Terra available for openai models Release Notes: - open_ai: Added support for GPT 6.1 Terra --------- Co-authored-by: Anant Goel <anant@zed.dev> |
||
|
|
06999050d6 |
agent: Stream thread saves into zstd instead of buffering the JSON (#66683)
## Summary Closes #65622 `ThreadsDatabase::save_thread_sync` serialized the whole thread into a JSON `String` and then compressed it with `zstd::encode_all` into a second buffer, so every save held the full uncompressed JSON and the compressed output at the same time. For long threads with large tool outputs that's tens of MB per save. This change serializes through a `BufWriter` straight into a `zstd::stream::Encoder`, so the uncompressed JSON is never held in memory. The `BufWriter` is flushed explicitly so write errors propagate. Serialization and compression now both happen before taking the database lock (serialization already did), so the lock is only held for the insert. The stored format is unchanged: same compression level, same JSON including the flattened `version` field, so existing rows and the load path are unaffected. I measured it with a standalone program (not part of this PR) on a synthetic thread with about 54 MB of JSON, 5 runs each: | | extra peak heap during save | serialize + compress (median) | | --- | --- | --- | | before | 64.2 MiB | 42.6 ms | | after | 0.23 MiB | 31.1 ms | The synthetic data compresses very well, so on real threads the saving is roughly the size of the uncompressed JSON per save. The `BufWriter` matters: without it, streaming was about 2x slower than before because `serde_json` makes many tiny writes. Not in this PR: the save on scroll (`ui_scroll_position` and `draft_prompt` are part of `DbThread`, so scrolling still triggers a full save). That seems like a separate design question. I'm happy to look at it as a follow-up. This change also doesn't touch save ordering. Saves for a session still go through the save worker one at a time, and #62698 is the separate fix for stale saves. ## Testing - Added `test_save_thread_stores_versioned_json`, which saves a thread with a long summary (quotes, backslashes, newlines, Unicode), reads the raw row, decompresses it, checks the `version` field, and checks that `DbThread::from_json` restores the same value. It guards the on-disk format, so it passes before and after the change. - `cargo test -p agent db::` (22 tests), `./script/clippy -p agent` and `cargo fmt --check -p agent` pass. I ran these on Linux (arm64). I haven't tested it manually in the app. ## 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). (No UI changes.) - [x] Tests cover the new or changed behavior. Release Notes: - Improved memory usage when saving long agent threads. Co-authored-by: Nikhil Sood <206686452+founderinaction@users.noreply.github.com> |
||
|
|
dc93abce2f |
gpui: Keep macOS notification service calls off the UI thread (#66934)
## Problem macOS notification APIs can synchronously wait for the notification service, even when they expose completion handlers. A captured main-thread stack showed notification dismissal blocked in `removePendingNotificationRequestsWithIdentifiers:` → `__NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__`. GPUI called that API on the UI thread while holding its platform-state mutex, freezing the interface until macOS replied. ## Changes - Lazily start one dedicated notification thread that owns the notification center, delegate, authorization state, and registered categories. - Queue posting and dismissal in FIFO order so a delayed dismissal cannot overtake a replacement notification. Initialization and native calls happen on the worker; notification responses still return through the foreground executor. - Return a `Task<()>` from `dismiss_system_notification`, allowing callers to await completion without blocking the UI. Completion means the platform calls returned, not that asynchronous OS work finished. Dropping the task does not cancel dismissal. Update the other platform implementations, example, and tests for the return type. - Keep the unbundled-binary guard and use autorelease pools around native work. A stalled notification service can still delay later notification commands, but no longer stalls the UI. ## Verification Ran on macOS: ```sh corgi test -p gpui -p gpui_macos --lib 'system_notification' ``` All five tests passed. The new regression test submits show/dismiss/show commands without advancing a consumer, checks their order, and verifies completion remains pending until acknowledgement. The source published here is identical to that tested revision; the subsequent commit only records the human removal of the README review marker. No live macOS-service stall was induced, and Linux/Windows/browser workflows were not run. Release Notes: - [GPUI] Fixed macOS system notification operations blocking the UI thread while waiting for the notification service. --------- Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com> Co-authored-by: Anthony Eid <hello@anthonyeid.me> |
||
|
|
83df5df635 |
Add corgi to the Nix dev shell (#66940)
Release Notes: - N/A Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
aff99ecc32 |
gpui: Animate SVG transformations without re-rendering views (#66896)
## Summary Ref #21146, #23479, #51597 One common problem that I've been working towards fixing by adding a retained mode is Zed's high battery usage, caused by invalidating clean entities because a single ancestor is dirty. While looking closer into this problem I realized that a ton of the invalidations we run into are due to animations, which can be fixed separately from retained mode. My solution is adding a `TimedTransformation` struct and a new animation API that uses it. ```rust // A spinner: one full turn every two seconds. svg() .path("icons/load_circle.svg") .with_timed_transformation(TimedTransformation::rotation( Duration::from_secs(2), Transformation::default(), )) // A pulsing ring: grows to 1.5x while fading out, each value with its own easing. svg() .path("icons/ring.svg") .with_timed_transformation( TimedTransformation::new(Duration::from_millis(1750)) .from(Transformation::alpha(0.6)) .to(Transformation::scale(size(1.5, 1.5)).with_alpha(0.)) .with_scale_easing(Easing::EaseOutQuint), ) ``` Because most of our animations are an SVG sprite with simple matrix operations applied to it, such as rotation, alpha changes and size changes, that change based on elapsed time, we can avoid invalidating the view by extracting the before and after transformations and deriving a function that takes elapsed time and computes what the animated sprite should look like. The extracted function lives in a table on the scene, and each animated sprite points at its entry. This lets GPUI advance animations right before presenting a frame, without dirtying the view or recomputing the scene from scratch. This should save a lot of CPU usage and battery life for end users of GPUI apps that use animations. `Icon` and `Vector` in `ui` now use this for `with_rotate_animation`, so Zed's existing spinners get it with no call site changes. With reduced motion on, the SVG is drawn at its starting transformation and nothing animates. ### Results Main-thread CPU instructions for one animated frame, from a headless benchmark on macOS with the Metal renderer (not included in this PR): | | 200 animated SVGs | 60 rows of text + 5 spinners | |---|---|---| | Re-render with `with_animation` | 6.07 M | 7.34 M | | `with_timed_transformation` | 162 K | 100 K | | Improvement | 37x | 73x | The `svg_animation` example (`cargo run --release -p gpui --example svg_animation`, 200 animated SVGs in a window, Apple M4 Max), as reported by `top`: | | CPU | Energy impact | |---|---|---| | Re-render with `with_animation` | 21% | 21.5 | | `with_timed_transformation` | 6% | 7.5 | | `with_timed_transformation`, capped at 15 fps | 1.9% | 3.0 | That is about 3.5x less CPU and 3x less energy impact uncapped, and about 11x less CPU and 7x less energy impact with the cap. ### Follow ups - Allow animating more primitives, such as glyphs, instead of only SVG sprites - Lower the fixed cost of presenting a frame, which is most of what remains after this change - Retained layers, so a whole subtree can be moved or faded without re-rendering Release Notes: - Improved battery life by animating spinners without re-rendering the views that contain them - [GPUI] Added `TimedTransformation` and `Svg::with_timed_transformation` to animate SVGs without re-rendering a view |
||
|
|
563319c3f4 |
Sync Neovim default key mappings (#66759)
## Summary Sync a few missing keymaps from Neovim. ## References - https://neovim.io/doc/user/lsp/#gra - https://neovim.io/doc/user/treesitter/#v_%5Dn ## 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: - Added `g r t` keymap for `editor: go to type definition`. - Added `] n` and `[ n` keymaps for `vim: select next/previous syntax node`. |
||
|
|
69239eb540 |
ui: Add an icon-only variant to the toggle button component (#66937)
We didn't support having a toggle button group component with just icons in each button, but now we do :) ## 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 |
||
|
|
faf97b0a0c |
Preserve structured model refusal details (#66929)
Carry provider refusal reasons, categories, and input/output stage with refusal errors. Preserve unknown Gemini categories without interpreting them. Release Notes: - N/A |
||
|
|
cb48e27ceb |
project: Prefer musl builds of ACP registry agents on musl Linux hosts (#66914)
The ACP registry now optionally publishes `linux-{arch}-musl` targets.
On a musl host (e.g. Alpine), Zed now picks that target and falls back
to `linux-{arch}` when an agent doesn't publish one.
The host libc is detected at runtime rather than with `cfg!(target_env =
"musl")`: the Linux remote server is a static musl binary that mostly
runs on glibc hosts, and the desktop build is glibc.
- Move the libc probe from the rust-analyzer adapter into
`util::libc_type::host_libc_type()` and cache the result for the process
lifetime.
- Also read `ldd --version` stderr, which is where musl prints its
version. Previously musl hosts were only detected through the `/lib`
scan.
- Use one ordered list of registry platform keys for both the "supported
on this platform" check and the archive selection, so the registry UI
and the installer agree.
Closes #66850
Release Notes:
- Improved ACP registry agent installation on musl-based Linux systems
to use musl builds when available
|
||
|
|
af7a1adb50 |
Use full context window for Copilot models without long-context surcharge (#64302)
# Objective - Some Copilot models support 1 million token context windows without any surcharge, but Zed uses their smaller context windows by default. For models where it's free to have more context, this PR uses them. - Related to #54390 (Copilot path only), #58657 (Claude/Gemini yes, GPT/Grok intentionally not), and #63123. ## Solution - Bumped the API version used for Copilot Chat. The newer version of the `/models` response reports per-tier token pricing (`billing.token_prices`) with a `default` tier and an optional `long_context` tier, each carrying its own `max_prompt_tokens`, `input_price`, and `output_price`. ## Testing Verified against the live `/models` endpoint by diffing both API versions and applying the new `max_token_count` logic. Reproducible with an authenticated `gh` (the Copilot `/models` endpoint accepts a `gh` OAuth token directly): ```bash TOKEN=$(gh auth token) models() { curl -s -H "Authorization: Bearer $TOKEN" -H "X-GitHub-Api-Version: $1" \ https://api.githubcopilot.com/models; } # /models is non-deterministic — GitHub serves one of a few different model sets # regardless of API version — so retry until both versions return the same IDs. for _ in $(seq 1 20); do old=$(models 2025-10-01); new=$(models 2026-08-01) a=$(printf '%s' "$old" | jq -r '.data[].id' | sort) b=$(printf '%s' "$new" | jq -r '.data[].id' | sort) [ "$a" = "$b" ] && break done [ "$a" = "$b" ] || { echo "could not get matching model sets" >&2; exit 1; } jq -s -r ' (.[0].data | map({(.id): .capabilities.limits.max_context_window_tokens}) | add) as $old | .[1].data[] | select(.capabilities.limits.max_context_window_tokens != null) | .capabilities.limits as $lim | (.billing.token_prices // {}) as $tp | ($tp.default // {}) as $d | ($tp.long_context // null) as $lc | (($lc != null) and (($lc.input_price > $d.input_price) or ($lc.output_price > $d.output_price))) as $surcharged | (if $surcharged and (($d.max_prompt_tokens // 0) > 0) then [$d.max_prompt_tokens + ($lim.max_output_tokens // 0), $lim.max_context_window_tokens] | min else $lim.max_context_window_tokens end) as $new | [ .id, $old[.id], $lim.max_context_window_tokens, $new, (if $surcharged then "surcharged" elif $lc then "free" else "none" end), (if $new != $old[.id] then "CHANGED" else "" end) ] | @tsv ' <(printf '%s' "$old") <(printf '%s' "$new") \ | column -t -N 'MODEL,BEFORE,FULL_WINDOW,AFTER,LONG_CTX,' ``` Result (abridged; available models vary by Copilot plan): ``` MODEL BEFORE FULL_WINDOW AFTER LONG_CTX claude-opus-5 264000 1000000 1000000 free CHANGED claude-sonnet-5 264000 1000000 1000000 free CHANGED claude-fable-5.1 264000 1000000 1000000 free CHANGED claude-opus-4.8 264000 1000000 1000000 free CHANGED gemini-3.7-flash 264000 1000000 1000000 free CHANGED gemini-3.8-flash 265536 1048576 1048576 free CHANGED gpt-5.6-luna-utility 328000 1050000 1050000 none CHANGED gpt-5.4 400000 1050000 400000 surcharged gpt-5.6-luna 328000 1050000 328000 surcharged gpt-6-astra 400000 1178000 400000 surcharged grok-4.6 328000 500000 328000 surcharged gpt-4o 128000 128000 128000 none ``` Also ran `cargo test -p copilot_chat` and it passed. ## 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) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Improved GitHub Copilot models to use their full context window when the provider does not charge a long-context surcharge, and to display per-token pricing where available. Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> Co-authored-by: Jakub Konka <kubkon@jakubkonka.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
4fd48c02ac |
Miscellaneous improvements to prepare for Rust 1.100 (#66901)
## Summary Fixes rustc and clippy warnings for a potential upcoming Rust 1.100 version bump. All changes are backwards compatible and Rust is **not** bumped in this PR. ## 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] N/A --------- Co-authored-by: Finn Evers <finn.evers@outlook.de> |
||
|
|
5a40bc8bd7 |
gpui_web: Fix safe-area insets under a strict style CSP (#66907)
## Summary gpui web uses exploratory divs to learn about the unusable deadspace on the margins of a device's screen, which it calls safe-area insets. When doing this, it uses html `style` attributes with raw css parameters. In modern web development, is typical to use a `Content-Security-Policy` to block `unsafe-inline` css in html. This feature breaks when such security settings are in use. However, while raw CSS in the style element is not permitted, even with the CSP set to block `unsafe-inline` style attributes, it still permits some direct adjustments via CSSOM with `el.style.setProperty(p, v)`. This workaround is already used by gpui web on the canvas and IME elements. See * https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/style-src * https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/style-src-attr ## Testing I have manually reviewed this change in WebKit, Chromium, and Gecko. All modern web engines support this workaround and document it as safe. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] There are no UI changes. - [x] Tests are not relevant for this change. Release Notes: - [GPUI] Fixed safe-area insets reading as zero on pages with a strict style Content-Security-Policy. |
||
|
|
48741fd17d |
which_key: Show popup above open modals (#66838)
Follow-up to #66068 With which-key enabled, the popup didn't show while a modal was open, like the commit editor or Go to Line. It was drawn as a modal, and the modal layer holds only one. It's now drawn in its own slot on `MultiWorkspace`, deferred above the modal layer like the sidebar overlay. It doesn't take focus, so the chord still completes in the open modal. <img width="500" src="https://github.com/user-attachments/assets/2089163d-e96b-4b5e-8d2d-0ca5d9826f63" /> Release Notes: - Improved the which-key popup to also show inside open dialogs, like Go to Line and the commit editor. |
||
|
|
42fa909546 |
corgi: Support building on NixOS (#66827)
Building Zed with corgi on Linux fails because corgi hands webrtc-sys and wasmtime-c-api-impl the macOS cmake and libwebrtc. Neither tool in `corgi.toml` says which platform it's for, so corgi uses them everywhere. This gives both tools a `targets` list and adds Linux x86_64 builds of each, same as Delta's `corgi.toml`. It also forwards `PKG_CONFIG`, `PKG_CONFIG_PATH` and `CMAKE` from the environment to the build scripts that need them. NixOS needs this because build scripts run in a sandbox with no environment, so they can't find pkg-config or the libraries from a Nix shell, and the downloaded Linux cmake can't run there since it expects a standard dynamic loader. With this, Zed builds on NixOS as long as the shell sets `CORGI_RUST_TOOLCHAIN`, `CORGI_CC` and `CORGI_NATIVE_RUNTIME_ROOTS`. Nothing changes on a mac. I checked, and it picks the same tools and rebuilds nothing, unless the shell already sets `PKG_CONFIG_PATH` or `CMAKE`, in which case webrtc-sys and the crates that depend on it rebuild once. One thing still doesn't work out of the box. The Linux libwebrtc is a zip, and corgi unpacks tools with `tar`, which GNU tar can't handle. I use bsdtar as `tar` locally, but this probably wants a fix in corgi. Left out on purpose: - Linux arm64 tools. - Zed's Nix dev shell. `nix develop` still doesn't include corgi or set the `CORGI_*` variables, so for now you have to set those yourself. - Non-Nix Linux like Ubuntu. Corgi needs every system library listed under `[libraries]` there, and Zed doesn't list any yet. Release Notes: - N/A |
||
|
|
27bbbc1cc4 |
languages: Highlight C/C++ preprocessor call arguments (#66875)
## Summary Arguments of `preproc_call` nodes, like the `pack(push, 4)` in `#pragma pack(push, 4)` or the `FOO` in `#undef FOO`, had no highlight capture, so they always rendered as plain text. `#define` bodies are covered by the injection, and `#if` conditions are parsed as expressions, but nothing reached `preproc_call`'s `preproc_arg`. I added a `(preproc_call argument: (preproc_arg) @preproc)` rule to both the C and C++ highlight queries. I went with `@preproc` because every built-in theme already defines it, and it makes the whole directive line one color, like VS Code does. Happy to switch to `@constant.macro` or `@string` if you'd prefer. | Before | After | | --- | --- | | <img alt="preproc-before" src="https://github.com/user-attachments/assets/95fa0660-c41f-4433-98c7-887d9871fe1d" /> | <img alt="preproc-after" src="https://github.com/user-attachments/assets/7c4fa978-a6c1-4707-a627-6d7e32dd897a" /> | | <img alt="preproc-before-light" src="https://github.com/user-attachments/assets/3d2479ce-cd04-42ae-bfeb-e5c8c49fb9a6" /> | <img alt="preproc-after-light" src="https://github.com/user-attachments/assets/8d342f73-25e2-4dae-b984-72b88fd23287" /> | `#define FOO 1` and `#if defined(BAR)` look the same before and after. Closes #66675 ## Testing - Added a query test for C and one for C++, checking that `#pragma` and `#undef` arguments are captured as `preproc` and that a `#define` body isn't. Both fail without the query change. - `cargo test -p languages` passes (105 tests), and `./script/clippy -p languages` is clean. - Built the branch on macOS and compared it with Zed 1.28.1 on the same file, in One Dark and One Light (screenshots above). To try it: open a `.c` or `.cpp` file and type `#pragma pack(push, 4)` / `#undef FOO`. The arguments should now take the directive's color. I used Claude Code to help with this change and tested it myself. ## 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 syntax highlighting of `#pragma` and `#undef` arguments in C and C++. --------- Co-authored-by: imryanthedev <352313849+imryanthedev@users.noreply.github.com> |
||
|
|
8e474e1598 |
gpui: Pass premultiplied alpha to wgpu shaders as a uniform (#66902)
We tried implementing this switch as a WGSL override constant to avoid the uniform read. Only `blend_color` reads it, so most of our vertex shaders don't use the constant. WebGPU specifies that unused constants should be ignored. Safari 26 silently fails to build the pipeline instead. So, put the flag back in the uniform. Release Notes: - N/A - [GPUI] N/A |
||
|
|
73ad8e3ed0 |
Fix opening ssh:// links with a drive letter on Windows remotes (#66814)
## Summary Closes #66813 `ssh://host/C:/project` (and `zed://ssh/host/C:/...`) sends `/C:/project` to the remote, because a URL path keeps a `/` before a Windows drive letter. A Windows remote server cannot canonicalize that path (os error 123), so the project fails to open with `DevServerProjectPathDoesNotExist`. This is a follow-up to #66497, which fixed the same leading `/` for local `file://` and `zed://file` links. That fix could not be reused here: it checks the local OS while the URL is parsed, and for SSH the remote's OS is only known after connecting. This change strips the slash in `determine_paths_with_positions`, which runs after the connection and can ask the remote for its path style. Paths on Unix remotes and `/~` paths are left alone. Before (Zed 1.27.0): <img width="420" height="225" alt="zed-ssh-drive-letter-error" src="https://github.com/user-attachments/assets/ee33b4e7-4dae-43a1-8bfa-8b85c8302ebe" /> After (this branch, same URL): <img width="620" height="140" alt="zed-ssh-drive-letter-fixed" src="https://github.com/user-attachments/assets/a937839c-f8ba-4f2e-9fb0-9ca1a91380be" /> ## Testing - Windows 11 Pro with OpenSSH Server, connected to itself over `localhost` (setup in #66813). - Zed 1.27.0: `zed ssh://zed-win-repro/C:/Users/<user>/zed-ssh-repro/project` fails with `DevServerProjectPathDoesNotExist path=/C:/...`. - This branch, debug build, with the remote server built from the same commit: the same URL opens the project, and the worktree is `C:\Users\<user>\zed-ssh-repro\project`. - `cargo test -p recent_projects --lib remote_connections`: 6 passed, including the new `test_strip_slash_before_drive_letter`, which covers both path styles and the paths that must stay unchanged. - `cargo clippy -p recent_projects --tests`: no warnings. To test a debug build against a Windows remote: the debug remote server panics outside the checkout ("dev asset loading requires running from within the checkout"), so build it with `cargo build -p remote_server --features util/debug-embed` and set `ZED_COPY_REMOTE_SERVER` to `target/debug/remote-server.exe`. ## 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). (No UI changes.) - [x] Tests cover the new or changed behavior. Release Notes: - Fixed `ssh://` links with a drive letter (for example `ssh://user@host/C:/project`) failing to open a project on a Windows remote. |
||
|
|
d3fc053d5b |
gpui: Speed up sorting scene primitives (#66898)
`Scene::finish` sorts each primitive array by draw order. It used `sort_by_key` on the primitives themselves, so every move in the sort copied a whole instance struct. This sorts small `(key, index)` pairs instead, then permutes the primitives in place by following the permutation's cycles, so each primitive is copied once. Details: - The insertion index is part of each key, so ties keep insertion order, the same as the stable `sort_by_key` did. That also makes `sort_unstable` safe to use, and it measured about 20% faster than the stable sort here. - Arrays that are already sorted return early without allocating. - One key buffer, local to `finish`, is shared by all primitive kinds. - Paths and surfaces keep `sort_by_key`: they aren't `Copy` and there are few of them. ## Benchmarks This adds a `Primitives/finish` group to the `primitives` bench. It inserts the primitives during untimed setup and times only `Scene::finish`. Measured on an Apple Silicon Mac, two seeds per size: | Case | `main` | This PR | Change | |---|---|---|---| | random-256 | 6.0 / 7.2 µs | 4.0 / 4.4 µs | −33% / −40% | | random-1024 | 46.0 / 40.7 µs | 22.9 / 18.4 µs | −50% / −55% | | random-4096 | 270 / 264 µs | 121 / 117 µs | −55% / −55% | The already-sorted patterns (grid, stripes, overlay and so on) take 0.1–4 µs and are the same or faster, apart from run-to-run noise in the 4096-primitive cases. `finish` is about 5% of building a scene in `Primitives/scene/random-4096` (about 5.5 ms per build), so the whole scene build gets roughly 2.5–3% faster. Draw-order assignment during insertion is the rest. Release Notes: - [GPUI] Improved the speed of sorting scene primitives in `Scene::finish` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> |
||
|
|
498af674ab |
fs: Improve responsiveness during heavy filesystem activity (#66835)
## Summary While working on https://github.com/zed-industries/zed/discussions/66325 I noticed that everytime I boot Zed with `cargo run` it blocks the background executor for **~5 seconds** while processing fs events from `cargo check`. I noticed this via the following log that showed 2 things: 1. We block the background executor for ~5 seconds because we never yield the dispatcher loop. 2. We have some overflow issues with `user dropped` errors, which i want to look into next. Because we seem to over rescan when there is already one in process (not 100% sure) but it looks like it. **Before** **Note**: I had to cap the logs, because the `rescan: user dropped` kept showing up (over 400 times) until cargo check was done. ``` 2026-11-06T17:51:19+01:00 INFO [zed::reliability::hang_detection::logging] Background hang detected on Unknown: Tasks(s) that ran too long 5.508914833s - crates/fs/src/fs_watcher.rs:961:38 2026-11-06T17:56:24+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to.config/zed/keymap.json"], recent_paths=["/path/to/zed/target/release/.fingerprint/dary_heap-5f373105b3bafcd8/lib-dary_heap.json", "/path/to/zed/target/release/.fingerprint/dary_heap-5f373105b3bafcd8/lib-dary_heap.json", "/path/to/zed/target/release/.fingerprint/dary_heap-5f373105b3bafcd8/lib-dary_heap.json", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta"] 2026-11-06T17:56:24+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to.config/zed/settings.json"], recent_paths=["/path/to/zed/target/release/.fingerprint/dary_heap-5f373105b3bafcd8/lib-dary_heap.json", "/path/to/zed/target/release/.fingerprint/dary_heap-5f373105b3bafcd8/lib-dary_heap.json", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to.config/zed/keymap.json"] 2026-11-06T17:56:24+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/toLibrary/Application Support/Zed/extensions/installed"], recent_paths=["/path/to/zed/target/release/.fingerprint/dary_heap-5f373105b3bafcd8/lib-dary_heap.json", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json"] 2026-11-06T17:56:24+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed/assets"], recent_paths=["/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed"] 2026-11-06T17:56:24+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed/crates/grammars/src"], recent_paths=["/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed", "/path/to/zed/assets"] 2026-11-06T17:56:24+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to.config/zed/themes"], recent_paths=["/path/to/zed/target/release/.fingerprint/gpui_util-b340aed9b9d177bb/invoked.timestamp", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src"] 2026-11-06T17:56:24+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to.gitconfig"], recent_paths=["/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src", "/path/to.config/zed/themes"] 2026-11-06T17:56:24+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/toDocuments/code/zed"], recent_paths=["/path/to/zed/target/release/deps/rmeta5zTfxr", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to/zed/target/release/deps/rmeta5zTfxr/full.rmeta", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src", "/path/to.config/zed/themes", "/path/to.gitconfig"] 2026-11-06T17:56:25+01:00 INFO [project::prettier_store] Prettier config file ".prettierrc" changed, reloading prettier instances for worktree 1 2026-11-06T17:56:30+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to.config/zed/keymap.json"], recent_paths=["/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/rustcMLfajb", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/rustcMLfajb", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o"] 2026-11-06T17:56:30+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to.config/zed/settings.json"], recent_paths=["/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/rustcMLfajb", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to.config/zed/keymap.json"] 2026-11-06T17:56:30+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/toLibrary/Application Support/Zed/extensions/installed"], recent_paths=["/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json"] 2026-11-06T17:56:30+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed/assets"], recent_paths=["/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed"] 2026-11-06T17:56:30+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed/crates/grammars/src"], recent_paths=["/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed", "/path/to/zed/assets"] 2026-11-06T17:56:30+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to.config/zed/themes"], recent_paths=["/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.4iz1v46zr9aqlfexkegd6zykq.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src"] 2026-11-06T17:56:30+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to.gitconfig"], recent_paths=["/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to/zed/target/release/build/io-lifetimes-bd3d3f02c86a2171/build_script_build-bd3d3f02c86a2171.build_script_build.2a749c07dcaf763-cgu.0.rcgu.o", "/path/to.config/zed/keymap.json", "/path/to.config/zed/settings.json", "/path/toLibrary/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src", "/path/to.config/zed/themes"] ``` **After** **Note**: It now only shows up a few times and the `[zed::reliability::hang_detection::logging] Background hang detected on Unknown: Tasks(s) that ran too long` message is gone :). ``` 2026-11-11T13:57:30+01:00 INFO [language] found user-installed language server for rust-analyzer. path: "/path/to/.rustup/toolchains/1.98.1-aarch64-apple-darwin/bin/rust-analyzer", arguments: [] 2026-11-11T13:57:30+01:00 INFO [lsp] starting language server process. binary path: "/path/to/.rustup/toolchains/1.98.1-aarch64-apple-darwin/bin/rust-analyzer", working directory: "/path/to/zed", args: [] 2026-11-11T13:57:30+01:00 ERROR [crates/edit_prediction/src/edit_prediction.rs:2626] No organization selected. 2026-11-11T13:57:31+01:00 ERROR [crates/edit_prediction/src/edit_prediction.rs:2626] No organization selected. 2026-11-11T13:57:46+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/.config/zed/keymap.json"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/html_output_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/text_field_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/chooser_resource_loader.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/number_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/hidden_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/date_time_field_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/menu_list_inner_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/base_text_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/form_data.h"] 2026-11-11T13:57:46+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/.config/zed/settings.json"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/text_field_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/chooser_resource_loader.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/number_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/hidden_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/date_time_field_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/menu_list_inner_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/base_text_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/form_data.h", "/path/to/.config/zed/keymap.json"] 2026-11-11T13:57:46+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/Library/Application Support/Zed/extensions/installed"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/chooser_resource_loader.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/number_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/hidden_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/date_time_field_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/menu_list_inner_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/base_text_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/form_data.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json"] 2026-11-11T13:57:46+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed/assets"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/chooser_resource_loader.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/number_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/hidden_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/date_time_field_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/menu_list_inner_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/base_text_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/form_data.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed"] 2026-11-11T13:57:46+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed/crates/grammars/src"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/number_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/hidden_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/date_time_field_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/menu_list_inner_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/base_text_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/form_data.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed", "/path/to/zed/assets"] 2026-11-11T13:57:46+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/.config/zed/themes"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/hidden_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/date_time_field_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/menu_list_inner_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/base_text_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/form_data.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src"] 2026-11-11T13:57:46+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/.gitconfig"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/date_time_field_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/menu_list_inner_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/base_text_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/form_data.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src", "/path/to/.config/zed/themes"] 2026-11-11T13:57:46+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/menu_list_inner_element.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/base_text_input_type.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/core/html/forms/form_data.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src", "/path/to/.config/zed/themes", "/path/to/.gitconfig"] 2026-11-11T13:57:47+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/.config/zed/keymap.json"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/plugins", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription_change_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_type_converter.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription_options.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/service_worker_global_scope_push.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_error.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_message_data.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_provider.h"] 2026-11-11T13:57:47+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/.config/zed/settings.json"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription_change_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_type_converter.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription_options.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/service_worker_global_scope_push.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_error.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_message_data.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_provider.h", "/path/to/.config/zed/keymap.json"] 2026-11-11T13:57:47+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/Library/Application Support/Zed/extensions/installed"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription_change_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_type_converter.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription_options.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/service_worker_global_scope_push.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_error.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_message_data.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_provider.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json"] 2026-11-11T13:57:47+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed/assets"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_type_converter.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription_options.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/service_worker_global_scope_push.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_error.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_message_data.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_provider.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed"] 2026-11-11T13:57:47+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed/crates/grammars/src"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_subscription_options.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/service_worker_global_scope_push.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_error.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_message_data.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_provider.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed", "/path/to/zed/assets"] 2026-11-11T13:57:47+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/.config/zed/themes"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/service_worker_global_scope_push.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_error.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_message_data.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_provider.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src"] 2026-11-11T13:57:47+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/.gitconfig"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_error.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_message_data.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_provider.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src", "/path/to/.config/zed/themes"] 2026-11-11T13:57:47+01:00 ERROR [fs::fs_watcher] Native filesystem watcher requested rescan: reason="rescan: user dropped", paths=["/path/to/zed"], recent_paths=["/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_event.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_message_data.h", "/path/to/zed/target/debug/build/webrtc-sys-fee0322722e0221f/out/webrtc-0001d84-4/mac-arm64-release/include/third_party/blink/renderer/modules/push_messaging/push_provider.h", "/path/to/.config/zed/keymap.json", "/path/to/.config/zed/settings.json", "/path/to/Library/Application Support/Zed/extensions/installed", "/path/to/zed/assets", "/path/to/zed/crates/grammars/src", "/path/to/.config/zed/themes", "/path/to/.gitconfig"] 2026-11-11T13:57:48+01:00 INFO [project::prettier_store] Prettier config file ".prettierrc" changed, reloading prettier instances for worktree 1 2026-11-11T13:57:50+01:00 ERROR [crates/editor/src/editor.rs:3809] Get document highlights via rust-analyzer failed: content modified 2026-11-11T13:57:51+01:00 INFO [project::prettier_store] Prettier config file ".prettierrc" changed, reloading prettier instances for worktree 1 2026-11-11T13:57:59+01:00 INFO [zed::reliability] memory usage: resident 555 MiB (+446 MiB), virtual 521723 MiB 2026-11-11T13:57:59+01:00 INFO [zed::reliability] worktree diagnostics: projects 1, orphaned projects 0, stores 1, slots 1, live 1, visible 1, strong 1, dead weak 0, loading 0, entries 5300, visible entries 5293, largest /path/to/zed (5300 entries, 5293 visible) 2026-11-11T13:58:59+01:00 INFO [zed::reliability] memory usage: resident 640 MiB (+85 MiB), virtual 521821 MiB 2026-11-11T13:58:59+01:00 INFO [zed::reliability] worktree diagnostics: projects 1, orphaned projects 0, stores 1, slots 1, live 1, visible 1, strong 1, dead weak 0, loading 0, entries 5952, visible entries 5293, largest /path/to/zed (5952 entries, 5293 visible) ``` **reviewer note**: The only case that this change does not support/cover is coalescing rescans across batches which is maybe a follow-up PR worth, but only if we think it's a problem, but will leave that up to the reviewer. ## Testing I add tests that validate that we still handle all events inside the order as we expected. As you can see inside the **after** logs, the background executor hang detector message is gone which showed up every time consistently for me. ## 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, such as external builds creating or removing many files. |
||
|
|
7fab4c0527 |
language_models: Detect OpenRouter Anthropic aliases (#66857)
## Summary OpenRouter aliases are prefixed with `~` (e.g. `~anthropic/claude-sonnet-latest`). `into_open_router` only checked for the `anthropic/` prefix, so aliases were not treated as Anthropic models: no `cache_control` was sent (no prompt caching), and `reasoning_details` was echoed back in requests. Strip the leading `~` before checking the prefix. Aliases are documented at https://openrouter.ai/docs/guides/routing/routers/latest-resolution ## Testing Added `test_anthropic_alias_model_uses_anthropic_request_handling`. It fails without the fix (`Alias should get cache_control`) and passes with it. `cargo test -p language_models --lib open_router`, `cargo fmt --check` and `./script/clippy -p language_models` pass. I did not test this manually against the OpenRouter API. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the checklist. (N/A, no UI change) - [x] Tests cover the new or changed behavior. Release Notes: - Fixed prompt caching for OpenRouter Anthropic aliases (e.g. `~anthropic/...`) |
||
|
|
4dff6f8eef |
terminal: Route the remaining emulator access through the alacritty module (#66744)
## Summary A follow-up to #57483. `terminal.rs` still reads a few things straight from alacritty's `Term`: cursor blinking, colors the program set, history size, the cursor line and the renderable cells. It also runs vte's `Processor` itself. These now go through small functions in `alacritty.rs`, so `terminal.rs` reaches the emulator only through that module. Behaviour doesn't change. This makes the emulator replaceable behind one module. Motivation: #66743. ## Testing - `cargo test -p terminal -p terminal_view`: 118 and 99 tests pass. - `./script/clippy -p terminal` is clean. ## 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). (No UI changes.) - [x] Tests cover the new or changed behavior. (No behaviour change; existing tests cover these paths.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Release Notes: - N/A Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3c846c3d49 |
Fix sidebar and no titlebar aligment (#66877)
Follow-up to https://github.com/zed-industries/zed/pull/65671 Make the vertical size of the tab bar and "Search threads" elements aligned. <img width="1728" height="51" alt="Screenshot 2026-11-12 at 12 34 07" src="https://github.com/user-attachments/assets/8ce6294d-4392-440b-9b1d-9a99625124c1" /> Release Notes: - N/A (Nightly only) |
||
|
|
eda58e5040 |
Keep history of unchanged tasks on tasks file updates (#66646)
Closes https://github.com/zed-industries/zed/issues/52659 Release Notes: - Fixed task rerun opening task spawn menu after any tasks.json edit |
||
|
|
78a8526196 |
Update merman to 0.9.3 (#66874)
Closes #66582 Closes #62410 Closes #62913 Closes https://github.com/zed-industries/zed/pull/65192 * Label measurement merman 0.9 no longer ships font metrics, and sizes label boxes from a font-agnostic estimate. `SvgRenderer::measure_text_width` lays out a line with the renderer's own `usvg` options, and merman's width callback uses it, so layout and painting share font matching, fallback and shaping. This also fixes labels overflowing their nodes with a wide UI font. * Font data `fontdb` reopens and maps a file-backed font on every glyph lookup, which made each measurement with a system font cost 1 to 5ms. The SVG renderer now reads each font file selected for text once, within a 64MiB total budget, and serves later lookups from memory. A 36-character measurement with Menlo went from 2.8ms to 0.06ms. * Configuration merman 0.9 follows Mermaid 12 defaults: the `neo` look, 120px wrapping and a 120px minimum node width. Zed keeps the classic look, 200px wrapping and no minimum width, as before. merman also stopped restricting `themeVariables` in diagram directives; Zed restricts it again, together with `fontSize`. * Styling merman now defines label text once in `<defs>` and references it with `<use>`, so descendant selectors and position lookups no longer reach it. Node accents, mindmap section colors and edge label backgrounds are adapted to that structure. Label typography comes from merman instead of a forced 16px, and label viewports are not clipped. * Limits * Text measurement has a per-render work budget, so a label of zero-width characters fails the render instead of measuring ever longer prefixes. * merman 0.9.3 has a hard-coded limit on CSS matching work in its label fallback. Flowcharts above about 310 nodes and class diagrams above about 375 members fail with `svg_fallback_selector_index exceeded`. `main` renders 500 nodes and 400 members. * Behavior changes * ER relationship labels are 14px, merman's size; they were forced to 16px. * A `gantt.fontSize` directive is ignored, because `fontSize` is restricted at any depth. * A per-node `font-size` style is now painted; before, only the node box grew. * A single label line above roughly 90KB fails to render. ### Known regression Release Notes: - Fixed Mermaid state descriptions overlapping in the Markdown preview. - Fixed Mermaid sequence diagram titles being cut off. - Fixed Mermaid labels overflowing their nodes with wide fonts. - [GPUI] Added `SvgRenderer::measure_text_width`, and made SVG text rendering keep used font files in memory. |
||
|
|
6ceb6fee87 |
git_ui: Fix "entity released" errors when closing the branch picker early (#66873)
The branch picker detached the tasks that wait for the default branch and remote URLs. If you closed the picker before they finished, they tried to update it anyway and logged `entity released`. The picker now owns those tasks, so they're dropped along with it. <img width="600" src="https://github.com/user-attachments/assets/2cff4aab-8476-4aa6-bd68-b1b3953fd163" /> Release Notes: - N/A |
||
|
|
8a5cf7e23a |
gpui: Use Levien's shadow approximation (#66812)
GPUI draws shadows using Evan Wallace's technique: the blur along x is computed in closed form with the error function, and the blur along y is integrated numerically with four samples. Each pixel runs that loop, which evaluates the error function eight times, plus four square roots and four exponentials. We replace it with [Raph Levien's closed-form approximation](https://raphlinus.github.io/graphics/2020/04/21/blurred-rounded-rects.html) of a blurred rounded rectangle. The blurred shape is approximated as a superellipse whose radius and exponent are fitted to the blur, so each pixel needs one distance and two error function evaluations. Everything that depends only on the shadow is computed once per vertex and passed to the fragment shader through interpolators. The content in the `shadow` example differs from `main` by at most 5/255 per channel. On an Intel HD 4600, GPU time in the `shadow` example is reduced by 30% (2,008µs → 1,399µs). Release Notes: - Reduced GPU usage - [GPUI] Improved shadow rendering performance |
||
|
|
be07e43ea0 |
gpui: Reduce overdraw using the depth buffer (#66811)
GPUI paints a frame by recording primitives (quads, shadows, paths, underlines, glyph sprites, surfaces) into a `Scene`. The renderer then draws the scene's primitives back to front, so that later primitives paint over earlier ones. This means every pixel of every primitive is shaded, even where a later primitive completely covers it. In heavily nested UI, this adds up to a lot of overdraw. Inspired by WebRender, we reduce overdraw with a depth buffer and two passes: - The opaque pass draws quads that we know cover their whole area with an opaque color. They're drawn front to back, with depth testing and depth writes enabled. In practice, we can only make this guarantee for quads with a solid, fully opaque fill and no rounded corners. - The blended pass draws everything else back to front, with depth testing enabled but depth writes disabled. This is essentially the existing render loop with a depth test added. Any fragment 'behind' an opaque quad fails the depth test and is never shaded. To get more of each frame into the opaque pass, `paint_quad` now splits any quad with rounded corners into a rectangular interior and the four edge strips around it. The interior is a plain rectangle, so if its fill is solid and opaque, it's drawn in the opaque pass, and only the strips need the border and corner shading. Measured on an Intel HD 4600: Scene | Before | After | Change | Pixel shader invocations | |---|---|---|---|---| | Editor | 3,941µs | 1,689µs | −57% | 3.71M → 1.65M (−55%) | | Command palette | 7,658µs | 2,275µs | −70% | 5.33M → 1.80M (−66%) | | Git Graph | 3,589µs | 1,889µs | −47% | 3.13M → 1.65M (−47%) | Fixes https://github.com/zed-industries/zed/issues/8043 Release Notes: - Reduced GPU usage - [GPUI] Improved rendering performance by skipping pixels hidden behind opaque quads |