mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 15:10:34 +01:00
96dec006df8758c1783c0e4b03f01299f05ddd2b
40267 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
96dec006df |
docs: Add Homebrew casks to the list of Linux packages (#65116)
The Homebrew casks [`zed`](https://github.com/Homebrew/homebrew-cask/blob/main/Casks/z/zed.rb) and [`zed@preview`](https://github.com/Homebrew/homebrew-cask/blob/main/Casks/z/zed%40preview.rb) from the official repository now support Linux since these PRs were merged: * <https://github.com/Homebrew/homebrew-cask/pull/291231> * <https://github.com/Homebrew/homebrew-cask/pull/291370> ## Summary Lists the Homebrew packages `zed` and `zed@preview` in the “Installing via a package manager” section of the “Zed on Linux” document. ## Testing No testing deemed necessary. ## 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 |
||
|
|
2ff34954a0 |
Fix a flaky terminal test (#65160)
CI example: https://github.com/zed-industries/zed/actions/runs/37274127321/job/111647574180?pr=65158 `true` could exit before the test checked for active PTY resources. The ACP completion task releases those resources immediately after exit, so correct cleanup could fail the assertion. Release Notes: - N/A |
||
|
|
8385157b2f |
editor: Fix off by one in Open Docs action (#64317)
# Objective using `editor: open docs` never chose the local file even when it existed, found it was because this was slicing off the leading `/` which gave an invalid path ## Solution slice the URI correctly to preserve the path ## Testing tested by using `editor: open docs` in my project before and after running `cargo doc`, before it went to doc.rs, after it opened the local docs file ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - fixed opening local documentation when using `editor: open docs` --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
2117a376b9 |
editor: Reuse tab point cursor state across calls (#64409)
Follow-up to #58510 and #60605 for #32051. This is the `TabMap::sync` cursor reuse @Anthony-Eid asked for in https://github.com/zed-industries/zed/issues/32051#issuecomment-4781437473, and it resolves the `todo(lw): Implement TabPointCursor properly`. ## What was slow `TabPointCursor::map` was stateless: every call built a new fold chunk iterator at column 0 of the row (several tree descents plus a rope seek) and rescanned the row. `TabMap::sync` makes four of those calls per edit, plus a fifth chunk iterator per edit to look for tabs after the edit. With one cursor per line that is five iterator constructions per cursor per keystroke. Temporary timers around each layer in `DisplayMap::sync_through_wrap` (not committed) showed the tab map was essentially the whole display sync on the multi-cursor path. Per sync, `Multi-cursor input` bench, Apple Silicon: | layer | 1k cursors | 10k cursors | |---|---|---| | `InlayMap::sync` | 4 µs | 20 µs | | `FoldMap::read` | 27 µs | 204 µs | | `TabMap::sync` | 3,856 µs | 46,160 µs | | `WrapMap::sync` | 27 µs | 190 µs | ## What this does - `TabPointCursor` keeps its `TabStopCursor` and tab expansion state between calls. A later column on the same row continues the scan. A nearby later row is reached by walking the chunk `newlines` bitmaps (bounded by a chunk budget). Anything else (a far row, an earlier point, `reset()`) seeks the existing chunk iterator, so out-of-order input stays correct and only costs a seek. `reset()` was a no-op that `DisplayPointConverter` already relied on; it now forces a re-seek. - `expand_tabs` takes the cursor and expansion state by reference, so the cursor and the one-off `fold_point_to_tab_point` share one code path. The one-off path builds its `TabStopCursor` directly as before. - `TabMap::sync` maps the merged edits through one cursor per snapshot. The points are non-decreasing within each snapshot. - `TabMap::sync` seeks a single fold chunk iterator when looking for tabs after each edit, and stops at the first newline instead of converting the next row's start to an offset. No callers change. `BlockMap::sync`, `BlockMap::spacer_blocks` and `DisplayPointConverter` pick up the stateful cursor as is; the companion side of `spacer_blocks` and `columnar_selection` keep using the stateless `fold_point_to_tab_point` because they walk backward. ## Results `TabMap::sync` per sync, same timers: | | 1k cursors | 10k cursors | |---|---|---| | before | 3,856 µs | 46,160 µs | | cursor reuse in the mapping pass | 1,989 µs | 23,718 µs | | plus the shared chunk iterator | 1,380 µs | 16,205 µs | The bench does three edits per iteration, so this removes roughly 90 ms of a ~550 ms iteration at 10k cursors. The whole-bench number is noisy at `sample_size = 10` (two runs of unmodified `main` gave 549 ms and 671 ms on my machine), which is why I am reporting the per-layer timers; the criterion comparison against a saved `main` baseline was -9.6% at 10k (p = 0.00) and within noise at 1k. `To tab point/to_tab_point/1024` (one-off conversion) is unchanged: 412.0 ns before, 412.3 ns after (p = 0.10). What is left in `TabMap::sync` is mostly the six `FoldOffset -> FoldPoint` conversions per edit, which could get the same cursor treatment in a follow-up. After this change the inlay, fold, tab and wrap sync together are about 10% of the multi-cursor bench at 10k cursors; the rest is outside them. ## Tests The first commit adds tests only, and they pass on unmodified `main`: - `test_random_tab_map_sync` drives buffer, inlay and fold mutations plus tab size changes through `TabMap::sync` and checks the returned `TabEdit`s by applying them to the previous tab text. Nothing asserted on `TabEdit` ranges before, and `test_random_tabs` never calls `sync`. - `test_tab_map_sync_edits` asserts the exact expanded edit ranges for a small case. - `test_random_tab_point_cursor` maps sorted, repeated, and then unordered fold points (including columns past the end of the row and multibyte text) through a single cursor with a randomized scan budget, and compares against both the oracle and `fold_point_to_tab_point`. All three pass at `ITERATIONS=5000`, as do `test_random_tabs` and `test_to_tab_point_random`. `cargo test -p editor` passes (1144 tests) and `./script/clippy -p editor` is clean. One thing I ran into: with `MultiBuffer::build_random` the sync test fails at seed 4882 on unmodified `main` too, because `FoldMap` reports a fold edit whose old range does not cover text that a surviving fold re-folds after excerpts are replaced. That is unrelated to the tab map, so the test uses a singleton buffer. Filed as #64444. Release Notes: - Improved multi cursor editing performance |
||
|
|
e4945b5d09 |
remote: Reuse the known OS when reconnecting over SSH (#65024)
## Summary The OS should not be re-probed during remote reconnection. ## Testing Just a simple refactoring. ## 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: - Reuse the known OS when reconnecting over SSH Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
ad4512a2e5 |
Fix tab double click (#65159)
Closes https://github.com/zed-industries/zed/issues/65140 Also return back the extra actions: for that, reverts part of https://github.com/zed-industries/zed/pull/65081 and re-implements the actions properly. https://github.com/user-attachments/assets/04570ff5-08cb-4414-a386-b1b5b6660f47 Release Notes: - N/A (Nightly only) |
||
|
|
eca87ab896 |
gpui: Remove redundant flushing_effects reentrancy guard (#65016)
Already guarded by pending_updates == 1, so the extra flag was unnecessary. ## Testing Manually test your changes; report results, mention platforms if relevant. How can reviewers test this easily? Include setup and steps. ## 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: - [gpui] Remove redundant flushing_effects reentrancy guard |
||
|
|
279fe070bb |
languages: Fix JSON completion order for settings keys (#65139)
## Summary Closes #64341 Typing `"status` in settings.json puts `show_call_status_icon` above `status_bar`. json-language-server includes quotes in `filterText` (`"status_bar"`), but the search query doesn't. Since #62433, this means a match at the start of the key gets a lower score than it should. This strips the quotes in the JSON adapter's `process_completions`, following the Python adapter. Insertion is unchanged. Enum values like `"dark"` and `"system_dark"` have the same problem, but their quotes come from the label. I'll handle those in a separate PR. Before / after: | Before | After | |---|---| |  |  | ## Testing Added a unit test. `cargo test -p languages` and `cargo test -p editor` pass. Checked on macOS: typing `"status` in settings.json now puts `status_bar` first. Selecting it inserts the same text as before. ## 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 JSON completion ordering when typing the start of a key. |
||
|
|
a84689073d |
path: Reimplement PathStyle on the standard library's path implementation (#64149)
# Objective Rust's standard library `Path` API is platform-dependent, so you get wrong results when processing a Windows path on Unix, or vice versa. Zed needs this functionality because we support remote development, where cross-platform path handling is routine. Zed's `PathStyle` takes on this responsibility. But handling paths can be really tricky: we need to handle paths with non-UTF-8 characters, a problem I ran into in #63075. And thanks to Microsoft, there are 5 different kinds of valid path prefixes! Not to mention the `/` and `\` separators, which was another problem I ran into in #63102. So we need to make some changes to the `PathStyle` API. ## Solution I'm not an expert on this low-level API design, or on API design in general. But the people who maintain the Rust standard library are. Since `PathStyle`'s API is largely a cross-platform version of the standard library's `Path`, the most reliable and straightforward approach I could come up with is to bring the standard library's implementation into the Zed repo and make the necessary modifications to make it work cross-platform. It turns out Rust already has a great abstraction: the platform-dependent part of `Path` is packaged under `library/std/src/sys/path` and selected at compile time, while the `Path` implementation just uses the abstracted constants and methods: https://github.com/rust-lang/rust/blob/6474e999898cad2289175e2a7d253f5d0f574fa2/library/std/src/path.rs#L96 So we can add some helper methods to `PathStyle` to represent the compile-time-determined pieces of the standard library. Then we bring in the rest, achieving our goal of making `PathStyle`'s functionality the same as the standard library's, but cross-platform. Overall, the `parent()` and `file_name()` methods I introduced in #62038 have been reimplemented, and a new `starts_with()` method has been added. Their implementations are nearly the same as the ones in the standard library. To make these methods work, the standard library's `Components` struct was added in a new file, `crates/path/src/path_component.rs`, which is the core of reliable path handling; and `crates/path/src/windows_prefix.rs` was added to handle Windows paths. Most of the code in these two files is the same as the standard library's; I only made some small tweaks to make it work with `PathStyle`. ## Testing New tests for `starts_with` have been added. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - N/A |
||
|
|
5eed2397a8 |
git_ui: Add command to create tags at HEAD (#61973)
Add a Command Palette action that creates a lightweight local tag at the active repository's HEAD. Refresh tag consumers after creation and show success or failure notifications. # Objective This adds a `git: create tag at head` Command Palette action for creating a lightweight local tag at the active repository's current `HEAD`. ## Solution The action uses the existing single-line Git modal style and notification patterns. Tag creation uses `git update-ref` with a required nonexistent previous value, preventing an existing tag from being overwritten. It also: - Supports local and remote project repositories. - Refreshes Git graph and history views after tag creation. - Shows a bottom-centered success toast. - Uses the existing critical error prompt for failures. - Documents that created tags are local and are not pushed automatically. ## Testing - `cargo test -p git test_create_ref_requires_ref_to_not_exist` - `cargo test -p git_ui test_create_tag_at_head` ## Showcase https://github.com/user-attachments/assets/81ceffdb-d5f7-4e97-b513-4ee04b55b619 --- Release Notes: - Add command to create tags at HEAD --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
a9c0144d00 |
git_ui: Improve Git graph UX (#59839)
# Objective Currently the UX of the git graph is pretty bad, since we are displaying all the refs inside the **description** column we bairly have room for the description itself. It's also pretty hard to implement any more advanced features like renaming/deleting a specific ref for example. ## Solution My solution/idea is to move the refs to the git graph itself, so we have more room to show the actual commit description, and we also move towards a UI where it's possible to implement renaming/deleting of refs for example. I got inspired by this [tweet](https://x.com/ruru_1x/status/2068021793173172351) that shows a really clean git graph similar to how [git kraken](https://www.gitkraken.com) does it. I think Zed should also move to a UI similar to this, so we can make some more advanced features and make them discoverable without blocking other parts of the UI e.g. tooltips of the commit description. ## 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 ## Showcase **Before** <img width="1512" height="821" alt="Screenshot 2026-06-24 at 17 45 49" src="https://github.com/user-attachments/assets/620d04d2-581b-4d78-b8fa-17f6aee7807e" /> **After** <img width="1512" height="820" alt="Screenshot 2026-07-08 at 17 22 37" src="https://github.com/user-attachments/assets/ae6b55e2-7b9b-4f7a-a393-a0943798eb50" /> <img width="823" height="581" alt="Screenshot 2026-07-08 at 17 24 47" src="https://github.com/user-attachments/assets/468e36fb-d615-452d-b96a-0161cffd8103" /> https://github.com/user-attachments/assets/0d0549c8-2593-4f1e-b3da-239bdbc3d22d --- Release Notes: - Git graph: Improved the UX of the git graph. --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
01376d4926 |
git_hosting_providers: Add Gitiles provider (#63996)
Add Gitiles support to git hosting providers, to enable permalink / git
blame diff link features working for repositories browsed with Gitiles
(used by Gerrit).
Permalinks use the Gitiles URL format:
{base_url}/{repo}/+/{sha}/{path}#{line}
Configured via git_hosting_providers setting:
{ "provider": "gitiles", "name": "...", "base_url": "https://..." }
# Objective
- Add basic permalink + git blame linking support for another common Git
provider (Gerrit + Gitiles).
Gerrit/Gitiles is a self hosted setup used at several large
corporations, so it would be nice to have native support for it
alongside the other git hosting providers. It is relevant to many
people.
URL can vary substantially between different self hosted setups. URL can
be like https://gerrit.example.com or something more elaborate like
https://vcs.internal.example.com/plugins/gitiles.
This does not implement avatars or PR links (as the similar Chromium
provider does) since exact Gerrit setup (e.g. trailers used, avatars
used) can differ significantly between different self hosted instances.
It implements the fundamental Gitiles link part instead which is still
very useful, and is reliable; `base_url` can be set to the gitiles "Git
repositories on [instance]" [base
page](https://gerrit.googlesource.com/), and this integration will then
work.
## Solution
- Implements a new GitHostingProvider which constructs Gitiles format
permalinks based on the user config.
Implementation follows inspiration from other providers: Tangled /
Chromium (also Gitiles/Gerrit based but tied specifically to Chromium).
## Testing
- Unit tests cover the logic in this change.
- Built for Windows, performed exploratory testing (adding multiple
providers, different base_urls, trying a self hosted Gerrit instance vs
googlesource, git blame link through UI works, copy permalink via
right-click context menu in code works).
## Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments -> N/A
- [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) -> N/A
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Showcase
#### "Copy permalink to line"
<img width="1958" height="677" alt="image"
src="https://github.com/user-attachments/assets/802a02af-db4e-4b9c-a7d5-ac26dc52cd7e"
/>
Above results in clipboard being set to:
https://gerrit.googlesource.com/gitiles/+/77d36f6ff5f50316daa82c6753af2c3217859df4/java/com/google/gitiles/GitilesUrls.java#34
#### Git blame diff view links to remote Gitiles view for the commit:
<img width="2242" height="808" alt="image"
src="https://github.com/user-attachments/assets/2792397a-83ae-4294-ae61-5a631975950d"
/>
Above example opens this link in browser:
https://gerrit.googlesource.com/gitiles/+/67c7844b7f7f228229c037cf297296874f50692c
---
`settings.json` for showcase example:
```json
"git_hosting_providers": [
{
"provider": "gitiles",
"name": "Gerrit Googlesource",
"base_url": "https://gerrit.googlesource.com"
}
],
```
---
Release Notes:
- Added `gitiles` as a Git hosting provider for Gitiles/Gerrit
deployments, enabling permalinks and navigation from git blame diff
view.
Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
|
||
|
|
d9afb21688 |
git_hosting_providers: Add support for self-hosted Gerrit repositories (#53832)
Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable I based my change on forgejo.rs and chromium.rs (gerrit instance). I didn't include logic for parsing Gerrit metadata from commit message (depends on gerrit configuration). I tested with settings: ``` json { "git_hosting_providers": [ { "provider": "gerrit", "name": "googlesource", "base_url": "https://gerrit.googlesource.com", }, ], } ``` and https://gerrit.googlesource.com/git-repo Release Notes: - Add support for self-hosted Gerrit repositories for permalinks. Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
80ee0a3563 |
markdown_preview: Add Show Source to preview tab menu (#65081)
## Summary Markdown files can now open in preview by default, but there's no discoverable way back to the raw source. `markdown::CloseAndReturnToEditor` exists (`cmd-shift-v` / `ctrl-shift-v`), but nothing in the UI points to it. This adds a "Show Source" entry to the preview tab's context menu that triggers that action. Tab menu entries that dispatch actions only work on the active tab. Inactive tabs aren't rendered, so they aren't in the dispatch tree and never receive the action. Because of that: - "Show Source" only appears when the preview is the active tab. - The editor's "Open Markdown Preview" and "Open SVG Preview" entries had the same problem, so they're now hidden on inactive tabs too. ## Testing - `cargo test -p markdown_preview` - `./script/clippy -p markdown_preview -p editor` - Manually verified on macOS: - Right-click the active Markdown preview tab → "Show Source" closes the preview and focuses the source editor. - Right-click an inactive preview tab or inactive Markdown editor tab → no preview entries are shown. To try it: open any `.md` file in preview, right-click the preview tab, choose "Show Source". ## 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 a "Show Source" option to the Markdown preview tab context menu. - Fixed "Open Markdown Preview" and "Open SVG Preview" appearing in the tab context menu of inactive tabs, where they had no effect. |
||
|
|
badfb8d31f |
docs: Fix tab-switcher keybindings (#65105)
## Summary Fixes missing keybinding pills in the Tab Switcher documentation on Linux. The keybinding processing in `docs/theme/plugins.js` assumed every `<kbd>` element contained both macOS and Linux variants separated by `|`. Hand-written keybindings such as `ctrl`, `tab`, and `shift` only contain a single value, making them render empty on Linux. This change falls back to the first keybinding when a Linux-specific value is not provided. Also removes the `tab_switcher::ToggleAll` keybinding reference from the documentation, since the action does not have a default keybinding. Closes #65087. ### Before <img width="1890" height="942" alt="image" src="https://github.com/user-attachments/assets/e3d1298e-2e4f-404f-9f64-74e04d53a27f" /> ### After <img width="1600" height="797" alt="image" src="https://github.com/user-attachments/assets/7a3ef09b-0125-4184-8352-bdd174839720" /> ## Testing - Ran the Zed documentation locally with `mdbook serve docs`. - Verified the Tab Switcher documentation on Linux. - Confirmed that single-sided keybindings (`ctrl`, `tab`, `shift`, etc.) now render correctly. - Confirmed that keybindings containing both macOS/Linux variants continue to render correctly. - Confirmed the `ToggleAll` entry no longer displays the 'no default binding' message. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [ ] Tests cover the new or changed behavior. Release Notes: - N/A --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
3fec483014 |
tabular_data_preview: Single-cell focus and arrow navigation with reveal (1/8) (#64916)
## Overview Part **1 of 8** in a series adding full keyboard/mouse navigation, cell selection, multi-format clipboard copying, and keyboard-driven sorting/filtering to `tabular_data_preview`. Split into small, isolated PRs for review safety. The feature is gated to debug/test builds (`cfg!(any(test, debug_assertions))`) until PR 6 (copying + context menus) to avoid exposing selection without copy support. --- ### Full Series Roadmap **1/8 (This PR):** Single-cell focus & arrow navigation with viewport reveal **2/8:** Range selection (`Shift+Arrows`), edge jumps (`Cmd/Ctrl+Arrows`, `Home/End`), and page jumps (`PageUp/Down`) **3/8:** Mouse selection, Shift+Click extension, and drag-to-select **4/8:** Select All (`Cmd/Ctrl+A`) across datasets **5/8:** Multi-format copy engine (TSV, CSV, Markdown, JSON Lines) & `CopySelected` **6/8:** Context menu, copy format settings, toasts, and release enablement **7/8:** Row selection via row gutter click/drag **8/8:** Keyboard sorting (`Alt+S`), filter popover (`Alt+F`), and filter clear (`Cmd/Ctrl+Alt+Backspace`) NOTE, that all work is done & running on my machine end to end. The split is just code review organization buerocracy. <summary> 👇 Demo of fully ready feature👇 </summary> <details> https://github.com/user-attachments/assets/696554f9-ca3e-4b74-83d1-948292668334 https://github.com/user-attachments/assets/5ef5f1f1-4f15-4b01-b825-de592d8a1972 https://github.com/user-attachments/assets/40c0e57f-da7a-440a-9ee6-48af8abe116e </details> --- ### Changes in this PR (1/8) 1. **Data-Space Coordinates (`CellSelection`):** Coordinates anchor to `DataCellId { row: DataRow, col: AnyColumn }` so selection survives background sorting/filtering without shifting rows. 2. **Single-Cell Navigation (`tabular_data::MoveFocusedCell`):** Arrow navigation (`Up`/`Down`/`Left`/`Right`), initializing focus at `(0, 0)` on first movement. 3. **Viewport Auto-Scroll & Peek Cushion:** Auto-scrolls focused cells with a 20px horizontal peek buffer and 1-row vertical context cushion. 4. **Focus & Outline:** Renders focused cell border (`theme.colors().border_focused`) and binds `"context": "TableView"`. 5. **Debug Gating:** Hidden in release builds via `is_selection_enabled()` until copying lands in PR 6. --- Release Notes: - N/A --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
708c7eef55 |
file_finder: Implement SeedQuerySetting::Selection seed_query (#64946)
## Summary UX parity with JetBrains IDEs: there, you can - select a file name/path in the terminal/editor - press the "open file finder" hotkey - see search results for that file On Zed's main branch, you have to: - select a file name/path in the terminal/editor - press ctrl+c / ctrl+shift+c (depending on the context) - press the "open file finder" hotkey - see the default list of files for an empty search - press ctrl+v - see search results for that file The issue is little one but it is a "death by a thousand cuts" type of straw for me. https://github.com/user-attachments/assets/26de5bba-98c2-4a1f-8540-1e0e646301e8 The feature can be disabled in the `settings.json` with the `file_finder.prefill_query_from_selection` flag set to `false` or in the settings UI page for file finder. ## Testing To test this, a reviewer can: - open any project - select a file name/path in the terminal/editor - press the "open file finder" hotkey - see search results for that file Then switch the checkbox in the file finder setting page (or set `file_finder.prefill_query_from_selection` to `false` in settings.json) and: - select a file name/path in the terminal/editor - press the "open file finder" hotkey - see the default list of files for an empty search ## 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. Zed already has a `seed_query` mechanism for `text_finder`, built on `SeedQuerySetting::Selection` and `SearchableItemHandle::query_suggestion`, which I reused as much as possible. `FileFinder::seed_query` basically duplicates `TextFinder::active_item_query` code (except checking if the setting is disabled). I wanted to unify the functionality but did not know where the new unified method would fit better and decided that some code duplication is not as terrible as bad refactor (if any reviewer can tell me a proper place to put the method to get selected text for search query I will be very thankful). Ran every existing test (- each passed) and asked LLM generate new ones for this PR (reviewed them and can vouch that they make sense) Release Notes: - Improved the file finder to pre-fill the search query with the text selected in the terminal/editor - [GPUI] Added a method for retrieving the selected text from any registered input handler --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
7ea5428f0c |
agent: Improve custom bedrock model support (#64953)
## Summary Improve custom model support for Amazon Bedrock (**not** Mantle). Add the ability to specify existing model configuration settings in custom models. Specifying custom Amazon Bedrock Converse models is useful for a few key reasons: - Adding new models before Zed adds support - ex. Grok 4.6 was added 8/19, but is not yet added to the Zed agent picker. - Using application inference profiles to track individual usage - Using fully custom models uploaded and hosted in Bedrock Custom models should be as configurable as the provided models can be. Currently, they are not. Thinking, tools, and image support cannot be configured for custom models. This PR adds support for these settings. Configuration Changes for objects under `language_models` -> `bedrock` -> `available_models`: - Added `supports_tools` bool value to indicate that the model supports tool use - Added `supports_images` bool value to indicate that the model supports image recognition - Added `thinking` key that can either be a bool to enable basic thinking, or an object to describe additional thinking details: - `adaptive` bool to indicate whether model thinking can have adaptive levels (low, high, medium, etc.) - `has_xhigh` bool to indicate whether the model supports the xhigh adaptive thinking level. Unused if `adaptive` is false - `budget_tokens` to specify how many tokens the model can use for a thinking operation The new configuration format is mostly backwards compatible with the old format. i.e. **most** existing configurations will not break if this fix is merged. The only exception is now custom model `name`s are completely unmodified instead of potentially having a region prefix added to them. The user is responsible for making sure the `us.` (or whatever region) prefix is added to the model identifier. `allow_global` will have no impact on these models and they will be used if specified even if they are global models. I can change this behavior if it is desired. I think custom should be fully custom, though. We can optionally bounce a model specifier if it does not have a region prefix or has the `global` prefix if `allow_global` is false. I am open to feedback on the configuration keys and values. Misc changes: - The default `default_temperature` value for custom models is now `None` instead of 1.0. Some models do not support temperature and a default of 1.0 is still a value that the Bedrock endpoint will reject. ## Testing - Existing automated unit tests pass - Newly added automated unit tests pass - Tested manually with models currently unsupported in Zed (Grok 4.6/4.7, Kimi K3) - Models show up, function properly, show thinking level settings (incl. xhigh, if `has_xhigh` specified), can use tools, can add images - Manually tested model with custom ARN (application inference profile) ## Self-review - [X] I've reviewed my diff for quality, security, reliability, and performance. - [N/A] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [X] Tests cover the new or changed behavior. Release Notes: - Improved custom model support for Amazon Bedrock --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
199500e9be |
file_content: Fix stack overflow in encoding detection (#65102)
## Summary Fix a stack overflow when searching a project in a macOS debug build. When on a debug build, opening a project which hits the `detect_encoding` code path and typing in a global search triggers an illegal instruction violation. The regression was introduced in #64549 Allocate the encoding detector’s 64 KiB buffer using a `Vec`. The inline array enlarged nested search futures and their debug-build stack frames beyond the background worker’s available stack. This hasn't hit stable yet, so I've omitted a release note. ## Testing - All tests pass - Change is extremely trivial - Project search no longer crashes with this patch To verify manually on macOS, launch Zed with `cargo run`, open a Rust project, press Cmd-Shift-F, and search for anything. ## 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)](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - N/A |
||
|
|
c83abe7d0e |
git_ui: Allow collapsing the commit editor and commit details (#63236)
## Summary - The commit message editor in the Git panel is pinned to six lines and its only two controls both make it *larger* — one fills the panel, the other opens the modal. Anyone who commits from a terminal pays for an input they never use, and the Changes list is what gets squeezed. - In the Git Graph detail panel, the author metadata and the commit message render at a fixed size above the changed-files list, so shortening the panel (e.g. dragging the terminal up) hides the file list entirely. ## Changes **Git panel — collapsible commit editor** - New `git::ToggleCommitEditor` action. - A chevron beside the commit button hides the editor down to a thin bar; the commit button row stays available. - State persists per workspace via `SerializedGitPanel`, seeded from a new `git_panel.commit_editor` setting (`expanded` | `collapsed`, default `expanded`). - Collapsing clears the fill state — a hidden editor cannot also fill the panel. - `activation_focus_handle` no longer focuses an editor that isn't rendered. **Git Graph — collapsible commit details** - A disclosure folds the author metadata (avatar, refs, email, SHA, provider link) down to a single author + short-sha line. - A second disclosure folds the commit message body. - The changed-files container is already `flex_1().min_h_0()`, so it reclaims the freed space with no other layout change. **Settings plumbing** - `GitPanelCommitEditor` in `settings_content`, wired through `GitPanelSettings`, `assets/settings/default.json`, the settings UI, and `docs/src/reference/all-settings.md`. ## Test plan - [x] `test_toggle_commit_editor_collapsed` added, covering the toggle, persistence of the flag, and the fill/collapse exclusion. - [x] Manually verified in a dev build: chevron hides and restores the editor, Changes list expands into the freed space, action appears in the command palette, state survives a restart, and the `collapsed` setting seeds a new workspace. - [x] Manually verified both disclosures in the Git Graph detail panel with the panel shortened, including that the collapse state survives selecting a different commit. Release Notes: - Improved the Git panel by allowing the commit message editor to be collapsed, and the Git Graph commit details by making the metadata and commit message sections collapsible. ### Evidance Test | Expand | Collapse | Settings Git Panel | | ------- | --------- | ------------------ | | <img width="675" height="965" alt="Screenshot 2026-08-26 at 15 00 46" src="https://github.com/user-attachments/assets/70c56d02-35fc-45ac-988c-24ccd6d1a19e" /> | <img width="661" height="962" alt="Screenshot 2026-08-26 at 15 00 57" src="https://github.com/user-attachments/assets/2c32fa5d-30fc-4f35-8323-afbc2a031210" /> | <img width="1041" height="956" alt="Screenshot 2026-08-26 at 16 50 40" src="https://github.com/user-attachments/assets/67f166b6-5cd9-4430-bba3-fa765715c557" /> | --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
57af58b3ad |
acp_thread: Share v2 configuration options (#65093)
Use SDK v2 configuration options and values at the shared model/UI boundary while keeping the existing backend-owned collection and v1 transport. This is preparation for v2 integration, **not v2 wire enablement**. - Explicitly adapt legacy options, including `id` → `configId`, `group` → `groupId`, category strings, descriptions, and option/group/value metadata. Convert full snapshots before replacing cached state. - Lower supported shared setter values to the original v1 wire shape; reject unsupported values before an RPC or state mutation. - Preserve select/boolean controls, grouped pickers, favorites, persistent settings, defaults, and live updates. Retain unknown option payloads without editable controls; stale controls validate current kind/choices before acting. Dedicated v1 modes and protocol selection remain unchanged. No additional configuration store or persistent-settings format is introduced. ## Review guide - [Shared interface](https://github.com/zed-industries/zed/blob/d7116d9eb95ee5082b368a00f308f4e060821908/crates/acp_thread/src/connection.rs#L339) and [explicit adapters](https://github.com/zed-industries/zed/blob/d7116d9eb95ee5082b368a00f308f4e060821908/crates/acp_thread/src/config_options.rs#L4). Release Notes: - N/A |
||
|
|
f37989fbdf |
gpui: Cross-platform headless windowing API and linux impl (#64969)
Adds a cross-platform API for GPUI apps to switch between windowed and headless modes. Release Notes: - N/A - [GPUI]: N/A --------- Co-authored-by: Antonio Scandurra <me@as-cii.com> |
||
|
|
23d10a4754 |
acp_thread: Append streamed tool-call content (#65090)
## Summary Add a typed SDK v2 tool-content append path. `ToolCallContentChunk` appends one complete item; `ToolCallUpdate.content` still replaces the collection. No wire handler or protocol selection is added. - Target exact/historical tool IDs without rebuilding the existing snapshot. New IDs create minimal records with reported fields unset; this is a lenient client policy. - Reuse item preparation and registered terminal placeholders. Preserve existing render entities, native diff ownership, tool status/permissions/metadata/locations/raw values, and normal raw-output fallback behavior. - Emit updates for the actual row; only new rows use the existing streaming-flush boundary. - Retain item/body metadata. Delivery-scoped chunk `_meta` is not promoted into aggregate state or stored as a separate history, matching message chunks. ## Review guide Production code is unchanged by the cleanup: - [Append and fallback refresh](https://github.com/zed-industries/zed/blob/a15b15ecc1f4feaaaf87123d9349e3d9a24d2079/crates/acp_thread/src/acp_thread.rs#L1574). - [Shared single-item preparation](https://github.com/zed-industries/zed/blob/a15b15ecc1f4feaaaf87123d9349e3d9a24d2079/crates/acp_thread/src/acp_thread.rs#L2949). - [Exact-ID append and first-seen defaults](https://github.com/zed-industries/zed/blob/a15b15ecc1f4feaaaf87123d9349e3d9a24d2079/crates/acp_thread/src/acp_thread.rs#L5332). Coverage is now three focused regressions, reduced from seven and approximately **1,000 → 300 test lines**: 1. [Ordering/targeting](https://github.com/zed-industries/zed/blob/a15b15ecc1f4feaaaf87123d9349e3d9a24d2079/crates/acp_thread/src/acp_thread.rs#L13068): historical ID, append vs replacement, clear/raw fallback, defaults, metadata isolation, original Markdown, and row events. 2. [Preservation](https://github.com/zed-industries/zed/blob/a15b15ecc1f4feaaaf87123d9349e3d9a24d2079/crates/acp_thread/src/acp_thread.rs#L13180): real permission waiter, reported state, native diff identity, and unrelated buffered text/new-row flush. 3. [UI integration](https://github.com/zed-industries/zed/blob/a15b15ecc1f4feaaaf87123d9349e3d9a24d2079/crates/agent_ui/src/conversation_view.rs#L10077): an existing expanded search automatically refreshes after older-tool append, while row/entity identity and the later tool remain unchanged. Broad content-variant, full diff-editor, and repeated render/search matrices remain covered by existing tests rather than being repeated here. Fixtures use SDK builders; no helper framework was added. ## Validation - Full suites: **240 core**, **496 UI** (serial). - Two core regressions: **100 seeds**; UI regression: **20 seeds**. - Six-package `./script/clippy`, formatting and `git diff --check` passed. - Production text was verified byte-for-byte unchanged by this test-only cleanup. ## Suggested .rules additions GPUI testing guidance: `VisualTestContext::debug_bounds` needs a static selector. Reuse allocated fixture selectors for runtime IDs; do not borrow temporary `&format!(...)` strings. Release Notes: - N/A |
||
|
|
9dd6993e2e |
gpui_shared_string: Avoid intermediate string allocation when deserializing a SharedString (#65089)
## Summary This PR improves how we deserialize SharedStrings. Since we moved to `SmolStr` under the hood some time ago, which takes a string by `impl AsRef<str>` in its constructor, we can get rid here of allocating a string where possible in favor of using a stringvisitor during deserialization. This provides us with some decent improvements. ## Testing The benchmark results are the following: | Case | `from_str` before | `from_str` after | Δ | |---|---:|---:|---:| | short (≤23 B, inline) | 23.1 µs | 11.6 µs | −50% | short, escaped | 33.2 µs | 22.4 µs | −32% | | long (~66 B, heap) | 46.9 µs | 31.4 µs | −33% | | long, escaped | 307.6 µs | 267.6 µs | −13% | ## 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 - [GPUI] Improved memory usage and performance when deserializing SharedStrings. |
||
|
|
309f91f564 |
copilot: Move enterprise URI to top-level setting (#65082)
This PR is moving the `enterprise` URI to a top level `copilot` settings because it is used for both Edit Predictions and Copilot Chat. Previously it was listed under `languages > copilot > enterprise_uri` Release Notes: - N/A |
||
|
|
3209c7d31f |
acp_thread: Add generic permission prompts (#65080)
Extend the request-owned permission model from merged #65039 to typed ACP v2 permission requests and a minimal request-owned UI. This is a shared-model/UI foundation, **not v2 wire enablement**. - Retain the complete SDK request: title, description, subject, offered options, unknown option kinds, and request/subject/option metadata. Legacy tool permissions remain a separate variant in the same authoritative pending-request store. - Validate the owning session and nonempty, unique offered IDs before insertion. Multiple requests for the same subject coexist under distinct local request IDs; subjects never create or update tool history. - Return the exact explicitly selected SDK option ID, including for unknown kinds. Do not infer approval from unknown hints or apply legacy tool-progress policy to generic choices. Selection and cancellation target the exact session/request record. - Render plain-text generic cards in the existing permission area without transcript anchors or scroll-to-tool behavior. Root views include child requests even without a spawning-tool anchor; standalone child views remain session-scoped. - Preserve legacy flat/dropdown/pattern controls, parameters, grant-versus-action-choice behavior, and grouped request ordering. A generic-first request blocks legacy shortcuts rather than allowing them to skip to a later tool request. Generic records do not enter legacy selection caches, authorization telemetry, tool counts, or scroll summaries. - Notify on registration/hydration and new permission requests so late or unanchored child prompts do not depend on unrelated rendering events. Bound long option controls and provide full-name tooltips. ## Review guide Most added lines are regression tests. The production boundary stays in the existing owners: 1. [Request ownership](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/acp_thread/src/acp_thread.rs#L1055), [typed insertion/selection](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/acp_thread/src/acp_thread.rs#L5462), and [canonical settlement](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/acp_thread/src/acp_thread.rs#L5708). 2. [Conversation hydration/invalidation](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/agent_ui/src/conversation_view.rs#L296) and [legacy-only tool counts](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/agent_ui/src/conversation_view.rs#L521); the shared pending selector retains its generic-first barrier. 3. [Generic cards and exact-ID callbacks](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/agent_ui/src/conversation_view/thread_view.rs#L3767), including bounded controls with complete-label tooltips. 4. [Lifecycle regressions](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/acp_thread/src/acp_thread.rs#L20594), [narrow-card geometry](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/agent_ui/src/conversation_view.rs#L15075), and [rendered late-registration/deduplication](https://github.com/zed-industries/zed/blob/d2e2870906800e9c34244b4aff30fbc561ceb8d4/crates/agent_ui/src/conversation_view.rs#L15389). Release Notes: - N/A |
||
|
|
7362739f94 |
agent_ui: Fix elicitation radio indicator alignment (#63885)
## Summary Addresses the selected radio dot alignment reported as the second issue in #62955 (ask_user formatting issues), which is already closed. Merged PR #63656 fixed long option wrapping by removing label truncation. That fix was already present in this branch base. This PR keeps option text rendering unchanged while fixing the remaining radio alignment issue and extracting the radio behavior into a reusable UI component. Original Issue: <img width="1672" height="844" alt="image" src="https://github.com/user-attachments/assets/54422dec-f35a-4b83-b16c-831e8755cf50" /> After #63656: <img width="769" height="386" alt="image" src="https://github.com/user-attachments/assets/f659f518-2b4a-47cc-8e2d-c9d46bbdbe10" /> After: <img width="777" height="385" alt="Screenshot From 2026-09-07 18-05-16" src="https://github.com/user-attachments/assets/71ee9343-9623-46bc-8be8-09667fab89b6" /> ## Implementation - Add a reusable `ui::RadioButton` component that owns the full option-row hit target, click handling, focus-visible styling, configurable tab index, accessibility role/state, and theme-derived radio styling. - Keep the elicitation form responsible for selection state and the selection callback while moving the radio control mechanics into `crates/ui`. - Paint the outer radio circle and selected dot from the same pixel-snapped bounds instead of independently laid-out elements. - Derive the dot using equal whole-device-pixel insets so the outer circle and selected dot remain concentric when rounded device-pixel diameters have different parity. - Preserve the original `size_3()` visual radio inside the 20px control slot, while the full row remains clickable. - Provide an explicit accessible label for each radio option and expose the selected state through `Role::RadioButton` / `aria_selected`. - Preserve the existing elicitation row spacing, hover styling, long-option layout, and keyboard navigation behavior. ## Scope This PR does **not** re-enable the `ask_user` tool or change its default profile settings. The tool remains opt-in following #63036. Subagent question visibility and broader radio-group behavior such as arrow-key/roving-tab-index navigation are outside this change. ## Validation - `cargo check -p ui -p agent_ui` passed. - `cargo test -p agent_ui form_choices_are_keyboard_accessible -- --nocapture` passed. - `rustfmt --edition 2024 --check crates/ui/src/components/radio_button.rs crates/ui/src/components.rs crates/agent_ui/src/conversation_view/elicitation.rs` passed. - `git diff --check` passed. - Built and ran the updated application locally. - Manually verified the single-select UI with short and long options: the selected dot is centered, the visual radio retains its original size, long option text wraps correctly, and the row layout remains intact. - Other display scales have not been visually verified. Release Notes: - Fixed selected radio indicator alignment in agent elicitation forms. --------- Co-authored-by: MrSubidubi <finn@zed.dev> |
||
|
|
90731bdec0 |
editor: Fix movement mismatch between minimap thumb and cursor (#62087)
# Objective Fixes #44824 This bug results from an incorrect mathematical derivation of the `pixels_per_line` calculation formula. The complete derivation is too lengthy to include here, so it is provided in a separate comment below. This PR does the same thing as #60080, but it is a refined version of it. ## Solution Replace the previous incorrect calculation formula with the correct one. ## Testing These changes are manually tested on my computer and all worked as expected. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content 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 ## Showcase This recording shows the behavior in short document environment: https://github.com/user-attachments/assets/2e5e7aec-ccf2-47c3-a046-e7f668bdb6c0 While this one shows the behavior in long document environment: https://github.com/user-attachments/assets/e5809c81-4cfb-45f9-8ec7-051a487bd6f7 It's apparent that the minimap thumb moves closely with the cursor in both environments. --- Release Notes: - Fixed movement mismatch between minimap thumb and cursor. --------- Co-authored-by: Finn Evers <finn@zed.dev> |
||
|
|
6708a25004 |
docs: Document default open behavior setting (#64610)
# Objective Update https://zed.dev/docs to include documentation for the `default_open_behavior` setting, introduced by #58805, just like we do for `cli_default_open_behavior`. This was discovered while I was revisiting https://github.com/zed-industries/zed/discussions/44355 . ## Solution Update the documentation for the `Windows & Projects > Opening in a New Window > Via Settings` section. ## Testing Used `mdbook serve docs` to build the documentation and review the edits. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase <details> <summary>Before</summary> <img width="3792" height="2458" alt="CleanShot 2026-09-22 at 16 27 41@2x" src="https://github.com/user-attachments/assets/6722aa35-dc9a-4414-9338-bd08182af71b" /> </details> <details> <summary>After</summary> <img width="3792" height="2458" alt="CleanShot 2026-09-22 at 16 27 03@2x" src="https://github.com/user-attachments/assets/ec8ceb77-a2a9-495f-b145-85f5b8efddde" /> </details> --- Release Notes: - N/A |
||
|
|
5c5236ded8 |
Remove descriptive comments in default settings (#65077)
This PR removes two comments from the default settings, as these merely describe the sorting of the keys to follow and do not provide much context/help for users browsing our default settings. ## 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 |
||
|
|
c5b6d4386e |
acp_thread: Scope permission lifetimes to requests (#65039)
Give each pending permission request a stable local identity and a single lifetime owner. Existing v1/native permissions are the real consumers; this prepares generic permission support without adding v2 wire handling or generic cards. - `AcpThread` owns ordered pending request records, options, authorization kind, and response senders. Tool calls retain only a link to the current request; UUIDs are local and never become agent-visible IDs. - Creation and settlement emit state-owned notifications. Response tasks only deliver outcomes, so dropping a waiter cannot keep resolved requests in UI bookkeeping or prevent activity/sleep state reconciliation. - SDK cancellation and internally generated UI actions capture the exact request ID and owning session. Replacing a request for the same tool cancels its predecessor; late cleanup or captured controls cannot affect the successor. - Validate offered option IDs and derive permission kind from the record rather than trusting action data. Preserve native dropdown/pattern parameters and the permission-grant versus action-choice continuation policy. - Settle detached requests on terminal status, even when presentation preparation fails, and clean up records on refusal/rewind/removal. Legacy cancellation with no local running turn now settles pending permissions without changing unrelated tool state or sending a new no-turn wire cancellation. - Keep session-bucket/per-session presentation ordering, but validate lookups/counts against canonical pending records. Late registration seeds those records rather than rescanning tool history. - Give dropdown/pattern selections one shared `Conversation` owner. Embedded child controls, displayed selection, authorization, and exact-ID cleanup now use the same cache, preventing orphan UUID selections after child resolution/supersession. ## Review guide 1. [Request identity/ownership types](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/acp_thread/src/acp_thread.rs#L1052), then [request APIs and settlement](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/acp_thread/src/acp_thread.rs#L5396-L5583). Check sender ownership, replacement, offered-choice validation, and exact-ID idempotence. 2. [Tool update detachment](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/acp_thread/src/acp_thread.rs#L5101) and [legacy cancellation](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/acp_thread/src/acp_thread.rs#L6135). Status remains authoritative on presentation failure; idle cleanup is deliberately narrow. 3. [SDK adapter](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/agent_servers/src/acp.rs#L5876) and [real SDK cancellation regression](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/agent_servers/src/acp.rs#L4731). The test requires the old RPC's `RequestCancelled` error, not merely a superseded permission outcome. 4. [Conversation ordering/selection owner](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/agent_ui/src/conversation_view.rs#L285), [action addressing](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/agent_ui/src/conversation_view/thread_view.rs#L3099), and [optional action fields](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/agent_ui/src/agent_ui.rs#L346). 5. [Rendered embedded-child regression](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/agent_ui/src/conversation_view.rs#L13858) and [new core boundary tests](https://github.com/zed-industries/zed/blob/54b3ea39493f8adb2d4c1177e839d2eb2f76125d/crates/acp_thread/src/acp_thread.rs#L19396). These cover actual controls, outcome params, UUID-cache cleanup, failed replacement, last-handle release, stale actions, and request recreation. Most of the diff is regression coverage and migration of existing assertions/readers; no second pending lifecycle store is introduced. The UI index and selections are presentation-only state. Release Notes: - N/A |
||
|
|
cd8c467418 |
Add completions and schema validation for agent profile tool settings (#65036)
## Summary List built-in tools in the settings schema so profile tool keys are suggested and unknown keys are flagged. Test that the schema covers the tools in the default write and ask profiles. ## Testing Tested manually on local build. ## 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 Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com> |
||
|
|
28d5832adb |
markdown_preview: Add heading_font_weight setting (#64421)
Headings in the Markdown preview are hardcoded to semibold (600). Users
who set a lighter UI font, or who simply prefer lighter headings, have
no way to change this.
This adds `markdown_preview.heading_font_weight`, applied to H1 through
H6 in the preview. It defaults to `600`, so existing rendering is
unchanged unless the setting is set.
```jsonc
{
"markdown_preview": {
"heading_font_weight": 500
}
}
```
The value flows through `ThemeSettings` alongside the existing preview
typography settings, so the generic `markdown` crate gains no dependency
on `markdown_preview`. Because notebook Markdown cells share the preview
typography, they follow the setting too. Bold text inside headings and
table header cells keep their own weights. The setting is also exposed
in the settings editor under Markdown Preview Font, and documented in
the visual customization docs.
## Before / after
| Default (`600`) | `"heading_font_weight": 500` |
| --- | --- |
| <img width="2000" height="1299" alt="heading-weight-600-default"
src="https://github.com/user-attachments/assets/403d29bb-34ed-4cb1-b333-920ec5ee65f0"
/> | <img width="2000" height="1299" alt="heading-weight-500"
src="https://github.com/user-attachments/assets/9fbdd7f9-2d56-4815-a39e-fd1325ba7cd2"
/> |
## Testing
- New tests in `crates/markdown` assert every preview heading level
resolves to `600` by default and to the configured weight when set, and
that the weight does not leak into editor or agent Markdown.
- Verified manually in a dev build with `SF Pro` at weights 500 and 600;
the open preview re-renders on settings save.
Release Notes:
- Added `markdown_preview.heading_font_weight` to configure the font
weight of headings in the Markdown preview.
|
||
|
|
54edefa083 |
Sort built-in agent profile tool keys in default profiles (#65022)
## Summary It allows quick comparison (diff) to custom profiles. ## Testing Manually test your changes; report results, mention platforms if relevant. How can reviewers test this easily? Include setup and steps. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [ ] Tests cover the new or changed behavior. Release Notes: - N/A Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com> |
||
|
|
c9daddfa0a |
git_ui: Show file counts in git panel section headers (#65028)
The section headers in the git panel (Staged / Unstaged, Tracked / Untracked, and Conflicts) didn't say how many files were in each section. With a long list of changes you had to scroll or collapse sections to get a sense of what was staged versus not. VS Code shows a small count next to each group, and this brings the same thing to Zed. Each section header now shows its file count in a small chip next to the "stage all" checkbox. The chip is hidden when a section is empty, so the pinned empty Staged/Unstaged headers stay clean. A couple of notes on the implementation: - The count comes from the same per-section lists that `update_visible_entries` already builds to render the rows, so the number always matches what's on screen. The existing `tracked_count` / `new_count` fields couldn't be reused here: there's no equivalent for Staged/Unstaged, and a partially staged file shows up in both of those sections. - In tree view the count is the number of files, not files plus directories. - The badge reuses the existing `Chip` component, which the panel already uses for tags in the history view. I added assertions to the existing grouping tests to cover the counts for both the staging and the status grouping. ## Showcase ### Staged / Unstaged <table width="100%"> <tr> <td width="50%" valign="top"> **Before** <img width="358" height="605" alt="image" src="https://github.com/user-attachments/assets/d23c7051-abf7-470a-9194-9e3ea7ae2a7e" /> </td> <td width="50%" valign="top"> **After** <img width="360" height="665" alt="image" src="https://github.com/user-attachments/assets/38e5528d-0d73-4f1d-ab30-2cd0f00b8ef1" /> </td> </tr> </table> ### Tracked / Untracked <table width="100%"> <tr> <td width="50%" valign="top"> **Before** <img width="360" height="631" alt="image" src="https://github.com/user-attachments/assets/d234321e-7f3b-4215-b9ed-34a6da8d6904" /> </td> <td width="50%" valign="top"> **After** <img width="359" height="553" alt="image" src="https://github.com/user-attachments/assets/02b702f9-89b9-4af3-876f-06ed6c1c8320" /> </td> </tr> </table> Release Notes: - Added file counts to section headers in the git panel |
||
|
|
981b224a46 |
Fix forward Delete key icon (#65037)
<img width="2940" height="1720" alt="keymap-dark" src="https://github.com/user-attachments/assets/f4c28b4f-6a33-4479-a24f-c95d64a790c3" /> Closes #64964. Use a dedicated forward Delete icon (⌦) instead of Backspace (⌫). Add a regression test for distinct icons. Release Notes: - Fixed identical Backspace and Delete icons in the keymap editor. |
||
|
|
651d693d42 |
Make Git panel file actions work with multiple selections (#64640)
# Objective Make Git panel file actions apply to the current multi-selection. View File and several context-menu actions currently act on only the focused row. ## Solution - Open every selected file, file diff, and tracked file history. - Copy selected paths as newline-separated text, preserving explicitly selected directory paths. - Add multiple selected untracked files to `.gitignore` or `.git/info/exclude`. - Show plural menu labels and avoid processing a partially staged path twice when it appears in two sections. - Keep single-file actions and the existing stage/discard behavior. ## Testing - `cargo test -p git_ui --lib` — 164 passed on Windows. - `cargo fmt --all -- --check` — passed. - `git diff --check` — passed. - New regression tests cover multi-file tabs, diffs, histories, path copying, ignore/exclude writes, and duplicate status rows. Release Notes: - Improved Git panel file actions for multiple selected files. --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
07310d0f9d |
docs: Fix missing keybindings in tab switcher documentation (#65060)
## Summary What problem does this solve, how, and why does this change matter? Closes #64909. used the same #kb way as others for these two instead of <kdb>, this is limited to docs only. <img width="1184" height="90" alt="image" src="https://github.com/user-attachments/assets/11826738-5e54-478a-bc73-e17cba7192b4" /> ## Testing to test: run ```mdbook serve docs``` and go to: ``http://localhost:3000/tab-switcher.html`` ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [ ] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). <!-- N/A: Documentation only --> - [ ] Tests cover the new or changed behavior. <!-- N/A: Documentation only --> Release Notes: - N/A |
||
|
|
ba2b48461d |
Update dependency urllib3 to v2.8.0 [SECURITY] (#64995)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [urllib3](https://redirect.github.com/urllib3/urllib3) ([changelog](https://redirect.github.com/urllib3/urllib3/blob/main/CHANGES.rst)) | `2.7.0` → `2.8.0` |  |  | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/15138) for more information. --- ### urllib3: HTTPS proxy TLS configuration may be ignored or overridden [CVE-2026-97687](https://nvd.nist.gov/vuln/detail/CVE-2026-97687) / [GHSA-8988-9cw3-xx77](https://redirect.github.com/advisories/GHSA-8988-9cw3-xx77) <details> <summary>More information</summary> #### Details ##### Impact urllib3 supports configuring TLS independently for an HTTPS proxy and the target server. `proxy_ssl_context`, `proxy_assert_hostname`, and `proxy_assert_fingerprint` configure the TLS connection to the proxy. `ssl_context` and the other target-specific TLS parameters configure the connection to the target server. In urllib3 versions 1.26.0 through 2.7.0, these configurations were not consistently separated. Depending on the proxy mode, urllib3 could: 1. Ignore `proxy_ssl_context` and use the target server's SSL context for the TLS connection to an HTTPS forwarding proxy. 2. Override the HTTPS proxy's certificate-verification policy with the target server's certificate-verification policy. 3. Apply target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials to the TLS connection to an HTTPS forwarding proxy. In particular, configuring `cert_reqs="CERT_NONE"` for a target server could overwrite the `verify_mode` of the SSL context configured for the HTTPS proxy. This modification occurred in place and persisted on the context object, potentially disabling proxy certificate verification for later connections that reused the same context. An attacker able to intercept the connection to an HTTPS proxy may be able to impersonate the proxy when the effective proxy TLS configuration disables certificate verification or otherwise accepts the attacker's certificate. This may occur, for example, when the target server's trust or identity policy is incorrectly applied to the proxy connection. When HTTPS forwarding is enabled, an impersonated proxy can observe or modify forwarded requests and responses, potentially exposing credentials, authentication tokens, request bodies, response data, and other sensitive information. A TLS client certificate intended for the target server may also be presented to the proxy or to an attacker impersonating it. This can disclose the client's identity and provide proof of possession of the corresponding private key. The private key itself is not transmitted during the TLS handshake. In CONNECT tunneling mode, impersonating the HTTPS proxy does not by itself defeat the separate end-to-end TLS connection between the client and the target server. ##### Affected Usages Code using urllib3 versions 1.26.0 through 2.7.0 may be affected in any of the following cases. ##### 1. The target SSL context is used for an HTTPS forwarding proxy HTTPS requests are forwarded through an HTTPS proxy with `use_forwarding_for_https=True`, and `proxy_ssl_context` is configured for the proxy. urllib3 may ignore `proxy_ssl_context` and use the target server's `ssl_context` for the proxy TLS handshake. The proxy may therefore be verified using the target server's trust and certificate policy instead of the policy explicitly configured for the proxy. ##### 2. The target verification policy overrides the proxy policy An HTTPS proxy is configured with `proxy_ssl_context`, while the target server uses a different certificate-verification policy. urllib3 may apply the target server's `cert_reqs` value to the proxy SSL context. For example, setting `cert_reqs="CERT_NONE"` for the target server may also disable certificate verification for the HTTPS proxy, even when `proxy_ssl_context` was configured to require verification. This issue can affect the TLS connection to an HTTPS proxy in both forwarding and CONNECT tunneling configurations. ##### 3. A mutated proxy SSL context is reused The same SSL context is reused as `proxy_ssl_context` across multiple connections, and certificate verification is disabled for one target server. urllib3 may modify the proxy SSL context's `verify_mode` in place. Later connections that reuse the same context may therefore connect to the HTTPS proxy without certificate verification. ##### 4. Target-specific TLS identity or credentials are applied to the proxy HTTPS requests are forwarded through an HTTPS proxy with `use_forwarding_for_https=True`, and target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials are configured. urllib3 may apply these target-specific settings to the proxy TLS handshake. This may cause urllib3 to: - send SNI intended for the target server to the proxy; - verify the proxy using a hostname or certificate fingerprint intended for the target server; or - present a TLS client certificate intended for the target server to the proxy. Code connecting through a plain HTTP proxy does not establish a TLS connection to the proxy and is not affected by this issue. ##### Remediation Upgrade to urllib3 2.8.0 or later. urllib3 2.8.0 independently applies the explicitly configured `proxy_ssl_context` and proxy-specific certificate assertions to the HTTPS proxy connection. Target-specific SNI, certificate assertions, and TLS client certificate parameters are no longer applied to the HTTPS proxy handshake. For backward compatibility, when an HTTPS proxy is used with `use_forwarding_for_https=True` and `proxy_ssl_context` is not provided, urllib3 2.8.0 continues to use `ssl_context` for the TLS connection to the proxy. This configuration emits a `FutureWarning`. In urllib3 3.0, passing `ssl_context` with `use_forwarding_for_https=True` for an HTTPS proxy will raise an error. Applications should use `proxy_ssl_context` to configure TLS for an HTTPS forwarding proxy. The fixes were implemented in commits b6447295fff7b38fdffc67e0df9712d60cef3cc3 and 07408cec79d1856d81bb42c74a904a24fdb9e465. #### Severity - CVSS Score: 7.6 / 10 (High) - Vector String: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N` #### References - [https://github.com/urllib3/urllib3/security/advisories/GHSA-8988-9cw3-xx77](https://redirect.github.com/urllib3/urllib3/security/advisories/GHSA-8988-9cw3-xx77) - [https://nvd.nist.gov/vuln/detail/CVE-2026-97687](https://nvd.nist.gov/vuln/detail/CVE-2026-97687) - [https://github.com/urllib3/urllib3/pull/5093](https://redirect.github.com/urllib3/urllib3/pull/5093) - [https://github.com/urllib3/urllib3/commit/07408cec79d1856d81bb42c74a904a24fdb9e465](https://redirect.github.com/urllib3/urllib3/commit/07408cec79d1856d81bb42c74a904a24fdb9e465) - [https://github.com/urllib3/urllib3/commit/b6447295fff7b38fdffc67e0df9712d60cef3cc3](https://redirect.github.com/urllib3/urllib3/commit/b6447295fff7b38fdffc67e0df9712d60cef3cc3) - [https://github.com/urllib3/urllib3/releases/tag/2.8.0](https://redirect.github.com/urllib3/urllib3/releases/tag/2.8.0) - [https://github.com/advisories/GHSA-8988-9cw3-xx77](https://redirect.github.com/advisories/GHSA-8988-9cw3-xx77) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-8988-9cw3-xx77) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory [CVE-2026-97689](https://nvd.nist.gov/vuln/detail/CVE-2026-97689) / [GHSA-vxq7-64xx-v4gw](https://redirect.github.com/advisories/GHSA-vxq7-64xx-v4gw) <details> <summary>More information</summary> #### Details ##### Impact urllib3's [streaming API](https://urllib3.readthedocs.io/en/2.7.0/advanced-usage.html#streaming-and-i-o) is designed for efficiently handling large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once. When decoding a [chunked-transfer-encoded response](https://httpwg.org/specs/rfc9112.html#chunked.encoding), this API reads each chunk's size field by buffering until it sees `\n` or EOF. A malicious HTTP server can return `Transfer-Encoding: chunked` and then send a very long run of bytes without any newline, causing the streaming client to buffer that entire run before urllib3 can reject the chunk size as invalid and allocate more memory than intended. To fix the issue, we'll reject chunk-size fields larger than 65536 bytes, as already done in the non-streaming case, which is currently handled by the Python standard library. Note that this only applies to reading the chunk-size field, not the chunk data, which is already handled correctly. Thus, there shouldn't be any impact for non-malicious servers. ##### Affected usages Applications and libraries using urllib3 versions earlier than 2.8.0 may be affected when streaming a chunked response from untrusted sources. Specifically, this affects the [read_chunked()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.read_chunked) and [stream()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.stream) methods of the HTTPResponse object. This also affects requests streaming API, which uses urllib3 under the hood. ##### Remediation Upgrade to urllib3 version 2.8.0 or later, where chunk-size fields larger than 65536 will be rejected. If upgrading is not immediately possible, consider reading the response at once using the [read()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.read) method. #### Severity - CVSS Score: 8.9 / 10 (High) - Vector String: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H` #### References - [https://github.com/urllib3/urllib3/security/advisories/GHSA-vxq7-64xx-v4gw](https://redirect.github.com/urllib3/urllib3/security/advisories/GHSA-vxq7-64xx-v4gw) - [https://nvd.nist.gov/vuln/detail/CVE-2026-97689](https://nvd.nist.gov/vuln/detail/CVE-2026-97689) - [https://github.com/urllib3/urllib3/commit/cd770b059b543be29298ea5c52afb0b1b090f5ed](https://redirect.github.com/urllib3/urllib3/commit/cd770b059b543be29298ea5c52afb0b1b090f5ed) - [https://github.com/urllib3/urllib3/releases/tag/2.8.0](https://redirect.github.com/urllib3/urllib3/releases/tag/2.8.0) - [https://github.com/advisories/GHSA-vxq7-64xx-v4gw](https://redirect.github.com/advisories/GHSA-vxq7-64xx-v4gw) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-vxq7-64xx-v4gw) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### urllib3: Chunked Deflate streaming can enter an infinite loop [CVE-2026-97688](https://nvd.nist.gov/vuln/detail/CVE-2026-97688) / [GHSA-gh4c-6fx4-qh6g](https://redirect.github.com/advisories/GHSA-gh4c-6fx4-qh6g) <details> <summary>More information</summary> #### Details ##### Impact urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading content in chunks instead of loading the entire response body into memory at once. urllib3 can decompress response bodies according to the HTTP `Content-Encoding` header. When streaming a compressed, chunked response, urllib3 first consumes data already buffered by the decoder before reading the next HTTP chunk. However, urllib3 versions from 2.6.2 through 2.7.0 could enter an infinite loop when a chunked response contained bytes after the end of the Deflate stream. If the decompressed body exceeded the requested streaming chunk size, Python's zlib implementation could retain the trailing bytes as unconsumed input after reaching the end of the compressed stream. urllib3 would repeatedly attempt to decode those same bytes without making progress or reading more data from the network. A malicious server could exploit this behavior to cause excessive CPU usage and prevent the affected request from completing on the client. Network read timeouts would not interrupt the loop because no further socket operation was required. ##### Affected usages Applications and libraries using urllib3 versions 2.6.2 through 2.7.0 may be affected when all of the following conditions are met: 1. Compressed responses from an untrusted source are streamed using `HTTPResponse.stream(amt=N)` or `HTTPResponse.read_chunked(amt=N)` with a positive, finite chunk size. 2. Content decoding is enabled. 3. The response uses both `Transfer-Encoding: chunked` and `Content-Encoding: deflate`. 4. The decoded body exceeds the requested chunk size and the encoded body contains bytes after the end of the Deflate stream. `HTTPResponse.stream()` uses a finite chunk size by default and is therefore affected when the other conditions are met. ##### Remediation Upgrade to urllib3 2.8.0, in which the Deflate decoder stops accepting input after reaching the end of the compressed stream and no longer reports trailing bytes as data that can produce more decoded output. If upgrading is not immediately possible, disable automatic content decoding for responses from untrusted sources by setting `decode_content=False`, or reject streamed responses using the Deflate content encoding. Applications that disable automatic decoding must handle the compressed response safely at another layer. #### Severity - CVSS Score: 6.9 / 10 (Medium) - Vector String: `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N` #### References - [https://github.com/urllib3/urllib3/security/advisories/GHSA-gh4c-6fx4-qh6g](https://redirect.github.com/urllib3/urllib3/security/advisories/GHSA-gh4c-6fx4-qh6g) - [https://nvd.nist.gov/vuln/detail/CVE-2026-97688](https://nvd.nist.gov/vuln/detail/CVE-2026-97688) - [https://github.com/urllib3/urllib3/commit/ea2ad7b21a80da3632f80016526a18864586077f](https://redirect.github.com/urllib3/urllib3/commit/ea2ad7b21a80da3632f80016526a18864586077f) - [https://github.com/urllib3/urllib3/releases/tag/2.8.0](https://redirect.github.com/urllib3/urllib3/releases/tag/2.8.0) - [https://github.com/advisories/GHSA-gh4c-6fx4-qh6g](https://redirect.github.com/advisories/GHSA-gh4c-6fx4-qh6g) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-gh4c-6fx4-qh6g) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>urllib3/urllib3 (urllib3)</summary> ### [`v2.8.0`](https://redirect.github.com/urllib3/urllib3/blob/HEAD/CHANGES.rst#280-2026-09-15) [Compare Source](https://redirect.github.com/urllib3/urllib3/compare/2.7.0...2.8.0) \================== ## Security Fixed the following security issues: - The TLS configuration for HTTPS proxies could be ignored or overridden. (High severity, `GHSA-8988-9cw3-xx77 <https://github.com/urllib3/urllib3/security/advisories/GHSA-8988-9cw3-xx77>`\_\_) - `HTTPResponse.stream()` and `read_chunked()` could buffer a chunk-size line of unbounded length in memory. (High severity, `GHSA-vxq7-64xx-v4gw <https://github.com/urllib3/urllib3/security/advisories/GHSA-vxq7-64xx-v4gw>`\_\_) - Chunked Deflate streaming could enter an infinite loop. (Medium severity, `GHSA-gh4c-6fx4-qh6g <https://github.com/urllib3/urllib3/security/advisories/GHSA-gh4c-6fx4-qh6g>`\_\_) .. caution:: ``` urllib3 2.8.0 fixes HTTPS proxy TLS configuration being ignored or overridden by destination settings. Configurations relying on that behavior may require changes. Configure proxy CA certificates and client certificates in ``proxy_ssl_context``, and proxy identity checks with ``proxy_assert_hostname`` or ``proxy_assert_fingerprint``. Destination client certificates and identity overrides no longer apply to HTTPS forwarding proxy connections. ``` ## Deprecations & Removals - Deprecated using an empty collection as the `Retry` option `allowed_methods` to retry any verb. (`#​5044 <https://github.com/urllib3/urllib3/issues/5044>`\_\_) ## Features - Added `Url.auth_decoded` and `Url.auth_decoded_joined` convenience properties to the result of `parse_url()`. (`#​4945 <https://github.com/urllib3/urllib3/issues/4945>`\_\_) - Added `basic_auth_encoding` and `proxy_basic_auth_encoding` parameters to `urllib3.util.make_headers()`. (`#​5092 <https://github.com/urllib3/urllib3/issues/5092>`\_\_) ## Bugfixes - Fixed response header handling to replace obsolete folded header lines (`obs-fold`) with spaces in accordance with RFC 9112, preventing raw CRLF sequences from appearing in header values such as `Set-Cookie`. (`#​1362 <https://github.com/urllib3/urllib3/issues/1362>`\_\_) - Fixed usage of `proxy_ssl_context` with `ProxyManager` when `use_forwarding_for_https=True`. Passing `ssl_context` instead of `proxy_ssl_context` for HTTPS proxies in this configuration now emits a `FutureWarning` and will raise an error in v3.0. (`#​2577 <https://github.com/urllib3/urllib3/issues/2577>`\_\_) - Changed behavior of the default `ConnectionPool.pool` initialization. `LifoQueue` is now resolved from the `queue` module after the `ConnectionPool` is instantiated instead of using the default cached `QueueCls` class property. This is done because sometimes the `queue.LifoQueue` is monkey-patched late in the program, such as by gevent. (`#​3289 <https://github.com/urllib3/urllib3/issues/3289>`\_\_) - Raised `UnrewindableBodyError` instead of `ValueError` when retrying a request whose body had `tell()` but not `seek()`. (`#​3779 <https://github.com/urllib3/urllib3/issues/3779>`\_\_) - Decoded percent-encoded SOCKS proxy credentials before authenticating with the proxy server. (`#​3785 <https://github.com/urllib3/urllib3/issues/3785>`\_\_) - Fixed `HTTPResponse.drain_conn()` to discard unread response data in 64 KiB chunks (same as the default `amt` when doing `HTTPResponse.stream(...)`). (`#​5019 <https://github.com/urllib3/urllib3/issues/5019>`\_\_) - Fixed `is_ipaddress()` to detect non-standard IPv4 forms accepted by `socket.connect`, such as hex (`0x7f000001`), octal (`0177.0.0.1`), and decimal integers (`2130706433`), ensuring SSL certificate verification uses the correct mode for these addresses. (`#​5029 <https://github.com/urllib3/urllib3/issues/5029>`\_\_) - Fixed `HTTPConnectionPool.urlopen` raising a misleading `FullPoolError` instead of `ValueError` when called with an invalid `timeout` argument on a pool created with `block=True`. (`#​5059 <https://github.com/urllib3/urllib3/issues/5059>`\_\_) - Fixed port-zero handling to preserve explicit `:0` values instead of substituting the default ports 80 or 443 in URL parsing, pool selection, proxy configuration, `connection_from_url()`, and HTTP/2 request authority. (`#​5071 <https://github.com/urllib3/urllib3/issues/5071>`**, `#​5101 <https://github.com/urllib3/urllib3/issues/5101>`**) - Fixed a bug where `PoolManager` passed the `assert_hostname` and `assert_fingerprint` parameters to HTTP connection pools. (`#​5077 <https://github.com/urllib3/urllib3/issues/5077>`\_\_) - Fixed `HTTPConnectionPool.urlopen()` and HTTP proxy forwarding to strip URL fragments from absolute request targets before sending requests. (`#​5079 <https://github.com/urllib3/urllib3/issues/5079>`\_\_) - Added safeguards to the proxy tunneling code to prevent potential security issues when handling invalid characters in the proxy host and HTTP headers. This change affects users of Python 3.10, Python 3.11, and Python 3.12 when the standard library does not contain the fix; those on newer Python versions should upgrade to 3.13.14+ or 3.14.5+ to get the same security fixes. (`#​5091 <https://github.com/urllib3/urllib3/issues/5091>`\_\_) - Fixed `HTTPSConnection.connect()` overriding `ProxyConfig.ssl_context`'s certificate policy and proxy identity checks with the target connection's TLS settings when forwarding through an HTTPS proxy. `HTTPSConnection` no longer applies target SNI, assertions, or client credentials to forwarding proxy handshakes and continues to use its `ssl_context` as a fallback when an HTTPS proxy forwards an HTTP target. (`#​5093 <https://github.com/urllib3/urllib3/issues/5093>`\_\_) - Fixed URL parsing to more strictly enforce RFC 3986 host syntax, rejecting invalid host input such as raw spaces and control characters, malformed percent-encodings, and percent-encoded control characters in HTTP(S) hosts and IPv6 zone identifiers, including proxy CONNECT tunnel targets. Host normalization now also follows RFC 3986 normalization rules for percent-encoded octets by decoding percent-encoded unreserved characters and uppercasing the hexadecimal digits of retained percent-encoded octets. (`#​5095 <https://github.com/urllib3/urllib3/issues/5095>`\_\_) - Fixed an `AttributeError` on Python built with OpenSSL 4+, where `ssl.PROTOCOL_TLSv1` no longer exists. (`#​5097 <https://github.com/urllib3/urllib3/issues/5097>`\_\_) - Fixed `urllib3.contrib.pyopenssl` to use cryptography APIs when reading a certificate subject and loading encrypted private keys, avoiding `DeprecationWarning` raised by pyOpenSSL 26.3.0+. (`#​5103 <https://github.com/urllib3/urllib3/issues/5103>`\_\_) - Fixed handling of HTTP 303 redirects for requests with chunked or file-like bodies. (`#​5161 <https://github.com/urllib3/urllib3/issues/5161>`\_\_) - Fixed `assert_fingerprint()` to raise `SSLError` instead of `binascii.Error` when a fingerprint has a supported length but contains non-hexadecimal characters. (`#​5211 <https://github.com/urllib3/urllib3/issues/5211>`\_\_) ## Misc - Added a `test` dependency group containing the minimum dependencies needed to run the test suite, intended for downstream packagers. The `dev-base` and `mypy` groups now include this new group via `include-group`, removing duplication. (`#​3594 <https://github.com/urllib3/urllib3/issues/3594>`\_\_) - Fixed test failures with pytest >= 9.1. (`#​5094 <https://github.com/urllib3/urllib3/issues/5094>`\_\_) - Enabled JSPI tests with Firefox in the Emscripten test suite. (`#​5166 <https://github.com/urllib3/urllib3/issues/5166>`\_\_) - Improved streamed response decoding performance. (`#​5209 <https://github.com/urllib3/urllib3/issues/5209>`\_\_) - Fixed flaky tests. (`#​5232 <https://github.com/urllib3/urllib3/issues/5232>`**, `#​5234 <https://github.com/urllib3/urllib3/issues/5234>`**, `#​5239 <https://github.com/urllib3/urllib3/issues/5239>`\_\_) </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- Release Notes: - N/A <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
35bba8eef7 |
Allow builtin language servers to be disabled by default (#65049)
## Summary This addresses the concern mentioned in https://github.com/zed-industries/zed/pull/65030#pullrequestreview-5380076060 Release Notes: - N/A |
||
|
|
2a97fbf22b |
agent_ui: Keep the Awaiting Confirmation label on a single line (#64952)
## Summary Closes #62772 The "Awaiting Confirmation" label below a pending tool call animates an ellipsis by changing its text (`Awaiting Confirmation`, `.`, `..`, `...`). When the text is close to the row's width, it wraps onto a second line whenever the dots are drawn and goes back to one line when they aren't. The row keeps changing height, so the tool call confirmation above it bobs up and down. This renders the label with `single_line()` so it never wraps and the row height stays fixed. This replaces #64887. That PR reserved the full `...` width, so the label stopped bobbing but stayed wrapped onto two lines. As @ChristopherBiscardi pointed out, the wrapping itself is the bug. ## Screenshots The agent panel at its 300px minimum width with `"ui_font_size": 26` (the easiest way to put the label right at its wrap point), captured across one animation cycle. **Before**: the row grows to two lines when the dots appear:  **After**: the label stays on one line in every frame:  ## Testing 1. Set `"ui_font_size": 26` and `"agent_ui_font_size": 26`, and shrink the agent panel to its minimum width. 2. Ask the agent to do something that needs tool confirmation. 3. Watch the "Awaiting Confirmation" row as the dots cycle. It no longer changes height. The screenshots come from a stub agent with a pending permission request, rendered in Zed's visual test harness on macOS. `cargo clippy -p agent_ui --all-targets -- --deny warnings` and `cargo fmt --check` 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). - [ ] Tests cover the new or changed behavior. Release Notes: - Fixed the agent panel's "Awaiting Confirmation" row jumping up and down while its ellipsis animates. |
||
|
|
57bfce2945 |
git_ui: Enable splitting MultiDiffView (directory zed --diff) (#64967)
## Summary Enable split diffs for `zed --diff`, where the left and right sides are directories. This simply reuses the existing split diff that's already used for single-file diffs, git UI, etc. I believe this will make the Zed diff experience more consistent for use cases like `git difftool`, `jj diff --tool` etc. See #50046 for a similar change that made this work for single-file diff views. ### Before <img width="1624" height="975" alt="image" src="https://github.com/user-attachments/assets/db8c0592-8bea-4b8f-9ccc-d94456fb6208" /> ### After <img width="1624" height="976" alt="image" src="https://github.com/user-attachments/assets/c074cc5f-bdf7-4747-9ef5-4f77b3e42ee6" /> <img width="1624" height="976" alt="image" src="https://github.com/user-attachments/assets/a97026a8-312d-4a51-a9f7-24343640237a" /> ## Testing 1. `cargo build` 2. `zed --zed target/debug/zed --diff $left $right` (where `$left` and `$right` are directories) For the screenshots above, I used `jj` configuration like this. It's a little awkward to setup because the debug build of Zed looks for grammar files in `crates/grammars/src` to properly highlight everything ```toml [merge-tools.zed-tester] program = "bash" diff-invocation-mode = "dir" diff-args = [ "-c", ''' dir=$PWD cd /path/to/zed/checkout zed-preview --zed ./target/debug/zed --wait --diff "$dir/$1" "$dir/$2" ''', "", "$left", "$right" ] ``` Usage with this config: `jj show $revision --tool zed-tester` or `jj diff -r $revisions --tool zed-tester` ## 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 new UI components here, just plugging existing ones together. UX should match what already existed for other usages of these components - [x] Tests cover the new or changed behavior. - In particular, added a test for the same scenario as #60914 to ensure that it works for this view Release Notes: - Enable side-by-side view for multibuffer `zed --diff` of directories |
||
|
|
20d29fc6bc |
Rewatch a directory that was deleted and recreated (#61372)
# Objective Addresses the delete-then-recreate cause reported under #53901 (@Akizay's reproduction) — a different root cause from the macOS FSEvents fd-saturation case in #61072, so this intentionally does not use a closing keyword. Supersedes #64151 (rescan stale empty directories on expand), which recovers from the same stale watch later in the UI. When a directory is deleted and quickly recreated while it is being repopulated — e.g. a build or test step that clears an output directory and then rewrites it — most of the newly-written files never appear in the project panel (nor do buffers/git status reflect them) until the workspace is reloaded. @Akizay reproduced this on Linux with a small Python script that `rmtree`s a directory and immediately recreates it with 20 files + 20 subdirectories; only the first one or two show up. ## Root cause Proven empirically on Linux/inotify (see Testing): the failure is a stale watch registration in the `fs` crate, not fd budgets and not an LSP. 1. Each watched directory has its own inotify watch (inotify is not recursive). `FsWatcher` tracks these in a `registrations` map keyed by path. 2. When the directory is deleted, the kernel silently invalidates its inotify watch (`IN_IGNORED`), but `FsWatcher`'s `registrations` entry lingers, because the delete and the recreate coalesce within one `FS_WATCH_LATENCY` (100ms) debounce window, so the worktree processes the path as still-present (metadata exists again) and never unwatches it. 3. When the worktree rescans the recreated directory and calls `watcher.add(path)`, both `FsWatcher` and the shared per-backend registration state still mark the path as watched, so no new OS watch is installed. Files written into the new directory produce no events until an unrelated rescan. 4. Separately, `scan_dir` established the directory's watch only *after* enumerating its contents (`read_dir`), leaving a TOCTOU window even when a fresh watch is created. 5. The same stale state happens when a watched directory is renamed. Its inotify watch, and the watches on its watched subdirectories, follow the moved directory, so a directory recreated at the old path goes unwatched. It also happens when an inotify queue overflow drops the removal event. This matches @Akizay's observation that inserting a `sleep` longer than `FS_WATCH_LATENCY` between the delete and the recreate fixes it: with the delete processed in its own window, the worktree unwatches the path, so the later `add` re-registers cleanly. ## Solution - `fs`: the shared registration state for each path gets a `stale` flag. On native non-recursive (Linux) watches, `dispatch` sets it before callbacks run: - for `Remove` or rename events on a registered path; - on a rename, also for every registered path under it; - for every path on a queue overflow. The next `add` for a stale path calls `unwatch`, then `watch`, and clears the flag. One repair covers every subscriber that shares the watch. A directory that stays deleted costs only a hash lookup per event; it is cleaned up through the existing `remove`. - `fs`: backend `watch`/`unwatch` calls are now made while holding the per-backend state lock. A concurrent add can't treat a path as watched before its new watch exists, and a concurrent final remove can't interleave with a repair. Backend callbacks only enqueue events, so this can't deadlock. - `worktree`: `scan_dir` installs the directory's watch before `read_dir`, so a child created during enumeration still produces an event. Polling and macOS/Windows native watches are recursive and unchanged. Known limitations: - A stale watch is repaired only when something calls `add` for that path again. The worktree scanner does this when it rescans the directory. - A poll watcher's first registration walks its tree while holding the poll backend's state lock. Poll events and other poll adds wait until it finishes; no events are lost. Disclosure per the AI policy: I investigated and developed this with an LLM agent (Claude Code / Opus 4.8), reviewing and directing each step; the measurements below are from real runs I can defend in review. ## Testing - `fs_watcher::tests::removed_or_renamed_path_is_rewatched_once` (Linux only, fake backend). Two subscribers share a directory, and its subdirectory is watched too. The test covers a removal, an overflow, a rename of the parent directory, and the same rename on a case-insensitive path. It asserts the backend's full `watch`/`unwatch` calls after a repair. Each case fails without its part of the fix. - `test_new_directory_scan_does_not_miss_event_before_adding_watcher` (worktree, Linux only). A FakeFs hook creates a file without an event while the new directory's watch is being installed. The test fails if `scan_dir` reads before watching. - `test_root_rescan_keeps_root_watcher_registered` is updated. On Linux the overflow rescan now reinstalls the root watch before reading the root, so it expects 2 root `watch` calls. On macOS and Windows it still expects 1. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed files created in a directory that was deleted and immediately recreated (for example by a build or test step that clears and repopulates an output directory) not appearing until the workspace was reloaded --------- Co-authored-by: Ben Kunkle <ben@zed.dev> |
||
|
|
36b6d0951f |
gpui: Stop sealing empty intervals on idle frame skips (#65057)
## Summary Follow-up to #64958. macOS (display link), Windows (`VSyncProvider`) and X11 (refresh timer) deliver a frame request on every refresh while a window is visible. Since frame skips became interval boundaries, each idle refresh: - sealed an empty snapshot that the hang monitor thread had to build and discard, and - flushed folded sub-floor task polls into the journal via the platform-signal and skip records. Flushed polls reach the sealer even when end-of-turn idle handling discards folded-only work, so idle wake-ups could again accumulate toward a later frame budget, which is what that rule exists to prevent. Changes: - `FrameSkipped` boundaries follow the same rule as idle boundaries: they're recorded only when an event was retained since the last boundary. - `PlatformSignal` and `ReentrantFrameSkipped` are published as point records that leave folded polls folded. - The sealer no longer seals empty intervals. - Throttled and no-render skips still seal real work, so GPUI's own frame-rate limits (inactive windows, thermal pressure) aren't counted as dropped frames. - Cleanups: the throttle carries a `FrameRateLimit` enum instead of `(Duration, bool)` with an underscore-named binding, `#[repr(u8)]` is removed from `FrameRequestSource`, and `PlatformFrameSignal::record` uses `expect(unused_variables)` in profiler-disabled builds instead of `let _ = (at, source);`. ## Testing - New `idle_refreshes_seal_nothing_and_keep_polls_folded`: refreshes with folded polls and no retained work publish only platform signals and seal nothing. - Updated skip tests to give skips retained work. A late signal without work now seals nothing. - `cargo test -p gpui --features profiler --lib` (438 passed), profiler-disabled frame-signal and window tests, `./script/clippy -p gpui`, Windows (`--no-default-features`) clippy, wasm32 check. Release Notes: - [GPUI] Fixed idle frame requests sealing empty hang-detection intervals and flushing folded task polls on every refresh |
||
|
|
506beb34de |
gpui: Record debug selectors only in debug builds (#65056)
Since #65043, `gpui/test-support` is safe to enable in every build, and downstream projects (Delta) do so to avoid compiling GPUI twice. One exception remained: with the feature on, `debug_selector` allocates its `String` on every element construction, and paint copies it into the frame's debug-bounds map every frame, even in release builds. Its docs already promised it was a no-op in release. Selectors are now recorded only in GPUI's own tests and in debug builds with `test-support`. `VisualTestContext::debug_bounds` returns `None` in optimized test builds; Zed doesn't run tests that way. Release Notes: - [GPUI] Fixed `debug_selector` allocating and recording bounds every frame in release builds with `test-support` enabled |
||
|
|
cd4fc8de4c |
gpui: Journal platform frame requests and skipped frames (#64958)
## Summary Pass captured platform frame request timing to `on_request_frame` and emit foreground journal records. This PR provides timing data; it does not classify platform waits or change latency histogram/reporting policy. `RequestFrameOptions` carries an optional captured time and a native-callback/local-schedule source. A per-window atomic preserves the earliest coalesced request timestamp and its matching source until main-thread delivery. Journal records include window identity, captured time when available, foreground handling time, and source. No request IDs or second journal stream are introduced. ## Completed frame skips (retained for review) Keep completed GPUI decisions not to render as sealing boundaries, with no-render-needed, inactive-throttle, and thermal-throttle reasons. They seal at foreground completion without satisfying or clearing pending demand. Hang serialization uses `sealed_by: "frame_skipped"`. Platform frame requests do not seal or count as foreground work. Reentrant deferrals remain non-sealing raw diagnostic records with their own window/time payload; they cannot be represented as completed skip reasons or sealing skip boundaries. Raw point diagnostics are not copied into snapshots. Hang qualification still uses foreground execution durations and occupancy; infinite foreground hang detection remains follow-up work. The skip-sealing portion is intentionally retained for review and can be split out if requested. The signal-to-present histogram, refresh estimation, platform-wait filtering, and Frame Duration Report changes are deferred. The complete prior checkpoint is preserved on `platform-frame-latency-followup`; it is not a second PR yet. ## Platform sources - **macOS:** CoreVideo’s supplied current host timestamp is converted to an `Instant` using paired host-clock/local-clock samples, with receipt-time fallback for invalid timestamps. Capture happens before registry locking/coalescing; synchronous `displayLayer` and key-window draws use call time. `WindowFrameSource::stop()` clears stale signals after detaching the subscription. - **Windows:** VSyncProvider time immediately after waiting, before redraw invalidation. Compositor-paced waits are tagged `NativeCallback`; failed or short waits followed by the existing fallback sleep are tagged `LocalSchedule`. Coalescing retains the earliest timestamp and its matching source together; hidden/minimized slots are cleared. Wait and redraw behavior are unchanged. - **Wayland:** compositor milliseconds converted against CLOCK_MONOTONIC with wrapping subtraction and a 60-second plausibility bound; receipt-time fallback. Demand pings retain enqueue time; retries retain scheduled deadlines. - **X11:** scheduled calloop refresh deadline; expose requests have no captured time. - **Web:** no captured timestamp yet, but requests are still journaled with foreground handling time. Captured-time option fields remain available regardless of the profiler feature so independently featured backends share one API shape. Built-in backends collect timestamps only with `gpui/profiler`: disabled capture does not evaluate clock/conversion closures, the accumulator has no timestamp storage or atomic operations, and callback delivery and actual scheduling clocks remain unchanged. Wayland's protocol does not guarantee the clock epoch. Windows fully covered-window behavior and X11 compositor gating beyond the timer remain limitations of these sources. Live compositor/display-off/lock workflows remain unverified. Skip-boundary changes touch `journal.rs` and `hang.rs`. This PR will merge before the parallel hang-watchdog work; that follow-up PR will resolve its conflicts against these changes. ## Verification Latest feature-gating checks: the profiler-disabled capture regression passed; enabled coalescing and window integration tests passed; macOS and GPUI/Web Wasm compiled with profiling both disabled and enabled. An optimized probe built from the shared implementation confirmed disabled capture/accumulator paths contain no calls or atomic instructions. Clippy, formatting, and whitespace checks passed. Latest-head CI passed Linux, Windows, and macOS tests and Clippy, along with Wasm and style checks. Latest type/guard cleanup: seven focused journal, hang, and window tests passed, along with the profiler-disabled GPUI library check, Clippy, formatting, and whitespace checks. The consecutive profiler guards are grouped without shortening the foreground-turn guard lifetime. - Previous extracted checkpoint: `cargo test -p gpui --features profiler --lib -- --test-threads=1`: **431 passed**. - Focused TestPlatform tests exercise request/source emission and pending demand surviving throttling, observing callback execution and draw counts. No wall-clock sleeps are used by the new window tests. - `corgi check -p gpui_macos --lib`: passed. - `./script/clippy -p gpui -p gpui_macos -p input_latency_ui`: passed, including repository hygiene checks. - GPUI + Web Wasm check with profiler and repository CI build-std/atomics flags: passed. - Formatting and `git diff --check`: passed. Corgi's parallel suite passed 436 of 437 tests but encountered the previously observed hang-monitor shutdown channel timing failure. That test passed in the serial Cargo suite and was not changed or disabled. The preceding checkpoint passed Linux, Windows, macOS, and Wasm CI. CI also passed on the current head, `3641f14ab0`. Local cross-target checks remain constrained by missing Linux system libraries and Windows SDK tooling on the macOS host. ## Suggested .rules additions When manually driving platform frame requests in GPUI tests, account for test-mode automatic draws during effect flushing. For throttle-routing tests, configure a comfortably long throttle interval instead of relying on wall-clock sleeps or short scheduling deadlines. Release Notes: - [GPUI] Added captured platform frame request timing and foreground journal records, including sealing boundaries for completed decisions not to render. |
||
|
|
7bbd162ddf |
ui: Add ability to customize context menu spacing (#65044)
## Summary This PR adds a `spacing` method to the context menu, adding the ability to use the `ListItemSpacing` enum to customize the size of each individual menu item. ## 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 |
||
|
|
95cd535a5f |
gpui: Make test-support safe to enable in every build (#65043)
Projects that depend on GPUI rebuild it, and everything above it, whenever they switch between running their app and running their tests: `cargo test` turns on `test-support` through dev-dependencies, and `cargo build` doesn't. Turning `test-support` on in every build would remove that split, but today the feature changes runtime behavior, so it can't ship in a production binary. This PR makes it additive where it mattered. - **Leak detection is opt-in.** `gpui/test-support` no longer turns on `leak-detection`, which takes the entity map's write lock on every handle create and drop. It's now enabled by the `leak-detection` feature (as `zed/track-project-leak` already does) or by setting `GPUI_LEAK_DETECTION=1` when building. Without it: - `leak_detector_snapshot()` and `assert_no_new_leaks()` are no-ops; - `WeakEntity::assert_released()` still panics when the entity is alive, but can't list the live handles. - **`util::paths::home_dir()`** returns the fixed fake path (`/Users/zed`) only in `util`'s own tests, not whenever `util/test-support` is on. No test outside `util` depended on the fake path. - **`is_test()` on GPUI contexts.** `App::is_test`, `AsyncApp::is_test` and `BackgroundExecutor::is_test` (in gpui and scheduler) report whether the executor is a `TestScheduler`, in every build. Code that must behave differently under tests should use these instead of `cfg(feature = "test-support")`, so compiling the feature into an app doesn't change its behavior. For code with no executor, such as expensive invariant checks, `scheduler::test_scheduler_created()` reports whether the process has created a `TestScheduler`, which test harnesses do before the test body runs. - **Metal `framebuffer_only(false)`** (needed for offscreen capture) now only applies in debug builds, so optimized builds that compile `test-support` keep the faster presentation path. **Open question:** CI doesn't set `GPUI_LEAK_DETECTION`, so with this change leak checks outside gpui's own unit tests are skipped in CI. If we go ahead, the test jobs should set it. I've left that out until we agree on the approach. This PR is mainly to see what CI says about crates whose tests read `home_dir()` (`project`, `worktree`, `workspace`, …), which now see the real home directory. Release Notes: - [GPUI] Made the `test-support` feature safe to enable in production builds: leak detection is now opt-in via the `leak-detection` feature or `GPUI_LEAK_DETECTION`, and `App::is_test` reports whether code runs under the test scheduler |
||
|
|
1399a804bd |
Make it possible to disable language servers in the extension manifest (#65030)
## Summary This PR enables extension authors to disable language servers from the `extension.toml` as opposed to requiring a change to Zed's default settings. With this in, we no longer need to ship default enabled servers for a given language and can instead resort to extension authors disabling those in their extension. This gives extension authors more control and also finally removes the need to link Zed version releases to extension releases in cases where the extension wants to add a new language server. ## Testing Aside from the added tests, also ran a local build and tested this against the kotlin extension. Worked as I would expect it to. ## Self-review - [X] I've reviewed my diff for quality, security, reliability, and performance. - [-] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [X] Tests cover the new or changed behavior. Release Notes: - Added the possibility for language server extensions to configure which language servers are enabled/disabled by default. Visit https://zed.dev/docs/extensions/languages.md#opt-in-language-servers for more information. --------- Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com> |
||
|
|
17d3378bb9 |
cloud_api_types: Add settings update notifications (#65040)
Add SettingsUpdated to the shared Cloud WebSocket protocol so account-settings consumers can refetch canonical state. Release Notes: - N/A |