Commit graph

2274 commits

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

Release Notes:

- N/A
2026-03-12 15:34:09 -07:00
Tommy Han
ec2659a095
Add hotkeys and actions for toggle light and dark theme (#49027)
Mentioned in #47258 

Release Notes:

- Added hotkey options and actions for toggling light and dark theme.
- Add default keymap as `cmd/ctrl+k cmd/ctrl+shift+t`
2026-03-12 21:35:42 +02:00
João Soares
7b69324856
Truncate long diagnostic messages in the status bar (#51031)
Closes #50186

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

## Screenshots:
### Before:
<img width="2543" height="39" alt="image"
src="https://github.com/user-attachments/assets/5e9fb7c5-0ba6-44b5-a0f6-1f63b35550f6"
/>

### After:
<img width="1165" height="581" alt="image"
src="https://github.com/user-attachments/assets/903bc637-7d38-48c5-9207-30e12eaa40de"
/>

Release Notes:

- Fixed long diagnostic messages in the status bar pushing right-side
buttons (terminal, agent, etc.) off screen
2026-03-12 18:25:52 +02:00
Danilo Leal
3c82ddf261
git_ui: Fix "resolve with agent" merge conflict notification (#51290)
Follow up to https://github.com/zed-industries/zed/pull/49807

This PR fixes the merge conflict notification by making it appear only
once per a given set of conflicted paths, as opposed to showing every
time the `ConflictsUpdated` or `StatusesChanged` even would fire.

Release Notes:

- N/A
2026-03-11 11:35:59 -03:00
Max Brunsfeld
b5666319b4
Move threads sidebar into agent panel (#51241)
* [x] Put back persistence of sidebar open state
* [x] when agent panel is docked right, put sidebar on the right side
* [x] remove stale entries from `SidebarsByWindow`

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2026-03-10 23:45:55 -07:00
Danilo Leal
a26f0f8b60
sidebar: Adjust design for the "Open Project" button (#51145)
This PR makes the "Open Project" button in the sidebar also open the
"Recent Projects" popover, while also anchoring that popover to the the
button on the sidebar instead.

Release Notes:

- N/A
2026-03-09 22:01:40 -03:00
Om Chillure
503741ddca
workspace: Hide "View AI Settings" when AI is disabled (#50941)
Fixes #50835

### Problem :
The "View AI Settings" button on the Welcome page was always rendered
regardless of the disable_ai setting. This made it visible (and
non-functional) for users who had AI disabled, which was confusing.

### Fix :
- Adds an optional visibility: Option<fn(&App) -> bool> predicate field
to SectionEntry
- At render time, Section::render uses filter_map to skip entries whose
predicate returns false.
- The "View AI Settings" entry is given a predicate that checks
!DisableAiSettings::get_global(cx).disable_ai, matching the same pattern
used in `title_bar.rs` and `quick_action_bar.rs`.
- All other entries have visibility: None, meaning they are always shown
— no behaviour change for them.

### Video :
[Screencast from 2026-03-06
20-18-43.webm](https://github.com/user-attachments/assets/cbfab423-3ef3-41dd-a9ab-cbae055eef6e)


Release Notes:

- Fixed the "View AI Settings" button being visible on the Welcome page
despite AI features being disabled in settings.
2026-03-09 18:43:39 +01:00
Piotr Osiewicz
97421c670e
Remove unreferenced dev dependencies (#51093)
This will help with test times (in some cases), as nextest cannot figure
out whether a given rdep is actually an alive edge of the build graph

Closes #ISSUE

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

Release Notes:

- N/A
2026-03-09 13:22:12 +01:00
Anthony Eid
2fd5c7b09d
workspace: Fix dock/panel resizing (#50947)
Before the panel resize wouldn't take into account the width of the
sidebar and the right dock could push the left dock on resize too.

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


Co-authored-by: Cameron \<cameron.studdstreet@gmail.com\>

Release Notes:

- N/A
2026-03-06 15:58:58 +00:00
claire
49ef20585d
terminal: Fix drag-and-drop in vertical terminal panels (#49825)
Closes #49800

Adds `handle_drop` to Item & ItemHandle, which allows an active item in
a pane to consume drop events before the pane does.

Release Notes:

- terminal: Fix drag-and-drop not working in vertical terminal panels
2026-03-06 11:37:14 +02:00
Mikayla Maki
7040484057
Fix sidebar selections (#50900)
Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
2026-03-06 06:51:26 +00:00
Mikayla Maki
9afeb4e11d
Implement new Multi Agent UI (#50534)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A

---------

Co-authored-by: Eric <eric@zed.dev>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: John Tur <john-tur@outlook.com>
2026-03-05 20:22:28 +00:00
Om Chillure
b5881c90e5
workspace: Fix autosave on buffer change in multibuffer (#50686)
Fixes #50526
Fixes https://github.com/zed-industries/zed/issues/42841
Fixes https://github.com/zed-industries/zed/issues/49875

### Summary

Fix `autosave: on_focus_change` not firing reliably when leaving editors
with nested focus targets (e.g. multibuffer/search flows).

### Root cause

Autosave on focus change was wired to `on_blur` of the item focus
handle.
`on_blur` only fires when that exact handle is the focused leaf, which
misses common descendant-to-outside focus transitions.

## Fix

In `crates/workspace/src/item.rs`, switch autosave subscription from:
     - `cx.on_blur(&self.read(cx).focus_handle(cx), ...)`

to:
     - `cx.on_focus_out(&self.read(cx).focus_handle(cx), ...)`

Autosave behavior and guards remain unchanged:
- only for `AutosaveSetting::OnFocusChange`
- only when focus truly left the item (`!contains_focused`)
- skipped when modal is active (`!has_active_modal`)

### Impact

- Fixes missed autosaves when moving focus from item descendants to
other UI (terminal, file tree, search inputs, etc.).
- No behavior change for other autosave modes (`off`, `after_delay`,
`on_window_change`).

### Video
[Screencast from 2026-03-04
15-23-07.webm](https://github.com/user-attachments/assets/81135999-320f-40f3-9673-7c0460e5a14a)




Release Notes:

- Fixed an issue where `"autosave": "on_focus_change"` would not
reliably work in multibuffers.

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-03-05 09:51:20 +00:00
Viraj Bhartiya
f3e4c152a3
project_panel: Fix scrolling in empty area below file list (#50683)
Closes #50624

The empty bottom section of the project panel showed a horizontal
scrollbar on hover, but scrolling didn't work there. Added a scroll
wheel handler to the blank area that forwards scroll events to the
uniform list's scroll handle, making both horizontal and vertical
scrolling work from anywhere in the panel.

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

Release Notes:

- Fixed project panel empty area showing a non-functional scrollbar;
scrolling now works from anywhere in the panel

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-03-04 19:13:32 +01:00
Piotr Osiewicz
d329961d7c
workspace: Remove superfluous call dependency (#50713)
Closes #50701

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

Release Notes:

- N/A
2026-03-04 16:02:26 +00:00
Richard Feldman
7c9a9d40c0
Add "Start Thread in New Worktree" (#49141)
Add the thread target selector in the agent panel behind the
`agent-git-worktrees` flag:

<img width="590" height="121" alt="Screenshot 2026-03-02 at 11 50 47 PM"
src="https://github.com/user-attachments/assets/17ee3303-7e01-4e40-bb84-1e7e748a3196"
/>

- Add a "Start Thread In..." dropdown to the agent panel toolbar, gated
behind `AgentV2FeatureFlag`
- Options: "Local Project" (default) and "New Worktree"
- The "New Worktree" option is disabled when there's no git repository
or in collab mode

Closes AI-34

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: morgankrey <morgan@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Finn Evers <finn@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: MostlyK <135974627+MostlyKIGuess@users.noreply.github.com>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: John Tur <john-tur@outlook.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Wuji Chen <chenwuji2000@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Kasper Nyhus <kanyhus@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Josh Robson Chase <josh@robsonchase.com>
Co-authored-by: ozacod <47009516+ozacod@users.noreply.github.com>
Co-authored-by: ozacod <ozacod@users.noreply.github.com>
Co-authored-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Lena <241371603+zelenenka@users.noreply.github.com>
Co-authored-by: 0x2CA <2478557459@qq.com>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Co-authored-by: Albab Hasan <155961300+Albab-Hasan@users.noreply.github.com>
Co-authored-by: KyleBarton <kjb@initialcapacity.io>
Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: Tom Houlé <13155277+tomhoule@users.noreply.github.com>
Co-authored-by: Nikhil Pandey <nikhil@nikhil.com.np>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: dancer <144584931+dancer@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-03 15:25:36 +00:00
Sergei Zharinov
4392e3a9fc
workspace: Fix scrolling to active tab when pinned tabs are present (#50538)
When pinned tabs are present, activating an unpinned tab passed the
absolute tab index to the scroll handle, which only contains unpinned
tabs. This caused the scroll-into-view to silently fail.

Subtract `pinned_tab_count` from the index so it maps to the correct
child in the unpinned tabs scroll container.

Release Notes:

- Fixed tab bar not reliably scrolling to the active tab when pinned
tabs are present.
2026-03-03 01:18:56 +01:00
Lukas Wirth
8f329d1ee3
workspace: Properly flush effects in send_keystrokes_impl (#50486)
Should fix the test issue observed in
https://github.com/zed-industries/zed/pull/50068

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-02 15:37:59 +01:00
Anthony Eid
ab7cf50857
Revert "sidebar: Zoom temporarily hides sidebar (#50088)" (#50297)
This reverts commit aa3a12b566, because we no longer want a zoomed item
to block the sidebar.

This is because the sidebar is used for navigation and it interrupts a
user's flow if they're scrolling through their active workspaces, and
the sidebar just vanishes.

### Before
<img width="3248" height="2122" alt="image"
src="https://github.com/user-attachments/assets/c1c94b2c-fbbc-41a4-8eb9-47160ecba994"
/>

### After
<img width="1624" height="1061" alt="Screenshot 2026-02-27 at 2 10
24 PM"
src="https://github.com/user-attachments/assets/91d70281-f8ed-4da5-8e50-056370eb2fee"
/>


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

Release Notes:

- N/A
2026-02-27 13:24:26 +00:00
Mikayla Maki
f1c5ed324b
Add folder_paths for project grouping (#50249)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-02-26 22:32:48 +00:00
Anthony Eid
2434a77dbf
ui: Fix modals not using UI font and text color (#50208)
The bug occurred because we weren't setting the right text style on the
root div anymore (Multiworkspace), which was introduce in #49995

### Before
<img width="3248" height="2122" alt="image"
src="https://github.com/user-attachments/assets/eca71731-5009-4e47-a948-d80eb3f13938"
/>

### After
<img width="3248" height="2122" alt="image"
src="https://github.com/user-attachments/assets/75d8c591-f539-413e-a171-71e4fc847f13"
/>


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

Release Notes:

- N/A
2026-02-26 14:05:26 +00:00
Anthony Eid
72d69d1b14
multi_workspace: Move up action handler and modal rendering from workspace to multi workspace (#49995)
Now that MultiWorkspace is the root view, actions bound to the
`Workspace` key context wouldn't be dispatched when `Workspace` is not
in the key context stack (e.g. when the sidebar is focused). To fix
this, the `Workspace` key context and action handlers are moved up to
the MultiWorkspace rendering layer. This avoids introducing a new key
context and the keymap migration that would require.

This PR also moves modal rendering up a layer so modals are centered
within the window (MultiWorkspace element) instead of the Workspace
element.

### Before
<img width="3248" height="2122" alt="image"
src="https://github.com/user-attachments/assets/233a0b75-47a1-423a-8394-c6a1b50fb991"
/>
### After
<img width="3248" height="2122" alt="image"
src="https://github.com/user-attachments/assets/9c51c839-e524-4ef8-afc9-9429b028def0"
/>


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

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2026-02-25 23:37:17 +00:00
Anthony Eid
697e71d91b
multiworkspace: Disable sidebar if disable_ai is enabled (#50137)
We don't want to show the sidebar to users if they have `disable_ai`
enabled because it's an AI focused feature. In the future if we add non
AI functionality to the sidebar we'll reenable it.

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

Release Notes:

- N/A
2026-02-25 23:01:59 +00:00
Mikayla Maki
1b2c1b4864
Fix a bug where closing the workspace could skip the dirty check for other workspaces (#50105)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-02-25 17:33:05 +00:00
Cameron Mcloughlin
aa3a12b566
sidebar: Zoom temporarily hides sidebar (#50088)
Using zoom now temporarily hides the sidebar. Unzooming reopens the
sidebar

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-25 15:14:20 +00:00
Mikayla Maki
7e3e168761
Fix window bounds related bugs from multi-workspace serialization (#50065)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-02-25 08:08:00 +00:00
Conrad Irwin
40d3aa6fea
Make Workspace::split infallible (#50060)
Fixes ZED-596

Release Notes:

- Fixed a panic in editor::GoToDefinitionSplit if you managed to close
the current pane before the definitions were resolved
2026-02-24 23:33:34 -07:00
xj
269b03f4a3
workspace: Add ActivateLastPane action (#49853)
## Summary

Add `workspace::ActivateLastPane` so users can bind a shortcut (for
example `cmd-9`) to focus the last pane.

## Why

Today, the closest option is `workspace::ActivatePane` with an index
(for example `8`), but that has side effects: when the index does not
exist, it creates/splits panes (`activate_pane_at_index` fallback).

`ActivateLastPane` gives a stable, no-surprises target: focus the
rightmost/last pane in current pane order, never create a new pane.

## Context

This capability has been requested by users before:
- https://github.com/zed-industries/zed/issues/17503#event-22959656321

## Prior art

VS Code exposes explicit editor-group focus commands and index-based
focus patterns (e.g. `workbench.action.focusSecondEditorGroup` ...
`focusEighthEditorGroup`) in its workbench commands:
-
https://github.com/microsoft/vscode/blob/main/src/vs/workbench/browser/parts/editor/editorCommands.ts#L675-L724

Zed already follows numbered pane focus in default keymaps
(`ActivatePane` 1..9 on macOS/Linux/Windows), so adding a dedicated
"last pane" action is a small, natural extension:
- `assets/keymaps/default-macos.json`
- `assets/keymaps/default-linux.json`
- `assets/keymaps/default-windows.json`

## Change

- Added `workspace::ActivateLastPane`
- Implemented `Workspace::activate_last_pane(...)`
- Wired action handler in workspace listeners
- Added `test_activate_last_pane`

## Validation

- `cargo test -p workspace test_activate_last_pane -- --nocapture`
- `cargo test -p workspace test_pane_navigation -- --nocapture`
- `cargo fmt --all -- --check`

## Risk

Low: focus-only behavior, no layout/data changes, no default keymap
changes.

Release Notes:

- Added `workspace::ActivateLastPane` action for keybindings that focus
the last pane.

---------

Co-authored-by: xj <gh-xj@users.noreply.github.com>
2026-02-24 21:53:02 +05:30
Anthony Eid
c6a82b3b45
debugger: Open correct pane for breakpoints (#49390)
Closes #40602

### Summary

This PR ensures that active debug lines only open in a single pane and
new active debug lines are added to the most recent pane that contained
an active debug line. This fixes a bug where Zed could go to the active
debug line file and location in every pane a user had open, even if that
pane was focused on a different file.

I fixed this by storing the `entity_id` of the pane containing the most
recently active debug line on `BreakpointStore`, this is consistent with
where the selected stack frame is stored. I used an `entity_id` instead
of a strong type to avoid circular dependencies. Whenever an active
debug line is being set in the editor or by the debugger it now checks
if there's a specific pane it should be set in, and after setting the
line it updates `BreakpointStore` state.

I also added a new method on the `workspace::Item` trait called `fn
pane_changed(&mut self, new_pane_id: EntityId, cx: &mut Context<Self>)`
To enable `Editor` to update `BreakpointStore`'s active debug line pane
id whenever an `Editor` is moved to a new pane.


### PR review TODO list

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

Release Notes:

- debugger: Fix bug where active debug lines could be set in the wrong
pane
2026-02-24 12:49:52 +01:00
Jakub Konka
060d0712f8
workspace: Invert dependency on call crate by extracting into a trait (#49968)
Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2026-02-24 11:19:34 +00:00
Lukas Wirth
aa91fd4a96
Reduce amount of closure monomorphizations part 2 (#49688)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-20 08:32:45 +00:00
Austin Cummings
157a02e7d9
Fix OpenFiles action not respecting use_system_path_prompts setting (#47027)
The OpenFiles action was always using the system file picker dialog,
ignoring the use_system_path_prompts setting. This adds a
workspace-level handler that calls prompt_for_open_path, which respects
the setting, instead of falling through to the global handler.

Closes #46386

Release Notes:

- Fixed "workspace: open files" not respecting "use_system_path_prompts"
setting

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-02-19 04:02:29 +02:00
Richard Feldman
5b0a3de01c
Add agent worktree directory setting + worktree info persistence (#49139)
Add `agent_worktree_directory` to `GitSettings` for configuring where
agent worktrees are stored (default: Zed data dir). Remove `Copy` derive
from `GitSettings`/`GitContentSettings` (incompatible with String field)
and fix downstream `.as_ref().unwrap()` call sites.

Define `AgentGitWorktreeInfo` (branch, worktree_path, base_ref) and add
it to `DbThread` + `DbThreadMetadata` for persistence and session list
display.

Closes AI-33

Release Notes:

- N/A
2026-02-18 22:20:31 +00:00
Richard Feldman
4e21e753ec
Fix multi-workspace restoration and serialization bugs (#49380)
Fix several issues with multi-workspace serialization and restoration
that caused sidebar workspaces to not fully restore after Zed restart.

## Changes

### 1. Resilient restoration — don't let one failing workspace kill the
rest

In `restore_multiworkspace`, the loop restoring each workspace in a
group used `?` on every `.await`. If any single workspace failed (e.g. a
DB read error, item deserialization failure), all remaining workspaces
were silently abandoned. Changed to log-and-continue so each workspace
is attempted independently. `restore_multiworkspace` now returns a
`MultiWorkspaceRestoreResult` containing both the window handle and a
list of errors, which the caller logs individually.

### 2. Proper serialization at lifecycle events

- **`create_workspace`** now assigns a database ID (via `next_id()`) and
writes a `session_id`/`window_id` binding so newly-created workspaces
can be persisted and restored.
- **`remove_workspace`** now deletes the removed workspace from the DB
(preventing zombie restoration) and serializes the updated
multi-workspace state.
- **`activate`** now only serializes when the active workspace actually
changes, and uses the new `set_active_workspace` helper to keep the
ordering correct (set index *then* serialize, not the other way around).
- The `serialize` method now stores its task in `_serialize_task`
instead of fire-and-forget detaching, enabling `flush_serialization` to
await it.

### 3. Flush serialization on quit

The quit handler now calls `flush_serialization` on every workspace and
multi-workspace before `cx.quit()`, bypassing the 200ms throttle to
ensure all `session_id`/`window_id` values are written to the database
before the process exits.

### 4. Await pending tasks on app quit

`MultiWorkspace` now registers an `on_app_quit` handler that awaits all
in-flight serialization, creation, and removal tasks within GPUI's
shutdown timeout. The existing `on_release` handler continues to detach
tasks as a safety net for non-quit window closes, matching the pattern
used by `Room`.

### 5. Track workspace serialization task

`Workspace::serialize_workspace` now stores the actual serialization
task in `_serialize_workspace_task` instead of detaching it, so
`flush_serialization` can cancel any pending throttle *and* await the
in-flight write.

### 6. New persistence helper

Added `set_session_binding` query to update a workspace's `session_id`
and `window_id` in one shot, used by `create_workspace` to bind
newly-created workspaces to the current session.

### 7. Tests

Added tests covering:
- `flush_serialization` completing before quit
- `create_workspace` assigning a DB ID and serializing the active
workspace ID
- Removal of a workspace deleting it from the DB and updating
multi-workspace state
- Restoration resilience when individual workspaces fail

Closes AI-37

(No release notes because this is still feature-flagged.)

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-02-18 18:26:26 +00:00
Anthony Eid
66f7aea166
agent: Disables multi workspace refresh queue for non-staff (#49496)
Refreshing the queue was causing hangs on debug builds, so this is a
short term fix until we rework how the sidebar gets its data.

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

Release Notes:

- N/A
2026-02-18 16:34:27 +00:00
Lukas Wirth
7d80412cca
Reduce amount of monomorphizations from FnMut closures (#49453)
Replaces a bunch of `impl FnMut` parameters with `&mut dyn FnMut` for
functions where this is the sole generic parameter.
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-18 12:00:02 +01:00
Cameron Mcloughlin
7eca6a9527
workspace: Group recent projects by date (#49414)
Release Notes:

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

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-17 23:30:28 +00:00
Cameron Mcloughlin
ee9191ecd2
workspace: Add Toggle actions to all the side panels (#49395)
Release Notes:

- Add `toggle` actions to all panels to toggle visibility

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-17 23:06:27 +00:00
Danilo Leal
d2aa2e0c5a
ui: Remove unused components (#49410)
Some house-keeping on the UI crate; all of these were pretty much
unused, so we can take them out for the time being.

Release Notes:

- N/A
2026-02-17 19:28:30 -03:00
Danilo Leal
d900b2b656
ui: Put back left-border in tab bar end actions (#49402)
Fixing a minor UI issue that regressed in
https://github.com/zed-industries/zed/pull/49038.

Release Notes:

- N/A
2026-02-17 21:36:47 +00:00
Anthony Eid
a5dee51fd9
sidebar: Serialize after adding/removing workspaces (#49372)
Before this PR we wouldn't always serialize workspaces when a
mutliworkspace adds/removes a workspace. This PR fixes this by adding a
test and calling serialization in remove

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

Release Notes:

- N/A
2026-02-17 12:38:03 -05:00
John Tur
d168301c5d
Reuse existing remote workspaces when opening files from the CLI (#49307)
Re-lands https://github.com/zed-industries/zed/pull/48891, which was
reverted due to conflicts with multi-workspace.

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects

Release Notes:

- N/A
2026-02-16 18:03:18 -05:00
Lukas Wirth
e9a8ef1c9e
workspace: Fix read-only button tooltip for non-toggleable buffers (#48998)
Release Notes:

- Fixed an incorrect hover label for read-only file lock buttons
2026-02-16 20:11:37 +00:00
Yaroslav Yenkala
d0c0c33abf
Fix missing right border on pinned tabs in two-row layout (#46952)
Closes https://github.com/zed-industries/zed/issues/46926

## Description:

- Fixes the missing right border on pinned tabs when
`show_pinned_tabs_in_separate_row` is enabled.

The two-row tab bar layout was missing the border element that visually
separates the pinned tabs row. This border was present in the single-row
layout but was not added when implementing the two-row layout.

  ## Steps to reproduce

1. Enable `"tab_bar": { "show_pinned_tabs_in_separate_row": true }` in
settings
  2. Open multiple files
  3. Pin at least one tab (right-click → Pin Tab)
  4. Notice pinned tabs are missing right-hand side border

  **Before (bug):**
  
<img width="1060" height="186" alt="image"
src="https://github.com/user-attachments/assets/7d18f24d-a51b-4f13-8410-a15fa92e1bb3"
/>

  **After (fixed):**

<img width="863" height="69" alt="image"
src="https://github.com/user-attachments/assets/3354e809-b298-49a1-b16a-871caef67176"
/>

  ## Test plan

- [x] Follow reproduction steps above and verify the border now appears
  - [x] Verify border appears immediately (not just after drag-and-drop)
- [x] Verify single-row layout still works correctly when setting is
disabled
  - [x] Added automated test `test_separate_pinned_row_has_right_border`
  
   ### Additional fix: Drag-and-drop to pinned tabs bar

During implementation, discovered that we couldn't drag tabs to the end
of the pinned tabs bar. This PR also adds:

  - A drop target at the end of the pinned tabs row
- Proper pinning behavior when dropping unpinned tabs to the pinned area
  - Keeps the dragged tab active after drop
  
Release Notes:

- Fixed the missing right border on pinned tabs when
`show_pinned_tabs_in_separate_row` is enabled.
- Fixed drop target at the end of the pinned tabs row
- Fixed pinning behavior when dropping unpinned tabs to the pinned area
- Fixed case when the dragged tab was not active after drop (when enable
`"tab_bar": { "show_pinned_tabs_in_separate_row": true }` in settings)

---------

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-02-16 14:11:54 +00:00
Coenen Benjamin
b6c48b60ab
search: Fix collapse/expand all button sync (#48773)
Derive collapsed state from `Editor.has_any_buffer_folded` instead of
tracking it separately, removing redundant `ResultsCollapsedChanged` event
and stale `is_collapsed`/`results_collapsed` fields.

Closes #48734 

Release Notes:

- Fixed collapse/expand all button in buffer search and project search
not syncing correctly when toggling individual file sections

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-02-16 12:55:16 +00:00
Xin Zhao
81ec5b79ed
workspace: Fix remote project buttons sharing same element ID on welcome page (#49096)
Closes #49083

This issue was caused by remote projects on the welcome page sharing the
same ID, as they all used the "Remote Project" label. Additionally, the
tab size was hardcoded to 10, which caused the tab navigation to break.
This PR assigns unique IDs and removes the hardcoded limitation.


- [x] locally checked the click behavior
- [x] self-review done

Release Notes:

- Fixed Welcome page remote projects not responding correctly when
clicked.
2026-02-13 14:17:58 +00:00
Tom Planche
4fefc6f890
Fix discard not reloading buffer from disk (#48936)
Closes #48308.

Before:

![zed-#48308-before](https://github.com/user-attachments/assets/3da194c1-6e86-4743-8194-94dd1a17682c)

After:

![zed-#48308-after](https://github.com/user-attachments/assets/4f52ff38-bcb8-4f07-8e44-55c57ff16002)

Release Notes:
- Fixed file changes not being discarded when closing a tab with "Don't
Save" or "Discard all".
2026-02-13 00:40:45 +00:00
Richard Feldman
f39e3fbd23
Fix agent panel closing unexpectedly when zoomed (#49037)
Closes https://github.com/zed-industries/zed/issues/33430

Two changes:

1. Fix `observe_global_in` to not permanently remove observers when the
window is transiently unavailable (e.g. temporarily taken during a
nested update). Previously this returned false and silently removed the
observer from the subscriber set. Now it checks whether the entity is
actually dropped before removing — if the entity is alive but the window
is just unavailable, it keeps the observer alive.

2. Extend `dock_to_preserve` in `handle_pane_focused` to also preserve
docks whose active panel has focus, not just docks whose panel's inner
pane matches the focused pane. Panels like `AgentPanel` don't implement
`pane()` (only panels like `TerminalPanel` that contain panes do), so
the existing preservation logic never identified the agent panel's dock
as needing protection. This meant that when the agent panel was zoomed
and a center pane received focus (e.g. during macOS window activation
events), `dismiss_zoomed_items_to_reveal` would close the dock, making
the panel disappear unexpectedly.

Closes AI-16

Release Notes:

- Fixed agent panel unexpectedly closing when zoomed and the window
regains focus.
2026-02-12 17:15:56 -05:00
Richard Feldman
9446eef9b9
Preserve panel zoom state across workspace switches (#49069)
When the agent panel (or any dock panel) is open and
fullscreened/zoomed, switching to a different workspace in the sidebar
and then switching back caused the panel to close. It should remain both
open and zoomed.

The root cause was in `MultiWorkspace::focus_active_workspace()` — it
always focused the center pane of the active workspace. This triggered
`dismiss_zoomed_items_to_reveal(None)`, which closed any zoomed dock
panel (the same behavior as when a user intentionally clicks away from a
zoomed panel).

The fix checks if any dock has a zoomed panel before deciding what to
focus. If a zoomed panel exists, it focuses that panel instead of the
center pane, preventing the dismiss logic from firing.

Closes AI-22

Release Notes:

- Fixed panels losing their fullscreen state when switching between
workspaces.
2026-02-12 16:59:28 -05:00
Richard Feldman
009cc7ebb0
Remove Agents Panel and utility panes (#49038)
Remove the `AgentsPanel` (from the `agent_ui_v2` crate) and the utility
pane infrastructure from the codebase.

The Agents Panel was a separate panel gated behind the `agent-v2`
feature flag that was redundant with the existing Agent Panel. Utility
panes were a layout concept (secondary panes next to the editor,
separate from dock panels) whose only consumer was `AgentThreadPane` in
the Agents Panel.

### Changes
- Deleted the entire `agent_ui_v2` crate (`agents_panel.rs`,
`agent_thread_pane.rs`)
- Deleted `workspace/src/utility_pane.rs`
- Removed `UtilityPane`, `UtilityPaneHandle`, `UtilityPanePosition`,
`MinimizePane`, `ClosePane` from `workspace/src/dock.rs`
- Removed all utility pane fields, methods, and render blocks from
`workspace.rs`
- Removed all aside toggle code from `pane.rs` and `pane_group.rs`
- Removed `agents_panel_dock` setting from agent settings and
`default.json`
- Removed all `agent_ui_v2` references from `main.rs`, `zed.rs`, and
Cargo.toml files
- Cleaned up test code in `tool_permissions.rs` and `agent_ui.rs`

Closes AI-17

(No release notes because this was all feature-flagged.)

Release Notes:

- N/A
2026-02-12 15:46:10 -05:00