Commit Graph
38611 Commits
Author SHA1 Message Date
Finn Evers 9c02d74cac docs: Improve documentation around MCP servers (#59380)
Release Notes:

- N/A
2026-06-23 08:03:24 +00:00
Finn Evers 031b6c1eb2 Make adding a remote MCP server more discoverable (#59359)
# Objective

The reasoning for this is that it is currently rather hard to find the
option to add a remote MCP in the app - there is no hint that this is
supported and (without using the command palette) requires up to 5
clicks before the proper modal is shown.

The idea for this here is to make adding a remote server the default and
also make it more visibile throughout the app - the `AddContextServer`
action will now default to remote and this also adds two context menu
entries to directly open the modal with the remote option preselected.

Open for feedback - I admit this might not be the most optiomal
solution, but at least it surfaces the availablilty better and
(hopefully) makes adding these easier.

Release Notes:

- Added an entry to the agent panel options menu to quickly add a remote
MCP server
2026-06-23 08:01:19 +00:00
Lukas Wirth 42edf2fea1 Implement telemetry for the remote server (#59692)
# Objective

Telemetry events generated **on a remote server** were silently dropped,
and all remote telemetry that *was* reported got attributed to the local
client's OS.

## Solution

This PR makes server-originated events flow to the telemetry pipeline
and attributes them to the actual remote host (connection type, OS,
version, architecture), plus adds a transport-agnostic connection event.

## Additional Notes

This removes the "SSH Project Opened" event and replaces it with a
"Remote Connection Established" one that has more structured info and is
also more useful in where it gets invoked.

The server unconditionally sends back telemetry to the client, the
client is then responsible for filtering on whether telemetry is enabled
by the user or not as the server does not have knowledge of those
settings itself.

Release Notes:

- N/A
2026-06-23 05:53:33 +00:00
Sam Trouy 21e3b7ecb6 agent_ui: Fix padding for editor (#59735)
# Objective

Fixes #59498 

Original issue mentioned problem with the alignment of text entered into
the agent editor compared with the thread title when in full expanded
mode. I was able to reproduce issue both in expanded mode and also when
resizing while not in expanded mode by dragging panel wide enough. After
more investigation, it seemed that all of the contents within the editor
(text entered, bottom row of elements) were not properly aligned on both
the left and right sides with other content in the agent panel.

## Solution

Moved horizontal padding to inner div that uses `max_content_width` in
`render_message_editor` so that it is calculated as expected as part of
the max width of the content.

- Dropped horizontal padding, keep vertical padding on outer `h_flex`
div. Changed `.p_2()` to `.py_2()` here .
- Added horizontal padding back to first child `v_flex` div that uses
`max_content_width`. Added `.px_2()` here.

After changes, elements within the editor are aligned on both the left
and right sides with the messages within the message history and the
contents of the title bar.

## Testing

I tested the fix on Linux visually, no tests were added due to the small
amount of changes and the strictly visual nature of the issue.

<details>
   <summary>Self-Review Checklist</summary>

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments (**no unsafe
blocks added**)
- [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 (**no tests added**)
- [x] Performance impact has been considered and is acceptable

</details>

## Showcase

<details>
  <summary>Before/After empty convo</summary>

### Before

<img width="946" height="551" alt="before-maximized"
src="https://github.com/user-attachments/assets/27805f8c-9a04-40b3-a808-5dc3a548a0b8"
/>

### After

<img width="948" height="554" alt="after-maximized"
src="https://github.com/user-attachments/assets/4f557aa8-d8ce-44c4-8278-35df203ca434"
/>

</details>

<details>
  <summary>Before/After existing convo</summary>

### Before

<img width="950" height="555" alt="before-with-convo"
src="https://github.com/user-attachments/assets/82ea6b04-bca7-48fd-ab11-3414855afec8"
/>

### After

<img width="950" height="555" alt="after-with-convo"
src="https://github.com/user-attachments/assets/2f2f394a-6d78-4650-9ddf-e760841a2635"
/>

</details>


## Note

- A similar issue also seems to apply to the activity bar within
`render_activity_bar`, but it's less jarring, and this is also my first
PR, so I'm leaving it alone.

---

Release Notes:

- N/A
2026-06-22 23:59:22 +00:00
Ben Kunkle b9fb089b44 edit_prediction: Remove diagnostic-triggered jumps (#59724)
# Objective

- Simplify edit prediction jumps enough to re-enable the staff flag.
- Defer diagnostic-triggered jump refreshes until we know we need them.

## Solution

- Remove the diagnostic refresh trigger path and its supporting state.
- Keep jumps driven by ordinary prediction requests only.

## Testing

- Not run.

## 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-22 21:22:15 +00:00
MartinYe1234 92e767df07 Refine agent terminal sandbox off-switch and expand WSL env blocklist (#59520)
Follow-ups to the recently-landed agent terminal sandboxing work.

- Make the persistent "Allow Unsandboxed Terminal Commands" setting
(`allow_unsandboxed`) the single off-switch for the agent terminal
sandbox: when enabled, the sandboxed terminal tool isn't exposed and the
system prompt omits the sandbox section, so the model uses the plain
`terminal` tool (and on Windows, WSL sandbox setup is skipped). This
removes the dead, unwired `disabled` setting that was meant to do the
same thing but had no UI, writer, or docs. Per-command and per-thread
`unsandboxed: true` grants are unchanged.
- Expand the blocklist of Windows-specific environment variables that
aren't forwarded into the WSL sandbox (system locations, `HOME`/profile
paths, host/session identity, CPU descriptors, etc.) so they can't
shadow or break Linux commands. It stays a blocklist, so portable
variables like `LANG` still reach the command.

Release Notes:

- N/A
2026-06-22 21:14:30 +00:00
Danilo Leal 7c395d9dbc Restore keyboard navigation for Remote Projects modal (#59336)
Recently realized that the Remote Projects default view isn't keyboard
navigable anymore: arrow keys up and down to navigate through the list
don't work. So, this PR makes that state of the view use a picker, which
gives us a bunch of these search + nav stuff for free. Ended up also
doing some light changes to the UI so it's more consistent with any
other picker in the app thus far. All other views of the multi-flow
modal are untouched.

Release Notes:

- Fixed a bug where the Remote Projects modal wasn't keyboard navigable
anymore.
2026-06-22 21:11:40 +00:00
guopenghuiandYara 🏳️‍⚧️ 9079f2fa95 Add named bookmark support (#57491)
Adds support for named bookmarks while preserving the existing unnamed
bookmark workflow.

Main changes:
- Keeps `ToggleBookmark` as the quick unnamed bookmark action.
- Adds `ToggleNamedBookmark`, which prompts for a bookmark name when
adding a new bookmark and removes an existing bookmark on the same line,
including unnamed ones.
- Adds `EditBookmark` support for renaming existing bookmarks.
- Persists bookmark names in workspace storage.
- Adds a project bookmarks picker that supports filtering by bookmark
name and relative path, with highlighted matches.
- Updates bookmark storage and tests to carry bookmark names through
serialization, restoration, navigation, and project-level listing.

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

Video
toggle:


https://github.com/user-attachments/assets/a725b9cf-ac37-4ebc-85cc-ee820452c043

rename:


https://github.com/user-attachments/assets/a6d0d0c1-511b-4fb7-ae5d-22c55d1a075f


Release Notes:

- Add named bookmark support

---------

Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
2026-06-22 20:47:44 +00:00
Jiby Jose 515042eb4d Fix compaction happening too early for chatgpt_subscribed (#59686)
# Objective
 
Fixes auto-compaction for ChatGPT Subscription / Codex-backed GPT models
by treating the Codex `context_window` as the usable context budget
instead of reserving an inferred `128k` output budget.
 
- Fixes #59555 

## Solution

Zed previously reported `max_output_tokens = 128_000` for
`openai_subscribed` models. Generic agent code subtracts
`max_output_tokens` from `max_token_count` when computing the effective
input budget, so `openai_subscribed` models ended up with:

- `max_token_count = 272_000`
- `max_output_tokens = 128_000`
- effective compaction budget = `144_000`
- default `90%` threshold = `129_600`

## Testing

Tested with a heavy prompt to confirm that the auto compaction is indeed
now triggered at 90% (default)

<img width="385" height="183" alt="image"
src="https://github.com/user-attachments/assets/da569152-f687-4366-868a-a6559b948ce5"
/>

This made Zed compact around the halfway point of the actual Codex
context window.

Codex model metadata exposes `context_window = 272000` and does not
expose a `max_output_tokens` cap. Codex also compacts against the
context window directly, rather than subtracting an output reservation.
The subscribed backend also rejects the `max_output_tokens` request
parameter, so Zed already omits it when serializing requests.

This change makes `openai_subscribed` report no known max output token
cap, which matches also that split token display is disabled for these
models.


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

- agent: Fix compaction happening too early when using the ChatGPT
subscription provider.
2026-06-22 19:34:16 +00:00
Conrad Irwin 47a653c38d install_cli: Show notification instead of failing CLI install (#59575)
Closes #10065
Closes #42293

Release Notes:

- Improved error handling and documentation when Zed cannot install the
CLI on macOS
2026-06-22 18:20:57 +00:00
Kunall Banerjee 3a3adc19d7 opencode: Model updates (#59236)
Fresh new updates from OpenCode dropped recently.

Closes #59225.

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

Release Notes:

- Added GLM 5.2 + Kimi K2.7 Code (OpenCode Go) and DeepSeek V4 Pro
(OpenCode Zen); removed/restricted models deprecated upstream (MiniMax
M3 Free removed; GLM 5, Kimi K2.5, MiniMax M2.5 now Zen-only)
2026-06-22 18:12:49 +00:00
Darshan SithanandMartin Ye 9d696a585c editor: Fix Python docstring formatting in hover popovers (#59480)
# Objective

Fixes #59426

Python (and possible others like JS/TS ) docstrings in hover popovers
currently have broken indentation and alignment. This happens because
markdown soft breaks (single newlines) are parsed and replaced with
spaces by default. This collapses multi-line Python docstrings into
single wraps, ruining code example layouts and line-wrapped formatting.

## Solution

Configure the `MarkdownStyle` returned by `hover_markdown_style` in
`crates/editor/src/hover_popover.rs` to treat soft breaks as hard breaks
(`soft_break_as_hard_break: true`). This ensures single newlines in
docstrings are preserved and rendered correctly in the hover popover.

## Testing

- Verified hover popovers locally on Python methods/classes to confirm
that multi-line docstring indentation and alignment are preserved.

## Self-Review Checklist:

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

---

Release Notes:

- Fixed Python and Markdown docstring formatting/alignment in hover
popovers.

---------

Co-authored-by: Martin Ye <martin@zed.dev>
2026-06-22 17:35:10 +00:00
Aleksei Gusevanddino c4103e5ad9 Add paragraph-based navigation to terminal's vi mode (#56038)
Alacritty has default keyboard shortcuts to navigate between paragraphs
in vi mode:

- shift-{: `ParagraphUp`
- shift-}: `ParagraphDown`

This change unlocks them to use in Zed's terminal. The keybindings can
be easily overridden via keymap.yml like that:

```yaml
{
    "context": "Terminal && vi_mode",
    "bindings": {
        "ctrl-up": ["terminal::SendKeystroke", "shift-{"],
        "ctrl-down": ["terminal::SendKeystroke", "shift-}"],
    }
}
```

Release Notes:

- Added support for navigating up or down paragraphs in the terminal,
when vim vi mode is enabled, with `shift-{` and `shift-}`, respectively.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-06-22 16:47:34 +00:00
Ben Kunkle 834b56642a ep: Combine settled and example capture (#58759)
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:

- N/A or Added/Fixed/Improved ...
2026-06-22 16:45:50 +00:00
Cameron Mcloughlin 3e9408a9f4 gpui: Bump resvg/usvg and regression test for panic (#59704)
Bumps resvg and usvg to fix a panic when rendering some complex mermaid
diagrams.

Closes FR-90

---

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-22 15:42:12 +00:00
EmilioandYara 🏳️‍⚧️ d76354bc45 vim: Fix out of scope insert line above (#55459)
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 #52588 

Release Notes:

- Fixed insert line above out of an scope

Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
2026-06-22 14:57:35 +00:00
5744486bff Add shell completions for CLI (#57440)
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
- [ ] ~~Performance impact has been considered and is acceptable~~

Release Notes:

- Added shell completions generation for CLI with `zed --completions
<SHELL>`

Co-authored-by: silvanshade <silvanshade@users.noreply.github.com>
Co-authored-by: Yara 🏳️‍⚧️ <git@yara.blue>
2026-06-22 14:57:34 +00:00
Danilo Leal 76be720c2f agent_ui: Close search when hitting escape from message editor (#59705)
This PR makes the search-closing behavior consistent with regular
buffers, where hitting escape when focused in the message editor will
close it (before it cancels the message). Also, made the whole search
bar height match the toolbar for perfect grid alignment.

Release Notes:

- Agent: Fixed the closing behavior of the in-thread search by enabling
`escape` to close it when focused in the message editor.
2026-06-22 13:42:14 +00:00
Finn Evers 5c4ac91ce9 Remove cherry-pick-bot config (#59703)
Although not listed on https://killedbygoogle.com/, the Google
cherry-pick bot was killed some time ago and we now use our own bot for
this. Thus we can safely remove the config here.

Also, fixes the shebang in the cherry-pick script.

Release Notes:

- N/A
2026-06-22 13:00:51 +00:00
Finn Evers 5a6c2c1467 Re-add section about extension API to CONTRIBUTING.md (#59702)
This was lost in https://github.com/zed-industries/zed/pull/58627

Release Notes:

- N/A
2026-06-22 12:55:51 +00:00
Danilo Leal 924be03fcf git_panel: Add some design tweaks (#59699)
Small things here: ensuring padding and responsiveness on the header is
good, make the global diff stat part of the "view diff" button, and
conditionally render the "sort by" filter section in the menu (no need
to render it if it's all disabled).

Release Notes:

- N/A
2026-06-22 12:35:20 +00:00
Nikolay Bukhalov 009ff37183 copilot_ui: Fix sign-in window floating above all applications (#59657)
The Copilot code verification window was opened with
`WindowKind::PopUp`,
which causes the window to float above all other applications.
Changed to `WindowKind::Normal` so it stays scoped to Zed.

Fixes #51043

Release Notes:

- Fixed Copilot sign-in window floating above all other applications
instead of being scoped to Zed
2026-06-22 12:29:02 +00:00
Tom Houlé 6fff3ce881 settings_ui: Fix env var name input for local MCPs (#59690)
I wanted to add env vars to a local MCP server from the settings UI, and
notices the variable name input does not work. This fixes it.

The key input was wrapped in `div().flex_1().min_w_0()` while the value
was rendered directly. A single-line editor asks for `width: 100%`,
which needs a parent with a definite width to resolve against;
`flex-basis: 0` together with `min-width: 0` collapses that width to
zero, and a zero-width editor paints no hitbox and so never receives
focus or input. Removing the wrapper so the key renders like the value
(matching the equivalent inputs on the external agents form) fixes it.
The key/value section is shared, so this also restores header editing
for remote servers, not just env vars for local ones.

Current Nightly:


https://github.com/user-attachments/assets/f6419785-69e4-482d-9cd5-3e60abafb431

This branch:


https://github.com/user-attachments/assets/b9a85be5-208c-4779-9b48-154f08c7fd04

Release Notes:

- N/A
2026-06-22 12:20:07 +00:00
Lena 94eb50724b CONTRIBUTING.md: Add links and cosmetic changes (#58627)
Release Notes:

- N/A
2026-06-22 11:53:57 +00:00
Ben Brandt f2e3f8c668 acp: Advertise model picker support to Cursor (#59694)
Fixes an issue where users couldn't see when fast mode was enabled

Release Notes:

- acp: Fix for Cursor agent only being able to use Fast mode with
Composer 2.5
2026-06-22 11:36:15 +00:00
Yara 🏳️‍⚧️ c84982260e Migrate missed pickers to new width system (#59693)
# Objective

- Fixes #59643.

## Problems

- Initial and minimum width was not migrated for all pickers.
- Some pickers had their width still determined by their wrapper. 
- Some pickers where not modals but did not have modal false set.

## Solution
- Migrate the pickers we missed.
- Remove the width being set on the div's wrapping the pickers.
- Set modal false on the missed pickers.

## Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-22 11:21:37 +00:00
Ben Brandt 37387b59ac acp: Update agent client protocol crate to 0.15.0 (#59593)
We finally have a cancellation mechanism to use! Made the non
side-effectful handlers stop their work if we get a cancel request
notification.

Release Notes:

- N/A
2026-06-22 09:04:29 +00:00
Charley WuandChristopher Biscardi 36a3813839 git_ui: Re-render Git Panel when language model registry updates (#59299)
Fixes the "Generate git commit message" wand button being permanently
disabled on startup. Subscribes the Git Panel to language model registry
events so that it automatically re-renders once the asynchronous model
fetches complete.

Closes #55451.

## Suggested .rules additions

### GPUI Views and Global State Registries

* If a view (like `GitPanel`) reads from a global state registry (like
`LanguageModelRegistry`) during rendering, it must subscribe/observe
that registry's events and call `cx.notify()` to re-render when the
state updates (such as when models finish loading asynchronously).

Release Notes:

- Fixed the git commit message generation button showing as permanently
disabled when models load after startup.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-06-22 03:29:08 +00:00
Nathan FiscalettiandChristopher Biscardi 5d777e9eab git_ui: Add setting to control default click behavior for git panel (#59649)
# Objective

The current behavior of the git panel is that when you click a file it
will open the multi-buffer view that shows all files with changes. If
you use CMD+Click or CTRL+Click, it will open the solo-file experience
where you only see the diff of the file you have selected. But, there is
no way to customize this behavior.

Related to:
https://github.com/zed-industries/zed/pull/56152#issuecomment-4641971669

## Solution

This MR adds a setting that allows you to customize the default click
behavior. The alternate behavior will always be accessible via CMD+Click
or CTRL+Click.

## 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 a setting to control default click behavior for git panel files

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-06-22 02:00:15 +00:00
Trong Nguyen 583fd90c37 git_ui: Search commits by hash (#59132)
## Summary

- Allows Git Graph search to match abbreviated or full commit hashes
when the query looks like a SHA.
- Keeps the existing message search behavior for non-hash queries.
- Mirrors the hash search heuristic in the fake git backend and adds
GPUI coverage for hash and message search.

<img width="1912" height="1241" alt="image"
src="https://github.com/user-attachments/assets/903b438e-baa8-4447-95dc-faf321bca6a5"
/>


## Test Plan

- `cargo fmt --check --package git_ui`
- `cargo -q test -p git_ui
test_git_graph_search_matches_commit_hash_prefix -- --nocapture`
- `./script/clippy -p git_ui`

## Suggested .rules additions

- N/A

Release Notes:

- Improved Git Graph search to find commits by abbreviated or full hash.
2026-06-22 00:37:28 +00:00
EugeneandChristopher Biscardi 373f4a1618 Git status list fix (#59155)
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

Closes #ISSUE

Issue:
- Create and/or modify several files.
- Go to GitPanel.
- Stage files you want to commit.
- Select last entry. You may select not last but make sure after list of
entries shrinks, your selection would be "out of visible list" after.
- Commit.
- Entries will be committed and disappear.
- But it seems like `selected_entry` is not updated (or updated
incorrectly) and Zed still have "hidden" selected entry of the last
selected entry. So you need to `Shift-g` (in vim mode) or some other
keybinding to select last entry manually. I used `k` multiple times
before I realized I can use `Shift-g` or `g g` -,-

Release Notes:

- Fixed: stale index (`selected_entry`) of git panel after .

Notes:
- I basically copied logic of function 1 line above but instead of
`first_entry` I used `last_etnry`. So... It should be harmless.
- I didn't find where selection logic is tested. I tried to do something
using `test_amend` as template, but... I'm afraid I won't be able to
understand if I'm using testing framework correctly.
- I couldn't make tests, but I tried to "test" by hand using something
like this:
<img width="358" height="487" alt="image"
src="https://github.com/user-attachments/assets/8575bdcc-f59b-44f2-99e3-fe663e5e61f1"
/>

Flat View seems like working fine, but Tree View has some "bugs" (if we
can call it like that) inherited. For example, if I stage selected file
and commit it, selection jumps to the `asdjfl` instead of the file right
under - `outer_file`. The same behavior in the current release.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-06-22 00:23:22 +00:00
Xiaobo Liu b44f12bd4b gpui: Fix web examples build (#59470)
# Objective

fix `cargo xtask web-examples --no-serve` error.

## Solution

Building GPUI web examples for wasm failed because gpui's ordinary
dev-dependencies were included in the wasm build graph. That pulled in
proptest's default fork/timeout support, which depends on wait-timeout.
wait-timeout does not support wasm32-unknown-unknown, so compilation
failed.

The a11y example also had a wasm_bindgen start function but was missing
the wasm no_main crate attribute, so Rust still expected a normal main
function and emitted E0601.

Move gpui's proptest dev-dependency behind the non-wasm target so web
example builds do not include native-only test timeout support. Add the
wasm no_main crate attribute to the a11y example.

Verified with:

```
cargo tree --target wasm32-unknown-unknown -p gpui -i wait-timeout
cargo xtask web-examples --no-serve
```

---

Release Notes:

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

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-06-22 00:19:08 +00:00
Sathwik ChirivelliandChristopher Biscardi 7e11793875 git_panel: Add Git actions in split button (#59608)
# Objective

Improve the Git panel changes header by making the Stage All / Unstage
All control more consistent with other split-button actions in the Git
panel, such as the Fetch/Pull button.

## Solution

- Replaced the standalone Stage All / Unstage All button with a split
button.
- Kept the primary action context-sensitive, switching between Stage All
and Unstage All.
- Moved related Git change actions into the split-button menu: staging,
stashing, discard tracked changes, and trash untracked files.

## Testing

- Ran `cargo fmt --check`.
- Ran `cargo check -p git_ui`.
- Manually verified the Git panel dropdown behavior in the app.

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

The Git panel changes header now uses a split button similar to the
Fetch/Pull control. The primary action updates between Stage All and
Unstage All, while the dropdown groups related Git actions.

when nothing is staged
<img width="359" height="245" alt="Screenshot 2026-06-19 at 11 01 44 PM"
src="https://github.com/user-attachments/assets/7fb7601f-8396-49c7-9d90-9f2e1706230a"
/>

when everything is staged already
<img width="360" height="219" alt="Screenshot 2026-06-19 at 11 01 52 PM"
src="https://github.com/user-attachments/assets/38ebebd9-09c2-4d24-aac3-6c4e22786ba5"
/>

rest of the menu options
<img width="385" height="294" alt="Screenshot 2026-06-19 at 11 01 59 PM"
src="https://github.com/user-attachments/assets/47393a17-78af-411c-9cb1-90781cf3a645"
/>


---


Release Notes:

- Improved Git panel change actions with a split-button menu.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-06-21 23:50:08 +00:00
Sathwik ChirivelliandChristopher Biscardi fdfc80ca83 git_panel: Add better view options (#59043)
Self-Review Checklist:

- [x] I have reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed UI standards
([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

## Summary

This updates the Git Panel view controls so the panel can independently
model:

- whether entries are shown as a list or tree
- whether flat entries are sorted by path or name
- whether entries are grouped by status or shown as one combined set

It also keeps the Project Diff order consistent with the Git Panel,
including tree ordering, status grouping, and flat name/path sorting.

## Why This Is Useful

The previous sort_by_path boolean overloaded two separate ideas: sorting
and grouping. That made it hard to represent the view users actually
wanted, especially a single tree where tracked and untracked files are
not split into separate sections.

This change replaces that boolean with explicit enum settings:

- git_panel.sort_by: path or name
- git_panel.group_by: none or status

That keeps the settings mutually exclusive, easier to extend, and closer
to the UI model.

## Implementation Notes

- Adds a dedicated Git Panel View Options menu using the sliders icon.
- Moves view, sort, and group controls out of the overflow actions menu.
- Disables sort options in tree view because tree order is folder-first
rather than pure path/name sorting.
- Removes the Tracked heading when grouping is disabled.
- Keeps Git Panel tree expansion state when switching view options.
- Recomputes Project Diff sort prefixes from tree_view, sort_by, and
group_by so diff cards follow the same top-to-bottom order as the Git
Panel.
- Preserves Project Diff open/closed file state across view option
changes by carrying fold state by repo path instead of by synthetic sort
key.
- Updates settings UI renderers and docs for the new enum settings.

## Testing

- [x] cargo fmt --package git_ui --package settings_ui
- [x] cargo check -p git_ui
- [x] Verified settings UI enum dropdown rendering for Git Panel
sort/group settings

Closes https://github.com/zed-industries/zed/issues/53555
Closes https://github.com/zed-industries/zed/issues/56039
Closes https://github.com/zed-industries/zed/issues/45438

Release Notes:

- Improved Git Panel view options and Project Diff ordering.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-06-21 22:36:42 +00:00
Ibrahim Khan b349620d65 settings_content: Make context server args optional (#59623)
# Objective

- Fixes #59614.
- A stdio `context_servers` entry defined with only a `command` (the
minimal form most MCP hosts accept, e.g. `{ "command": "echo" }`) fails
to deserialize. `ContextServerCommand.args` is a required field, so the
entry matches no variant of the untagged `ContextServerSettingsContent`;
the server silently never loads, and the only log line is the opaque
`data did not match any variant of untagged enum
ContextServerSettingsContent`. Other fields (`env`, `timeout`) are
already optional, and the docs only ever show `args` with a value
without stating it is required, so users reasonably assume it is
optional.

## Solution

- Add `#[serde(default)]` to `ContextServerCommand.args` in
`crates/settings_content/src/project.rs`, so it defaults to an empty
list when omitted, the same way `env` and `timeout` are already
optional. `{ "command": "echo" }` now defines a valid stdio server with
no arguments.

## Testing

- Added `test_stdio_context_server_without_args` in
`crates/settings_content/src/project.rs`, which deserializes `{
"command": "echo" }` (asserts empty `args`) and `{ "command": "echo",
"args": ["hello"] }` (regression guard).
- Fail-before/pass-after confirmed: without the change the new test
fails with the exact error from the issue; with it, `cargo test -p
settings_content` passes (24 passed, 0 failed).
- `cargo clippy -p settings_content --tests` and `cargo fmt -p
settings_content -- --check` are clean.
- serde-only change; platform-independent.

## Self-Review Checklist:

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

---

Release Notes:

- Fixed stdio MCP servers configured with only a `command` (no `args`)
failing to load.
2026-06-21 22:34:04 +00:00
Bennet Bo Fenner 84b7c81462 Revert "zed: Respect default_open_behavior when opening from Finder" (#59670)
Reverts zed-industries/zed#59551

Will re-land in #59661
2026-06-21 18:16:02 +00:00
Ben Kunkle bb807e1e3a ep: Track settled telemetry for empty predictions (#59645)
# Objective

## 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-20 22:40:15 +00:00
Ben Kunkle d8e04a57e0 ep: Limit diagnostic message token counts (#59644)
# Objective

Prevent unbounded ep request sizes

## Solution

Use same token limiting logic used for snippets, on diagnostic messages

## 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-20 20:57:43 +00:00
Ibrahim Khan 2d4ca03c24 docs: Fix incorrect default values (#59578)
# Objective

The settings reference documents three default values that no longer
match the shipped defaults in
[`assets/settings/default.json`](https://github.com/zed-industries/zed/blob/main/assets/settings/default.json):

- `line_indicator_format`: docs said `"short"`, actual default is
`"long"`
([`default.json:2643`](https://github.com/zed-industries/zed/blob/main/assets/settings/default.json#L2643);
the `LineIndicatorFormat` enum marks `Long` as `#[default]` in
[`crates/settings_content/src/settings_content.rs#L1094`](https://github.com/zed-industries/zed/blob/main/crates/settings_content/src/settings_content.rs#L1094)).
- `pane_split_direction_horizontal`: docs said `"up"`, actual default is
`"down"`
([`default.json:90`](https://github.com/zed-industries/zed/blob/main/assets/settings/default.json#L90)).
- `pane_split_direction_vertical`: docs said `"left"`, actual default is
`"right"`
([`default.json:92`](https://github.com/zed-industries/zed/blob/main/assets/settings/default.json#L92)).

The pane split defaults were changed in #36101 ("Change default pane
split directions"), which updated `default.json` but not the docs.

## Solution

Update the three `- Default:` values in
`docs/src/reference/all-settings.md` to match
`assets/settings/default.json`. The runtime honors these `default.json`
values (e.g.
[`crates/workspace/src/workspace_settings.rs`](https://github.com/zed-industries/zed/blob/main/crates/workspace/src/workspace_settings.rs#L98)
`.unwrap()`s the pane split options supplied by `default.json`).

## Testing

- `cd docs && npx prettier --check src/reference/all-settings.md`
passes.
- Verified each documented default now matches
`assets/settings/default.json`.

## Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-20 10:23:56 +00:00
Anthony Eid 4f38066f5b Fix CI error from linux case insensitive path (#59624)
CI failed to build Linux because of my recent FS watcher fix, so I
commented out the libc code and defaulted to false. In a follow up PR I
will fix this

## Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-19 22:49:34 +00:00
Anthony Eid 1f495c3885 Fix picker preview for matches far down in files (#59621)
Fixes picker previews for matches far down in a file by building the
excerpt around the actual matched row instead of clamping it to the
preview height estimate.

### Before

<img width="1858" height="1192" alt="Screenshot 2026-06-19 at 6 03
03 PM"
src="https://github.com/user-attachments/assets/fcbed7c4-22d6-4481-a263-522bb48c656f"
/>

### After

<img width="2057" height="1128" alt="Screenshot 2026-06-19 at 6 05
02 PM"
src="https://github.com/user-attachments/assets/f88db8e2-8687-4f79-8085-bca50de09ce9"
/>

## Self-Review Checklist:

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

Release Notes:

- N/A
2026-06-19 22:45:20 +00:00
Anthony EidandCole Miller 45e3602c78 Allow file watchers to handle case insensitive file systems (#59579)
## Goal

This PR fixes a bug in our file system watcher. Because it matched paths
case sensitively, it didn't account for file systems that are case
insensitive by default (macOS, Windows, etc.). As a result, when
multiple subscribers watched the same path using different casing, Zed
could fail to emit file system events to some of them.

### Reproduction

I reproduced this with the `tsgo` LSP, which lowercases the file path of
the visible worktree root it runs in. Zed subscribes to worktree roots
to receive FS updates — e.g. external edits to a buffer, or git state
changes — but it doesn't normalize the path when subscribing, so the two
casings never matched.

### Fix

Fixing this took longer than expected, because I spent a while deciding
on an approach. I considered three:

- **Follow VS Code's lead:** always treat macOS/Windows as case
insensitive and Linux as case sensitive. Simple, but it would leave a
couple of bugs.
- **Real case the path at registration:** walk each component and use
syscalls to rewrite it to match what the file system shows the user
(e.g. Finder shows `/Project/some`, so a request to watch
`/project/some` becomes `/Project/some`). This had rough edge cases with
symlinks that I didn't want to deal with.
- **Detect via syscalls whether a path is on a case-insensitive
(normalizing) file system and match accordingly** — what I went with.
The one wrinkle is that Windows can mark individual directories
case-sensitive… because Windows.

I also added integration tests to prevent future regressions.

Note: Windows currently defaults to case insensitive; implementing the
actual case sensitivity check for it is left to a follow up PR.

Helps #38109 #35861 #52376  and maybe #41195

## Self-Review Checklist:

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

Release Notes:

- Fixed missed file system events on case-insensitive filesystems that
could cause stale git state and other sync issues

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2026-06-19 20:49:58 +00:00
Danilo Leal fd510ce470 thread_view: Add some design improvements to thread search (#59609)
Small stuff here mostly improving colors, spacing, and typeface use
(leaning towards using UI font as most of the text in the agent panel is
actually UI font).

| Before | After |
|--------|--------|
| <img width="700" alt="Screenshot 2026-06-19 at 7  48@2x"
src="https://github.com/user-attachments/assets/b54da1de-e6ce-4e39-8d9d-6c375430e67c"
/> | <img width="600" alt="Screenshot 2026-06-19 at 7  47@2x"
src="https://github.com/user-attachments/assets/b3d5c704-6961-4ae2-9306-f6b70a641cdd"
/> |

Release Notes:

- N/A
2026-06-19 17:58:47 +00:00
6a6fcbebc4 Add preview to pickers and make them resizable (#59604)
Overhauls Zed's pickers to make them resizable and give them a preview.

Closes #8279 

### Background
The most requested Zed feature has the last year has been a [Telescope
like search box](https://github.com/zed-industries/zed/issues/8279)
[discussion](https://github.com/zed-industries/zed/discussions/22581).
To understand why this is so popular we need to understand search can
serve thee goals:
- Navigation: fuzzy search is faster & easier then clicking in a file
tree
- Exploration: example, find a function by a word in its doc comment
- Collecting: example, getting a list of functions to change

The project search which shows results in a multibuffer is the perfect
way to operate on a list of items. Navigation and Exploration need a lot
of context around each result and offer fast navigation between them.
For both of these live searching is also critical.

The `telescope UI` is a picker with a preview to the right or below.
It's offered in various editors and IDE's most famously Neovim (through
the Telescope plugin), IntelliJ (natively), Helix (natively) and of
course VScode (plugins) and it's _many_ forks.

While having a UI like that for text search (our project search) is most
requested the UX pattern is applied widely, from `find_all_references`
to `bookmarks`. It enhances most pickers. Note that we have over 50
different picker modals!

The community has tried to build something like this for Zed:
- https://github.com/zed-industries/zed/pull/44530
- https://github.com/zed-industries/zed/pull/45307
- https://github.com/zed-industries/zed/pull/46478
- https://github.com/zed-industries/zed/pull/43790

These all became huge PR's that we could not merge for various reasons.
This is a really hard feature to integrate in Zed!
This PR got started as https://github.com/zed-industries/zed/pull/46478
and supercedes that.

### Design
- Extend pickers to support an optional preview with minimal changes to
the pickers themselves.
- Make pickers resizable.
- Complement the existing search do not replace it by having both UI's
share the underlying search and allow freely switching between them.
- Allow extending the preview to things other then files.
- Maintain a clean design on all the pickers.

### Heigh level Implementation overview
- Adds an `Option<Preview>` to `Picker`
- Gives `PickerDelegate` a method to communicate a preview to the Picker
- Overhaul the way pickers are drawn to allow for resizing them.
Implemented on the `Shape` and `SizeBouds` structs.
- Adds a high level way to draw the `footer` and `editor` so we do not
need to change much to the pickers.
- Adds a new text finder Picker
- Adds a way to take a running search from project search and hand it to
the text finder Picker and the other way round
- Give the file finder a preview

### Next steps
A more detailed list and how to help out will be added to the tracking
issue for [Pickes with
previews](https://github.com/zed-industries/zed/issues/56037)
- Add more previews to more pickers!
- Enable selectioning multiple items in pickers and performing actions
on those
- Open selected items in a multibuffer
- Add a way to restore the last picker
- Make popovers (picker attached to some menu) resizable as well

## 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
TODO (will be done post merge)

---

Release Notes:
- Added resizing via dragging to all picker modals. 
- Added a preview to the File finder, the preview can be to the right or
below.
- Added a Text finder picker with a preview as alternative project
search UI. The search is shared and allowes switch between UIs while
running.

---------

Co-authored-by: ozacod <47009516+ozacod@users.noreply.github.com>
Co-authored-by: ozacod <ozacod@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-06-19 17:43:07 +00:00
G36maidandJakub Konka e2fa520006 Fix binary name resolution against custom PATH on macOS (#55672)
Closes #50536

## Summary

Addresses https://github.com/zed-industries/zed/issues/50536

- On macOS, `posix_spawnp` resolves programs against the parent
process's `cwd` and `environ` (via `getcwd` and `getenv("PATH")`),
ignoring the child's `current_dir` and `envp`. This causes two classes
of failures when Zed spawns external commands via the custom
`posix_spawnp`-based `Command`:
- **Bare names** (e.g. `"black"`): resolved via the parent's `PATH`, not
the child's — binaries only available in a project-specific PATH
(Nix/direnv) are not found.
- **Relative paths** (e.g. `"./script.sh"`, `"bin/test.sh"`): resolved
against the parent's `cwd`, not `current_dir` — only works when Zed's
cwd happens to match the project root.
- Added program resolution in `spawn_posix_spawn`
(`crates/util/src/command/darwin.rs`): before calling `posix_spawnp`,
resolve the program to an absolute path — bare names via
`which::which_in` against the child's PATH, relative paths via
`Path::join(current_dir)`. Falls back to the original program if
resolution fails.

## Root Cause

Apple's Libc implementation of `posix_spawnp` resolves the program path
using the parent process's context — `getcwd()` for relative paths and
`getenv("PATH")` for bare names — rather than the `current_dir` (set via
`posix_spawn_file_actions_addchdir_np`) or `envp` argument. The child's
working directory and environment only take effect **after** the binary
has already been located. This is a well-documented macOS behavior that
Rust's own `std::process::Command` works around by bypassing
`posix_spawn` when PATH is modified (see
[rust-lang/rust#48624](https://github.com/rust-lang/rust/pull/48624)).

The regression was introduced when PR #49090 switched macOS from
`std::process::Command` (which uses fork+execvp, correctly using the
child's cwd and PATH) to a custom posix_spawnp-based implementation
(which does not).

## Testing

- `test_bare_program_resolved_via_custom_path` — bare name resolves via
child's custom PATH
- `test_bare_program_with_custom_path_falls_back_when_not_found` —
non-existent binary still errors
- `test_bare_program_with_custom_env_no_path_key` — custom env without
PATH key falls back gracefully
- `test_relative_path_skips_resolution` — relative path resolves against
`current_dir` instead of parent's cwd

Note: The fix and tests are in `darwin.rs` which is macOS-only. The
Linux path uses `smol::process::Command` (via fork+execve) and is
unaffected.

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 external formatters and language servers failing to launch on
macOS when specified as a bare binary name or relative path and only
available in the project's PATH (e.g. Nix, direnv)

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-06-19 16:44:06 +00:00
Larsanddino 68fa98c1e9 helix: Fix start and end of document motions (#59449)
# Objective

- This PR fixed the `gg` and `ge` motion in Helix mode to match the
behavoir from Helix. Fixes #56702

## Solution

- The solution is to add custom handling for the StartOfDocument and
EndOfDocument Motions in normal and select mode. For both cases, column
0 is hard coded in the DisplayPoint for the destination of the motion.

## Testing

- Did you test these changes? If so, how?
Yes, I added unit tests which pass and also manually tested the `gg` and
`ge` motions in the new build.
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
1. Enable Helix mode in the settings
2. Open a file with multiple lines
3. Move to the middle of the file
4. Press `gg` and `ge`
5. Cursor should move to start or end of file at column 0
6. Same for Select mode

- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
I only tested on Linux (Fedora). Since the changes are not platform
specific, I don't think more testing is necessary, but always welcome.

## Self-Review Checklist:

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


Release Notes:

- Fixed `gg` and `ge` motions to jump to the first character on the line
and match Helix exactly.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-06-19 14:20:22 +00:00
Piotr Osiewicz 63c88eced0 workspace: Allow user to pick arbitrary parent path as a trustee (#59562)
This allows one to "bless" arbitrary parent path, without making
assumptions about the structure of the project storage on users machine.

## 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
- [ ] 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:

- When opening a project for the first time, you can now auto-trust
arbitrary parent path; previously Zed offered affordance for
auto-trusting a parent of a parent only.
2026-06-19 11:07:07 +00:00
Marshall Bowers 57f456c68e cloud_api_types: Add ZedVip variant to Plan (#59443)
This PR adds a new `ZedVip` variant to the `Plan` enum.

Closes CLO-881.

Release Notes:

- N/A
2026-06-18 20:51:36 +00:00
Neel 7e882399f9 agent: Preserve saved model selection until provider loads (#59417)
This PR fixes a bug where a thread could fall back to a BYOK model when
a remote provider hasn't yet returned its list of available models. On a
cold start, a thread previously using a Cloud model would fall over to a
BYOK model (if a key is defined) because Cloud models aren't loaded yet.

Note: there is a small behaviour change here, where previously the
priority was `default_model → profile_model → default_model`. The new
order is `profile_model → default_model`.

Release Notes:

- Improved saved thread model selection for cloud-based providers
2026-06-18 18:27:21 +00:00
Edward Compton 0f7dc9a9ed agent_ui: Use the thread title for agent notifications (#59377)
The agent-waiting notification heading was hardcoded to the agent id,
showing "claude acp" for external agents. Use the thread's own title,
which external agents now provide via session info updates, and fall
back to the agent id only for threads that aren't titled yet.

# Objective

- External agent notifications were just headed generically I.e. "claude
acp". There was a TODO in the code to use the thread name, so that it's
clear which thread actually produced the notification.

## Solution

- Use the thread name, seems it was inscope in the code already from a
previous change.

## Testing

Tested manually by triggering a notification and seeing the thread name
instead of acp-claude.

## 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 - this code path wasn't
tested and doesn't seem like it needs it, but willing to be corrected.
- [x] Performance impact has been considered and is acceptable

Release Notes:

- agent: Include thread title in notification when Zed is not focused
2026-06-18 15:34:43 +00:00