Commit Graph
38699 Commits
Author SHA1 Message Date
Kirill Bulatov 314cfdccfb Allow empty values in .editorconfig (#60026)
Closes https://github.com/zed-industries/zed/pull/59559
Closes https://github.com/zed-industries/zed/issues/59466

Release Notes:

- Fixed incorrect parsing of .editorconfig with empty values
2026-06-28 16:15:20 +00:00
Kirill Bulatov fe2c2f4000 Fix code lens not being resolved in remote workflows (#59999)
Follow-up to https://github.com/zed-industries/zed/pull/54100
Closes https://github.com/zed-industries/zed/issues/59122

Original PR overlooked that the resolve was not handled from the remote
hosts at all...
Also, fixes the re-fetch of code lens not taking new language servers
into account: before, it exit early whilst now it actually re-fetches
the lens for the new servers.

Before:

<img width="1728" height="1084" alt="before"
src="https://github.com/user-attachments/assets/9ee8205b-084b-4409-9abc-18c4ddb9c4e9"
/>

After:

<img width="1728" height="1084" alt="after"
src="https://github.com/user-attachments/assets/16ad76dc-25e1-4257-80dc-b5aeabc9a4ef"
/>


Release Notes:

- Fixed code lens not being resolved in remote workflows
2026-06-28 14:44:44 +00:00
Artem KalytiukandClaude Opus 4.8 c43971d69c Handle dynamic registration of semantic tokens capability (#60015)
In C# files nothing gets semantic highlighting — class fields and other
identifiers are colored by tree-sitter only, so a private field looks
the same as a plain local variable.

The reason: Roslyn (the C# language server) doesn't declare
`semanticTokensProvider` statically in its `initialize` response. It
registers it **dynamically** (`client/registerCapability`), and only
when the client advertises
`textDocument.semanticTokens.dynamicRegistration = true`. Zed advertised
`false` and didn't handle such a registration, so Roslyn never offered
semantic tokens at all. (rust-analyzer/gopls are unaffected — they
declare the capability statically.)

This is the first of two PRs. This one makes Roslyn actually **send**
semantic tokens. The companion PR (#60027) maps Roslyn's C#-specific
token types to theme styles — without it the tokens arrive but most are
dropped, since their types aren't in Zed's default rules.

## Solution

- Advertise `textDocument.semanticTokens.dynamicRegistration = true`.
- Handle the `textDocument/semanticTokens` registration and
unregistration so the capability is stored, following the existing arms
for `documentLink`, diagnostics, etc.

## Testing

- Added a test that dynamically registers and unregisters
`textDocument/semanticTokens` and checks the stored capability appears
and is cleared.
- Verified manually against Roslyn on a C# project: Zed now sends
`textDocument/semanticTokens/full` and gets tokens back; before this
change there was no semantic-token traffic at all.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Support dynamic registration of the `textDocument/semanticTokens`
capability.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 13:48:10 +00:00
Xin Zhao 4083fc8592 languages: Fix Rust completion labels with fullFunctionSignatures enabled (#59125)
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

Closes #57030

When `fullFunctionSignatures` is enabled in `rust-analyzer`, some
completion items returned by the language server have an unexpected
`filterText`. For example:
```jsonc
{
  "label": "sync_all(…)",
  "labelDetails": {
    "detail": "(alias fsync)",
    "description": "pub fn sync_all(&self) -> io::Result<()>"
  },
  "kind": 2,
  "sortText": "7ffffffa",
  "filterText": "sync_allfsync",
  ...
}
```
For such completion items, the rust-analyzer adapter falls back to an
outer range passed into the `mk_label` closure to determine the display
range:

https://github.com/zed-industries/zed/blob/22852a6431ca8a5e0fe07a4769e9fe521d2b1b0a/crates/languages/src/rust.rs#L362-L371

For functions or methods, this fallback range is calculated here:

https://github.com/zed-industries/zed/blob/22852a6431ca8a5e0fe07a4769e9fe521d2b1b0a/crates/languages/src/rust.rs#L424-L435

In this example, the `function_signature` is `"pub fn sync_all(&self) ->
io::Result<()>"`, and the regex matches up to `fn sync_all(&self) ->
io::Result<(`. Currently, the range passed to the `mk_label` closure
mistakenly covers `"ub fn sync_all(&self) -> io::Result<"` (causing the
first character 'p' to be truncated, as reported in #57030), whereas we
only want `"sync_all"` itself

This PR introduces two main changes to fix this behavior:
- Adjust the range start: Skip the leading `fn` keyword so that the
range starts exactly at the function or method name.
- Update the regex pattern: The current pattern matches up to the last
`(`, which causes incorrect slicing if the return type contains
parentheses (e.g., `Result<()>`). This is changed to match up to the
first `(`.

Release Notes:

- Fixed some rust completions has `ub fn ` as prefix when
`fullFunctionSignatures` is enabled
2026-06-28 10:08:29 +00:00
Kirill Bulatovandzed-zippy[bot] 9afbcb75c5 Refresh code lens after dynamic registration (#60009)
Follow-up to https://github.com/zed-industries/zed/pull/54100

Closes https://github.com/zed-industries/zed/issues/58864

Release Notes:

- Fixed code lens not being refresh after the corresponding capability
was dynamically registered

---------

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-06-28 09:17:34 +00:00
Kirill Bulatov 5e3499ee3a Hide code lens' blocks in folds (#60011)
Closes https://github.com/zed-industries/zed/issues/57053

Decided to be on a safest side and made only the code lens' blocks to
hide in folds: let me know if that's not desired and we should hide all
blocks (e.g. ctrl-enter for inline assist block is also not hiding and
looks odd).

Ran `ITERATIONS=100000 OPERATIONS=10 cargo test --profile release-fast
-p editor --lib display_map::tests::test_random_display_map --
--nocapture` and it passes successfully.

`SEED=770 OPERATIONS=50 cargo test --profile release-fast -p editor
--lib display_map::tests::test_random_display_map` seems to fail even on
`main`

Before:

<img width="392" height="155" alt="before"
src="https://github.com/user-attachments/assets/44d1a500-7512-49de-a9bd-2837c33353a9"
/>

After:

<img width="338" height="159" alt="after"
src="https://github.com/user-attachments/assets/671791d8-a443-4ca2-abb2-8049fe8910a7"
/>


Release Notes:

- Fixed code lens not hiding for folded regions
2026-06-27 21:19:49 +00:00
Matt Van HornandCole Miller 585e40a6dc git_ui: Preserve in-progress commit message across reconnect (#58180)
Losing the connection on a remote project, or restarting Zed, while
editing a git commit message cleared the in-progress text, because the
Git panel rebuilds the commit buffer from the repository and discards
unsent input.

This persists the draft, scoped to the active repository's work
directory, in the panel's serialized state and restores it when the
panel is rebuilt from that state: at construction when the active
repository already matches, and again in `reopen_commit_buffer` once the
commit buffer loads. The restore only applies to an empty target buffer
whose work directory matches the active repository, so it never replays
committed or cleared text and never leaks a draft across repositories.
The persisted draft is cleared after a successful commit.

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

Release Notes:

- Fixed in-progress git commit messages being cleared when a remote
project reconnects or Zed restarts

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2026-06-27 20:29:20 +00:00
Finn Evers 1f7c8d7ab6 ci: Bump setup-node and use Node v24 (#59947)
This applies a similar set of changes to this repo that we also recently
applied to other repos that we have.

Release Notes:

- N/A
2026-06-27 16:37:15 +00:00
Cameron Mcloughlin ef1eb35c71 docs: Remove readme junk (#60008)
Left some junk in the readme during a pairing session and forgot to
remove oopsies

---

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-27 15:06:29 +00:00
Kirill Bulatov 18c28c3e63 Improve context menu experience in the markdown preview (#59993)
* removes useless "no items" pop-up and does not show any menu at all if
no actions are applicable.
This required adding `pub fn maybe_menu` into the 

* adds actions to copy rendered text and markdown text: in fact,
`cmd/ctrl-c` work already but we did not expose it

Before:


https://github.com/user-attachments/assets/906f2bfd-bf19-48de-bbb5-85bb33431f60

After:


https://github.com/user-attachments/assets/2c039c4d-2d42-4689-9ac1-12e3b10119cf

Release Notes:

- Improved context menu experience in the markdown preview
2026-06-27 10:09:13 +00:00
Kirill Bulatov 8eb85ac9e2 Restore remote binary dev build output (#59997)
Follow-up of https://github.com/zed-industries/zed/pull/46695

cargo outputs to stderr, so if we do not inherit it, we do not see it,
yet this can be useful to understand what broke and see the progress.
I am not sure if there was a reason to remove it, hence creating the PR
to discuss — want to add at least a comment there for the future if we
decide to keep things as is.

Before:

<img width="1731" height="1022" alt="before"
src="https://github.com/user-attachments/assets/92bb0969-e495-41b0-8cac-1f85a83440a0"
/>

After:
<img width="1728" height="1086" alt="after"
src="https://github.com/user-attachments/assets/c733fb8b-adbe-44dc-84a5-48e2c9e63a38"
/>

Release Notes:

- N/A
2026-06-27 09:21:37 +00:00
Cole Miller d4e43845fa Use stable path keys for the project diff (#59984)
#59043 updated the project diff and git panel to improve the sorting
options and make the order of files always match across the two.
However, the approach relied on sorting the list of buffers first and
then using an incrementing `PathKey.sort_prefix` to insert them into the
multibuffer. This is a problem because path keys are intended to be
stable, and any addition of removal of a buffer from the multibuffer
would cause the path keys for all subsequent buffers to change, so
`update_path_excerpts` would do unnecessary work.

This PR fixes that by computing stable path keys for the buffers based
on the ordering settings:
- `PathKey.sort_prefix` is based on the git status if that setting is
enabled, or a constant otherwise (the same way it worked before #59043)
- when the tree view is disabled, `PathKey.path` is either the raw
`RepoPath` (if sorting by path) or `{name}/{repo_path}` (if sorting by
name). When the tree view is enabled, we get the path by inserting `\0`
just before every directory component of the `RepoPath`, so that all
directories sort before all files.

Release Notes:

- N/A
2026-06-26 22:56:41 +00:00
Joseph T. Lyons bfebb1301f Remove auto watch feature flag (#59619)
## 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 an auto-watch button to the collab panel that automatically
opens other participants' screen shares while you're in a call.
2026-06-26 21:13:01 +00:00
Joseph T. Lyons 7387a146a4 Unify behavior of delete/cut to line boundary actions (#59627)
I noticed that our line deletion actions are inconsistent.

For `DeleteToBeginningOfLine`:

- `one «two threeˇ» four` -> ` four` ✅
- `one «ˇtwo three» four` -> ` four` ✅

Great, these have the same results, regardless of selection direction.

For `DeleteToEndOfLine`:

- `one «two threeˇ» four` -> ` one ` ✅
- `one «ˇtwo three» four` -> `one two three` ❌

Whoops, that second one should be the same, assuming that selection
direction again shouldn't matter, as in the case of
`DeleteToBeginningOfLine`.

The same issue exists for `CutToEndOfLine`:

- `The quick «brownˇ» fox` -> `The quick ` ✅
- `The quick «ˇbrown» fox` -> `The quick brown` ❌

I unified the end-of-line actions to match `DeleteToBeginningOfLine`:
selection direction no longer matters, so the whole selection is always
included.

---

- [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 `editor: delete to end of line` to behave consistently
regardless of selection direction.
- Fixed `editor: cut to end of line` to behave consistently regardless
of selection direction.
2026-06-26 20:56:38 +00:00
Marshall Bowers 7c91706a11 Unship shared threads (#59981)
This PR unships shared threads.

The feature is not used much and is getting in the way, at this point.

These are only ever made available to staff.

The corresponding database schema migration has been created in the
Cloud repo and applied to the production database.

Release Notes:

- N/A
2026-06-26 20:50:37 +00:00
Dino 19e85945cc git: Use version control colors in diff hunk line numbers (#59973)
# Objective

When diff hunks are expanded, reading the line numbers can be a little
hard due to the contrast between `editor.line_number` and both
`editor.diff_hunk.deleted.background` and
`editor.diff_hunk.added.background`. In order to make it easier for
these line numbers to stand out, the actual `version_control` colors,
respective to each diff hunk, can be used to color the line number.

## Solution

Luckily, the line numbers color was already dynamically decided on
`EditorElement::layout_line_numbers` depending on whether the line had a
breakpoint or it was active (part of a selection). The information on
whether the row for which the line was being laid out belonged to a diff
hunk is also already available on the `Gutter::row_infos`.

As such, this change was easy to achieve by simply updating
`EditorElement::layout_line_numbers` to take into consideration each
row's `RowInfo::diff_status` and mapping each status to a
`version_control` color, ignoring the `Modified` variant, as that should
never happen.

## Testing

Manually tested against a repository that has added, deleted and
modified changes. Differences can be seen in the `Showcase` section.

## Self-Review Checklist:

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

## Showcase

<details>
  <summary>Before</summary>
  
<img width="2744" height="2994"
alt="version_control_line_numbers_before"
src="https://github.com/user-attachments/assets/75d160a7-e0cc-4c9d-8fdd-4cab5cc6eefb"
/>
</details>

<details>
  <summary>After</summary>

<img width="2744" height="2994" alt="version_control_line_numbers_after"
src="https://github.com/user-attachments/assets/887fdb6a-34c6-4331-b750-4d3bea6fcd77"
/>
</details>
---

Release Notes:

- Improved line number colors in diff hunks to match the version control
colors
2026-06-26 17:59:47 +00:00
9fd3e0ca3b project_panel: Add expand/collapse all to context menu (#59567)
Add `ExpandAllEntries` action, keybinding, and right-click context menu
entries for expand/collapse all in the project panel.

- Add `ExpandAllEntries` action + handler + `expand_all_entries()`
method
- Add `cmd-right` / `ctrl-right` keybinding for `ExpandAllEntries`,
mirroring
  the existing `cmd-left` for `CollapseAllEntries`
- Add "Expand All" to root-entry and folder right-click context menus
- Add keybinding hint to root-entry "Collapse All" context menu entry
- Per-worktree behavior: context menu actions affect only the selected
worktree,
  subfolder "Expand All" expands from that folder down

# Objective

The project panel had no discoverable way to expand or collapse all
entries. The only ways were keyboard shortcuts (`cmd-left` for collapse
all)
or the right-click context menu. The global `ExpandAllEntries` shortcut
(`cmd-right`) was also missing. This PR adds that shortcut and exposes
both actions in the context menu so users learn the keybindings while
keeping the UI minimal.

## Solution

- Add `ExpandAllEntries` action + handler + `expand_all_entries()`
method
- Add `cmd-right` / `ctrl-right` keybinding for `ExpandAllEntries`
(global),
  mirroring the existing `cmd-left` for `CollapseAllEntries`
- Add "Expand All" to the right-click context menu for both root entries
and
  subfolder entries
- Update root-entry "Collapse All" to show its keybinding hint via
  `.action(Box::new(CollapseAllEntries))`
- **Per-worktree behavior**: each root entry's context menu actions
affect
only that worktree, subfolder "Expand All" expands from that folder down

## Testing

- Added 6 GPUI tests in `project_panel_tests.rs`:
  - `test_expand_all_entries`: single worktree
- `test_expand_all_entries_multiple_worktrees`: global expand across
worktrees
  - `test_expand_all_entries_via_window_dispatch`: action dispatch path
  - `test_per_worktree_expand`: expand only the clicked worktree
- `test_per_worktree_collapse`: collapse only the clicked worktree, keep
root visible
  - `test_expand_all_entries_with_auto_fold`: expand with auto_fold_dirs
- Ran `cargo test -p project_panel`: 106 pass

**Manual testing for reviewers:**

1. Open a project with nested directories and open the Project Panel
2. Right-click a root entry, confirm "Expand All" and "Collapse All"
appear
   with their keybinding hints (`⌘→` / `⌘←`)
3. Right-click a subfolder, confirm "Expand All" and "Collapse All"
appear
4. Click "Expand All" on a subfolder, confirm only that folder's subtree
expands
5. Click "Collapse All", confirm children collapse but the root stays
visible
6. Open a multi-folder workspace. Right-click the second root and click
   "Expand All", confirm only that folder expands
7. Press `cmd-right` (or `ctrl-right`), confirm all worktrees expand
globally

Tested on macOS only. Linux and Windows should behave the same since
there
is no platform-specific code.

## 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/adc501d7-8e3a-4687-aef0-dc00426d232d

---

Release Notes:

- Added `Expand All` and `Collapse All` to the project panel right-click
  context menu with keybinding hints.
- Added `cmd-right` / `ctrl-right` keybinding to expand all entries.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 17:44:41 +00:00
Florentin DUBOIS d412fb10d7 terminal: Fix procfs file descriptor leak in PTY process tracking (#58683)
Closes #58651

## Problem

On Linux, long-lived Zed sessions accumulate thousands of open procfs
handles (`/proc/<pid>/stat`, `/proc/<pid>/task/<tid>/stat`). A degraded
6-hour session was measured holding **9,675 FDs, 97% of them
never-closed procfs stat handles**, alongside system-wide clipboard
breakage (Wayland clipboard `send()` stretching from 13 ms to ~17 s,
which makes every other client abort the paste).

The leak comes from `PtyProcessInfo` in
`crates/terminal/src/pty_info.rs`, through three interacting sysinfo
0.37 behaviors:

1. **Hidden full-system snapshot per terminal.**
`System::new_with_specifics(RefreshKind::nothing().with_processes(…))`
immediately refreshes **all** processes. Each refreshed process gets a
`Process` entry that caches an **open `/proc/<pid>/stat` file** for the
lifetime of the entry (a documented sysinfo optimization).
2. **Task enumeration is opt-out.** `ProcessRefreshKind::nothing()`
keeps `tasks: true`, so that constructor snapshot also creates one entry
— and one open `/proc/<pid>/task/<tid>/stat` — **per thread on the
machine**, per terminal.
3. **No eviction outside the refreshed set.** The recurring refresh uses
`ProcessesToUpdate::Some(&[foreground_pid])`; sysinfo's dead-process
sweep only visits pids in that list. Every former foreground process
(one per command the user runs) therefore stays in the map forever,
pinning its FD.

sysinfo silently raises `RLIMIT_NOFILE` and budgets half of it (~262k)
for this cache, so the process never hits `EMFILE` — it just degrades.

Reproduction (standalone, sysinfo 0.37.2, Fedora 44): constructing one
`System` the way `PtyProcessInfo::new` does instantly retains **3,566
FDs**; each simulated shell command leaks one more, unbounded.

## Fix

All changes confined to `pty_info.rs`:

- `.without_tasks()` on the `ProcessRefreshKind` — eliminates the
per-thread handle class entirely.
- Replace the constructor's implicit all-process scan with
`System::new()` plus a refresh of just the spawned child, so
`kill_child_process()` still works before the first foreground refresh.
- Rebuild the `System` whenever the foreground pid changes, and refresh
`[foreground, child]` so the dead-process sweep can actually evict stale
entries. The map is now bounded at 2 entries per terminal.

With the fix, the same repro stays flat at ~6 FDs across arbitrary
command churn, and the foreground process info (name/cwd/argv for tab
titles) keeps working.

The regression test fails on `main` (3,747 retained entries on a desktop
system) and passes with the fix (≤ 2).

Note: the ~17 s clipboard `send()` on the degraded session is a coupled
symptom; the FD/process-map bloat is the verified defect fixed here. The
Wayland data-source lifecycle is tracked separately in #58446.

Release Notes:

- Fixed a file descriptor leak in terminal process tracking that
degraded long-running sessions on Linux, including system-wide clipboard
breakage ([#58651](https://github.com/zed-industries/zed/issues/58651)).

Signed-off-by: Florentin Dubois <florentin.dubois@clever.cloud>
2026-06-26 16:38:42 +00:00
Ben Kunkle aa0cfcd190 ep: Send V4 prediction requests (#59930)
# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

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

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

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

My super cool demos here

</details>

---

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-26 15:47:51 +00:00
c2ba335b29 Keep inline code pipes inside markdown table cells (#57744)
## Summary

Fixes markdown table rendering when inline code spans contain pipe
characters. Code such as `` `a|b` `` and `` `a||b` `` now stays in one
table cell instead of being split into extra columns.

## Why

Agent output and markdown previews can include regexes, shell snippets,
and other code spans with `|` characters inside tables. Before this
change, those pipes could be parsed as table delimiters even though they
were part of inline code.

## Changes

- Masks raw pipes only inside matched inline code spans before
`pulldown-cmark` parses tables.
- Restores rendered code-span text from the original source range,
including escaped table pipes.
- Avoids masking unmatched backticks, fenced code blocks, indented code
blocks, and invalid fence closers.
- Adds parser and renderer coverage for raw pipes, escaped pipes,
unmatched inline code, invalid fences, and code-span link callbacks.

Manual check: generated agent responses across multiple models render
tables containing `` `a|b` ``, `` `(a|b)` ``, and `` `a||b` `` as single
code-span cells rather than split columns.

## Screenshots / Recordings

| Before | After |
| --- | --- |
| <img width="702" height="532" alt="Before"
src="https://github.com/user-attachments/assets/f9b7606f-15d5-41bc-980c-5e26337f9be4">
| <img width="846" height="536" alt="After"
src="https://github.com/user-attachments/assets/60a7a9bf-8417-4146-ac37-0725dd8b4e3c">
|

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

Release Notes:

- Fixed markdown table rendering for inline code spans that contain pipe
characters.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-06-26 13:31:47 +00:00
3fab23b66d project_panel: Add markdown preview context menu item (#57112)
Opening a markdown file from the project panel used to require four
steps:
- click the file (opens raw editor)
- right-click the editor tab
- select "Open Markdown Preview"
- then close the raw editor tab

This PR shortcuts that to a single right-click (or keypress) from the
project panel.

Right-clicking a markdown file in the project panel now shows an **Open
Markdown Preview** option. Selecting it opens the rendered markdown
preview directly — no raw editor tab is left behind. The same shortcut
used in the editor (Cmd+Shift+V on macOS, Ctrl+Shift+V on Windows/Linux)
also works when focus is in the project panel.

## How it works

- **Context menu**: `OpenMarkdownPreview` action is registered and
surfaced in the right-click menu only for `.md`/`.markdown` files.
- **Keybinding**: `cmd-shift-v` / `ctrl-shift-v` bound to
`project_panel::OpenMarkdownPreview` in the `ProjectPanel` context,
mirroring the existing editor binding.
- **Loading**: The file is opened via `open_path_preview` with
`focus_item: false, activate: false`, so the raw editor is loaded into
the buffer system but never becomes the visible tab.
- **Preview construction**: `MarkdownPreviewView::create_markdown_view`
is called directly (no `dispatch_action` indirection, which would have
been deferred and caused a race). The preview is added to the active
pane and the raw editor tab is removed atomically in one synchronous
pane update.
- **Pre-existing tabs**: Before loading, all panes are checked for an
existing item at the file's project path. If the file is already open in
raw mode, `remove_item` is skipped — the existing tab is left untouched.

Release Notes:

- Added "Open Markdown Preview" context menu item to Project Panel
markdown entries.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-06-26 12:30:51 +00:00
Lukas Wirth a1a3122b2f gpui_windows: Add missing windows dependency feature (#59886)
https://github.com/zed-industries/zed/pull/59831 broke the crate from
compiling standalone

---

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-26 11:49:57 +00:00
Danilo Leal 9da8631c14 agent_ui: Refactor the queue feature and add steering ability (#59310)
Closes AI-367

This PR significantly refactors the queue feature so that we don't rely
on indexes being counted and synced across various state points of the
thread view. Instead, I'm introducing a dedicated message queue module
where we control through a stable queue entry ID all the states of a
given queued message.

Additionally, it's relevant to note that I changed the default behavior
of queued messages on this PR so that they get sent only at the end of
the generation. This makes the out-of-the-box, default behavior of the
feature consistent across the native and external agents, given we never
could pull off the feature with the latter. I personally never liked
that behavior anyway, but I do appreciate how some people do. Because of
that, though, for the Zed agent, a "Steer" toggle button is available
for whenever you'd like to signal that a queued message should be sent
at the turn boundary. This is not a setting, though; decided to go
simpler at this moment. It's something you can choose on a per-message
basis.

Ultimately, I think this implementation makes the overall shape of the
feature much more stable and easier to maintain overtime.

Release Notes:

- Agent: Changed the default behavior of queued messages for the Zed
agent so that they get send at the end of the generation. The ability to
steer them (i.e., send the message at the end of a turn boundary) is
still possible to be toggled.
2026-06-26 11:45:58 +00:00
Finn Evers 4a0537bc52 editor: Fix grammar in comment (#59951)
This is less of an actual fix as more something to test some GitHub
stuff with.

Release Notes:

- N/A
2026-06-26 11:42:56 +00:00
Tom Houlé 8d21284fbb language_models: Surface disabled cloud models (#59781)
Extends the support for disabled model state introduced in
https://github.com/zed-industries/zed/pull/59606 to Zed Cloud hosted
models.

Release Notes:

- N/A
2026-06-26 11:07:29 +00:00
David AlecrimandSmit Barmase 4306847359 markdown_preview: Add font size settings and actions (#55489)
Add support for scaling the Markdown preview's body text and headings
with `cmd-=` / `cmd--` / `cmd-0`. Previously these shortcuts only
resized code blocks because the preview's body used `ui_font_size` and
headings used a rem-based scale anchored to it, while the keybindings
only mutated `BufferFontSize`.

The preview's scroll subtree is now wrapped in
`WithRemSize(buffer_font_size)`, so `1rem` resolves to the buffer font
size inside the preview. Body text, headings
(`text_3xl`/`text_2xl`/...), and rem-based spacing all scale together.
The outer focus root and scrollbar remain at the UI font size.

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

Release Notes:

- Added `markdown_preview_font_size` setting and actions to scale
Markdown preview font size separately from the editor.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-06-26 05:12:59 +00:00
mTvare fea22b3934 gpui: Fix xdg_toplevel app_id set to None at first commit on Wayland (#55583)
This PR fixes the default behaviour of setting `app_id` to `None` which
breaks the rules based management by KWin as the first commit doesn't
have the actual `app_id` and apply initially setting stops checking for
the window by when it updates.

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

Release Notes:

- Fixed KWin not respecting Zed's rules due to mismatch of toplevel
app_id at startup
2026-06-25 20:10:31 +00:00
Ben Kunkle ae0b7cae37 Fix navigating to Collab URLs not working when not connected (#59652)
# Objective

- Fix collab channel links opened from URL actions or the CLI when Zed
is signed in but not currently connected to the collab server.

## Solution

- Connect to collab before handling channel joins or channel notes
links.
- Keep downstream errors visible if connecting or opening still fails.

## Self-Review Checklist:

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

---

Release Notes:

- Fixed opening collab links when Zed is not already connected to the
collaboration server.
2026-06-25 20:05:56 +00:00
Anthony Eid f8d286c2a7 Fix delayed titlebar clicks on macOS 27 Beta (#59836)
## Summary

macOS 27 Beta delays clicks in titlebar regions while AppKit determines
whether a gesture should become a drag, single click, or double click.
Zed's main workspace windows render a custom titlebar that already
handles window movement via `Window::start_window_move`, so they do not
need AppKit's native movable-titlebar behavior.

This sets `is_movable` to `false` for the main `MultiWorkspace` windows
and documents the `WindowOptions::is_movable` caveat for GPUI users with
custom titlebars.

## Background

The previous fix for this, #58947, used AppKit's private
`_opaqueRectForWindowMoveWhenInTitlebar` SPI to mark GPUI's full-size
content view as app-owned titlebar content. That fixed delayed titlebar
clicks, but was later reverted in #59214 because it also affected
windows that rely on AppKit's native titlebar dragging, like the
settings window.

This PR takes a narrower approach by only changing Zed's main
custom-titlebar windows. Those windows already implement dragging
explicitly via `Window::start_window_move`, so disabling AppKit's native
movable-titlebar behavior fixes the macOS 27 Beta click delay without
affecting other window types.

Release Notes:

- Fixed delayed clicks in the custom titlebar on macOS 27 Beta.
2026-06-25 18:25:41 +00:00
Peter TrippandBen Kunkle 403c714b5e Update bundled JSON schemas (2026-04-29) (#58948)
./script/update-json-schemas 16c22767

- Improved `script/update-json-schemas`
  - Fix paths to match new locations of schemas
  - Add support for specifying an explicit commit
  - Use sed to replace `json.` links with `www.` in schemas
- Updated JSON schemas to
[SchemaStore/schemastore@16c2276](https://github.com/SchemaStore/schemastore/tree/16c227677c1cb71864593f63382705e8c7390810)
(2026-04-29; last updated 2025-02-28)
-
[tsconfig.json](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/tsconfig.json)
@
[16c2276](https://raw.githubusercontent.com/SchemaStore/schemastore/16c227677c1cb71864593f63382705e8c7390810/src/schemas/json/tsconfig.json)
-
[changes](https://github.com/SchemaStore/schemastore/commits/16c227677c1cb71864593f63382705e8c7390810/src/schemas/json/tsconfig.json)
-
[package.json](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/package.json)
@
[16c2276](https://raw.githubusercontent.com/SchemaStore/schemastore/16c227677c1cb71864593f63382705e8c7390810/src/schemas/json/package.json)
-
[changes](https://github.com/SchemaStore/schemastore/commits/16c227677c1cb71864593f63382705e8c7390810/src/schemas/json/package.json)
- Updates tsconfig.json to support ES2025 stuff.
- Updates package.json to support `nodemonConfig`

Note, this is pinned to an old commit
(https://github.com/SchemaStore/schemastore/commit/16c22767) because
anything after https://github.com/SchemaStore/schemastore/pull/5631 will
result in errors for all referenced schemas in package.json. This occurs
as they are all now relative links, which cannot be resolved for the
schema injected via config. This is also a hint that the current method
of bundling of package.json schema in practice triggers json-language
fetching 8 other nested schemas. Probably worth revisiting that.

CC: @probably-neb as someone who recently worked on the schemastore
stuff.

Self-Review Checklist:

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

Release Notes:

- Update bundled tsconfig.json and package.json schemas

---------

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2026-06-25 17:30:12 +00:00
Zax71andTom Houlé 5824dca06e gpui_linux: Improve error message when X11 and Wayland feature flags are missing (#58685)
Improves `gpui_linux` error messages for missing feature flags.
Currently, you'd need to look at the source & Rust backtrace to diagnose
the error shown when the feature flags are missing.

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:

- Improve `gpui_linux` error messages for missing feature flags

---------

Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-06-25 16:28:21 +00:00
Ben Brandt 51f53b2c82 acp: Update to Rust SDK 1.0.0 (#59889)
Sticking to a pinned version because we use the unstable feature set

Release Notes:

- N/A
2026-06-25 16:03:28 +00:00
mengh04 3f1d8a706a markdown: Fix example crash on Linux (#58406)
markdown: Fix example crash on Linux by enabling wayland/x11 features

   The markdown example panics with `unreachable!()` on Linux because
   `gpui_platform`'s default features are empty, and the example doesn't
   explicitly enable `wayland` or `x11`.

Release Notes:

- N/A
2026-06-25 15:46:39 +00:00
Vlad Ionescu c0f6d84238 ai: Add Max reasoning effort (#59806)
# Objective

More and more models are supporting the `max` reasoning effort (DeepSeek
V4, GLM 5.2, etc) and that was missing from Zed.

## Solution

Added `ReasoningEffort::Max` level and implemented support for that
across providers. For most providers this is a no-op as they don't
support that (`max` is missing from `supported_reasoning_levels()`) but
for some providers this required tiny changes: for OpenCode there is now
a proper difference between `xhigh` and `max` (this bug was actually
what triggered this whole PR) and for DeepSeek reasoning levels were
migrated from a custom `deepseek::ReasoningEffort`.

## Testing

Tested and confirmed working with a simple _"rename this variable for
me. add a function. delete the function"_ test across a few providers
(OpenCode, GitHub Copilot, and DeepSeek).

## Self-Review Checklist:

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

## Showcase

N/A

---

Release Notes:

- OpenAI-compatible: added support for `max` reasoning levels
- OpenCode: added support for `max` reasoning levels
2026-06-25 14:47:28 +00:00
Yara 🏳️‍⚧️ 6e8b0ae150 Add picker label to GitHub community PR board automation (#59905)
Release Notes:

- N/A
2026-06-25 14:18:47 +00:00
Ben KunkleandNbarry 6b5193dd54 zeta_prompt: Add V4 edit prediction API types (#59869)
# Objective

Part of EP-10
Closes EP-118

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

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

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

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

My super cool demos here

</details>

---

Release Notes:

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

Co-authored-by: Nbarry <nbarry@zed.dev>
2026-06-25 14:07:41 +00:00
DamonXueandDanilo Leal b0e59a8ff5 agent: Truncate display name using grapheme clusters in config option selector (#59898)
This pull request updates how long configuration option names are
displayed in the UI to better handle Unicode characters, ensuring that
names are truncated by grapheme clusters (user-perceived characters)
rather than bytes or code points. This prevents visual glitches with
multi-codepoint characters like emojis or accented letters. The main
changes are:

**Unicode handling improvements:**

* Added the `unicode-segmentation` crate as a workspace dependency in
`Cargo.toml` to support grapheme-aware string operations.
* Updated import statements in `config_options.rs` to include
`unicode_segmentation::UnicodeSegmentation`.

**UI display logic:**

* Changed the truncation logic for configuration option display names in
`ConfigOptionSelector` to use `.graphemes(true).take(32)` instead of
slicing bytes, ensuring proper handling of Unicode graphemes.

--- 

Release Notes:

- Agent: Made label truncation of configuration options in the agent
panel more robust against non-single-byte characters like emojis and
others.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-06-25 13:44:22 +00:00
he-thinks b73b50c731 terminal: Swap right and middle mouse button mappings (#59844)
# Objective

`MouseButton::Right` was mapped to `MouseButtonCode::MiddleButton` and
vice versa, causing right-click and middle-click to behave as each other
in the terminal.

## Solution

Swapped the two arms of the match expression in
`crates/terminal/src/mappings/mouse.rs`.

## Testing

Tested manually: opened a terminal pane, verified that right-click and
middle-click now produce the correct events.

Tested on: Windows

## Self-Review Checklist:

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

---

Release Notes:

- Fixed right-click and middle-click being swapped in the terminal.
2026-06-25 13:24:07 +00:00
ozacodandozacod c8522e6d52 text_finder: Open match on the right column (#59840)
## Summary

When opening a result from the text finder navigate to the exact match
position the same way project search already does. Previously the text
finder opened the file at the start of the matched line, while project
search lands the cursor on the start of the match (correct line and
column).

## Solution
  
`go_to_singleton_buffer_point` now uses
`SearchMatch::relative_range.start `as the column instead of 0.

## Testing

- Manual: search in the text finder → open a result whose match starts
mid-line → cursor lands on the start of the match. Verified for both
opening in the current pane and opening in a split.

Release Notes:

- Improved text finder to open files at the matched column

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
2026-06-25 13:21:52 +00:00
Dino 127ea4a6b1 git_panel: Focus back on commit editor when expanded (#59901)
Update the focus handle returned by the `GitPanel::focus_handle` method
in order to ensure that, if the commit editor is currently expanded,
using the `git_panel::ToggleFocus` action will correctly focus back on
the expanded editor, rather than on the panel.

# Objective

When using the expanded commit editor, if one focuses away from the
panel and then uses the `git panel: toggle focus` action in order to
focus back on the panel, the focus will land on the panel, which is now
being rendered behind the commit editor.

## Solution

Update the focus handle returned by the `GitPanel` to take into
consideration whether the commit editor is expanded and, in that case,
return the editor's focus handle instead.

## Testing

Tested both manually as well as through a newly introduced test –
`git_ui::git_panel::tests::test_focus_handle`.

## Self-Review Checklist:

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

## Showcase

<details>
  <summary>Before</summary>


https://github.com/user-attachments/assets/0e2647f3-2835-485f-8f01-2128d2de6b8e
</details>

<details>
  <summary>After</summary>


https://github.com/user-attachments/assets/cc77fae7-e76c-4389-82b0-f4e7ec8258d7
</details>

---

Release Notes:

- Fixed `git panel: toggle focus` to focus back on the commit editor in
case it is expanded.
2026-06-25 13:18:47 +00:00
Xiaobo LiuandDanilo Leal 9f6279c616 git_ui: Disable remote button during operations (#59874)
# Objective

This change prevents users from starting multiple Git remote operations
at the same time from the Git panel. Fetch, pull, and push can take
time, may prompt for credentials, and can update shared repository
state, so allowing repeated clicks can create duplicated work, confusing
UI feedback, or overlapping Git commands.


## Solution

The panel now records when a remote operation is in progress, disables
the main remote action button, and shows a clear tooltip such as “Push
in progress.” When the async task exits, the state is cleared and the
button is re-enabled. This keeps the UI aligned with the operation
lifecycle and makes repeated clicks harmless.

---

Release Notes:

- Git: Improved performance by not allowing multiple remote Git
operation to start at the same time.

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-06-25 13:17:06 +00:00
94f81acf87 agent_ui: Show base name for duplicate file mentions in the Agent Panel (#59845)
# Objective

- Fixes #59654

When the same file was added as a mention more than once in the Agent
Panel,
the label would expand to the full absolute path instead of staying at
the
base filename.

Before

<img width="734" height="438" alt="Screenshot 2026-06-24 at 11 19 30 AM"
src="https://github.com/user-attachments/assets/94450eef-088a-49aa-97d3-80d6dd06925b"
/>

## Solution

The algorithm in `compute_disambiguation_details` treats two
entries with the same URI as a "collision" and tries to resolve it by
adding
more parent path components. Since the paths are identical it can never
succeed and keeps escalating to the full path.

Fix by deduplicating URIs via a `HashSet` before passing them to
`compute_disambiguation_details`, so identical mentions share a single
entry
and are never flagged as collisions.

## Testing

Reproduced by opening the Agent Panel, adding the same file as a mention
twice, and observing the label. Before: label showed the full absolute
path.
After: label stays at the base filename.

Tested on macOS.

After

<img width="638" height="215" alt="Screenshot 2026-06-24 at 11 20 09 AM"
src="https://github.com/user-attachments/assets/5acac2bd-d5a3-41c4-827c-84ccdc3a064d"
/>


## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability

---

Release Notes:

- Fixed duplicate file mentions in the Agent Panel showing the full
absolute
  path instead of the base filename.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-06-25 12:26:56 +00:00
sollniss c76594af82 go: Highlight predeclared types and built-in functions (#59780)
Tag Go's universe-scope identifiers as @type.builtin and
@function.builtin, matching Rust, TypeScript, and Python grammars (and
upstream tree-sitter-go / nvim-treesitter / Helix). Themes already style
these captures, so Go was the only major language not distinguishing
built-ins.

# Objective

Adds support for `@type.builtin` and `@function.builtin` targeted syntax
highlighting.

## Solution

Defined builtin functions and types in Go's highlights.scm.

## Testing

All screenshots are with `"semantic_tokens": "off"`. Built with
`--release` flag.

Before
<img width="591" height="619" alt="Screenshot_2026-06-24_03-15-56"
src="https://github.com/user-attachments/assets/996e48a0-4e46-45fa-a8fd-ff64820e58ac"
/>

<img width="591" height="619" alt="Screenshot_2026-06-24_03-15-11"
src="https://github.com/user-attachments/assets/b875c02b-80eb-4a4c-b9df-341ffd29ee5c"
/>

After

<img width="591" height="650" alt="Screenshot_2026-06-24_03-17-08"
src="https://github.com/user-attachments/assets/fca72a77-6359-4bb5-916e-a2e6e8b5c539"
/>

<img width="591" height="650" alt="Screenshot_2026-06-24_03-17-44"
src="https://github.com/user-attachments/assets/48a983ec-743c-4edc-abf3-915a759b2b23"
/>

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] 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:

- go: Add support for highlighting builtin types and functions
2026-06-25 11:03:44 +00:00
Yara 🏳️‍⚧️ 2f516d913a Fix recent projects footer overflowing (#59891)
The width of the recent projects picker was set too small. When
selecting an item that is already opened an additional action (remove
current window) appears that overflows. This sets the width such that
that no longer occurs.

fixes: #59847

Release Notes:

- N/A (bug on preview only)
2026-06-25 10:56:11 +00:00
Ben Kunkle 0227e83849 ep: Batch settled edit prediction telemetry (#59857)
# Objective

Closes EP-78

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

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

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

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

My super cool demos here

</details>

---

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-25 01:32:40 +00:00
60c6fd3690 ep: Hashed region format (#59837)
# Objective

Closes EP-9

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, use "Fixes #X" for each issue as
[described in the GitHub
docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).

## Solution

- Describe the solution used to achieve the objective above.

## Testing

- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

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

> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.

- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!

While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:

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

My super cool demos here

</details>

---

Release Notes:

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

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
2026-06-24 23:28:47 +00:00
Sathwik Chirivelli acd55213d1 solo_diff_view: Add git action to open file diff and other improvements (#59752)
# Objective

- Polish the solo diff review UI by reducing redundant controls and
hiding inactive fold controls in split diff views.

## Solution

- Collapse the solo diff header's `Stage File` / `Unstage File` actions
into one button that shows the action relevant to the file's current
staging state.
- Stop reserving fold gutter space and rendering fold crease toggles for
editors with companion snapshots, matching the existing LHS split diff
behavior.

## Testing

- `cargo fmt --check`
- `cargo check -p git_ui`

## Self-Review Checklist:

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

## Showcase

Before, the solo diff header showed both file-level staging actions at
once, and the RHS split diff gutter could show fold arrows that did not
work in that view. After this change, the header shows the relevant
file-level staging action and split companion panes no longer show
inactive fold controls.

Release Notes:

- Improved solo diff controls by showing the relevant file staging
action and hiding inactive fold toggles in split diffs.
2026-06-24 23:03:50 +00:00
liamandFinn Evers 6fbec96adb extension_host: Sync language extensions to remotes (#56487)
Resolves #56068

Remote extension sync previously only sent extensions that can run
remotely: language servers, debug adapters, and debug locators. That
excluded language-only extensions such as TOML, so a remote session
could have Tombi synced and loaded while the remote language registry
still lacked TOML's language definition.

This diff keeps the remote sync set narrow: it starts from extensions
that can run remotely, then adds the extension that defines each
language referenced by those extensions' language servers. This installs
the TOML language config alongside Tombi without syncing unrelated
language-only extensions, allowing project settings schemas to recognize
language names like TOML and allowing remote language servers to attach
to buffers whose language is provided by a separate extension.

Release Notes:

- Fixed remote sessions failing to recognize languages provided by
language-only extensions.

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>
2026-06-24 21:32:43 +00:00
Agus Zubiaga e85a546880 gpui: Add system wake callback (#59831)
# Objective

GPUI apps currently don't have a cross-platform way to react when the
system wakes from sleep.

## Solution

Add `Application::on_system_wake`, backed by platform hooks for macOS,
Windows, and Linux. The platform listeners are registered lazily once an
app installs a wake callback.

## Testing

- N/A

## Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-24 19:59:34 +00:00
ozacodandozacod 79039f93d7 picker: Fix layout persistency with preview setting change (#59827)
## Summary

When you change a picker's preview position (toggle it, or set it
right/below/hidden), that choice should be remembered the next time the
picker opens. Previously it wasn't: the last-used layout was only
written to the database as a side effect of
`store_shape_for_this_layout`, which runs exclusively when a resize
completes (`render.rs`). So changing only the preview position without
also dragging to resize, was forgotten on the next open.

All layout changes funnel through a single chokepoint,
`set_preview_layout`, but it only updated the in-memory `preview.layout`
and reloaded the per-layout shape; it never persisted the layout key.

## Solution

`set_preview_layout` now persists the layout immediately via a new
`store_last_layout` helper, which writes just the
`LAST_PREVIEW_LAYOUT` key — deliberately without writing the current
shape, so a never-resized layout's default size isn't frozen into the
database as if the user had chosen it.

  Both persistence paths are now correct:
  - Resize completes — saves size and layout (unchanged).
- Position-only change (toggle / set right / set below / set hidden)
saves the layout right away.

This applies to every picker with a preview (file finder, text finder),
since the persistence is keyed generically by the picker delegate name.

## Testing

- Manual: open the file and text finder → switch the preview to Below
(or Right) without resizing → close and reopen → it returns in that
position; hide the preview → reopen → it stays hidden. Resizing still
persists size as before.

Release Notes:

- Fixed picker preview position not being remembered when changed
without resizing the picker

---------

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
2026-06-24 17:19:23 +00:00