Commit Graph
40126 Commits
Author SHA1 Message Date
Marocco2andChristopher Biscardi 2c11b68c25 gpui: Add MicaBackdrop and MicaAltBackdrop to be selectable on themes (#48340)
Following #41842, this is an extension to that contribution and it
enables `MicaBackdrop` and `MicaAltBackdrop` for
`"background.appearance"`

Release Notes:

- Add `MicaBackdrop` and `MicaAltBackdrop` to be selectable on themes

Additional Notes:

If PR is merged, theme schema should be updated to 0.2.1 or higher

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-09-19 02:12:46 +00:00
Indy FuandChris Biscardi a0f008b755 Fix Windows task path handling for worktree variables with spaces (#55727)
## Summary
Fixes task variable resolution and Windows shell argument handling when
`$ZED_WORKTREE_ROOT` contains spaces or when tasks are spawned while the
global `tasks.json` buffer is focused.

## Problem
`$ZED_WORKTREE_ROOT` could resolve from the active editor item even when
that item was outside every visible project worktree, such as the global
`tasks.json` file under the Zed config directory. On Windows, paths with
spaces also need to remain one logical argument when terminal shell
commands are constructed.

## Changes
- Only let the active editor item provide the active task context when
it belongs to a visible project worktree.
- Fall back to the selected or first visible project worktree when the
active editor item is external/global.
- Preserve project-file-specific task variables for normal project
buffers.
- Add regression coverage for `$ZED_WORKTREE_ROOT` in `args` and `cwd`
with synthetic Windows-style paths containing spaces.
- Add regression coverage for PowerShell and cmd shell command
construction so a spaced path remains quoted as one shell argument.

## Testing
Ran on Windows with Rust 1.95.0, Visual Studio Build Tools 2022, and
Windows SDK 10.0.26100.0:

- `cargo fmt --all --check`
- `cargo test -p util
shell_builder::test::windows_powershell_preserves_spaced_arg_as_single_shell_argument
-- --exact`
- `cargo test -p util
shell_builder::test::windows_cmd_preserves_spaced_arg_as_single_shell_argument
-- --exact`
- `cargo test -p task
task_template::tests::test_worktree_root_with_spaces_stays_atomic_in_args_and_cwd
-- --exact`
- `cargo test -p tasks_ui
tests::test_non_project_active_editor_uses_visible_worktree_context --
--exact`
- `cargo test -p task`
- `cargo test -p tasks_ui`
- `cargo test -p workspace`

Release Notes:

- Fix Windows task path handling for worktree variables with spaces
- [GPUI] N/A

Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
2026-09-19 01:57:44 +00:00
Piotr OsiewiczandAmp 56ae3f4293 Install Linux dependencies for Wezel runs (#64475)
The first dispatched binary-size run failed while compiling `x11`
because the stock `ubuntu-latest` image did not include Zed's Linux
build dependencies. The old Wezel runner incorrectly reported that as a
successful empty run.

Run Zed's existing `./script/linux` setup before the Wezel action,
matching Zed's Linux CI jobs.

Release Notes:
- N/A

Co-authored-by: Amp <amp@ampcode.com>
2026-09-18 23:24:55 +00:00
wezel-build[bot]andPiotr Osiewicz 58eb7e54a0 wezel: Add GitHub Actions runner (#64402)
This PR was created by [Wezel](https://wezel.build) to run assigned
experiments in GitHub Actions. After merging it, add the runner token as
the `WEZEL_RUNNER_TOKEN` repository secret.

Release Notes:
- N/A

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2026-09-18 23:02:49 +00:00
Piotr OsiewiczandAmp f5966f7610 Replace incremental build scenario with binary size (#64453)
## Summary

- remove the `incremental-editor` Wezel scenario and its source patch
- build the `zed` binary with the release profile
- track both its original size and the size of a separately stripped
copy
- lock the `exec` and `filesize` foragers and regenerate the experiment
schema
- skip the full Zed test suite when a pull request changes only
`.wezel/**`

## Validation

- `wezel project tool sync`
- `wezel experiment lint`
- `wezel project status`
- smoke-tested the copy-and-strip command against a debug-symbol-bearing
executable on macOS
- `rustfmt --check tooling/xtask/src/tasks/workflows/run_tests.rs`
- `actionlint .github/workflows/run_tests.yml`
- exercised the CI path filter with Wezel-only, mixed, docs-only, and
source-only file sets

The full Zed release build was not run locally.

Release Notes:

- N/A

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-09-18 22:40:24 +00:00
Azeem Shaik c6f3347870 git_ui: Load diff buffers incrementally (#62536)
# Objective

Opening a diff against a heavily drifted branch sits on a spinner until
every changed file has loaded. Blob reads were serialized through the
git job queue and enqueued in `open_buffer` completion order rather than
path order, so the blob for the first excerpt could be hundreds of jobs
deep.

## Solution

1. `load_blob_content` skips the job queue — blobs are
content-addressed, so the read doesn't depend on the status snapshot.
2. `DiffBuffer::load` is a lazy future instead of an eagerly-spawned
`Task`, so the consumer picks the concurrency.
3. `DiffMultibuffer` drives those loads through `buffered(16)`.

All three are needed: dropping the queue without bounding forks
thousands of `cat-file` processes, and bounding without dropping it
still serializes.

Trust handling is unaffected, since the untrusted-repo flags are applied
in `GitBinary::build_command` rather than by the queue.

Worth noting that `handle_get_blob_content` is remote-reachable, so a
guest can now put up to 16 `cat-file` processes on the host instead of
queueing them.

## Testing

Added `project_diff::tests::test_excerpts_are_ordered_by_path`, which
pins excerpt order to `PathKey` rather than to load completion order,
using more files than the concurrency limit and several executor seeds.

Green: `cargo test -p git_ui --lib` (131), `cargo test -p project --lib
git_store` (11), `./script/clippy`.

Not tested against a remote or collab project, which is where the
`handle_get_blob_content` change actually matters.

### Numbers

Zed repo against a base ~3000 commits back: 2346 changed files, 1794
with a blob at the merge base. Warm cache, one `cat-file` process per
blob, best of two runs at each concurrency.

| concurrency | total | per blob | speedup |
|---|---|---|---|
| 1 (previous behaviour) | 77.25s | 43.1ms | 1.00x |
| 2 | 17.74s | 9.9ms | 4.35x |
| 4 | 10.05s | 5.6ms | 7.69x |
| 8 | 7.34s | 4.1ms | 10.52x |
| 16 (this change) | 6.63s | 3.7ms | 11.65x |
| 32 | 6.59s | 3.7ms | 11.73x |
| 64 | 7.14s | 4.0ms | 10.82x |

16 is where the curve flattens: 32 buys another 0.7% and 64 regresses,
so there's nothing above it worth the extra in-flight buffers or the
extra concurrent processes on a host serving a remote peer.

At one blob at a time the first excerpt waits at an arbitrary position
in a 1794-deep queue, so roughly 38s on average, which lines up with the
45s full load in the recording below. It's now in the first batch.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments — none added
- [x] The content adheres to Zed's UI standards — no UI changes
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

Opening a branch diff against a base ~3000 commits back, 2346 changed
files. Both clips are cut to 15s to keep the file size down — the before
run took 45s to finish loading.

**Before**


https://github.com/user-attachments/assets/d9475de8-ddd3-48a0-99e2-042a2f655b42


**After**


https://github.com/user-attachments/assets/0bf0e73d-0fac-4c2a-9749-71fee376f260


---

Release Notes:

- Improved how quickly a branch diff shows its first changes when the
branch has drifted a long way from its base
2026-09-18 19:53:58 +00:00
Dom Porada 25fccf11c1 Align "..." documentation for file pattern settings (#64452)
## Objective

Make the `"..."` convention easier to understand across the settings
that support it.

This is a meta follow-up to
[#64399](https://github.com/zed-industries/zed/discussions/64399),
establishing a documentation pattern that subsequent PRs can follow.

## Solution

Give each setting a succinct, self-contained explanation of `"..."`,
with matching wording and examples in its Rust doc comment and settings
reference:

- `file_scan_exclusions` • #62769
- `file_scan_inclusions` • #64440
- `read_only_files` • #64222

This keeps the explanation consistent across both surfaces and aligns
the content for future documentation generated from Rust comments.

## Testing

Built the docs locally on macOS and verified the examples, links, and
anchors. The existing settings merge tests pass.

## 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
2026-09-18 19:42:21 +00:00
Agus Zubiaga c5d6f0b2ca language_model: Allow explicit prompt cache keys (#64460)
## Objective

Related conversations can’t share an OpenAI cache key without also
sharing a thread ID. We currently derive `prompt_cache_key` directly
from `thread_id`, tying cache reuse to conversation identity.

## Solution

Add an optional `prompt_cache_key` to `LanguageModelRequest` and use it
in both OpenAI Chat Completions and Responses conversions. We still fall
back to `thread_id` when no key is supplied, so existing callers keep
their current behavior.

This lets callers share a cache key across parent and child
conversations while keeping their conversation and transport identities
separate.

## Testing

Added regression coverage for explicit keys, legacy fallback, provider
capability gating, and serialization compatibility.

## 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
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-09-18 18:44:49 +00:00
zhujiatao 31c3c86010 terminal: Release the parse buffer once a command finishes (#64405)
# Objective

Fix memory a terminal never gives back after its command finishes.

Each `terminal::Terminal` constructed a `vte::ansi::Processor`, and
`Processor::new` reserves `SYNC_BUFFER_SIZE` (2 MiB) up front for
synchronized updates. `Terminal::release_pty_resources` tore the PTY
down once the command exited but left that reservation in place, so it
lived exactly as long as the terminal did.

That matters because the terminal outlives the command: the agent panel
keeps each tool call's terminal so it can keep rendering the finished
command's output (`ToolCallContent::Terminal(Entity<..>)`,
`acp_thread.rs:2014`), and the panel's own terminal map is only cleared
through `TerminalEvent::CloseTerminal`, which a task terminal never
emits because `SpawnInTerminal::default()` sets `hide =
HideStrategy::Never`.

Measured on a release build running 50 agent commands (`ls`): peak heap
205.34 MB, 200.52 MB still retained at exit, and the heap grew in a
staircase that never came back down (75 MB to 192 MB between 288s and
300s, then flat). heaptrack attributed the largest share, 104.00 MiB, to
exactly 52 of these reservations (109,051,904 bytes = 52 x 2,097,152),
all allocated from `TerminalBuilder::new`
(`crates/terminal/src/terminal.rs:1309`) and never freed.

So this costs roughly 2 MB per command for as long as its terminal is
kept around.

## Solution

- `output_processor` is only used by `Terminal::write_output`, which
parses bytes *injected* into the terminal (init commands, terminal
providers, the REPL). PTY output goes through the `alacritty_terminal`
event loop's own parser, not this one.
- Make the field an `Option`, create it on the first injected byte
instead of at construction, and drop it in `release_pty_resources`,
right after the PTY is torn down.
- It is recreated if something injects bytes again, so `write_output`
semantics do not change for terminal providers or init-command
injection.

As a side effect, terminals that never receive injected bytes no longer
reserve the parser at all, even while they are live.

## Testing

Added
`tests::test_release_pty_resources_drops_an_allocated_parse_buffer` in
`crates/terminal/src/terminal.rs`. It runs `echo` to completion in a
task terminal the way an agent tool call does, and asserts the parse
buffer's lifecycle directly on the terminal:

- a terminal that received no injected bytes holds no parse buffer;
- `write_output` builds one;
- `release_pty_resources` drops it, while the output the terminal
already captured is still readable;
- injecting again after the release builds a new one.

Asserting on the terminal's own state instead of on process-wide heap
keeps PTY reader threads out of the measurement: they reserve parse
buffers of their own and are torn down asynchronously, so a heap-based
assertion would depend on a timing the test cannot synchronize with.

Removing `self.output_processor = None` from `release_pty_resources`
fails the test with `releasing the PTY should drop the parse buffer`.

- `cargo test -p terminal`: 107 tests, all green.
- `./script/clippy -p terminal`: clean.

Tested on Linux. The fix and the test are platform-independent Rust
(neither is behind a `cfg`, and Windows takes the same
`TerminalType::Pty` branch), so I expect the same behaviour on macOS and
Windows, but I have not verified it.

## 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

## Suggested .rules additions

Found while working on this, proposed rather than edited inline, per the
rules-hygiene section.

- `webrtc-sys`'s build script never reuses its prebuilt download: on
every run it deletes the extracted package and re-downloads 131 MB from
the GitHub release, and every distinct unit gets its own `OUT_DIR` and
therefore its own copy (a debug build, a release build, and
rust-analyzer's `cargo check --all-targets` are at least three). A build
that appears to hang indefinitely at `webrtc-sys(build)` with no output
is this. Avoid it by extracting the release asset once outside `target/`
and setting `LK_CUSTOM_WEBRTC` to that directory through the user-level
cargo config, so rust-analyzer's background checks inherit it too:

```toml
# ~/.cargo/config.toml
[env]
LK_CUSTOM_WEBRTC = "/home/<user>/.local/share/libwebrtc/webrtc-0001d84-4/linux-x64-release"
```

`webrtc_sys_build::download_webrtc` returns early whenever that variable
is set. If the path goes stale (the prebuilt is tagged, e.g.
`webrtc-0001d84-4`), the build fails to link, so the variable has to be
updated when the tag changes.

---

Release Notes:

- Fixed terminals retaining about 2 MB of memory per command after the
command had finished
2026-09-18 16:34:33 +00:00
Piotr Osiewicz c1b19374f4 collab: Drop old rustls dependencies (#55632)
## Summary

- Disable legacy default TLS features for the collab AWS SDK clients
- Use the current AWS HTTP client and Rustls dependency chain

## Verification

- `cargo check -p collab --locked`
- `cargo fmt --all -- --check`
- Confirmed the collab dependency tree excludes rustls 0.21,
hyper-rustls 0.24, and tokio-rustls 0.24

Release Notes:

- N/A
2026-09-18 11:38:53 +00:00
rn23thakurandSmit Barmase 108fd3ac11 editor: Fix vertical scroll margin calculation (#63944)
# Objective

- Fixes an issue where setting an arbitrarily high `Vertical Scroll
Margin` fails to perfectly lock the cursor in the center of the viewport
(Typewriter Mode?). In certain cases one could go up/down a line before
auto-scroll gets triggered, deviating from user intent.
- Fixes #63862

## Solution

- **The Issue:** When `Vertical Scroll Margin` is very high, the
effective margin applied above and below the cursor is derived from the
viewport's free space:
  ```rust
  ((visible_lines - (target_bottom - target_top)) / 2.0).floor()
  ```
- **The Fix:** Instead of using the same rounded number for both the top
and bottom margins, calculate them separately:
  1. The top margin stays the same as before.
2. The bottom margin is calculated by subtracting the top margin from
the total free screen space.
- This ensures the bottom margin automatically catches whatever fraction
the floor operation on the top margin drops, so the two margins always
sum to the full available space.

## Testing

- Did you test these changes? If so, how?
Ran `cargo test -p editor`, all passed. I've also attached the results
of manual testing in the Showcase section below.

## 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)](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)](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

Before and after screen recording

<details>
<summary>Click to view showcase</summary>

**Before:**


https://private-user-images.githubusercontent.com/63847494/646999418-4dd388b8-4aba-4004-ac4f-6f1e0dad0f70.mp4?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODg5MTE3MTUsIm5iZiI6MTc4ODkxMTQxNSwicGF0aCI6Ii82Mzg0NzQ5NC82NDY5OTk0MTgtNGRkMzg4YjgtNGFiYS00MDA0LWFjNGYtNmYxZTBkYWQwZjcwLm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA5MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwOTA4VDIzNTAxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhZGM5MWExMDkyMDIzZjVlYjcxYmQ4YTRmOTM3MDliNDcyOTUzZjFhYmY1ZTgwMDY0YzhlYmQ1NzllYWYyN2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT12aWRlbyUyRm1wNCJ9.DG6RpiEM-781ZctlvtQeWhw3kAYJ4KS6rNsAmMU38fg

**After:**


https://github.com/user-attachments/assets/4bf870e0-84ba-449a-bf2a-925c4a90d5ed

</details>

Release Notes:

- Fixed the cursor not staying perfectly centered when using a high
Vertical Scroll Margin (Typewriter Mode).

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-09-18 11:24:01 +00:00
Kirill Bulatov 1753d7f52b Share GPUI and scheduler implementations (#64261)
Move GPUI window/entity updates, view rendering, listener adapters,
arena allocation, and scheduler task setup into shared implementations.
Keep the generic entry points as thin adapters.

Uses pretty much the same technique prior PRs did, but this time on
`gpui` which I am not too confident about — can close it if seems
dangerous, but the binary strip win looks good to try.

`cargo llvm-lines --locked -p gpui`:
Before (bec63dee23): 934803 lines, 33225 copies
After: 926925 lines (-0.8%), 33454 copies (+0.7%)

With compiler wrappers disabled, `cargo clean --target-dir
target/binary-size-split-build` and `cargo build --locked -p zed`:
Before: 135.6s wall, 1569.8s CPU, zed binary 1175563800 bytes 
After: 142.5s wall (+5.1%), 1589.0s CPU (+1.2%), zed binary 1144068952
bytes (-2.7%, -31.5MB)

Release Notes:

- N/A
- [GPUI] Shared GPUI and scheduler implementations to reduce the final
binary size of the app
2026-09-18 10:50:41 +00:00
Kirill Bulatov 87d3b5fdfd Disable share generics to reduce the binary size more (#64335)
After the new macOS nightly with
https://github.com/zed-industries/zed/pull/64260 arrived, I've noticed
that the binary had actually bloated back — run some bisecting and build
comparison, and seems that the shared generics are the culprit.

Platform / executable | Sharing enabled | Sharing disabled/default |
Reduction |
|---|---:|---:|---:|
| macOS ARM64 editor | 304,794,488 bytes | 266,242,792 bytes |
**38,551,696 bytes / 12.65%** |
| Linux x86_64 editor | 334,001,336 bytes | 325,916,104 bytes |
**8,085,232 bytes / 2.42%** |
| Linux x86_64 remote server | 123,618,032 bytes | 106,211,592 bytes |
**17,406,440 bytes / 14.08%**

Each pair uses the same checkout and Rust **1.98.1**, was built with the
bundling script:
- macOS: `e0590874fd`, measured after `strip -x`.
- Linux: `b664a4004269`, measured after `llvm-objcopy --strip-debug
--discard-all`.

The Linux section changes when disabling sharing are:

| Component | Editor | Remote server |
|---|---:|---:|
| Retained `.symtab` + `.strtab` | **−47,560,049 bytes** | **−17,733,989
bytes** |
| Allocated file-backed sections | +39,475,120 bytes | +327,448 bytes |
| Headers, padding, and other bytes | −303 bytes | +101 bytes |
| **Total** | **−8,085,232 bytes** | **−17,406,440 bytes** |


Release Notes:

- N/A
2026-09-18 10:49:35 +00:00
Dom Porada 2229b4e2d6 Add support for the "..." entry in file_scan_inclusions (#64440)
## Objective

Let projects add inclusion patterns without repeating defaults or
patterns inherited from user settings.

Part of #64399.

## Solution

Extend the `"..."` behavior from #62769 and #64222 to
`file_scan_inclusions` using the shared merge implementation. `"..."`
includes the resolved inherited list, omitting it replaces the list, and
`[]` clears it. Duplicate entries retain their first occurrence.

Stop importing VS Code’s `files.watcherInclude` as inclusion patterns
because it configures additional watch roots rather than overriding Git
ignores.

## Testing

Tested on macOS with settings merge, VS Code import, and worktree
integration tests. Coverage includes preservation of the `.env*`
default, layered inheritance, replacement, clearing, and deduplication.
The worktree test verifies that inherited and project-specific patterns
include Git-ignored files while exclusions still take precedence.

To check manually, configure different user and project inclusion
patterns and add ignored files matching each. Include `"..."` to retain
inherited patterns, then repeat without it and with `[]` to verify
replacement and clearing. Confirm that excluded files remain absent.

## Self-Review Checklist:

- [x] I’ve reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed’s UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Added support for `"..."` in `file_scan_inclusions` so project
settings can extend inherited inclusion patterns.
2026-09-18 10:40:43 +00:00
Matei OpreaandSmit Barmase 18960e899a git: Fix git info exclude action for worktrees (#63967)
# Objective

- This PR fixes #63760. According to git docs "Patterns read from
$GIT_DIR/info/exclude".

## Solution

- We were reading the directory's absolute path instead of reading the
absolute path to the repository's common .git directory.


## 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

---

Release Notes:

- Fixed "Add to .git/info/exclude" not working when used from a
secondary git worktree

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-09-18 10:24:51 +00:00
Cameron Mcloughlin 3eddbb7f4e gpui: Fix debug selectors with cached views (#64433)
The debug-selector test mapping skipped cached views that weren't
rendered. Make sure we include them

---

Release Notes:

- [GPUI] N/A
2026-09-18 07:42:25 +00:00
Smit Barmase ae59a5be17 sidebar: Fix selection highlight flickering when clicking terminal threads (#64387)
Clear keyboard selection when clicking a terminal thread, as we already
do for agent threads.

The old test cleared selection itself instead of clicking a row. Replace
it with seven scoped tests:

| Test | Action | Expected result |
|---|---|---|
| Different terminal | Terminal A → click Terminal B | B active,
selection cleared |
| Same terminal | Terminal A → click Terminal A | A still active,
selection cleared |
| Different thread | Thread A → click Thread B | B active, selection
cleared |
| Confirm terminal | B active, A selected → Confirm | A active, A still
selected |
| Confirm thread | Thread A selected → Confirm | A active, A still
selected |
| Refocus without selection | Focus outside → sidebar | Search focused,
selection still empty |
| Refocus with selection | Focus outside → sidebar | List focused,
selection preserved |

Each click test starts with the source item active and
keyboard-selected, with the sidebar list focused so the keyboard
highlight is visible.

Before:


https://github.com/user-attachments/assets/eee8bc47-e962-402f-9268-8134dc20ba5b

After:


https://github.com/user-attachments/assets/a437f4c8-b2c0-47d8-99c6-c4600b49c359

Release Notes:

- Fixed the selection highlight flickering in the sidebar when clicking
terminal threads.
2026-09-18 07:17:01 +00:00
Piotr Osiewicz 967a49ff34 ci: Gate test execution on check_style passing (#64408)
Release Notes:

- N/A
2026-09-18 06:39:52 +00:00
restlessroninandClaude Opus 5 99dddba6b8 agent_ui: Stop the sidebar creating two terminals for one new entry (#62151)
# Objective

Starting a new terminal thread from the agent sidebar creates **two**
terminals instead of one, in a project that has no terminals yet. With
terminals already open, only one is created.

## Solution

`Sidebar::create_new_terminal` calls `AgentPanel::new_terminal` and then
focuses the panel. The spawn is async, so when `focus_panel` activates
the panel, `base_view` is still `Uninitialized` — and
`ensure_thread_initialized` reads that as an empty panel and spawns its
own "initial" terminal on top of the one already in flight.

Once terminals exist they are restored at panel load, so `base_view` is
already `Terminal` and the second spawn never happens. That's why the
bug only appears on a project with no terminals.

`restore_terminal` already guarded against this by marking the spawn
pending before calling `spawn_terminal`. This moves that marker into
`spawn_terminal` itself, so every spawn path arms it, and drops the
now-redundant assignment in `restore_terminal`. The marker is cleared
exactly where it already was: when the terminal lands, when the spawn
fails, and when the terminal is closed.

## Testing

- Added `test_new_terminal_prevents_initial_terminal_creation`, which
reproduces the sidebar's spawn-then-focus sequence. It fails without the
fix (the panel ends up with two terminals) and passes with it.
- `cargo test -p agent_ui --lib` — 405 passed.
- `cargo test -p sidebar --lib` — 142 passed.
- `./script/clippy -p agent_ui` — clean.
- Tested on macOS only. The race is platform-independent, but I can't
exercise the Linux/Windows terminal spawn paths.

## 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 the agent panel creating two terminals when starting a new
terminal thread in a project with no existing terminals

---------

Co-authored-by: Claude Opus 5 <claude-opus-5@claude-cli>
2026-09-18 05:46:01 +00:00
Anant Goel 30ba5d4ddb open_ai: Add GPT-6 Astra API support (#64420)
## Objective

Make GPT-6 Astra selectable through the OpenAI API-key provider. The
built-in catalog omitted it, even though it was available through the
separately fetched ChatGPT subscription catalog.

## Solution

Add `gpt-6-astra` with its documented context/output limits, reasoning
efforts, image support, and Responses capabilities. Existing model
defaults remain unchanged.

Handle two API compatibility differences found during review: Astra
rejects `temperature`, and its Fast-mode responses return `service_tier:
"fast"` even when requested as `"priority"`. Both request converters now
omit Astra's temperature, and response decoding accepts the new spelling
while preserving legacy serialization. Two focused regressions cover
these failures without duplicating the catalog declaration.

References: [Astra
model](https://developers.openai.com/api/docs/models/gpt-6-astra),
[migration
guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra),
[Fast mode](https://developers.openai.com/api/docs/guides/fast-mode).

## Testing

- `corgi test -p open_ai --lib`: 88 passed.
- `corgi check -p language_models --lib`: passed.
- `corgi fmt -p open_ai -p language_models -- --check` and `git diff
--check`: passed.
- Live API probes confirmed model availability, a successful Responses
function-tool call with parallel calls enabled, the `fast` response
spelling, and rejection of configured temperature.
- During development, Delta's existing API-key catalog test passed with
a temporary local dependency override and an Astra frontier expectation.
The override was removed; Delta's dependency bump is separate.
- Validation was on macOS. No interactive picker, browser, or Cloud
Runner workflow was exercised; image input, compaction, and Fast-mode
regional availability were checked against the docs rather than live
workflows.

## Before merge

The README contains the repository-required human-review confirmation
marker. The author must remove it after reviewing. Delta will need a
separate dependency bump after this change lands. Cache-preserving
reasoning-effort updates are outside this change.

Release Notes:

- Added GPT-6 Astra to the OpenAI API-key model picker.
2026-09-18 05:32:51 +00:00
Hyeondong Lee 6eb036cfb1 Fix casing of libX11-devel SUSE package in script/linux (#64411)
## Objective

`libx11-devel` is not a valid package name in SUSE: it should
be`libX11-devel` (_should be a capital X!_).

source: [RPM resource
libX11-devel](https://rpmfind.net/linux/rpm2html/search.php?query=libX11-devel)

## Testing

- [x] Did you test these changes? If so, how?
- Tested on SLES 15.7 an [openSUSE
Tumbleweed](https://software.opensuse.org/package/libX11-devel)
  - `script/bundle-linux` succeeds

<img width="675" height="175" alt="Screenshot 2026-09-18 at 02 43 41"
src="https://github.com/user-attachments/assets/4a89f6e5-de9f-4457-a6c2-8f5a15ad4283"
/>


---

Release Notes:

- N/A
2026-09-17 18:31:12 +00:00
Dom Porada 13b33084ab Document hidden_files setting (#64403)
## Objective

While suggesting #64399, I realized `hidden_files` didn’t have an entry
in the settings reference. This PR fills that gap.

## Testing

Checked the descriptions against the implementation and existing tests.

## 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
2026-09-17 17:51:22 +00:00
zooeywmandChris Biscardi 42038d0b14 gpui: Fix manifest path for cross-compilation (#62525)
# Objective

Fixes #62522

`cargo xwin` fails to find the GPUI Windows manifest because `llvm-rc`
resolves the path from the resource directory.

## Solution

Reference the manifest relative to `gpui.rc` and explicitly add the
resource directory to the include paths. This keeps both native Windows
and xwin builds working.

## Testing

- Tested with `cargo xwin clippy --target x86_64-pc-windows-msvc`

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- N/A
- [GPUI] N/A

---------

Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
2026-09-17 17:38:24 +00:00
Habis AhmadandChris Biscardi 2c8f682cd5 gpui: Fix centered window bounds to display settings header (#62073)
# Objective

- Fixes https://github.com/zed-industries/zed/issues/61914 
- The setting window gets cut off from the top of the screen when using
a high DP on Windows (e.g. 250% 2560×1600). This is because
`Bounds::centered` computes a wide rectangle with `origin =
display.center() - size / 2` which can cause issues on higher DPI.
## Solution

`Bounds::centered` now centers within the display's work area. 
```rust
let visible_bounds = display.visible_bounds();
Bounds::centered_at(visible_bounds.center(), size.min(&visible_bounds.size))
```
Added visible_bounds() and size.min(&visible_bounds.size). Size::min
will clamp each axis, windows that already fit are unaffected

## Testing

- Reproduced the bug locally and on production that the settings header
does not get clipped anymore; the video showcase shows this.

## 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


https://github.com/user-attachments/assets/5cafd03c-7835-488c-a70b-ba559e4cfff3

0:00 - 0:11. Current behaviour in production, settings header gets
clipped at 225%
0:11 - 0:20. My fix, header does not get clipped


Release Notes:

- Fixed the Settings window opening with its header off-screen at high
DPI scaling on Windows
- [GPUI] N/A

Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
2026-09-17 16:42:31 +00:00
Vlad GaevskyandChris Biscardi 55387ea4b7 gpui_windows: Keep DirectWrite's default ligatures when no font features are set (#62338)
On Windows, ligatures are off by default: they only show up if
`buffer_font_features` is set to something non-empty.

`generate_font_features` always creates an `IDWriteTypography` and
passes it to `apply_font_features` (`direct_write.rs:446-452`), and the
layout code calls `SetTypography` with it unconditionally (`:567`,
`:605`). `apply_font_features` returned early when no features were
configured, so an empty typography object reached DirectWrite.
`SetTypography` replaces the default feature set with exactly what the
typography contains, so `liga`, `clig` and `calt` ended up disabled.

Dropping the early return lets the rest of the function run, which adds
`liga`, `clig` and `calt` at 1. Users who configure features explicitly
are unaffected: that path already ran before this change, and an
explicit `liga: 0` still resolves to 0 through the same loop.

I went with this rather than guarding the two `SetTypography` calls,
because the function already owns the knowledge of which features
DirectWrite enables by default for the non-empty case, and guarding the
call sites would duplicate it in two places.

Other platforms are not affected: `generate_feature_array` on macOS
(`gpui_macos/src/open_type.rs:77`) appends one dictionary per configured
tag and does not replace the default feature set when the list is empty.

No test here: `apply_font_features` takes a live `IDWriteTypography`
from `CreateTypography()`, so covering it needs a real DirectWrite
factory and cannot run off Windows. I can extract the tag resolution
into a pure function and unit test that separately if you would prefer
it.

Checked on a Windows build with no `buffer_font_features` set: ligatures
render with this change and are absent without it.

Release Notes:

- Fixed ligatures being disabled on Windows unless
`buffer_font_features` was set
- [GPUI] N/A

Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
2026-09-17 16:37:56 +00:00
Minh VuandChris Biscardi 836c68bb20 gpui_windows: Fix reversed linear/sRGB transfer functions in shader (#57543)
## Summary
- swap the Windows HLSL exponents for `linear_to_srgb` and
`srgb_to_linear`
- align the Windows Oklab gradient path with the existing Metal and WGSL
implementations

## Testing
- not run (shader-only change)

Fixes #57542

Release Notes:

- [GPUI] Fix reversed linear/sRGB transfer functions

Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
2026-09-17 16:09:12 +00:00
Ben Brandt 1cea5261a1 agent_ui: Fix keyboard navigation in ACP elicitation forms (#64193)
Closes #61358

Address the keyboard-navigation portions. Image answers are
intentionally not included. ACP form responses support primitive values
rather than image attachments, and Claude Code's adapter treats the
"Other" answer as text. This PR therefore only partially addresses the
issue.

Release Notes:

- acp: Fixed submitting and navigating ACP elicitation forms with the
keyboard.
2026-09-17 14:39:57 +00:00
Piotr Osiewicz 0fd7252634 Downsize Miri and migration check runners (#64392)
## Summary

Move scheduler Miri tests from 16 vCPUs / 32 GiB to 4 vCPUs / 8 GiB, and
migration checks from 8 vCPUs / 16 GiB to 4 vCPUs / 8 GiB. Reuse the
existing `LINUX_MEDIUM` profile and keep test commands and coverage
unchanged.

September 16 whole-runner CPU samples showed Miri averaging about 1.3
cores with a 2.4-core sampled peak and 2.6 GiB peak RAM; migration
checks averaged 1.2 cores with a 1.8-core sampled peak and 1.3 GiB peak
RAM. These are sampled observations, not a cold-build guarantee.

## Validation

- `cargo xtask workflows`
- `cargo fmt -p xtask -- --check`
- `git diff --check`
- CI on the smaller runners is pending.

## Human review

The root repository rules require the README review notice. The human
author must remove it after review; this PR remains a draft until that
step and CI verification are complete.

Release Notes:

- N/A
2026-09-17 12:43:01 +00:00
zed-zippy[bot]andFinn Evers ea7ae18114 html: Bump to v0.3.2 (#64371)
This PR bumps the version of the HTML extension to v0.3.2.

Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Finn Evers <finn@zed.dev>
2026-09-17 09:59:21 +00:00
zed-zippy[bot]andFinn Evers f90d64568f glsl: Bump to v0.2.5 (#64370)
This PR bumps the version of the GLSL extension to v0.2.5.

Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Finn Evers <finn@zed.dev>
2026-09-17 09:50:03 +00:00
zed-zippy[bot]andFinn Evers e26a1f54f2 proto: Bump to v0.3.4 (#64372)
This PR bumps the version of the Proto extension to v0.3.4.

Release Notes:

- N/A

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Finn Evers <finn@zed.dev>
2026-09-17 09:49:10 +00:00
Finn Evers 3710520064 ci: Run license check more often (#64375)
Follow-up to the learnings of
https://github.com/zed-industries/zed/pull/64292

Release Notes:

- N/A
2026-09-17 09:35:14 +00:00
Finn Evers 1527cc6ceb Fix corgi patches license softlink (#64374)
Release Notes:

- N/A
2026-09-17 09:24:59 +00:00
Smit Barmase 890edba9ce which_key: Improve pending keystrokes indicator to include untimed chords (#64362)
Closes #64338

The pending keystrokes indicator now shows chords without a timeout,
with no countdown circle. For example, pressing `cmd-k` shows that Zed
is waiting for another key.

Few cases which needed special handling for untimed chords case:

- Hovering already pauses a timed chord, and GPUI preserves that pause
when the chord advances. An untimed chord has no paused timeout to carry
forward. We pause its newly created timeout if the pointer is still over
the indicator or popover.
- For timed chords, the timeout already stays paused during the
popover's 300 ms dismissal delay. If an untimed chord gains a timeout
during that delay, it now follows the same rule. The popover still
closes at the original deadline, then the timeout resumes with a full
second remaining.

<img width="308" height="182" alt="CleanShot 2026-09-17 at 11 45 33
AM@2x"
src="https://github.com/user-attachments/assets/9baa5fde-de9b-447d-9b02-b712a3065685"
/>

Release Notes:

- Improved the pending keystrokes indicator to show chords without a
timeout, such as shortcuts starting with `cmd-k`.
2026-09-17 09:17:09 +00:00
Finn Evers 20d55798db Fix cargo shear warnings (#64340)
Also updates CI to always run this - that way we ensure that disabling
or enabling tests does not become stale at some point and thus can
safely add this.

Release Notes:

- N/A
- [GPUI] N/A
2026-09-17 08:49:31 +00:00
tidely eb55524b57 gpui_macos: Fix traffic lights animation during fullscreen exit (#64339)
# Objective

Fixes #64050

Going out of fullscreen on MacOS currently gives the traffic lights a
janky animation. This seems to be a timing issue during ownership
transfer of traffic light rendering from AppKit to Zed.

## Solution

Add an additional boolean flag (yes, sad), which keeps track of whether
the animation from full screen to windows has completed.

## Testing

Tested this on a mac, animation is now buttery smooth.

## Showcase

<details>
  <summary>Click to view showcase</summary>

Before:



https://github.com/user-attachments/assets/f629f2d8-2466-47e3-9b8b-65975bdd1c61

After:


https://github.com/user-attachments/assets/a393d3a7-647d-4784-bc2a-9d67fac9f951

</details>

---

Release Notes:

- Fixed MacOS traffic lights animation when exiting fullscreen
- [GPUI] Fixed MacOS traffic lights animation when exiting fullscreen
2026-09-17 08:29:46 +00:00
Finn Evers 26fb9817c4 gpui: Improve PlatformAtlas::get_or_insert_with (#64331)
Stumbled across this during a recent review:

At all of the call sites in prod code, we would clone, then into, then
pass by ref, and then immediately clone again in `get_or_insert_with`
when the texture was not found.

Instead, changed the API to now take an owned `AtlasKey` to make better
use of the cloning.

As a second step, went ahead and added a generic `AtlasState`, as I
noticed all atlases shared some similar logic around keeping track of
the tiles. With this restructing, we reuse some code across different
backends, but more importantly, get rid of an additional hashmap lookup
by instead using the `Entry` API.

Release Notes:

- N/A
- [GPUI] N/A
2026-09-17 08:24:25 +00:00
Finn Evers 2ce3fc96e8 Move corgi-patches into tooling (#64292)
That seems like a better place for this to live as opposed to the
top-level namespace

Release Notes:

- N/A
2026-09-17 08:04:39 +00:00
tidely 85b8aa5898 gpui_macos: Migrate screen capture to objc2 (#64251)
# Objective

Get rid of instances of the `block` crate, as it will not compile in a
future version of Rust. This gets rid of the `block` crate inside of
`gpui_macos`, which means were on the home stretch.

## Solution

Migrate `screen_capture.rs` completely to `objc2`. While a more targeted
fix is theoretically possible, there were enough upsides where I thought
this was worth a full migration.

Completely gets rid of the `media` crate, which had manual bindings to
`core_media`, which `objc2` can provide. Gets rid of tons of unsafe
code, and a lot of code in general.

## Testing

Tested manual sharing inside of a Zed channel

Release Notes:

- N/A
- [GPUI] Migrated macOS screen capture to `objc2`
2026-09-17 01:46:02 +00:00
CainandChristopher Biscardi 5428eb8399 editor: Fix cursor animation across width and scroll changes (#64184)
Follow-up to #63195.

This PR fixes the cursor animation problems reported in [this
comment](https://github.com/zed-industries/zed/pull/63195#issuecomment-5662566417):

- Block cursors snapped instead of animating when moving between
characters with different display widths, such as an ASCII character and
an emoji or CJK character.
- Cursor animation disappeared near the top and bottom scroll margins
when keyboard navigation triggered vertical autoscrolling.

The first issue happened because any cursor geometry size change was
treated as a reason to snap. Cursor movement now retargets the animation
when either the rectangle position or size changes, while geometry
changes without a logical cursor move still snap immediately.

The second issue happened because every viewport change cleared the
active animation. Scroll-only viewport changes now translate the current
and target corner positions, as well as the previous target geometry, by
the scroll pixel delta before retargeting. This preserves the spring's
motion and velocity across autoscroll. Actual layout changes, including
text-area size, line height, and font advance changes, continue to snap.

Regression coverage includes:

- Both narrow-to-wide and wide-to-narrow cursor transitions, including
convergence to the new rectangle.
- Cursor movement in both directions while the viewport scrolls.
- Scrolling during an active animation without clearing its position or
velocity.
- Layout changes that must still snap.
- An editor-level keyboard autoscroll test using a vertical scroll
margin of 3.

Validation:

- `cargo test -p editor cursor_animation --lib`
- `cargo fmt --all --check`
- `cargo build -p zed --bin zed --profile release-fast`
- Manual verification with the release-fast binary

Release Notes:

- Fixed cursor animations when moving between characters of different
widths and during keyboard-triggered autoscrolling.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-09-16 23:26:23 +00:00
Cameron Mcloughlin bbacc15a4f gpui_web: Flatten webgl texel loading (#64337)
The webGL backend uses textures to upload quads to the GPU, since it
doesn't have storage buffers. Each quad is stored in 10 texels, and we
previously fetched each texel 4 times. Although texel fetches are
cached, the extra bookkeeping optimized badly, and lead to bad
performance.

This change replaces the `read_word` calls with `fetch_texel_instance`,
and manually unrolls this loop. This gave the following frame time
improvements scrolling through delta web:

- desktop, 9950x3d iGPU, 1440p, firefox:  ~3.3x faster
- mobile, Pixel 10 Pro, firefox: ~23x faster

---

Release Notes:

- [GPUI] Improved performance of webGL quad upload, around a ~3x frame
time reduction in typical cases
2026-09-16 23:23:23 +00:00
Max Brunsfeld a001a76198 gpui: Fix web fallback for text-default emoji (#64319)
## Objective

Fix missing characters in GPUI's web renderer for emoji-capable symbols
that default to text presentation, such as repeated bare spider webs
(`🕸🕸🕸`). The default Canvas policy previously rejected these symbols
before checking whether bundled fonts could render them.

## Solution

Separate emoji eligibility from presentation. Emoji-capable graphemes
can now use Canvas when their glyph is missing, while existing bundled
text glyphs remain native and explicit text/emoji presentation remains
intact. CJK fallback remains opt-in.

Add regression coverage for repeated spider webs and mixed bare, VS15,
and VS16 sequences, including every glyph's source index and
presentation, missing-glyph reports, copy preservation, and raster-cache
reuse.

## Testing

- `cargo test -p gpui_web --lib`: all 19 tests passed.
- `cargo fmt -p gpui_web -- --check`, example Rust formatting, and `git
diff --check`: passed.
- `trunk build` in `crates/gpui_web/examples/hello_web`: passed.
- Headless Chrome on macOS: browser regression failed against the old
implementation and passed with the fix. Inspected the resulting
screenshot; all mixed-presentation spider webs render.
- Firefox, Safari, and other operating systems have not been exercised.

To run the browser workflow, serve the gallery with `trunk serve` from
`crates/gpui_web/examples/hello_web`, then run `node
crates/gpui_web/examples/hello_web/test_canvas_fallback.mjs
http://127.0.0.1:8080` from the repository root.

Release Notes:

- [GPUI] Fixed missing text-default emoji, including spider-web symbols,
in GPUI's web renderer.
2026-09-16 22:23:38 +00:00
Taha e57126dcd4 auto_update: Add title bar feedback when Zed is already up to date (#64106)
# Objective

A manual "check for updates" that finds no newer version left the
updater back at `Idle`, so the "Checking for Zed Updates…" indicator in
the title bar simply vanished with no confirmation that the check had
succeeded.

## Solution

Track that transition in `UpdateVersion` and show an "Up to Date" button
in its place for a few seconds. The timer is stored as a task on the
view, so it is cancelled when the view is dropped or a new update state
arrives.

`restart_after_wake` passed through `Idle` before re-polling, which
would read as a completed check; it now stays in `Checking`.

## Testing

- Did you test these changes? If so, how? **Tested by running Zed in
preview channel.**
- Are there any parts that need more testing? **No**
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?

**Use `ZED_RELEASE_CHANNEL=preview cargo run` to open Zed. Then manually
trigger a check within menu `Zed -> Check for Updates`.**

- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

**Tested only on MacOS Tahoe**

## 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)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

A visual demo of what happens in title_bar when a manual check for
updates is triggered.


https://github.com/user-attachments/assets/23b72bf2-6188-4eae-82b9-1c5b70782bb4

---

Release Notes:

- Added confirmation in the title bar when a manual update check finds
Zed is already up to date
2026-09-16 21:41:45 +00:00
Kirill Bulatov b664a40042 Fix a flacky bracket test (#64321)
Fixes a flack from
https://github.com/zed-industries/zed/actions/runs/35127308706/job/104899555087?pr=64257#step:7:5674

I believe more tests are worth fixing like that, but those pass right
now, so let's first deal with the only flaky one.

Release Notes:

- N/A
2026-09-16 19:16:31 +00:00
Gautam Manchandani 4f10bb6fbc markdown_preview: Show source path in tab tooltip (#64318)
# Objective

Fixes #64129.

## Solution

Reuse the source editor's tab tooltip for Markdown preview tabs.

## Showcase

<img width="1582" height="962" alt="Markdown preview tab showing its
source file path tooltip"
src="https://github.com/user-attachments/assets/cba7dcfc-f7e7-460c-aaff-ce588321d146"
/>

## 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 Markdown preview tabs not showing their source file path on
hover.
2026-09-16 18:28:12 +00:00
Kirill Bulatov be1e2facfa Check remote server on each commit (#64283)
Release Notes:

- N/A
2026-09-16 17:01:52 +00:00
9f1587c697 editor: Fix columnar selection coordinates (#63723)
Closes #63712

## Summary

- Use tab-expanded grapheme columns for Add Selection Above/Below when
`skip_soft_wrap` is enabled, rather than UTF-8 byte offsets or Unicode
scalar counts.
- Keep mouse rectangles pixel-based and preserve logical selection goals
across short rows, direction changes, and selection/text undo and redo.
- Reconcile columnar groups when selections change, while preserving
committed groups during cancellable mouse previews.
- Batch source and destination queries by row and skip fully replaced
input rows without a persistent row cache.
- Handle folds, inlays, and replacement blocks with small map-query
additions, and fix the tab bitmap boundary at a tab size of 128.

## Validation

- Full editor library suite: 1,109 passed, one ignored.
- Editor Clippy and scoped formatting passed.
- Regression checks failed without the corresponding lifecycle and
batching fixes, then passed with them restored.
- The three related sync/history tests were rerun and passed after the
final callback-variable renames.

Release Notes:

- Fixed columnar selections landing in the wrong column around non-ASCII
text, tabs, soft wraps, and collapsed content.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-09-16 16:40:28 +00:00
9a606bc84c editor: Render point diagnostics without glyphs (#63933)
Closes #63084.

Zed already normalizes most empty and line-terminator-only diagnostic
ranges onto an adjacent character. A diagnostic can still remain a true
point when its position has no glyph, such as column zero of an empty
line or an empty file. The shaped-text path has no `TextRun` at that
position, so the diagnostic appears in diagnostic UI but has no editor
squiggle.

Render only diagnostics that remain zero-width after ingress as a one-em
wavy underline at their `DisplayPoint`. This keeps the stored LSP range
unchanged, uses the existing diagnostic underline policy and font
metrics, and also paints the decoration in a pinned sticky-header copy
when an anchored point survives an edit.

## Evidence

### Empty Go file with gopls

Before:

<img width="471" height="430" alt="Empty Go file before the fix:
diagnostic message without a squiggle"
src="https://github.com/user-attachments/assets/a7f29dd3-a16c-43ea-a53f-d0264efb4ce0"
/>

After:

<img width="471" height="430" alt="Empty Go file after the fix:
diagnostic message with a point squiggle"
src="https://github.com/user-attachments/assets/0546970a-e24e-4e15-a764-d548291eb623"
/>

`gopls` reports `expected ';', found 'EOF'` at `(0,0)..(0,0)` for the
empty file. The diagnostic message is present in both builds; only the
patched build paints the point squiggle.

Sticky-header behavior was also verified with a deterministic stdio LSP.
Before/after recordings are included in the review response below.

## Validation

- `cargo test -p editor point_diagnostic`
- `cargo test -p editor test_point_diagnostic_stays_in_edited_excerpt`
- `cargo test -p editor
test_point_diagnostics_follow_expanded_deletions`
- `cargo test -p project test_empty_diagnostic_ranges`
- `cargo test -p project test_diagnostic_range_spanning_line_terminator`
- `cargo fmt --all -- --check`
- `CCACHE_TEMPDIR=/tmp/zed-ccache-tmp ./script/clippy -p editor -p gpui
-p multi_buffer -p project`
- `git diff --check`
- Manual before/after verification with gopls on an empty Go file
- Manual before/after verification of a retained point diagnostic in a
sticky header
- Manual Fedora verification of physical overlap handling with
`.ZedMono` and proportional Jomolhari text

Regression coverage also includes retained point diagnostics across
edited excerpt boundaries and expanded deleted diff hunks at the
beginning, middle, and EOF, including an empty live buffer, plus
painted-span severity arbitration for point-vs-range and point-vs-point
overlaps.

Release Notes:

- Fixed missing editor underlines for language server diagnostics at
positions without underlying text.
- [GPUI] N/A

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-09-16 16:04:28 +00:00
Ibrahim KhanandKirill Bulatov 69a09e1c5e editor: Expand excerpts from deleted diff hunks (#63946)
# Objective

Fixes #62278.

Allow `editor: expand excerpts` from deleted text in unified diffs.

## Solution

- Resolve cursor and selection ranges against the current snapshot,
including deleted hunks.
- Preserve half-open selection boundaries and include trailing empty
excerpts at EOF.
- Skip removed paths during expansion.

## Testing

Regression coverage includes deleted-hunk cursors and selections, stale
paths, selections ending at excerpt boundaries, and trailing empty
excerpts. The boundary and EOF cases cover all three expansion
directions. The Bookmarks action case uses `excerpt_context_lines: 0`.

The new boundary and EOF regressions failed before the fix and passed
afterward.

- `cargo test --locked -p editor -p multi_buffer --lib`: 1026 editor
tests and 67 multibuffer tests passed; 1 ignored.
- `./script/clippy -p editor -p multi_buffer`: passed.
- `cargo fmt --all -- --check`: passed.
- `git diff --check origin/main..HEAD`: passed.

Automated testing ran on Linux. The first full run hit a SQLite table
lock in `persistence::tests::test_save_and_get_serialized_editor`. The
isolated test and full rerun passed.

## Self-Review Checklist:

- [x] I have reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks, if any, have justifying comments
- [x] The content adheres to Zed UI standards
- [x] Tests cover the new behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed excerpt expansion when the selection is on deleted text in
unified diffs

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-09-16 16:04:24 +00:00
Vitalii ShevtsovandKirill Bulatov 2f10cba7c6 editor: Honor lsp_results_location on cmd-click (#64039)
# Objective

Fixes #62916.

With `"lsp_results_location": "picker"`, `cmd-b` opens the LSP locations
picker but cmd-clicking the same symbol still opens a `Definitions for
…` multibuffer. #61187 fixed this for the go-to-definition *fallback*;
the definition path itself was left behind.

The setting is only consulted by `handle_nav_action` in `lsp_locations`,
which runs when one of the navigation *actions* is dispatched. Cmd-click
never dispatches them: `cmd_click_reveal_task` either navigates the
cached hover links itself, or calls `go_to_definition_of_kind` /
`go_to_type_definition` directly.

## Solution

Both cmd-click paths now dispatch the matching action (`GoToDefinition`,
`GoToTypeDefinition`, …) when `lsp_results_location` is `picker` and the
click is not a split one, so the picker gets its chance; everything else
is untouched:

- with the default `multi_buffer` setting `picker_action` returns `None`
and the old code runs unchanged;
- alt (split) clicks keep their current behavior, since the split
actions have no picker handler;
- URL and file links keep opening directly — the action is only
dispatched when every resolved link is a `HoverLink::Text`.

The dispatch is deferred to after the current editor update via
`cx.spawn_in`: `LspLocationsPicker::open_for_editor` reads the editor,
so dispatching inline panics with `cannot read editor::Editor while it
is already being updated` (this is also why the existing fallback
dispatch happens from a spawn).

## Testing

`cargo test -p lsp_locations` — two new tests, one per cmd-click path: a
cold cmd-click, and a cmd-click on a link already resolved by hovering
with the modifier held (the path users actually hit). Both fail on
`main` with the fix reverted and pass with it.

Also ran `cargo test -p editor --lib hover` (68 passed) and `cargo
clippy -p editor -p lsp_locations --all-targets`.

Not yet verified by hand in a running Zed build — the automated tests
above are what backs this.

## 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 cmd-click on a symbol ignoring the `lsp_results_location`
setting: with `"picker"` it opened a definitions multibuffer instead of
the picker that `cmd-b` opens
([#62916](https://github.com/zed-industries/zed/issues/62916)).

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-09-16 16:04:13 +00:00