Commit Graph
31406 Commits
Author SHA1 Message Date
Danilo Leal fbda4f862a collab_panel: Fix pressed state of the channel item (#61423)
Quick follow up to https://github.com/zed-industries/zed/pull/61397,
where there was a bug in background color for the extra controls on each
item flashing as a click on any item's disclosure occurred.

Release Notes:

- N/A
2026-07-21 22:50:08 +00:00
Danilo LealandMrSubidubi 502cfeb9c3 collab_panel: Add indentation guides and some other design adjustements (#61397)
This PR converts the collab panel list from a GPUI list into a uniform
list, which was a requirement for the indent guides to be displayed. I
have been wanting to add that to the channels list for a while, and
finally carved out some time. Ended up adding some more tweaks here and
there as overall improvements (e.g., using a lock icon for private
icons) and to make the indent guide fully work design-wise given we have
the chevron buttons rendering on top of them.

Here's how it looks:

<img width="600" alt="Screenshot 2026-07-21 at 10  08@2x"
src="https://github.com/user-attachments/assets/351b7e0f-aeb4-4c79-8177-7f1cdf635fbe"
/>

Release Notes:

- N/A

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-07-21 19:34:49 +00:00
Baris Palaska 3375c7b6c0 Revert "gpui_web: Only cancel the native context menu when the app claims the right-click" (#61403)
Reverts zed-industries/zed#60892

Realised this is probably not the desired behavior. Context menu is not
really useful when the app is full canvas. I think it's better to not
have the browser context menu on web at all. My bad and sorry for the
hassle!
2026-07-21 18:14:06 +00:00
Counterfeit IQandKirill Bulatov 8c1364c8ca Fix toggling diagnostics off not allowing to toggle them back (#60963)
# Objective

This change fixes an issue where once a single file has had it
diagnostics disabled, it will permenently make re-enabling diagnostics
in that specific file, no longer possible by either command or keybind.
This fixes issue #60958.

## Solution

This solution is quite simple. The logic used for registering the action
in the editor used a one way flip. The editor read the `cx` and then
checked its `diagnostics_enabled()` and `inline_diagnostics_enabled()`
and if they were disabled they would not register the corrosponding
`Editor::toggle_diagnostics` and `Editor::toggle_inline_diagnostics`
respectively. This meant once toggled off, the editor was no longer able
to register the action as it was already disabled, and thus made the
"toggle" part impossible. The fix simply removes the state checks for
the current editor and will leave the actions registered.

## Testing

This has been both manualy tested as well as had an `editor_tests.rs`
test added. Simply taking in the the `EditorTestContext`, then checks
the starting state, then toggles the diagnostics off and checks that it
correctly shows the state change, and then proceeds to re-enable the
diagnostics state, and check its again to make sure the appropriate
state has been set.
I manually tested this on windows_11_x64/x86(Desktop),
archlinux_7.0.10_x64/x86(Laptop), and it has **not** been tested on my
mac mini **yet**. However, the change 'should' be platform agnostic. If
someone wants to review this, they can simply open their settings file
with the JSONC lsp `on` and then disable their diagnostics and then, the
option to re-enable them, toggle, will now show up and also be able to
be executed by the keybinds too.

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

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

Original Behaviour:
[Zed Diagnostic Toggle (Original
Behaviour).webm](https://github.com/user-attachments/assets/bca860cd-f7e9-42b9-9456-56b9b1d2604f)

New Behaviour:
[Zed Diagnostic Toggle (New
Behaviour).webm](https://github.com/user-attachments/assets/e3629491-abb5-4e29-95ab-e8f0464db726)

</details>

---

Release Notes:

- Fixed `editor::ToggleDiagnostics` & `editor: toggle diagnostics`
permanently turning off diagnostics for the current file/editor,
addressing issue #60958.

---------

Signed-off-by: Counterfit IQ <logicye@proton.me>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-07-21 17:28:38 +00:00
Shuhei KadowakiandKirill Bulatov 8b2baadb09 lsp: Show request durations in RPC messages (#61018)
Language server performance issues can be difficult to diagnose because
request timings are not shown alongside the corresponding JSON-RPC
traffic. Annotate responses in the "LSP Logs / RPC Messages" view with
their end-to-end duration, making it easier to identify slow methods,
latency outliers, and cancellation behavior in the language server
process launched by Zed.

Capture timestamps at the transport boundary, correlate decoded request
IDs separately by direction, preserve timing across cancellation, bound
stale request tracking, and forward host-measured durations to remote
clients.

## Self-Review Checklist:

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

## Showcase

<details>
<summary>Example trace</summary>

```
// Send:
{"jsonrpc":"2.0","id":61,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":378,"character":3}}}

// Receive (took 7.698042ms):
{"jsonrpc":"2.0","id":61,"result":[]}

// Send:
{"jsonrpc":"2.0","id":62,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"range":{"start":{"line":378,"character":3},"end":{"line":378,"character":3}},"context":{"diagnostics":[]}}}

// Receive (took 5.632167ms):
{"jsonrpc":"2.0","id":62,"result":[{"title":"Show macro expansion for `@static`","command":{"title":"Show macro expansion for `@static`","command":"jetls.openMacroExpansion","arguments":["jetls-macro-expansion:/macro-expanded.jl?source=file%253A%252F%252F%252FUsers%252Faviatesk%252Fjulia%252Fpackages%252Fworktrees%252FJETLS%252Fplacid-wren%252FJETLS%252Fsrc%252Fanalysis%252FAnalyzer.jl&start=14278&stop=15609"]}},{"title":"Expand all macros in this top-level form","command":{"title":"Expand all macros in this top-level form","command":"jetls.openMacroExpansion","arguments":["jetls-macro-expansion:/macro-expanded.jl?source=file%253A%252F%252F%252FUsers%252Faviatesk%252Fjulia%252Fpackages%252Fworktrees%252FJETLS%252Fplacid-wren%252FJETLS%252Fsrc%252Fanalysis%252FAnalyzer.jl&start=14278&stop=15609&mode=toplevel"]}},{"title":"Show inferred type annotations","command":{"title":"Show inferred type annotations","command":"jetls.openTypeAnnotation","arguments":["jetls-type-annotation:/type-annotated.jl?source=file%253A%252F%252F%252FUsers%252Faviatesk%252Fjulia%252Fpackages%252Fworktrees%252FJETLS%252Fplacid-wren%252FJETLS%252Fsrc%252Fanalysis%252FAnalyzer.jl&start=14278&stop=15609"]}}]}

// Send:
{"jsonrpc":"2.0","id":63,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":379,"character":3}}}

// Receive (took 3.473792ms):
{"jsonrpc":"2.0","id":63,"result":[]}

// Send:
{"jsonrpc":"2.0","id":64,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"range":{"start":{"line":379,"character":3},"end":{"line":379,"character":3}},"context":{"diagnostics":[]}}}

// Receive (took 4.472375ms):
{"jsonrpc":"2.0","id":64,"result":[{"title":"Show macro expansion for `@static`","command":{"title":"Show macro expansion for `@static`","command":"jetls.openMacroExpansion","arguments":["jetls-macro-expansion:/macro-expanded.jl?source=file%253A%252F%252F%252FUsers%252Faviatesk%252Fjulia%252Fpackages%252Fworktrees%252FJETLS%252Fplacid-wren%252FJETLS%252Fsrc%252Fanalysis%252FAnalyzer.jl&start=14278&stop=15609"]}},{"title":"Expand all macros in this top-level form","command":{"title":"Expand all macros in this top-level form","command":"jetls.openMacroExpansion","arguments":["jetls-macro-expansion:/macro-expanded.jl?source=file%253A%252F%252F%252FUsers%252Faviatesk%252Fjulia%252Fpackages%252Fworktrees%252FJETLS%252Fplacid-wren%252FJETLS%252Fsrc%252Fanalysis%252FAnalyzer.jl&start=14278&stop=15609&mode=toplevel"]}},{"title":"Show inferred type annotations","command":{"title":"Show inferred type annotations","command":"jetls.openTypeAnnotation","arguments":["jetls-type-annotation:/type-annotated.jl?source=file%253A%252F%252F%252FUsers%252Faviatesk%252Fjulia%252Fpackages%252Fworktrees%252FJETLS%252Fplacid-wren%252FJETLS%252Fsrc%252Fanalysis%252FAnalyzer.jl&start=14278&stop=15609"]}}]}

// Send:
{"jsonrpc":"2.0","id":65,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":380,"character":0}}}

// Receive (took 1.186541ms):
{"jsonrpc":"2.0","id":65,"result":[]}

// Send:
{"jsonrpc":"2.0","id":66,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"range":{"start":{"line":380,"character":0},"end":{"line":380,"character":0}},"context":{"diagnostics":[]}}}

// Receive (took 2.552708ms):
{"jsonrpc":"2.0","id":66,"result":[]}

// Send:
{"jsonrpc":"2.0","id":67,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":401,"character":0}}}

// Receive (took 1.490084ms):
{"jsonrpc":"2.0","id":67,"result":[]}

// Send:
{"jsonrpc":"2.0","id":68,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"range":{"start":{"line":401,"character":0},"end":{"line":401,"character":0}},"context":{"diagnostics":[]}}}

// Receive (took 2.819125ms):
{"jsonrpc":"2.0","id":68,"result":[]}

// Send:
{"jsonrpc":"2.0","id":69,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":400,"character":0}}}

// Receive (took 3.501375ms):
{"jsonrpc":"2.0","id":69,"result":[]}

// Send:
{"jsonrpc":"2.0","id":70,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":399,"character":0}}}

// Receive (took 2.903333ms):
{"jsonrpc":"2.0","id":70,"result":[]}

// Send:
{"jsonrpc":"2.0","id":71,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":399,"character":14}}}

// Receive (took 3.166ms):
{"jsonrpc":"2.0","id":71,"result":[{"range":{"start":{"line":389,"character":19},"end":{"line":389,"character":22}},"kind":3},{"range":{"start":{"line":399,"character":11},"end":{"line":399,"character":14}},"kind":2}]}

// Send:
{"jsonrpc":"2.0","id":72,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"range":{"start":{"line":399,"character":14},"end":{"line":399,"character":14}},"context":{"diagnostics":[]}}}

// Receive (took 3.169625ms):
{"jsonrpc":"2.0","id":72,"result":[{"title":"Show inferred type annotations","command":{"title":"Show inferred type annotations","command":"jetls.openTypeAnnotation","arguments":["jetls-type-annotation:/type-annotated.jl?source=file%253A%252F%252F%252FUsers%252Faviatesk%252Fjulia%252Fpackages%252Fworktrees%252FJETLS%252Fplacid-wren%252FJETLS%252Fsrc%252Fanalysis%252FAnalyzer.jl&start=15676&stop=16556"]}}]}

// Send:
{"jsonrpc":"2.0","id":73,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":399,"character":14}}}

// Receive (took 1.234396208s):
{"jsonrpc":"2.0","id":73,"result":{"contents":{"kind":"markdown","value":"```julia\n(local) ret :: Compiler.RTEffects  # Core.PartialStruct(Compiler.RTEffects, Any[Any, Any, Compiler.Effects, Core.Const(nothing)])\n```\n"},"range":{"start":{"line":399,"character":11},"end":{"line":399,"character":14}}}}

// Send:
{"jsonrpc":"2.0","id":74,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":399,"character":14}}}

// Receive (took 11.429875ms):
{"jsonrpc":"2.0","id":74,"result":{"contents":{"kind":"markdown","value":"```julia\n(local) ret :: Compiler.RTEffects  # Core.PartialStruct(Compiler.RTEffects, Any[Any, Any, Compiler.Effects, Core.Const(nothing)])\n```\n"},"range":{"start":{"line":399,"character":11},"end":{"line":399,"character":14}}}}

// Send:
{"jsonrpc":"2.0","id":75,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"position":{"line":401,"character":0}}}

// Receive (took 1.098667ms):
{"jsonrpc":"2.0","id":75,"result":[]}

// Send:
{"jsonrpc":"2.0","id":76,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/aviatesk/julia/packages/worktrees/JETLS/placid-wren/JETLS/src/analysis/Analyzer.jl"},"range":{"start":{"line":401,"character":0},"end":{"line":401,"character":0}},"context":{"diagnostics":[]}}}

// Receive (took 4.117459ms):
{"jsonrpc":"2.0","id":76,"result":[]}
```

</details>

---

Release Notes:

- Improved LSP Logs by showing request durations alongside RPC
responses, making slow language server behavior easier to diagnose.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-07-21 16:55:55 +00:00
Kirill Bulatov 4ee16d3650 Fix the macOS tests that hang locally (#61407)
See also https://github.com/zed-industries/notify/pull/9

<img width="2088" height="266" alt="image"
src="https://github.com/user-attachments/assets/f4bc0b5c-76a9-424a-9abc-abde6e56b9db"
/>

Release Notes:

- N/A
2026-07-21 16:52:46 +00:00
MartinYe1234 298b3e8d7b Open relative file links at line numbers (#61006)
## Summary

- Open relative file links with GitHub-style line fragments at the
referenced line
- Support line navigation from agent responses and Markdown previews
- Preserve decoded-first path resolution with literal percent-escape
fallback

## Testing

- cargo test -q -p util test_source_line_from_fragment -- --nocapture
- cargo test -q -p acp_thread test_hyperlink_percent_escapes_are_decoded
-- --nocapture
- cargo test -q -p agent_ui test_open_link -- --nocapture
- cargo test -q -p markdown_preview -- --nocapture
- cargo fmt --all -- --check

Release Notes:

- Improved relative file links with line numbers to open at the
referenced line.
2026-07-21 14:55:19 +00:00
ummon-v 50b773f78e Add reasoning effort support for Mistral models (#61393)
# Objective

Follow-up to #60898 (as suggested by @tomhoule ). That PR marked
`mistral-medium-latest` as supporting thinking, but the flag is
currently a no-op: unlike Magistral, whose reasoning was native, Mistral
Medium 3.5 and Small 4 only emit thinking chunks when the request sets
`reasoning_effort: "high"` (see [Mistral's reasoning
docs](https://docs.mistral.ai/studio-api/conversations/reasoning)), and
the `Request` struct had no such field.

Related: #57581

## Solution

- Add a `ReasoningEffort` enum and an optional `reasoning_effort` field
to the Mistral `Request`. The field is skipped during serialization when
`None`, so requests for non-reasoning models (Codestral, Large,
Ministrals) are byte-identical to before.
- Set `reasoning_effort: "high"` in `into_mistral()` when the model
supports thinking and the request allows it. The rest of the pipeline
already works: `MistralEventMapper` handles `MessagePart::Thinking`
deltas, and `into_mistral` replays thinking parts into history, matching
Mistral's requirement to replay the reasoning trace across turns.
- Add `mistral-small-latest` to `supports_thinking()`: it now points to
Mistral Small 4, a hybrid reasoning model like Medium 3.5.
- Cover the Ministral variants in `Model::from_id()`, which previously
rejected `ministral-3b-latest` / `ministral-8b-latest` /
`ministral-14b-latest` as invalid ids even though the enum defines them.

## Testing

- Added `test_into_mistral_reasoning_effort` covering the three cases:
thinking model with thinking allowed (sends `high`), thinking model with
thinking disallowed (omits the field), and non-thinking model (omits the
field).
- Existing Mistral provider tests pass (`cargo test -p language_models
mistral`); both touched crates are clippy-clean.
- Reviewers can test by configuring a Mistral API key, selecting
`mistral-medium-latest` or `mistral-small-latest` in the agent panel,
and confirming thinking blocks stream in; with a non-reasoning model
like Codestral, requests are unchanged.

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

- Fixed thinking not being triggered for Mistral Medium 3.5 and Mistral
Small 4, and fixed custom Mistral configurations rejecting Ministral
model ids
2026-07-21 14:51:27 +00:00
Danilo Leal 9be89faf6a thread_view: Make thinking icon color consistent (#61399)
Tiny tiny tweak just adjusting the thinking icon color so its consistent
with the fast mode icon. Icons that are _toggled_ on and off should be
displayed in a colorful way so its obvious in which state they're in.

---

Release Notes:

- N/A
2026-07-21 14:20:48 +00:00
Duncan Ogilvie b4ae33f7fd Fix Devcontainer bugs/spec mismatches (#59020)
When testing Zed on our team's Devcontainer I found some missing
features/bugs/spec mismatches. Commit messages were written by hand,
code reviewed and tested manually, but everything was written by
Claude/Codex based on:

- https://github.com/devcontainers/cli
- https://github.com/devcontainers/spec

The main use case of the metadata is that you can `devcontainer exec`
and `devcontainer up` into a container Zed started (and vice versa). The
same with VSCode, it will reuse Zed's created devcontainer correctly
now. This is useful when using LLMs so they can run commands in the same
devcontainer you have open.

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 Dev Container compatibility and lifecycle behavior.
2026-07-21 14:15:32 +00:00
Yifeng XuandDanilo Leal 44df53c15d thread_view: Fix overflow of placeholder text and message editor controls (#61395)
# Objective

Fixes #61391
Fixes #60876 

Fix Agent Panel prompt text and controls being clipped when the panel is
narrow.

## Solution

- Allow the message editor and ACP configuration controls to shrink and
wrap.
- Use a dynamic minimum panel width based on the active Agent's prompt
text.
- Cap that dynamic width so long prompts, such as Zed Agent's, do not
prevent the panel from being resized narrower.

## Testing

- `cargo fmt --all -- --check`
- `cargo check -p agent_ui`
- `cargo test -p agent_ui --lib
conversation_view::tests::test_restored_threads_keep_available_commands`
- `cargo test -p agent_ui --lib config_options::tests`

Manual UI testing is still recommended for Zed Agent and third-party
Agent Panels at narrow widths.

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

## Showcase


https://github.com/user-attachments/assets/71825d64-6e5d-40fe-98a4-dcb13903e06b


---

Release Notes:

- Agent: Fixed agent panel placeholder and controls overflowing when the
panel width was narrow.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-07-21 13:56:24 +00:00
Lukas WirthandGaauwe Rombouts dc0c66cfeb cloud_api_client: Implement Wasm support (#61328)
Release Notes:

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

---------

Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
2026-07-21 13:20:31 +00:00
allisonandSmit Barmase abfced8e47 image_viewer: Allow setting a custom zoom level (#57215)
Allows you to click on the zoom percent to edit it. Right clicking the
percentage resets to 100%.

Self-Review Checklist:

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

Release Notes:

- Added support for editing image viewer zoom levels directly from the
toolbar.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-07-21 13:16:56 +00:00
Bing WangandKirill Bulatov a835731451 file_finder: Debounce file finder refreshes on worktree updates (#60451)
# Objective

Delay picker refreshes for entry updates so bursty filesystem events
trigger only one search refresh, while still refreshing immediately when
worktrees are added or removed.

Update tests to advance both the watch latency and refresh debounce, and
add coverage for coalesced worktree 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 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

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-07-21 11:59:11 +00:00
Kirill Bulatov 8b8c03e3fb Improve bogus brackets filtering (#60364)
Closes https://github.com/zed-industries/zed/issues/59298

Left — before, right — after:

<img width="1604" height="1001" alt="Screenshot 2026-07-03 at 19 45 45"
src="https://github.com/user-attachments/assets/cc43b639-8fbe-4951-9da8-4b1e9482ca39"
/>

Release Notes:

- Fixed incorrect rainbow brackets highlights in certain cases
2026-07-21 11:54:00 +00:00
Lee ByeongJunanddino 32adc59cb7 Surround selection with backticks in Rust, C, and C++ comments (#58674)
Typing a backtick over selected text in Rust, C, and C++ comments
replaced the selection instead of wrapping it. Markdown already supports
this via its backtick bracket pair.

Add a backtick bracket pair for these languages:
  - `surround = true` wraps selections in backticks
  - `close = false` avoids auto-closing lone backticks
  - `not_in = ["string"]` enables it in comments but not strings

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

Closes #58538

Release Notes:

- Added support for surrounding selected text with backticks in Rust, C,
and C++

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-07-21 11:27:16 +00:00
saberoueslatiandKirill Bulatov 1806aee21f Autocomplete language names in file_types setting (#58595)
## Context

Closes #58571

When editing `settings.json`, typing a new key under `languages`
triggers language-name autocomplete. The same did not work for
`file_types`, even though both keys map language names to configuration.

The root cause: the JSON schema generator uses `replace_subschema` to
inject installed language names as the allowed properties of a named
type. The `languages` field backed by `LanguageToSettingsMap` (a named
newtype) got this treatment; `file_types` was backed by a raw
`HashMap<Arc<str>, ExtendingVec<String>>` with no named type to target.

The fix introduces a `FileTypeMap` newtype parallel to
`LanguageToSettingsMap` and wires it into the same schema-injection
path.

Video of manual test below :

[Screencast from 2026-06-05
00-04-16.webm](https://github.com/user-attachments/assets/5d8afb60-d566-4c99-ad2a-66ebbb47ed2e)

## How to Review

- `crates/settings_content/src/language.rs` : Adds
`FileTypeMap(HashMap<Arc<str>, ExtendingVec<String>>)` with the full set
of derives (`Debug`, `Clone`, `Default`, `PartialEq`, `Serialize`,
`Deserialize`, `JsonSchema`, `MergeFrom`) and an `IntoIterator for
&FileTypeMap` impl so existing call sites
(`all_languages.file_types.iter().flatten()`) continue to work without
changes. Changes the `file_types` field in `AllLanguageSettingsContent`
from the raw HashMap to `Option<FileTypeMap>`.

- `crates/settings/src/settings_store.rs` : In
`configure_schema_generator`, adds a `replace_subschema::<FileTypeMap>`
call mirroring the existing `LanguageToSettingsMap` one: injects
installed language names as the allowed properties, with
`ExtendingVec<String>` (array of glob patterns) as the value schema.
Adds `test_file_types_schema_generation` to verify the injected
properties.

- `crates/settings/src/vscode_import.rs` : Updates `file_types()` to
return `Option<FileTypeMap>` and wraps the constructed map accordingly.

- `crates/language/src/buffer_tests.rs` : Updates the existing custom
`file_types` test setup to extend the inner map of the new `FileTypeMap`
wrapper explicitly, keeping the language crate test build passing after
the type change.

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

**Release Notes :**

- Fixed language name autocomplete not working in the `file_types`
setting

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-07-21 11:01:05 +00:00
Karol BrodaandKirill Bulatov cfc225d3ae extension: Check for rustup before calling it (#56090)
Self-Review Checklist:

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

Closes #42353

Release Notes:

- Fixed extension building failing on systems where Rust is installed
without rustup (e.g., NixOS, distro packages)

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-07-21 10:42:39 +00:00
Gabriel Linder 738bc25f05 Update Mistral provider models (#60898)
# Objective

- Update Mistral models according to their
[documentation](https://docs.mistral.ai/models/overview).

## Solution

- Remove deprecated models
- Update Mistral Medium to 3.5

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

- Remove deprecated Mistral models and update to Mistral Medium 3.5

Signed-off-by: Gabriel Linder <linder.gabriel@gmail.com>
2026-07-21 09:41:32 +00:00
prayansh_chhablaniandSmit Barmase 790781b90e Fix reopening and interacting with the command palette when its submenu is already open closing the palette (#54243)
Closes #10045

follow repro steps:
1. Open the command palette cmd-shift-p.
2. Locate and click language selector: toggle.
3. cmd-shift-p.
4. Click language selector: toggle.
5. Notice that the command palette is closed.

When the command palette is reopened on top of the already-open language
selector, the palette captures previous_focus_handle before the old
modal is hidden. In that case, previous_focus_handle refers to the
language selector picker, which is the correct previous focus at that
moment. The problem is that this modal is immediately dismissed (as the
language toggle gets hidden and command palette is shown in 3rd step)
and no longer exists by the time the selected command is confirmed.

Fix
Updated CommandPalette::toggle so that if another modal is already open,
it is dismissed first. Only after that dismissal completes does the
command palette capture window.focused(cx) as its previous_focus_handle.

This means the command palette now stores the real pre-palette focus
target, such as the editor or workspace, instead of storing focus from a
modal that is about to be removed.

Self-Review Checklist:

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

Release Notes:

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

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-07-21 09:13:56 +00:00
Jakub Konka 0414079168 Only install crash handler when a minidump endpoint is configured (#61384)
Closes FR-130

Builds compiled from source at a release tag report a non-dev release
channel, so they used to install the crash handler and write minidumps
into the shared logs directory. An official Zed launched later would
find and upload those dumps to Sentry, where they can never be
symbolicated (their debug UUID matches no uploaded debug files).

Gate the crash handler on having somewhere to send the dumps: either the
compile-time ZED_MINIDUMP_ENDPOINT baked into official builds, the
runtime ZED_MINIDUMP_ENDPOINT override, or an explicit
ZED_GENERATE_MINIDUMPS opt-in for debugging the crash pipeline locally.

Release Notes:

- N/A
2026-07-21 08:16:15 +00:00
tidely 484ae39d7c zed: Unify dependencies (#61381)
# Objective

Unify dependencies inside of the root `Cargo.toml` to prevent versions
from going out of sync and creating copies of dependencies.

## Testing

- All tests pass, nothing touches the `Cargo.lock`

## Review

Review is easiest by going through commit by commit.

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-07-21 07:58:16 +00:00
Smit Barmase b832d440a2 search: Escape seeded project search query in regex mode (#61335)
Fixes what https://github.com/zed-industries/zed/pull/57748 does for
buffer search.

When project search is deployed with regex mode enabled and the query is
seeded from the editor's selection or the word under the cursor, that
text is literal, so regex chars in it (e.g. `.` in `z.d`) are now
escaped instead of being interpreted as regex syntax. This follows how
VSCode handles it.

Release Notes:

- Fixed project search queries seeded from the current selection being
interpreted as a regular expression instead of literal text when regex
mode was enabled.
2026-07-21 07:39:25 +00:00
Pingy eb4f87e61d title_bar: Fix drop down arrow shifting upon user logging in (#61267)
# Objective

Fixes #44529

## Solution

Earlier, the container holding the right side of the title bar applied a
conditional right padding depending on the whether the user was signed
in or not. This PR removes the conditional padding and replaces it with
a constant.

## Testing

The changes where visually verified by replicating the issue and seeing
if the fix works.

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


[](https://github.com/user-attachments/assets/017099c3-224e-4e32-9f28-66961e244d1b)

---

## Release Notes:

Fixed drop down arrow shifting upon logging in.
2026-07-21 06:44:38 +00:00
Apoorva Verma 78dde3c78d editor: Place added cursors by tab-expanded column (#61153)
with `hard_tabs: true` and `tab_size: 4`, shift-alt-down off a
tab-aligned column drops the cursor in the wrong spot:

```
      current.rgb.r         ˇ= p[0] >> 8;      <- cursor here
      residuals[run].rˇgb.r  = p[0] & 0xff;    <- lands here, not on the =
```

both `=` render at column 48 but sit at buffer columns 22 and 27, since
a different number of tabs pads each row. shift-alt-down is
`skip_soft_wrap: true`, which placed the cursor by utf16 column where a
tab counts as one.

so count the column with tabs expanded instead. still a column and not a
pixel position, so the buffer-column behaviour
`test_add_selection_skip_soft_wrap_option` pins doesn't change (without
tabs the expanded column *is* the buffer column). tried pixels first and
it breaks that test, since x is measured inside a wrapped segment.

heads up that the existing tests here all pass `Default::default()`,
which is `skip_soft_wrap: false` (the `default_true` only applies to
deserializing), so nothing covered the branch the keybinding actually
uses.

Closes #60752.

Release Notes:

- Fixed added cursors landing in the wrong column when using tabs to
align code
2026-07-21 06:22:51 +00:00
JaceandChristopher Biscardi 0d67b1a7ff search: Fix toggle soft wrap not working while the search bar is focused (#61150)
Closes #34698

The buffer search query input is itself an editor, so dispatching
`editor::ToggleSoftWrap` from the command palette while the search bar
had focus toggled soft wrap on the single-line query editor (with no
visible effect) and never reached the searched editor.

This intercepts the action on the search bar in the capture phase and
applies it to the active searchable item, the same way `ToggleFoldAll`
is already relayed. Focus stays in the search bar, so you can keep
typing your query. `Editor::toggle_soft_wrap` and
`Editor::soft_wrap_mode` become `pub` (matching
`fold_all`/`has_any_buffer_folded`, which the existing `ToggleFoldAll`
relay already uses).

Includes a regression test that fails without the fix: it deploys the
search bar, dispatches `ToggleSoftWrap` with the query editor focused,
and asserts the searched editor's wrap mode changes while focus remains
in the search bar.

Release Notes:

- Fixed `editor: toggle soft wrap` doing nothing when invoked while the
buffer search bar was focused

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-07-21 06:14:52 +00:00
Attila SüliandClaude Fable 5 8ef6930d97 title_bar: Add show_worktree_name setting (#61137)
Adds a title_bar.show_worktree_name setting (default: true) that hides
the worktree picker button in the title bar, mirroring how
show_branch_name gates the branch picker. The "/" separator only renders
when both buttons are visible, and the container is omitted entirely
when both are hidden.

The setting is hide-only: it deliberately does not join the
render_project_items gate, so configurations with show_branch_name and
show_project_items both disabled keep hiding the whole group as before.

Requested in discussion
[zed-industries/zed#54902](https://github.com/zed-industries/zed/discussions/54902).

# Objective

The worktree name is always present in the title bar even when unused.
Unlike the branch name it has no dedicated option to disable it.

Requested in discussion
[zed-industries/zed#54902](https://github.com/zed-industries/zed/discussions/54902).

## Solution

Adds a `title_bar.show_worktree_name` setting (default: true) that hides
the worktree picker button in the title bar, mirroring how
show_branch_name gates the branch picker. The "/" separator only renders
when both buttons are visible, and the container is omitted entirely
when both are hidden.

The setting is hide-only: it deliberately does not join the
render_project_items gate, so configurations with show_branch_name and
show_project_items both disabled keep hiding the whole group as before.

## Testing

I tested the setting added by running the application by adding,
removing and toggling the `title_bar.show_worktree_name` setting in the
`settings.json`

## 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
- [ ] Performance impact has been considered and is acceptable

## Showcase

<img width="1496" height="982" alt="title_bar.show_worktree_name =
false"
src="https://github.com/user-attachments/assets/b2c502de-a8d8-4409-ba04-5ab807c77a8e"
/>

<img width="1496" height="982" alt="title_bar.show_worktree_name = true"
src="https://github.com/user-attachments/assets/6cea7eb5-0e88-454c-9c97-3b4ad62aed51"
/>

---

Release Notes:

- title_bar: Added title_bar.show_worktree_name (default: true) to hide
worktree picker button

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 06:04:06 +00:00
Apoorva Verma b64d3388c7 emacs: Stop ctrl-n and ctrl-p falling back to the default bindings (#61140)
on linux with the emacs keymap, holding `ctrl-n` at the end of the
buffer opens a new file every press. `ctrl-p` at the top opens the file
finder.

the keymap already tries `"ctrl-n": null`, but `null` only breaks
resolution in a *user* keymap, so from a base keymap
`workspace::NewFile` still resolves. a targeted unbind works regardless
of source:

```json
"ctrl-p": ["zed::Unbind", "file_finder::Toggle"],
"ctrl-n": ["zed::Unbind", "workspace::NewFile"],
```

left the MoveDown/MoveUp propagation alone, it's load bearing (agent
panel uses it for up-to-edit-last-message). tests cover the fix plus the
narrower ctrl-n/ctrl-p bindings still winning, since the unbind only
targets the one action.

ctrl-g/ctrl-x in that block are still null and probably just as broken,
but ctrl-x is a prefix key so i left them.

Closes #45010.

Release Notes:

- Fixed `ctrl-n` opening a new file and `ctrl-p` opening the file finder
at the ends of a buffer when using the Emacs keymap on Linux
2026-07-21 06:01:41 +00:00
Ruslan Semagin 5f865ffd69 Show runnable task results in gutter (#61095)
# Objective

- Make runnable task results visible directly in the editor gutter after
running a test or task.
- This makes it easier to see whether the last run passed or failed
without looking at the terminal output.

## Solution

- Track the completion result for scheduled runnable tasks.
- Show the last runnable result in the gutter:
  - running task: accent play icon
  - successful task: success check icon
  - failed/cancelled task: error icon
- Apply the same status update path when running from the gutter play
button and from inline code lens actions such as `Run Test`.

## Testing

- Ran `cargo check -p editor -p workspace`.
- Ran `cargo test -p workspace
test_schedule_resolved_task_with_completion_reports_success`.
- Manually tested running a GPUI test from the gutter play button.
- Manually tested running a GPUI test from the inline `Run Test` code
lens.
- Verified the gutter icon updates after completion in both cases.

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

Before:
<img width="1897" height="691" alt="before"
src="https://github.com/user-attachments/assets/614c2811-ee0a-43c0-8619-d0301836aa62"
/>

After:
<img width="1897" height="691" alt="after"
src="https://github.com/user-attachments/assets/a3db19f2-71e6-4c9b-824d-43a4f020a6b7"
/>

---

Release Notes:

- Improved runnable tasks by showing the last run result in the editor
gutter.
2026-07-21 05:36:42 +00:00
Prithvish Baidya 9eb43a8356 gpui_macos: Retain pasteboard objects (#61024)
## Objective

Prevent a use-after-free when a macOS pasteboard wrapper outlives the
autorelease pool in which it was created.

Pasteboard cached its NSPasteboard and custom zed-text-hash and
zed-metadata NSString objects as raw ids. These constructors return
autoreleased objects. A later clipboard read could therefore pass a
dangling type identifier to dataForType and crash in objc_msgSend.

## Solution

- Retain the pasteboard and custom type objects for the Pasteboard
lifetime with StrongPtr.
- Copy NSData contents into owned Rust byte buffers before the
autoreleased data object can expire.
- Add a regression test that drains the creation autorelease pool and
then accesses the retained custom types.

## Testing

- cargo test -p gpui_macos --features runtime_shaders
test_custom_types_survive_creation_autorelease_pool --lib
- Built an optimized macOS embedder against the patched GPUI checkout.

## Self-Review Checklist:

- [x] I have reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks have justifying comments
- [x] The content adheres to Zed UI and icon standards; this change has
no UI
- [x] Tests cover the changed lifetime behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed a macOS crash that could occur when reading from the clipboard.

---
AI Disclosure: I ran into this bug on a project where I'm using GPUI.
For my purposes I patched it on my fork I maintain. I had codex (gpt
5.6-sol) send this PR because I think this fix should be upstreamed.
2026-07-21 03:57:04 +00:00
Sathwik Chirivelli fcd85e1bfb git_ui: Show full files by default in solo diffs (#60989)
# Objective

Make solo diff views show the full file by default while preserving an
easy way to focus on changed hunks. This addresses a recurring request
across issues and pull requests for full-file context in single-file Git
diffs.

## Solution

- Initialize the solo diff with a singleton multibuffer so the entire
file is visible on open.
- Keep the existing toolbar toggle available for switching to
changes-only excerpts.
- Use the singleton path key when replacing excerpts so toggling remains
reliable.
- Preserve Git change indicators in the scrollbar; the editor generates
those markers for singleton buffers.

## Testing

- Ran `cargo fmt -p git_ui`.
- Ran `git diff --check`.
- Ran `cargo check -p git_ui --no-default-features` successfully.
- Manually reviewed the full-file and changes-only state transitions in
`SoloDiffView`.

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

Before, solo diffs opened with only changed hunks and surrounding
context. They now open with the complete file, retain Git change
indicators in the scrollbar, and can still be toggled to changes-only
from the toolbar.

---

Release Notes:

- Improved solo diffs to show the full file by default while retaining
Git change indicators in the scrollbar.
2026-07-20 21:31:42 +00:00
Danilo Leal 1b67fdc7f4 thread_view: Only show thread controls at the end of the turn (#61362)
Follow up to https://github.com/zed-industries/zed/pull/61245. That PR
introduced a bug where the thread controls would appear at seemingly
random tool boundaries as opposed to only at the end of each turn. It
caused this sort of behavior, where we'd have many instances of those
buttons showing up:

<img width="500" alt="Screenshot 2026-07-20 at 4  03 2@2x"
src="https://github.com/user-attachments/assets/6e6f716e-adb5-4532-9f89-e955398cda23"
/>

Alongside with fixing it, this PR is also making the "scroll to top"
only show up only at the very last turn. I think that makes more sense
given you'd be most likely interested to go to the top when you're at
the bottom, rather than at every turn, but I could be persuaded
otherwise; not holding that too strongly.

Release Notes:

- N/A
2026-07-20 20:31:07 +00:00
Danilo Leal af7fd8b72f branch_picker: Ensure description truncates (#61360)
Just a small tweak ensuring the description truncates nicely. I think
this was a recently-introduced regression, as I am pretty sure it was
truncating well not too long ago.

Release Notes:

- N/A
2026-07-20 20:25:07 +00:00
Joseph T. Lyons 3e34dcf2a7 Keep git panel history entry highlighted while context menu is open (#61354)
Also, unifies the naming of the variable naming for the target entry in
both the git graph and git panel history tab.

Release Notes:

- Improved the git panel's history tab to keep an entry highlighted
while its context menu is open
2026-07-20 17:27:25 +00:00
tidely 16fd124094 anthropic: Deprecate fast mode for Opus 4.6 and Opus 4.7 (#61341)
TLDR: Opus 4.6 has been falling back to standard speed. Opus 4.7 fast
mode API will error after July 24th.

This will likely need to be cherry-picked to stable for either
Wednesday's release, or be pushed out separately on the 24th to maximize
availability. Although I don't think there are many Opus 4.7 fast mode
users, so Wednesday seems better to me.

> Fast mode for Claude Opus 4.7 is deprecated as of June 25, 2026, and
will be removed on July 24, 2026. After removal, requests to
claude-opus-4-7 with speed: "fast" will return an error; unlike Claude
Opus 4.6 (see the following note), Claude Opus 4.7 does not fall back to
standard speed. The model itself remains available at standard speed. To
continue using fast mode, migrate to Claude Opus 4.8.

Source: https://platform.claude.com/docs/en/build-with-claude/fast-mode

Release Notes:

- Deprecated Fast Mode for Opus 4.6 and Opus 4.7
2026-07-20 17:23:54 +00:00
counterfactual5anddino a76d168d1e settings_ui: Fix MCP server toggle not updating in UI (#60552)
Fixes an issue where toggling an MCP server on/off in Settings → AI →
MCP Servers does not update the toggle state in the UI immediately.

## Root Cause

There were two issues:

1. `ContextServerStore::update_server_state()` and `remove_server()`
emitted `ServerStatusChangedEvent` but did not call `cx.notify()`, so
Settings UI observers were not informed to re-render.

2. `render_toggle_switch()` was bound to `is_running` (runtime status)
instead of `is_enabled` (settings state).

## Solution

- Add `cx.notify()` in both methods after emitting the status event.
- Change toggle to read `settings.enabled()` and rename parameter from
`is_running` to `is_enabled`.

## Testing

- `cargo check -p settings_ui -p project` passes.
- `cargo fmt --check` passes.
- Manual verification: open Settings → AI → MCP Servers, toggle a
server, observe immediate UI update.

---

Release Notes:

- Fixed MCP server toggle not updating immediately in Settings UI.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-07-20 17:08:32 +00:00
Jonathan DEKHTIARanddino 558336978a dev_container: Resume configured Compose services together (#60780)
# Objective

Docker Compose devcontainers currently resume only the primary container
when an existing environment is stopped. Supporting services listed in
`runServices`, such as databases and caches, remain stopped.

Fixes #60779

## Solution

Reuse the Docker Compose startup path when resuming an existing
Compose-based devcontainer.

The resume path now:

- Runs `docker compose up -d --no-recreate`.
- Targets the services configured in `runServices`.
- Uses the original Compose files and project name.
- Avoids recreating the existing devcontainer.
- Preserves the existing `docker start` behavior for non-Compose
devcontainers.

A regression test verifies that the requested services are resumed,
unrelated services are excluded, and the existing container is not
recreated.

## Testing

Tested on macOS with:

- `cargo fmt --all --check`
- `cargo test -p dev_container`
- `cargo clippy -p dev_container --tests -- -D warnings`

All 112 `dev_container` tests pass.

Also tested against a multi-service Docker Compose devcontainer
containing a workspace, web server, PostgreSQL, Redis, and Celery. All
configured services resumed while the workspace container retained the
same container ID.

## 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 Docker Compose dev containers not starting all configured
services when resuming an existing environment.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-07-20 17:04:01 +00:00
Chris Biscardi 2d06fded9c Revert "editor: Add language detection for untitled buffers (#61201)" (#61351)
This reverts commit a98c7e2fa8.

# Objective

language detection is firing very often in channel notes, often picking
YAML instead of markdown, causing some language-detection flickering.

cc/ @amtoaer (author of the original PR)
2026-07-20 16:43:55 +00:00
Hector Alfaro 61a81858a1 settings: Fix broken rustdoc intra-doc link in Settings::PRESERVED_KEYS (#61347)
## Objective

The doc comment links for `Settings::PRESERVED_KEYS` point to
`[FileContent](Self::FileContent)` but that associated type was removed
by the settings refactor in
https://github.com/zed-industries/zed/pull/38367.
`Settings::from_settings` now takes `&SettingsContent` directly. The
dead link causes `rustdoc::broken_intra_doc_links` warnings when
building docs for the `settings` crate:

```
warning: unresolved link to `Self::FileContent`
  --> crates/settings/src/settings_store.rs:61:53
    |
61 |     /// The name of the keys in the [`FileContent`](Self::FileContent) that should
    |                                                     ^^^^^^^^^^^^^^^^^ the trait `Settings` has no associated item named `FileContent`
```

Fixes #57310

## Solution

Replaced both `[FileContent](Self::FileContent)` occurrences in
`crates/settings/src/settings_store.rs` with `[SettingsContent]`, which
is already in scope via the existing `use` at the top of the file and
resolves correctly. Docs-only change, no runtime behavior change.

## Testing

- Verified with `cargo doc -p settings --no-deps`, which now completes
without any `broken_intra_doc_links` warnings (previously emitted two).
- No runtime code touched — doc comments only, so no other testing
applies.

## 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-07-20 16:36:51 +00:00
Cole Miller 87a08f30eb Use diff summary for action log stats instead of iterating hunks (#61272)
The diff already has a constant-time accessor to get the counts of
added/removed rows, use that instead of iterating hunks on the
foreground.

Release Notes:
- Improved performance in agent threads with many file changes.
2026-07-20 16:17:02 +00:00
Remco Smits 8e1f9eabc0 git: Only prompt for GPG passphrase when gpg-agent cannot supply it (#61265)
Closes #61141
Follow-up https://github.com/zed-industries/zed/pull/58791

# Objective

Currently after https://github.com/zed-industries/zed/pull/58791 landed,
we now always ask for the gpg passphrase on every commit which is not
ideal, since some people have a bigger **ttl** configured so they don't
have/want to re-enter their passphrase everytime on every commit. So we
should cache the signature so the user does not have to re-enter their
passphrase everytime, which also fixes the case for unprotected keys
which obviously don't have a passphrase. So we pre-check if we can sign
the commit if so we should not ask for the passphrase at all.

## Solution

The solution was also suggested inside this
https://github.com/zed-industries/zed/issues/61141 issue, to first check
if the signature was cached, if that is is the case use that to sign the
commit. If that fails we should fallback to the loopback mode and Zed
should prompt for your passphrase once and your signature should be
cached again.

## Testing

**The basic setup for gpg signing**:

1. Create a key `gpg --full-generate-key`
2. Run `git config --global user.signingkey <KEY ID>`
3. Run `git config --global commit.gpgsign true`
4. Run & copy result from `gpg --armor --export <KEY ID>` and submit
your public key to github https://github.com/settings/gpg/new

**Testing the new flow were the signature is cached**:

5. Run `gpgconf --reload gpg-agent` to reset cached signature
6. Make a change and try committing
7. See that it promts for your passphrase
8. enter passphrase
9. Make a change and try committing
10. Notice it does not re-promts for your passphrase

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] 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
- [x] Performance impact has been considered and is acceptable

## Showcase

**Before** (**Note** before you were prompted everytime when you commit)


https://github.com/user-attachments/assets/0a967bb1-5eff-4224-9e9a-995e411f8d3a

**After** (**Note** you are only prompted once and using the keychain
after instead)


https://github.com/user-attachments/assets/5eee6afb-5972-44d8-afdd-6416a189db32

---

**Note**: I used AI as an assistance to write this PR.

Release Notes:

- Git: Fixed the GPG signing passphrase prompt appearing on every commit
even when gpg-agent had the passphrase cached or the key was
unprotected.
2026-07-20 16:14:26 +00:00
Marshall Bowers 69e5f3e09d cloud_api_client: Make cloud_host method public (#61345)
This PR makes the `cloud_host` method on `CloudApiClient` public.

Release Notes:

- N/A
2026-07-20 15:42:10 +00:00
ozacodandozacod d46e72221f text_finder: Seed query from focused item selection, including terminal (#60351)
## Summary
Seed the text_finder's query from the focused pane's item instead of
only the active center editor. Selecting text in the terminal or
markdown_preview and opening text_finder now seeds that selection; the
item next to focus wins when both it and a center editor have
selections. If the focused item has no selection, the center item is
tried, then the last persisted search as before.

## Test plan
- Select a word in the terminal, open Text Finder, confirm it's
pre-filled and searching
- With a selection in both terminal and editor, confirm the focused one
wins
- Focus the terminal without a selection, confirm an editor selection
still seeds
- No selection anywhere, confirm the last search is restored
- Confirm a selection in a markdown preview seeds too

Release Notes:

- Improved the Text Finder to seed its query from the focused item's
selection, including the terminal

---------

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
2026-07-20 15:17:44 +00:00
cf42c37f29 Fix active pane border and pane opacity dimming showing simultaneously on editor panes and terminal panes (#56595)
When `active_pane_modifiers.border_size` is set in `settings.json`, both
the active editor pane and the active terminal pane would display a
border simultaneously, making it impossible to tell which pane actually
has focus. The pane opacity dimming also renders simultaneously before
this fix.

1. Before fix: impossible to tell which pane has focus
<img width="901" height="732" alt="image"
src="https://github.com/user-attachments/assets/cbcad798-0d72-420c-9585-2dafa867ff2b"
/>

2. After fix: only one pane has focus
<img width="902" height="731" alt="image"
src="https://github.com/user-attachments/assets/97f2238e-4789-41b3-97e3-98cb9a0c82ef"
/>

The root cause is that both the workspace center and the terminal panel
pass their own `active_pane` to `PaneRenderContext`, so each pane group
unconditionally marks its active pane for border rendering. The fix adds
a focus check so `active_pane_ix` is only set when the pane actually has
keyboard focus, ensuring only the truly focused pane gets the border
(and the inactive_opacity dimming applies correctly to unfocused
groups).

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 active pane border being drawn on both the editor pane and
terminal pane simultaneously

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-07-20 14:16:00 +00:00
ArneshandClaude Fable 5 e89e86bacd repl: Open notebooks from single-file worktrees in the notebook editor (#61294)
`NotebookItem::try_open` only checked the worktree-relative path's
extension, which is empty for single-file worktrees. As a result,
opening a notebook directly (`zed foo.ipynb`, or any open outside a
folder worktree) fell through to the text editor and showed raw JSON,
while the same file opened from within a folder workspace opened in the
notebook editor. Fall back to the absolute path when detecting
notebooks.

Tested locally (macOS, with the notebook feature enabled via
`LOCAL_NOTEBOOK_DEV`): `zed /tmp/solo.ipynb` now opens the rendered
notebook view; folder-workspace behavior unchanged.

Release Notes:

- Fixed notebooks opened as single files (e.g. `zed foo.ipynb`)
rendering as raw JSON instead of opening in the notebook editor
(preview-only).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 13:28:46 +00:00
Ben Brandt 46a64b17b5 acp: Validate registry agent checksums (#61334)
The registry now has optional checksums that we can use.

Release Notes:

- N/A
2026-07-20 13:21:18 +00:00
Finn Evers 3e78d2068e icons: Add test to ensure all icon variants exist (#61337)
This is just to help with bookkeeping, as we currently do not ensure
anywhere icons do actually exist.

Release Notes:

- N/A
2026-07-20 12:48:40 +00:00
Jakub Konkaandapoorva-01 913a81546d workspace: Fix crash when closing active item mid-update (#61336)
Closes https://github.com/zed-industries/zed/issues/61182

Supersedes https://github.com/zed-industries/zed/pull/61232

Closes FR-128

Release Notes:

- Fixed crash when closing active item while the workspace was
mid-update (double-lease panic).

Co-authored-by: apoorva-01 <vermaapoorva0510@gmail.com>
2026-07-20 12:39:07 +00:00
Venkatesh R b660cf8e0e snippet: Preserve escaped characters in non-default choice options (#61313)
Closes #61312

In `parse_choices`, the escape branch only appended the escaped
character to `current_choice` when parsing the first choice, because the
push was placed inside the `!found_default_choice` guard. That guard is
only meant for `text` (the default value inserted into the buffer) — the
plain-text branch below handles it that way. As a result, `${1|a,b\,c|}`
offered the choices `a` and `bc` instead of `a` and `b,c`, and the same
applied to any `\,`, `\|`, or `\\` in choices after the first.

Moved `current_choice.push(c)` out of the guard and added a regression
test covering escaped comma, pipe, and backslash in non-first choices.
Escapes in the first choice were already covered by the existing test
and are unchanged.

Before / after (snippet body `"${1|a,b\\,c|}"`): the choice dropdown
showed `a` / `bc`, now shows `a` / `b,c`.

Release Notes:

- Fixed escaped characters (`\,`, `\|`, `\\`) being dropped from snippet
choice options after the first one
2026-07-20 11:17:43 +00:00
Danilo Leal e1ee74dcbf worktree_picker: Improve discoverability of tasks as a creation setup mechanism (#61148)
Sometimes when creating Git worktrees, it's necessary to set things up
so the new worktree is ready. For example, copying env.vars, installing
dependencies, etc. That was already possible in Zed through the tasks
system, but you'd only maybe know about that if you read the
documentation or is super familiar with it already; nothing in the
product in the context of worktrees told you about that. This is what
this PR does.

Now, in the worktree picker, there's a "" button that opens the
`tasks.json` file exposing the `create_worktree` hook, which allows you
to plugin all sorts of things to be run by the time of a worktree
creation. If you don't already have a `tasks.json` file, we will create
a new one for you with a worktree-creation template. Otherwise, we
either append the `create_worktree` hook content to it or just open the
file.

Here's a quick video:


https://github.com/user-attachments/assets/21908be4-306b-4cf3-bed0-50d52cad9d79

Release Notes:

- Git Worktrees: Improved discoverability of the `create_worktree` hook
for setting up things that need to happen by the time of worktree
creation.
2026-07-20 11:17:21 +00:00