Commit graph

37876 commits

Author SHA1 Message Date
Oleksiy Syvokon
3409a84f3d
Show progress indicator in file finder (#54515)
When opening the file finder in a large project, it was impossible to
tell whether the scan was complete and if the results were final. Now we
show an animated arrow circle while the scan is active.

<img width="425" height="380" alt="Screenshot 2026-04-22 at 18 42 01"
src="https://github.com/user-attachments/assets/6d772483-a6c8-406b-bbf8-db810df7ab68"
/>


Closes #48009



Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-04-23 13:00:32 +00:00
Phillip Davis
8b1520467b
languages: Fix broken whitespace for C++ (#53709)
Uses tree-sitter indent queries to create a pseudo-scope, since access
modifiers are single-node in thetree-sitter grammar.

The @outdent capture truncates the parent { } indent range at the access
specifier, keeping it at the same level as the class keyword and the
pseudo-scopes from stacking.

The @outdent range selects siblings so we don't outdent the access
specifiers themselves, since screenshots from the reference issue seem
to show that at least one interested party does not prefer outdented
access modifiers, and also it seemed like less of a departure from
existing design.

Also, there are probably more tests than needed because this is my first
time writing treesitter queries and I wanted to triple-guess myself.
Quite open too feedback on which ones are more valuable.

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

Closes #53175

Release Notes:

- Improves handling of indentation after C++ access modifiers
2026-04-23 12:50:09 +00:00
Tom Houlé
a1eed3c742
docs: Document Tombi configuration with edit predictions (#54631)
See the docs edit for a description of the issues and solutions.

Maybe the styling is a bit too aggressive?

<img width="2222" height="2196" alt="image"
src="https://github.com/user-attachments/assets/127bb4c0-c548-45d7-9a29-ab5863096929"
/>


closes https://github.com/zed-industries/zed/issues/50917

Release Notes:

- N/A
2026-04-23 12:48:03 +00:00
deadcode-walker
109c2238aa
Fix freeze when binary content written to open empty file (#53074)
Opening an empty file then writing binary content to it on disk causes a
permanent freeze (not a crash — requires force kill).

`reload_impl` loads raw bytes via `load_bytes` and decodes with
`encoding_rs` but never checks if the content is binary. The existing
binary check in `decode_file_text` only runs on fresh opens, not
reloads. So binary content enters the buffer as lossy UTF-8.

Binary data has almost no newlines, producing a single enormous row. The
wrap map's sync fast path in `flush_edits` checks row count (< 100 rows)
but not line length, so it runs `wrap_line` on a multi-MB single line
synchronously on the main thread via `smol::block_on`. Font shaping
millions of non-ASCII replacement characters blocks the UI thread
indefinitely.

Two fixes, both one-condition guards:
- Null-byte check in `reload_impl` before decoding, same heuristic
(first 8000 bytes) used by `decode_file_text` on fresh opens. Binary
content never enters the buffer.
- Column-length guard (`MAX_SYNC_WRAP_COLUMNS = 10_000`) on the wrap map
sync fast path so absurdly long lines fall through to the async
background path. Defense in depth for any single-line content that's too
long to shape synchronously.

## Test plan
- [ ] Open an empty file in Zed, write binary content to it externally
(e.g. `cp /bin/ls /path/to/open-file`) — should show "Binary files are
not supported" instead of freezing
- [ ] Open a compressed file (zip, gz) that starts empty and gets filled
— same behavior
- [ ] Normal text file reload still works (no regression)
- [ ] Very long single-line text files (>10k columns) don't freeze the
editor

---------

Co-authored-by: deadcode-walker <268043493+deadcode-walker@users.noreply.github.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-04-23 12:42:10 +00:00
Joseph T. Lyons
62bd61a679
Update docs for creating multi-root projects (#54655)
Self-Review Checklist:

- [X] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-04-23 12:29:51 +00:00
Bennet Bo Fenner
4d346e9ebb
agent: Fix issue where new from summary was not working (#54648)
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

Closes #ISSUE

Release Notes:

- agent: Fixed an issue where clicking on "New from summary" would not
do anything
2026-04-23 12:25:46 +00:00
João Soares
3b98fca338
terminal_view: Show "Add to Agent Thread" on first right-click (#50860)
Closes #50844

## Summary

- When right-clicking a word in the terminal with no prior selection,
`select_word_at_event_position` queues the selection as an
`InternalEvent` that only syncs to `last_content` on the next update
cycle.
- The context menu was reading `last_content.selection_text` before the
sync, so "Add to Agent Thread" was missing until the second right-click.
- Pass `has_selection` into `deploy_context_menu` from the call site,
where we already know whether a word was just selected.

## Test plan

- [x] Open a terminal in Zed
- [x] Run a command that produces output (e.g. `echo foo bar baz`)
- [x] Ensure there is no existing selection
- [x] Right-click on a word — "Add to Agent Thread" appears on the first
right-click
- [x] Right-click with an existing selection — "Add to Agent Thread"
still appears
- [x] Right-click with no text under cursor — context menu still works
correctly

## Videos:
### Before

[agent_test_before.webm](https://github.com/user-attachments/assets/d913a05b-6189-40a4-8eee-3660be8c3647)


### After

[agent_test_after.webm](https://github.com/user-attachments/assets/ceacc617-71b2-442f-a150-305867f9dd5f)



Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed "Add to Agent Thread" missing from terminal context menu on
first right-click when no prior selection existed.

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2026-04-23 12:18:36 +00:00
galuis116
cb25ef95f5
Fix:Bug: “Static” **color** theme from Dynamic + System mode always used the **dark** slot (#54609)
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

Closes #54607

Release Notes:

- Settings UI theme conversion now respects system appearance.
When switching Theme Mode from Dynamic (System) to Static, Zed now picks
the static theme that matches the current OS app appearance (light or
dark) instead of always defaulting to the dark variant.

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2026-04-23 12:06:38 +00:00
Joseph T. Lyons
d92c12e86e
Fix docs preprocessor preferring parameterized keybindings over exact matches (#54593)
This PR fixes a bug with the docs pre-processor where it could match on
parameterized versions of key binds before exact matches.

I noticed this bug in the latest [parallel agent
docs:](https://zed.dev/docs/ai/parallel-agents#switching-threads)

<img width="717" height="110" alt="SCR-20260423-bhtn"
src="https://github.com/user-attachments/assets/ea20b592-55c3-4e92-9c2e-ff821efacdd8"
/>

Here, the preprocessor is matching on the parameterized version first:

```json
"ctrl-tab": "agents_sidebar::ToggleThreadSwitcher",
"ctrl-shift-tab": ["agents_sidebar::ToggleThreadSwitcher", { "select_last": true }],
```

This bug surfaced in some other places in the docs as well:

- https://zed.dev/docs/ai/agent-panel#multiple-threads
- https://zed.dev/docs/finding-navigating#project-search
- https://zed.dev/docs/finding-navigating#quick-reference
- https://zed.dev/docs/migrate/webstorm#no-indexing
- https://zed.dev/docs/migrate/webstorm#differences-in-user-interfaces

Self-Review Checklist:

- [X] I've reviewed my own diff for quality, security, and reliability
- [N/A] Unsafe blocks (if any) have justifying comments
- [N/A] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [X] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-04-23 12:04:17 +00:00
Kunall Banerjee
96eb05166f
lsp: Fix vtsls completeFunctionCalls setting being ignored (#53285)
Some language servers (notably `vtsls` with `completeFunctionCalls`)
update `insertText/textEdit` during `completionItem/resolve` to add
snippet content like function call parentheses. Previously,
`Completion.new_text` was only set from the initial completion response
and never re-derived after resolve, so the snippet text was silently
discarded.

Re-derive `new_text` from the resolved `lsp_completion`. Only the text
content is updated -- replace/insert ranges are left as anchors from the
original response since the LSP ranges in the resolved text_edit are
stale when completions are cached across keystrokes (re: #34094).

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

Closes #53275.

Release Notes:

- Fixed the `vtsls` `completeFunctionCalls` setting being ignored
2026-04-23 12:02:11 +00:00
Finn Evers
9e435c0fd6
compliance: Add temporary allowlist (#54644)
To not have another week of failing checks on Preview and until we find
a better way of handling these errors.

Release Notes:

- N/A
2026-04-23 11:54:16 +00:00
Ben Kunkle
aeb602dd18
fs: Polling backend support (#54481)
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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #51340
Release Notes:

- Linux/WSL: Added polling filesystem watching support in order to
support file watching on file systems that do emit events through
`inotify`, for example `/mnt/c` in WSL, network filesystems, and FUSE
mounts. Polling should be automatically chosen over `inotify` when
necessary, however it can be manually chosen by setting the
`ZED_FILE_WATCHER_MODE=poll` env var

---------

Co-authored-by: Lilith River <lilith@imazen.io>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-23 11:40:49 +00:00
João Soares
16466ea936
theme_selector: Revert theme when modal is dismissed by clicking outside (#52773)
Context

Related to #52118

Found this while looking into the theme selector filtering bug: clicking
outside the theme selector (or icon theme selector) keeps the previewed
theme applied instead of reverting. `hide_modal()` doesn't go through
the Picker's `dismissed()` callback, so the in-memory theme override
sticks around without being written to `settings.json`.

This PR only fixes the click-outside behavior. The filtering issue from
#52118 is separate.

## Demo

**Before (bug):**


https://github.com/user-attachments/assets/f8be49c4-7e1d-483c-bf23-346022ac83aa



**After (fix):**



https://github.com/user-attachments/assets/29cc1740-c869-42d1-8aee-fe46a091a949



## How to review

Two files, symmetrical changes. Look at:
- `on_before_dismiss` in `theme_selector.rs` and
`icon_theme_selector.rs`
- The extracted `revert_theme()` method on both delegates, now shared
between `dismissed()` and `on_before_dismiss`

## Self-Review Checklist

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


Release Notes:

- Fixed theme selector keeping the previewed theme when clicking outside
instead of reverting to the original.
2026-04-23 11:36:03 +00:00
Anthony Eid
b830524713
git: Fix create worktree hook tasks running when switching worktrees (#54612)
This PR fixes a regression that was likely caused by:
https://github.com/zed-industries/zed/pull/54183 and wasn't caught
because I didn't add a regression test when I originally created the
feature.

The fix was only running the hooks when the worktree was just created,
and I added an integration test to prevent regressions from occurring
again in the future.

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

Closes #54598

Release Notes:

- git: Fix create worktree hook tasks running when switching worktrees
2026-04-23 11:05:54 +00:00
Finn Evers
61b25b6119
ci: Perform compliance checks in parallel (#54564)
Not to be merged before https://github.com/zed-industries/zed/pull/54550

This makes it so that we perform not all checks sequentially but in
parallel which should overall make this a lot faster.

Ultimately, we can save some more requests if we were to search for all
co-author looking PRs with one GraphQL query, but for now, this here
should make things a lot faster already whilst working fine with rate
limits.


Release Notes:

- N/A
2026-04-23 10:50:51 +00:00
Valery Borovsky
9affe8cbac
editor: Fix sticky scroll showing decorator line instead of declaration (#53288)
Fixes #49466

It looks like this wasn't actually a bug in the PHP outline query, but a
general sticky scroll bug. In PHP, the attribute ends up inside the
`function_declaration` as a child node, so sticky headers were
previously taking their start from `item.range.start` and getting stuck
on the `#[Deprecated]` line instead of `function foo()`. Switching to
`source_range_for_text.start` fixes exactly that, and also covers other
languages that put decorators or attributes before the declaration. I
added the test in TypeScript because it has the same tree shape and
covers the same class of bug as #49466


---

Before:

<img width="967" height="772" alt="Screenshot from 2026-04-07 08-46-10"
src="https://github.com/user-attachments/assets/a6b2aa2b-03f7-4abf-a4c4-c87d41df83ae"
/>


After:

<img width="1245" height="993" alt="Screenshot from 2026-04-07 08-23-32"
src="https://github.com/user-attachments/assets/27ef2487-d7fd-4a73-93e5-97fc719f9245"
/>

<img width="1245" height="993" alt="Screenshot from 2026-04-07 08-23-40"
src="https://github.com/user-attachments/assets/1b1daf80-544d-4128-bc92-b7d44b8d6564"
/>

<img width="963" height="636" alt="Screenshot from 2026-04-07 08-23-53"
src="https://github.com/user-attachments/assets/bb244ce9-797e-4a5f-b48f-eb0e4b982f7d"
/>

---

Tests:

Nextest run ID f0de6791-1a3c-406b-9589-54df870b832b with nextest
profile: default
Starting 3 tests across 1 binary (655 tests skipped)
PASS [ 0.986s] (1/3) editor editor_tests::test_sticky_scroll
PASS [ 0.436s] (2/3) editor
editor_tests::test_sticky_scroll_with_decoration_prefix_in_item
PASS [ 0.822s] (3/3) editor
editor_tests::test_sticky_scroll_with_expanded_deleted_diff_hunks
────────────
Summary [ 2.298s] 3 tests run: 3 passed, 655 skipped

Release Notes:

- Fixed sticky scroll headers showing attribute/decorator lines instead
of the declaration line in PHP and other languages where annotations are
child nodes of the declaration.

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-04-23 10:46:52 +00:00
Bennet Bo Fenner
949458617e
sidebar: Drop conversation view when archiving thread (#54516)
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

Closes #ISSUE

Release Notes:

- agent: Fixed an issue where sessions would not immediately be cleaned
up when archiving
2026-04-23 10:40:01 +00:00
Finn Evers
75fe5a3c9b
compliance: Allow Zippy release channel changes (#54572)
This adds support for tracking Zed Zippy channel changes with the
compliance automation.

Release Notes:

- N/A
2026-04-23 10:37:53 +00:00
Xiaobo Liu
43d6ab5386
gpui: Avoid redundant SharedString allocations in ShapedLine::split_at (#54583)
Build split text directly from Arc<str> slices instead of allocating
intermediate Strings. Reuse the original SharedString for full-line
splits, return a static empty string for empty sides, and add a
regression test covering boundary splits.

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-04-23 10:25:24 +00:00
Finn Evers
72daa7d6d4
ci: Bump script check runner size (#54615)
Since we build the workflows xtask on this runner, increasing the size
here to make that job faster.

Release Notes:

- N/A
2026-04-23 10:22:05 +00:00
Cameron Mcloughlin
2ab32357a5
Normalize picker padding (#54573)
Looks like this now:
<img width="608" height="152" alt="image"
src="https://github.com/user-attachments/assets/275c9574-e4fe-4855-b269-051b68b87bbe"
/>

Closes #53188

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-04-23 10:15:33 +00:00
NaritaHARUKI
9c5d609543
Add side-by-side split diff view to FileDiffView (#50046)
## Summary
- Enable VSCode-like side-by-side file comparison in FileDiffView using
SplittableEditor
- Leverages existing SplittableEditor infrastructure that ProjectDiff
already uses
- Controlled by the user's `diff_view_style` setting (split/unified)

## Changes
- `crates/git_ui/src/file_diff_view.rs`: Refactored to use
SplittableEditor instead of plain Editor (+66/-30 lines)

## Test plan
- [ ] Open a file with git changes and verify the diff view renders
correctly
- [ ] Toggle between split and unified diff view styles via settings
- [ ] Verify side-by-side comparison shows old/new content correctly

Release Notes:

- Enabled side by side diffs in the file diff view

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2026-04-23 10:08:01 +00:00
Kunall Banerjee
9cb8d97f61
Fix Agent Panel font size incrementing by 2px instead of 1px (#53685)
Split the shared `AgentFontSize` in-memory global into separate
`AgentBufferFontSize` and `AgentUiFontSize` globals. Previously, both
`adjust_agent_ui_font_size` and `adjust_agent_buffer_font_size` read
from and wrote to the same global, so calling them back-to-back in
`handle_font_size_action` applied the delta twice.

Self-Review Checklist:

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

Closes #53368.

Release Notes:

- Fixed Agent Panel font size incrementing by 2px instead of 1px
2026-04-23 10:03:53 +00:00
Paul Di Pietro
70d07f9088
Fix a Wayland-related graphic bug for the status bar (#46466)
Release Notes:

- Address a scenario where scaling in Wayland can cause a 1px gap above
the status bar

Closes #46008

---------

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2026-04-23 09:08:08 +00:00
Philip Arndt
4b01676a3b
Add credentials_url setting for keychain storage (#50047)
Added support for `credentials_url`, falling back to `server_url`, to be
used as the key for storing information inside Keychain Access. This
allows two copies of Zed to be used side by side if the other is
launched with a custom `--user-data-dir`.

- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects

Release Notes:

- Added support for `credentials_url`, falling back to `server_url`, to
be used as the key for storing information inside Keychain Access.
2026-04-23 08:58:14 +00:00
Kunall Banerjee
8f684fcb95
terminal_view: Prevent local path resolution for remote terminals (#50268)
When opening a terminal in a remote project, skip local-only path
operations (home dir fallback, shell expansion, is_dir checks) so the
remote shell opens in the remote user’s home directory by default.

Closes #49613.

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Prevent local path resolution for remote terminals
2026-04-23 08:41:05 +00:00
Tim Vermeulen
0ae6b4c61a
workspace: Add basic pane property tests and fix navigation bug (#52871)
Adds very basic property tests for navigation within a single pane, with
these operations:

```rust
enum Operation {
    Open { path: Arc<RelPath>, allow_preview: bool },
    GoBack,
    GoForward,
}
```

It primarily tests that a single backward or forward navigation step
results in the correct item being active. It doesn't currently test that
going back multiple times in a row results in the correct items because
the deduplication logic that Zed uses for this turned out to be hard to
model in an "obviously correct" way, and I aimed to keep it really
simple.

These tests surfaced a navigation bug that this PR also fixes, where
replacing an inactive preview tab would sometimes corrupt the navigation
history.

Before:


https://github.com/user-attachments/assets/52e21002-1319-4b16-93d7-8f84fb8858c0

After:


https://github.com/user-attachments/assets/790b6e3b-4c2b-4f2e-a705-70b1bc034872

Self-Review Checklist:

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

Release Notes:

- Fixed a bug where replacing a preview tab would sometimes break
navigation.

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-04-23 08:36:00 +00:00
Ian Chamberlain
74b15e426b
Add integrated terminal bell + settings (#53752)
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

Followup to #47531 to use the gpui feature in Zed. This just plumbs the
"system bell" feature into the terminal, behind a new setting (enabled
by default, like most other terminal applications).

Closes #5303
Relates to
https://github.com/zed-industries/zed/issues/40826#issuecomment-3684556858

Release Notes:

- Added audible BEL to Terminal; can be enabled by setting
`terminal.bell` to `"system"`.

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Ben Kunkle <Ben.kunkle@gmail.com>
2026-04-23 07:55:50 +00:00
KyleBarton
cd217ea49d
Trim nonalphanumeric chars before prefixing image tag name (#54578)
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

Closes #54452

Release Notes:

- Fixed bug where the sixth character of a devcontainer name is
nonalpanumeric
2026-04-23 07:36:36 +00:00
Finn Evers
cb91c6117c
compliance: Use author_association where possible (#54550)
This changes some of the checks to use the existing `author_association`
where possible, which will result in no change of effect - this is also
what GitHub uses internally.

The advatage is that it saves us a few requests, especially in the
context of the GitHub worker, and allows us to share code more
efficiently here. It also removes some ugly duplication I wanted to get
rid of for some time and makes the code overall more readable IMO.

Release Notes:

- N/A
2026-04-23 07:34:22 +00:00
Cole Miller
582f6a8fd3
Remove a debug_panic from the LSP store (#54549)
This is reachable when you pass a path to the Zed binary that doesn't
exist, so it feels a bit too aggressive.

Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-04-23 07:25:55 +00:00
Cole Miller
cd944ad8d6
git: Correctly filter ignored paths inside gitdirs on all platforms (#54548)
Previously the worktree's handling of events inside gitdirs looked like
this:

- First, deduplicate paths for which we received events by dropping any
path that is a suffix of another one
- Then, filter out events for deliberately ignored paths like
`.git/index.lock`
- Finally, collect a set of affected gitdirs based on the paths that
remain

This doesn't work on Windows, because when events occur for paths inside
`.git` we also get an event for `.git` itself. The deduplication steps
drops `.git/index.lock` before we get the chance to filter it out in the
second step. This causes us to rescan git state unnecessarily on
Windows.

This PR fixes the issue by moving the filtering of ignored paths, and
also the handling of `.git/info/exclude`, to just before the
deduplication step. We also filter out events for the `.git` directory
itself, so that if the batch of events looks like `[".git",
".git/index.lock"]`, we don't trigger `WorktreeUpdatedGitRepositories`.

Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-04-23 07:23:19 +00:00
Finn Evers
3aa173ab1c
ci: Fix merge queue trigger (#54611)
This one was supposed to run, but was accidentally skipped.

Release Notes:

- N/A
2026-04-23 07:16:02 +00:00
Anthony Eid
f1ce3728cf
git_ui: Use switch wording in branch picker (#54606)
Closes #54467

This PR changes the branch picker’s confirm label from "Select" to
"Switch" to better match the rest of the codebase and the action
performed when confirming in the picker.

I originally considered using "checkout", but since most places in our
codebase use "switch" as the branch command name, I stuck with that.

Release Notes:

- N/A
2026-04-23 07:15:03 +00:00
Finn Evers
fb57cf82a3
client: Fix capitalization of comment (#54610)
This is less of an actual fix than more a test for the merge queue.

Release Notes:

- N/A
2026-04-23 06:55:23 +00:00
Korbin de Man
e4e656fb42
Add "Add to .gitignore" action in project_panel (#47377)
This PR adds a "Add to .gitignore" action to the project panel's
right-click context menu. Similar to the "Restore File" action that I
previously added, I frequently find myself wanting this in the project
panel.

<img width="380" height="391" alt="image"
src="https://github.com/user-attachments/assets/e4438fbe-b070-40c8-9e57-84b003fa5c15"
/>

With the restore file option:
<img width="382" height="408" alt="image"
src="https://github.com/user-attachments/assets/84425de8-04e5-4969-8991-edc46e6420dc"
/>

Notes:
- **Implementation**: The `add_to_gitignore` function is essentially
copy-pasted from `git_panel.rs`.

- **Error handling**: Added toast notification on error, which is
consistent with `restore_file` in project_panel and `perform_checkout`
in git_panel.
Note that `add_to_gitignore` in git_panel does NOT show a toast (just
uses `detach_and_log_err`). I don't know if this is on purpose.
To follow up, I can either: match the project_panel implementation to
the git_panel one (no toast), or update the git_panel implementation to
also show a toast on error.

- **Menu grouping**: Previously "Restore File" and "View File History"
were in separate sections, but both relate to git. With this third git
action, I grouped all three together under a single separator (see
screenshot).
We could also keep "View File History" separate and only group "Restore
File" + "Add to .gitignore" together (both modify the working tree state
in some way), if we don't want to alter the existing UI too much.

Release Notes:

- Added "Add to .gitignore" option to the project panel context menu for
files in git repositories.

---------

Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
2026-04-23 05:46:58 +00:00
MX48@Live
debf4c9988
Fix terminal combining marks (#53176)
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

Closes #46942

## Problem

The terminal's monospace grid forcing logic in `LineLayoutCache` breaks
rendering of combining marks in complex scripts. Thai, Lao, Arabic,
Hebrew, Myanmar, Khmer, and other scripts use combining characters
(vowels, tone marks, diacritics) that should render on top of or below
their base character — not in a separate cell.

The root cause is in `apply_force_width` within `line_layout.rs`. After
HarfBuzz correctly shapes the text (positioning combining marks at the
same x coordinate as their base character), the force-width loop blindly
increments the cell position counter for **every** glyph — including
zero-advance combining marks. This displaces them into the next cell,
breaking the visual output.

For example, Thai `สวัสดี` renders as `ส ว ั ส ด ี` with vowels and tone
marks scattered across separate cells.

#39526 previously fixed Latin combining characters (like NFD-normalized
é) by handling them at the terminal cell level via
`append_zero_width_chars`. That fix works when alacritty's cell model
already identifies the characters as zero-width. However, many complex
script combining marks still get mispositioned at the shaping layer —
which is what this PR addresses.

## Solution

Extracted `apply_force_width_to_layout()` in `line_layout.rs` that
detects combining marks during the force-width pass by checking whether
a glyph's shaped x position has advanced by at least half a cell width
beyond the previous base character. Combining marks (which HarfBuzz
places at the same x as their base) are kept at their shaped position
relative to the forced base, rather than being pushed to the next cell.

This approach is **script-agnostic** — it works for all complex scripts
(Thai, Arabic, Devanagari, Myanmar, Khmer, etc.) without hardcoding
Unicode ranges or disabling the monospace grid. The fix lives at the
text shaping layer in GPUI, so it benefits any consumer of
`LineLayoutCache` that uses `force_width`.

The two duplicate force-width loops (in `layout_line` and
`layout_line_by_hash`) are consolidated into the single shared helper.

## Testing

**Unit tests** cover the following scenarios:
- Latin text positions remain unchanged
- A single combining mark stays at its base character's cell
- A base character following combining marks gets the correct next cell
- Multiple stacked combining marks all stay anchored to cell 0
- Drifted base positions respect the existing 1px tolerance

**Manual testing** with the following scripts in the integrated
terminal:

| Script | Test text | What to look for |
|--------|-----------|-----------------|
| Thai | `สวัสดีครับ ภาษาไทย ก้อนหิน น้ำตก` | Vowel signs (ั ี) and tone
marks (้) render above/below consonants, not in separate cells |
| Lao | `ສະບາຍດີ ພາສາລາວ` | Vowel signs stay attached to consonants |
| Arabic | `بِسْمِ اللَّهِ الرَّحْمَٰنِ` | Diacritics (harakat) render
on their base letters |
| Hebrew | `בְּרֵאשִׁית בָּרָא אֱלֹהִים` | Vowel points (nikud) stay
under/over their letters |
| Hindi | `नमस्ते हिन्दी भाषा` | Vowel matras render correctly on
consonants |
| Bengali | `বাংলা ভাষা নমস্কার` | Combining marks stay attached |
| Tamil | `தமிழ் மொழி வணக்கம்` | Vowel signs render correctly |
| Myanmar | `မြန်မာဘာသာ မင်္ဂလာပါ` | Combining marks and medial
consonants stay in place |
| Khmer | `ភាសាខ្មែរ សួស្តី` | Subscript consonants and vowel signs
render correctly |

<details>
<summary>Script to reproduce</summary>

```sh
echo "=== Thai ==="
echo "สวัสดีครับ ภาษาไทย ก้อนหิน น้ำตก"
echo ""
echo "=== Lao ==="
echo "ສະບາຍດີ ພາສາລາວ"
echo ""
echo "=== Arabic ==="
echo "بِسْمِ اللَّهِ الرَّحْمَٰنِ"
echo ""
echo "=== Hebrew ==="
echo "בְּרֵאשִׁית בָּרָא אֱלֹהִים"
echo ""
echo "=== Hindi (Devanagari) ==="
echo "नमस्ते हिन्दी भाषा"
echo ""
echo "=== Bengali ==="
echo "বাংলা ভাষা নমস্কার"
echo ""
echo "=== Tamil ==="
echo "தமிழ் மொழி வணக்கம்"
echo ""
echo "=== Myanmar ==="
echo "မြန်မာဘာသာ မင်္ဂလာပါ"
echo ""
echo "=== Khmer ==="
echo "ភាសាខ្មែរ សួស្តី"
```

</details>

### Before

<img width="1144" height="740" alt="Screenshot 2569-04-05 at 10 43 00"
src="https://github.com/user-attachments/assets/bce2075a-9e19-40dd-81ea-0e29a451b781"
/>

### After

<img width="1144" height="747" alt="Screenshot 2569-04-05 at 11 22 55"
src="https://github.com/user-attachments/assets/e0613bf6-8452-4c65-b893-f9931a471b2e"
/>

### Tests passing

<img width="1144" height="740" alt="Screenshot 2569-04-05 at 11 20 22"
src="https://github.com/user-attachments/assets/9100bd77-4ea6-4f77-ae31-5129484552fd"
/>

Release Notes:

- Fixed terminal rendering of combining marks in complex scripts (Thai,
Arabic, Hebrew, Devanagari, Myanmar, Khmer, and others) where vowel
signs and tone marks were incorrectly displaced to adjacent cells
instead of rendering on their base characters.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-04-23 02:50:58 +00:00
Anthony Eid
58c4dda8b9
git: Fix remote branch picker not showing branches (#54575)
This sends `branch_list` in live `UpdateRepository` messages so
downstream repository snapshots stay in sync and the remote branch
picker can populate correctly. Collab DB replay for join/reconnect will
follow in a separate change.

This fixes a bug where the branch picker wouldn't show any branches in
remote environments

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

Closes #54530

Release Notes:

- git: Fix remote branch picker not showing any branches
2026-04-22 20:26:43 -04:00
Toni Alatalo
f939ec6049
dev_container: Align compose project name with reference CLI (#54302)
> **Draft / open question for maintainers.** The failure mode this fixes
is narrow — a new-Zed-created container exists under the `name`-field
project while a CLI-derivation tool (`@devcontainers/cli`, VS Code)
operates on the same folder (the container persists in Docker, so the
originating Zed session doesn't need to still be open). See issue #54255
failure mode 3 and the fixture's step 6.
>
> I'd like to pose this as a question rather than a claim: is matching
`@devcontainers/cli`'s `getProjectName` precedence something the project
wants to take on, given the narrowness of the bug? I wrote this
implementation mostly as a way to explore what parity would actually
cost — happy to close it if you'd rather leave it as-is, or pare it down
(e.g. just rule 4) if a partial match is preferable.
>
> The broader value beyond this specific bug: devcontainer impls
agreeing on the same project name means containers created by Zed, the
devcontainer CLI, and VS Code are interchangeable for the same folder,
which feels worth it to me — but you know the project's priorities
better.
>
> Folds in #54068 (detection) — closing that PR unmerged; its
`MultipleMatchingContainers` error lands here.

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

Closes #54255

## Summary

**Match `@devcontainers/cli`'s full `getProjectName` precedence.**
Replaces `safe_id_lower(devcontainer.json's name)` with the five-step
chain the reference CLI walks (see [`src/spec-node/dockerCompose.ts` in
devcontainers/cli](https://github.com/devcontainers/cli/blob/main/src/spec-node/dockerCompose.ts)):

1. `COMPOSE_PROJECT_NAME` from the local environment.
2. `COMPOSE_PROJECT_NAME=` in the workspace `.env` file.
3. Top-level `name:` on the merged compose config, when at least one
fragment declared it explicitly.
4. `${workspaceFolderBasename}_devcontainer` — only when the first
compose file's directory is `<workspace>/.devcontainer/`.
5. Otherwise, the plain basename of the first compose file's directory
(no suffix).

The old Zed implementation diverged at every one of those inputs: any
user setting `COMPOSE_PROJECT_NAME`, shipping a `.env` with one,
declaring a top-level compose `name:`, or pointing `dockerComposeFile`
outside `.devcontainer/` (e.g. `"../docker-compose.yml"`) got a
different project namespace than the CLI and VS Code, producing two
compose projects for the same folder.

Adds a small `sanitize_compose_project_name()` helper implementing the
CLI's rules (lowercase + strip `[^-_a-z0-9]`) — notably preserving
hyphens, which `safe_id_lower` would have replaced with underscores.

Adds two helpers used by the precedence walk:
- `parse_dotenv_compose_project_name` — line scan extracting
`COMPOSE_PROJECT_NAME=…` from the workspace `.env`, matching the subset
the CLI's regex dotenv reader recognizes.
- `compose_fragment_declares_name` — parses each compose fragment with
`yaml-rust2` (already a transitive workspace dep; slated to become a
direct dep via #53922) and checks for a `name` key on the root mapping
(block, quoted, or flow style all work), matching the CLI's own
`yaml.load`. `docker compose config` always injects `name: devcontainer`
into its merged output when no fragment declared one, so rule 3 needs to
distinguish the user-provided case from the injected default — this
helper supplies that signal. On YAML parse failure it returns "not
declared" (rule 4 applies), matching the CLI's fallback.

`project_name()` becomes async and fallible (`async fn
project_name(&self) -> Result<String, DevContainerError>`) so it can
load the `.env` file and each compose fragment via `self.fs.load`. Four
call sites now `.await?` the derivation. Real I/O errors on the `.env`
read propagate as `FilesystemError` (matching the CLI's narrow
`ENOENT`/`EISDIR` swallow); fragment-rescan read errors are logged and
skipped (matching the CLI's broader try/catch over its fragment read +
parse).

The `name` field is still used as the features image-tag prefix
(`generate_features_image_tag`); only the compose project namespace is
decoupled from it.

**Duplicate-container detection (from #54068).** When
`check_for_existing_container`'s label-based lookup returns more than
one match, propagate `MultipleMatchingContainers(ids)` with instructions
to clean up the stale one(s). This covers the mixed-version upgrade edge
case where a pre-fix Zed left a container under the legacy project name
alongside a CLI-style one — transparent to users in the common case (one
tool, one container), explicit error when two legacy siblings need
manual cleanup.

## Why

Full write-up with verified fixtures and captured output: #54255.

Three failure modes from the same root cause, all resolved by this
change:

1. **Interop** — opening a folder in both Zed and `devcontainer up` (or
Zed and VS Code) creates two compose projects with identical
`devcontainer.local_folder` + `devcontainer.config_file` labels,
breaking the spec's uniqueness invariant.
2. **Cross-worktree silent db/volume reuse** — if multiple git worktrees
share a `devcontainer.json` with the same `name`, Zed uses the same
compose project for all of them; Compose reuses stateful siblings (db,
cache, localstack) by config-hash, so worktree B silently inherits
worktree A's database. Fixture + captured output:
[antont/zed-devcontainer-db-share-repro](https://github.com/antont/zed-devcontainer-db-share-repro).
3. **Mixed-version Zed sessions** — the Rust impl landed in stable
v0.232.2 (2026-04-15, #52338). Older Zed (≤v0.231.x) shelled out to
`@devcontainers/cli` so it used the reference derivation. The collision
shows up when a new-Zed-created container exists under the name-field
project while a CLI-derivation tool (old Zed, `devcontainer up`, VS
Code) operates on the same folder.

## Migration / compatibility

Existing Zed-created containers (under the old `safe_id_lower(name)`
project) continue to be found via `check_for_existing_container`'s
label-based lookup — they're looked up by `devcontainer.local_folder` +
`devcontainer.config_file`, not by project name. A user with duplicate
legacy containers from a prior Zed session sees
`MultipleMatchingContainers` with cleanup instructions.

## Revision — 2026-04-22

Revised per @KyleBarton review on the prior version:
- Swapped the YAML parser from `serde_yaml_ng` to `yaml-rust2` (already
transitive via `tree-sitter-yaml`; net reduction of one direct workspace
dep; also what #53922 will pull in).
- Dropped the mixed-version tiebreak (`pick_canonical_container`) and
its `com.docker.compose.project` serde label. The edge case it covered
is transient enough to address via the explicit
`MultipleMatchingContainers` error rather than permanent tiebreaking
code.
- Folded #54068's detection commit into this PR; #54068 closed unmerged.
- Rebased onto `main`.

## Test plan

- [x] `cargo test -p dev_container --lib` — 89 passed, including:
  - `sanitize_compose_project_name_matches_cli_rules`
- `--project-name` assertion added to
`test_spawns_devcontainer_with_docker_compose`
  - `check_for_existing_container_errors_when_multiple_match`
  - `derive_project_name_env_wins_over_everything`
  - `derive_project_name_dotenv_wins_over_compose_and_fallback`
  - `derive_project_name_compose_name_wins_over_fallback`
- `derive_project_name_skips_compose_name_when_not_explicitly_declared`
-
`derive_project_name_omits_suffix_when_compose_file_outside_devcontainer_dir`
  - `derive_project_name_normalizes_compose_path_for_rule_4`
- `compose_fragment_declares_name_detects_top_level_name_key` (covers
block, quoted-key, and flow-style roots, plus parse failure →
not-declared)
  - `is_missing_file_error_only_accepts_notfound_and_isadirectory`
- [x] `cargo fmt --all` — clean
- [x] `./script/clippy -p dev_container` — clean
- [x] **End-to-end with fixture**
[antont/zed-devcontainer-compose-test](https://github.com/antont/zed-devcontainer-compose-test):
  - Build `zed` from this branch.
- Clean slate: `docker ps -a --filter
"label=devcontainer.local_folder=$PWD" -q | xargs -r docker rm -f`
- `zed --dev-container /path/to/devcontainer-compose-test` → Zed creates
container under project `devcontainer-compose-test_devcontainer` (was
`compose_duplicate_repro` before the fix).
- `devcontainer up --workspace-folder $PWD` → CLI reports the same
`containerId` Zed created; no second compose project is introduced.
- Captured: `devcontainer-compose-test_devcontainer-app-1`,
`composeProjectName: "devcontainer-compose-test_devcontainer"` reported
by both tools.

Release Notes:

- Fixed dev container Docker Compose project name now matches the full
`getProjectName` precedence from the reference devcontainer CLI
(`COMPOSE_PROJECT_NAME` in the environment, then in the workspace
`.env`, then an explicit top-level `name:` on the merged compose config,
then the basename of the first compose file's directory — with the
`_devcontainer` suffix only when that directory is
`<workspace>/.devcontainer`). This prevents duplicate containers when
the same folder is opened with both Zed and the devcontainer CLI / VS
Code.

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 16:56:14 -07:00
Finn Evers
8d53ebc70e
ci: Add workflow for bumping Zed versions (#54485)
Release Notes:

- N/A
2026-04-23 00:56:18 +02:00
Bennet Bo Fenner
a658e1d3b0
git_ui: Fix double borrow when showing worktree error message (#54555)
Fixes ZED-6Q0

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

Closes #54544

Release Notes:

- Fixed a crash that could occur when git worktree creating fails
2026-04-23 00:30:05 +02:00
Katie Geer
2475a30b62
telemetry: Add latency metrics (#54454)
Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...

---------

Co-authored-by: Eric Holk <eric@zed.dev>
2026-04-22 22:22:10 +00:00
Bennet Bo Fenner
8ff9302f04
bedrock: Fix wrong model ID for Opus 4.7 (#54554)
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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #54547 

Release Notes:

- bedrock: Fixed an issue where Opus 4.7 would not work because of an
invalid model ID
2026-04-22 22:18:46 +00:00
Eric Holk
2c237899f9
Keep trailing semicolons attached to the preceding word when wrapping (#54546)
When soft-wrapping text, `LineWrapper::is_word_char` determines which
characters stick to the preceding word at wrap boundaries. The list
already includes trailing punctuation like `,`, `.`, and `:`, but was
missing `;`. As a result, a message like "we won't pass it on; no big
deal" could wrap with `;` isolated at the start of the next line (`on` /
`; no`).

This was most visible in the agent panel message editor but affects any
surface that uses soft-wrapping.

Also adds `assert_word("on;")` to `test_is_word_char` to guard against
regressions.

Release Notes:

- Fixed trailing `;` being wrapped to a new line instead of staying
attached to the preceding word.
2026-04-22 14:57:44 -07:00
Eric Holk
73127da4b7
acp_tools: Always capture ACP transport and stderr into the log ring (#54536)
Part of #54531.

Previously the log tap started disabled and only flipped on when someone
opened the ACP logs panel for the first time on a given connection. That
meant the common *'I noticed something is wrong with my agent, let me go
look at the logs'* workflow started with an empty pane \u2014 all the
traffic that led up to the problem was already gone.

This removes the `enabled` flag on `AcpLogTap` so capture is
unconditional. The backlog ring is still bounded at
`MAX_BACKLOG_MESSAGES` (2000), so memory is capped. The steady-state
cost is one channel send per transport/stderr line, which is negligible
compared to the JSON-RPC serialization that already happened to produce
the line.

Net diff is ~40 lines deleted from `acp_tools.rs` \u2014 the flag, its
accessors, the early-return in `emit`, and the `active_tap` bookkeeping
needed to enable it on first subscribe.

I confirmed with the author of the original opt-in design before making
this change.

Release Notes:

- N/A
2026-04-22 14:57:12 -07:00
John Tur
41b4e89c23
Enable segment heap for Zed (#54538)
Reduces memory usage on Windows by using a newer heap implementation.

Memory usage after opening into the Welcome screen:
- Before: 124 MB
- After: 91 MB

Release Notes:

- N/A
2026-04-22 16:58:55 -04:00
Anthony Eid
72d004c8e8
git_graph: Add remote support for commit data handler (#54468)
### Motivation

To support remote Git graph usage, we need remote support for the Git
APIs that the graph depends on. This PR adds remote support for
`CommitDataHandler` (the `git cat-file --batch` process manager),
allowing remote Git graph consumers to fetch visible commit data without
polling.

#### Summary

The Git graph separates the UI and data layers so the UI can continue
rendering while commit data is fetched in the background. This change
extends that model to remote repositories by allowing
`GitStore::fetch_commit_data(sha: Oid, await_result: bool, cx: &mut
Context) -> &CommitDataState` to await remote commit loading.

For simplicity, the `Starting` variant was removed from
`CommitDataState`. `CommitDataState::Loading(Option<...>)` now stores
`Some(...)` when `await_result == true` is passed to
`fetch_commit_data`. This allows the data layer to await commit loading
without polling, and only when explicitly requested.

I also removed the `Graph` prefix from `CommitData`-related types
because this API is general-purpose and not limited to the graph. Longer
term, I hope to replace `Repository::show` with the commit data
functionality, since it already provides built-in caching.

#### Bug Fixes

- Fix stale `Loading(...)` entries that survive enqueue failure or
handler shutdown.
- Fix commit data handler bookkeeping so `pending_requests`,
`completion_senders`, and `CommitDataState` remain consistent.
- Fix remote commit-data loading so the data layer can await results
instead of polling.

#### Testing

- Add property tests for commit data fetching.
- Add a collab integration test that verifies batched remote commit-data
fetching.

#### Follow Up

In a follow-up, I want to replace the `Repository::show` backend with
the commit data handler and remove `CommitDetails` from the codebase as
a cleanup and maintenance pass. The commit data handler already provides
caching and is a better long-term path for commit metadata access.

I may also want to allow the `CommitData` type to propagate errors to
callers.

For the Git graph, the remaining work is remote search and initial data
fetching.

Self-Review Checklist:

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

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2026-04-22 16:11:51 -04:00
Finn Eitreim
f4addb6a24
editor: Make the multiline comment folding more robust (#54102)
Basically just applied the suggested fix as described in #53606 , I also
experimented with a hackier soln. that used the same logic as the code
this is replacing, but it seemed solidly worse than this version.

The original issue extremely clear with what is going on / what needed
to be fixed.


heres a video: 

https://github.com/user-attachments/assets/e7fc60f7-0a8c-403c-877f-93f58f370b00


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

Closes #53606 

Release Notes:

- editor: Fixed incorrect inclusion of comments into folds
2026-04-22 21:53:08 +02:00
Finn Evers
61ac9618a0
Revert "jsonc: Recognize renovate.json as JSONC" (#54537)
Reverts zed-industries/zed#54527

This has unintended side effects, thus revert it to the prior state for
now.

Release Notes:

- N/A
2026-04-22 19:45:26 +00:00
María Craig
234fbfca23
docs: Link to Task hooks from Worktree Isolation section (#54532)
Adds a link to the Tasks section of the docs from the Worktree Isolation
section in parallel-agents.md

Release Notes:

- N/A
2026-04-22 16:28:08 -03:00