d9abcde22a4fc2a17c2bcf4ae5def4e71a04db7e
532
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0446ad2294 |
Refine recent commands' UX (#64181)
Follow-up to https://github.com/zed-industries/zed/pull/63388 https://github.com/user-attachments/assets/2a855451-141b-4030-8475-92f23c661d51 Release Notes: - Improved recent commands' UX |
||
|
|
d643da9c3b |
project_panel: Add Menu key support to project panel context menu (#46744)
Closes #45783 `Menu` key or `Shift + F10` shortcut wasn't supported in project panel for opening the context menu, this PR fixes it. Release Notes: - Added an action and default keyboard shortcuts to open the context menu in the project panel. You can now bind `project_panel::OpenContextMenu` to deploy the context menu at the currently selected entry in the panel. --------- Co-authored-by: MrSubidubi <finn@zed.dev> |
||
|
|
aac4829c4d |
Add action parameter comment_empty_lines for editor::ToggleComments (#63961)
# Objective - Fixes: https://github.com/zed-industries/zed/issues/60738 - Re-iteration of https://github.com/zed-industries/zed/pull/63918 with suggested changes ## Solution - Added the parameter `comment_empty_lines` to `editor::ToggleComments` set to `false` by default. ## Testing - Tested manually. See showcase below. - Added two automated tests for the added feature. - Tested on MacOS. ## 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 ## References The action's behavior was observed across Emacs, VSCode, and Intellij, and the corresponding keymaps were set accordingly. https://github.com/user-attachments/assets/36c1a27a-357c-468a-b56b-59ef31265329 https://github.com/user-attachments/assets/de755753-9de1-4771-980f-177810fb85ef https://github.com/user-attachments/assets/c8ecd261-2bba-4345-89f4-c1d708d8b6d2 ## Showcase Below is the screen recording of these three tests: 1. Behavior of toggling comments when `comment_empty_lines` is `true`. 2. Switching the parameter value to true after commenting a block and un-commenting the same block does not re-comment the block due to an empty line in between. 3. Menu bar item is still present, albeit it's behavior is mapped to the default value of the parameters of the bound action, instead of what is inside the keybindings file. This (bug?) was present even before. See the attached clip below. 1. https://github.com/user-attachments/assets/a9cd2a2c-437b-41a3-bd8e-c4c3a1f350cd 2. https://github.com/user-attachments/assets/4bbfb77c-9019-410e-9d0a-952d4438d2a7 3. https://github.com/user-attachments/assets/ca300e2d-2106-4bb7-865b-5d2ab89cd0f2 https://github.com/user-attachments/assets/ec1e47b6-ff99-461e-93af-af925be4d914 --- Release Notes: - Added `comment_empty_lines` parameter to `editor::ToggleComments` for multiline selections. Use `["editor::ToggleComments", {"comment_empty_lines": true}]` to comment blank lines too (default for Zed keymap now), or `["editor::ToggleComments", {"comment_empty_lines": false}]` to skip them (default for VSCode keymap). --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
66a1d8d7cb |
Support LSP command executions and showDocument requests (#63607)
Closes https://github.com/zed-industries/zed/issues/13756 Closes https://github.com/zed-industries/zed/issues/61572 Last window client capability we were missing! <img width="1557" height="159" alt="image" src="https://github.com/user-attachments/assets/2cca5d92-a28e-4262-8f55-89f582782bbc" /> Two features are connected to each other, as most of the commands result in opening a document: https://github.com/user-attachments/assets/661aae88-7af9-4173-9f6a-2fd11dbec675 Release Notes: - Added support for LSP command executions and showDocument requests |
||
|
|
2e9b4fe596 |
Unify copy actions for agent panel and markdown (#63884)
Before, it was not possible at all to copy the text from the agent panel, only its markdown. The PR breaks the existing ctrl/cmd-c binding there by using the same approach markdown preview does: copy as text by default, allow to copy as markdown via the context menu. Before: https://github.com/user-attachments/assets/2014f363-5167-4700-be86-9c0774d7e4fd After: https://github.com/user-attachments/assets/1dad253c-7a3b-4ca7-99c8-e8df8b3c3fd6 Release Notes: - Changed agent panel to copy text with cmd/ctrl-c, as markdown preview does. `markdown::CopyAsMarkdown` action is available still and can be bound if needed. |
||
|
|
c2f6ece4e2 |
Add a history list key context to the Git panel (#63689)
# Objective The Git Panel exposes the `ChangesList` key context while its list is focused, including when the History tab is active. This causes Changes-only keybindings to match in History and provides no context for History-specific bindings. This is a fresh submission of the revised change from #63669, as requested in that PR's discussion. Fixes #61012 ## Solution Select the list key context from the active Git Panel tab. Changes exposes `ChangesList`, while History exposes `HistoryList`. The shared `GitPanel` and `menu` contexts remain unchanged. Preserve compatible keyboard behavior by sharing navigation, confirmation, and cancellation bindings between `ChangesList` and `HistoryList` on macOS, Linux, Windows, and Vim. File, staging, restore, and commit-editor bindings remain exclusive to `ChangesList`. Extend the dispatch-context test to verify that the list contexts are mutually exclusive and absent while the commit editor is focused. ## Testing - `cargo fmt --package git_ui -- --check` - `./script/check-keymaps` - `git diff --check` - `cargo test -p git_ui test_dispatch_context_with_focus_states -- --nocapture` - `cargo test -p git_ui` (153 passed) - `cargo build -p zed` - Manually verified on macOS that History reports `HistoryList` without `ChangesList`, arrow navigation selects commits, and Enter opens the selected commit - Linux and Windows keymaps were updated and checked, but not manually exercised on those platforms ## 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 The Keyboard Context view shows `GitPanel`, `menu`, and `HistoryList` while the History tab is focused. `ChangesList` is absent.  --- Release Notes: - Fixed Git Panel keybindings matching the Changes tab while the History tab is active. |
||
|
|
9441364cf1 |
Fix Keymap Editor "Search by Keystrokes" shortcut shadowed by the text finder (#63376)
# Objective Fixes #62361. In the Keymap Editor, focus lands on the "Filter action names" input, which is wrapped in a `BufferSearchBar` key context (`crates/keymap_editor/src/keymap_editor.rs`). Its `cmd-alt-f → text_finder::Toggle` binding (added in #60677) shadows the `KeymapEditor` context's `cmd-alt-f → keymap_editor::ToggleKeystrokeSearch`, because `BufferSearchBar` sits deeper in the focus stack — so `cmd-alt-f` in the filter opens the file finder instead of toggling "Search by Keystrokes". Same collision on Linux (`ctrl-alt-f`); Windows is unaffected (it uses `alt-f`). ## Solution Add a `KeymapEditor > BufferSearchBar` binding mapping the chord back to `keymap_editor::ToggleKeystrokeSearch`, in `default-macos.json` and `default-linux.json`. It's more specific than the plain `BufferSearchBar` binding and placed after the `KeymapEditor` block, so it wins the same-depth tie-break (gpui precedence: depth, then definition order) — restoring the shortcut inside the Keymap Editor without affecting the global text finder. I gave the `KeymapEditor` binding precedence rather than rebinding "Search by Keystrokes" to a non-conflicting default (e.g. `cmd-alt-k`), since it's less invasive and doesn't change a documented default. Happy to switch to the rebind if the team prefers. ## Testing Built and ran locally on macOS: opened the Keymap Editor (`cmd-k cmd-s`), pressed `cmd-alt-f` with focus in the filter → "Search by Keystrokes" toggles instead of opening the file finder; confirmed the file finder still works normally in a regular editor. `cargo test -p zed keymap` passes (validates the bundled keymaps parse and all actions resolve). ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Tests cover the new/changed behavior (bundled-keymap validation exercises the new binding; runtime behavior manually verified — no logic to unit-test in a default-keymap change) _Unsafe blocks / UI standards / performance: N/A for a keymap default change._ Release Notes: - Fixed the Keymap Editor's "Search by Keystrokes" shortcut (`cmd-alt-f` / `ctrl-alt-f`) being shadowed by the file finder. |
||
|
|
74f3fa1454 |
Support Emmet's wrap with abbreviation (#63383)
Closes https://github.com/zed-industries/zed/issues/15588 https://github.com/user-attachments/assets/2813d235-6dac-4fe6-9ae0-2783e16270ac Release Notes: - Added Emmet's wrap with abbreviation support |
||
|
|
6d0f8c93d8 |
git_ui: Add multi-select to git panel for bulk stage, unstage, and discard (#60340)
Closes #26430 Complements: #52935 by Jacob Binnie Enables multi-select in the Git Panel, following the Project Panel rules. https://github.com/user-attachments/assets/2892c1e2-3071-47f9-af1a-48e1c69dbb8a **Core selection gestures:** 1. Click one file, shift+click a file deeper in the list: all files between highlight. 2. Click one file, then ctrl/cmd+click another file: it joins the selection; or removes it when selected. 3. Shift+down extends the selection from the current row; shift+up shrinks it back and re-extends past the anchor. 4. Escape with a selection clears it and keeps focus; Escape again toggles focus as before. 5. Plain click collapses selection to file and opens its diff; double-click triggers the alternate open action. 6. Shift+click on a checkbox still performs the pre-existing range staging. **Bulk operation gestures:** 1. Select multiple files, press space: if any member is unstaged, all become staged; press space again: all unstaged. 2. Right-click a file inside the selection: menu reads Stage/Discard/Trash N files, depending on context. 3. Select multiple files, press delete: confirmation prompt. Mixed selections: untracked = trashed, staged = unstaged. **Folders, in tree view:** 1. Ctrl/cmd+click a folder row behaves like its checkbox does: selects it as a unit, expands operations to descendants. 2. Folder rows inside a shift range join the selection. A collapsed folder is selected including its hidden files. 3. The same directory under Tracked and Untracked is two independent selections (so marks are section-qualified). 5. Plain click on a folder still expands/collapses it and clears the selection. **Implementation notes:** 1. Selection is stored as repo paths plus section-qualified tree keys to survive status refreshes.* 2. Stale entries are pruned on rebuild, selection is cleared on active repository change. 3. Range selection follows visual order in both flat and tree view. 4. Bulk operations batch into a single git operation. \* Not sure if this is the best option for storing it. **Why this is necessary** - Multi-select has been an ongoing feature wish since 2025 with various upvotes - Current state of the art IDEs offer this (VSCode, IntelliJ, VS) - It greatly increases efficiency using the diff panel **Why is the PR from #52935 not enough?** This PR builds on its approach. Thanks to @jacobbinnie. But I noticed a few things: - never clears the selection when the active repository changes - a failed checkout or trash disappears silently - hardcodes single-click = project diff and double-click = file diff, ignoring the entry_primary_click_action setting - its context menu still reads "Stage File" / "Discard Changes" (singular) - discard prompt always says "Discard" even for an all-untracked selection that will actually trash files - no shift+arrow range extension, no Escape to clear - it skips directory rows entirely, in tree view you can't act on a folder's subtree at all - its range_select only ever accumulates, consecutive shift+clicks grow the set and nothing shrinks it - Uses Vec<RepoPath> on marks, linear contains scans -> This PR uses HashSets, relevant for huge repos. - doesn't ship any tests -> This PR covers the whole range with tests too* \* Tests dominate this PR (~850 lines). The actual feature sits around 400. Release Notes: - Added multi-select to the git panel --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> Co-authored-by: Jacob Binnie <jacob.b@linktr.ee> Co-authored-by: Andrea Leone <andrealeone@hey.com> |
||
|
|
75917d2f73 |
tabular_data_preview: Add shortcut to open tabular data preview (#63369)
## TL;DR Adds `cmd-shift-v` / `cmd-k v` (ctrl on linux/windows) to open the tabular data preview for `csv`/`tsv`/`ssv`/`psv` files, mirroring the existing `markdown::OpenPreview(ToTheSide)` and `svg::OpenPreview(ToTheSide)` bindings/context pattern already in the default keymaps. Extension check kept explicit (not just `"Editor"`) so it doesn't compete with the `md`/`svg` blocks bound to the same keys on their own extensions. ## Testing - Manually verified `cmd-shift-v` / `cmd-k v` open tabular data preview on `.csv`/`.tsv`/`.ssv`/`.psv` files, no-op on other extensions. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] UI standards followed - [ ] Tests cover the new/changed behavior - [x] Performance impact considered, acceptable Release Notes: - Added shortcuts to open the tabular data preview for CSV/TSV/SSV/PSV files (similar to md/svg preview) --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
c684a6a537 |
Add LSP call hierarchy modal (#53239)
<img width="1128" height="953" alt="image" src="https://github.com/user-attachments/assets/b2017c0a-e25a-49d7-9342-d074014d085c" /> Closes #14203 Release Notes: - Initial Call Hierarchy support in Zed --------- Co-authored-by: Alexey Olshanskiy <gh@aohoy.dev> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
e7a151de09 |
keymaps: Sync debugger bindings across platforms to match VS Code (#58729)
I was trying out zed after VS Code and I've stumbled upon inconsistency with debugging hotkeys. In VS Code it's f10/f11, in zed it was much more awkward f7/ctrl-f11. Investigating, I've found that I can't just override f11, because it's used by `zed::ToggleFullScreen` global hotkey and global hotkey always beats `Workspace && debugger_stopped`. Furthermore, I've found f11 hotkey is available, but only on Mac. And on Windows there was no `StepInto` hotkey at all. So configs were unsynced in that regard. Code changes: - To make f11 overridable, I've moved it to `Workspace` context - it's still pretty global, but now it's overridable. Though `Workspace && debugger_stopped` have the same depth as `Workspace`, it will take priority, because it's registered later in .json. - StepInto - added f11 hotkey for all platforms (was missing on linux and windows), kept older ctrl-f11 too as some users might be used to it. A note that on Mac F11 was added previously as `Workspace && debugger_running` - which practically means the hotkey wasn't available. `debugger_running` means debugger is running in background, user needs step commands when `debugger_stopped`- when they're actually stepping through the code. - StepOver - added f10 hotkey for all platforms (was missing on linux and mac). Kept old f7 hotkey on linux and mac, didn't added it on windows as it wasn't present before. - StepOut - it was consistently shift-f11 on all platforms already, just moved it from global context for consistency. - Removed StepOver, StepInto, StepOut from debugger_session context and kept it only in `debugger_stopped`, as this is when they're actually useful, similar to how we have `debugger::Continue"` there which also makes sense only when debugger is stopped. I've separated changes by commits, so it would be easier to review them. PS Global hotkeys overriding specific ones seems a bit odd by itself - it seems global more specific hotkeys should always have a priority, so maybe it's something to look into too. Another thing that `default-xxx.json` share a lot of hotkeys, so maintaining them separately may have other things going out of sync too. Closes #58899. ---- 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 - keymaps are not tested - [x] Performance impact has been considered and is acceptable Release Notes: - Improved debugger step keybindings across platforms to match VS Code defaults while preserving fullscreen outside paused sessions --------- Co-authored-by: Kunall Banerjee <hey@kimchiii.space> |
||
|
|
29202c1ab5 |
gpui: Frame time debug overlay (#62749)
<img width="372" height="207" alt="image" src="https://github.com/user-attachments/assets/5e44a121-b6f3-4bb8-9f94-5bb7da1c04d2" /> New keybinds: - `ctrl-alt-shift-p` - cycle debug overlay between "off", "minimal", "full" - `ctrl-alt-shift-o` - reset stats --- Release Notes: - Added: Frame time debug overlay |
||
|
|
4043c82956 |
git_panel: Add copy path actions to the context menu (#62352)
# Objective When developing remotely, when I close the uncommitted changes tab, I need some time to load before I can copy the path. Or have to switch to the project panel to find the specific file. All of this is annoying, so I added a copy path action to the git panel's context menu and key bindings consistent with the project panel. ## Solution Already described in the Objective section. ## Testing I wrote a unit test and tested it manually. ## 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 <img width="411" height="535" alt="showcase" src="https://github.com/user-attachments/assets/a17e7633-eb92-4737-aa30-958fe58bb99f" /> <img width="717" height="427" alt="showcase" src="https://github.com/user-attachments/assets/d067e892-17de-4527-ac20-16cad6f38015" /> --- Release Notes: - Added "Copy Path" and "Copy Relative Path" actions to the Git Panel's context menu |
||
|
|
b76a6228f5 |
repl: Add a delete-cell action to the notebook editor (#61295)
The notebook editor has actions for adding and moving cells but no way to delete one. This adds `notebook::DeleteCell`: - Trash icon button in the notebook toolbar (own group below add-markdown/add-code, disabled when the notebook has no cells) - Jupyter-style `d d` binding plus `backspace` in cell command mode (macOS and Linux keymaps) - Deletes the selected cell; selection moves to the neighboring cell, focus returns to command mode, and the item is marked dirty via the existing structural-change tracking so saving persists the deletion Tested locally on macOS with the notebook feature enabled: button click and bindings delete the selected cell and saving writes the result. (Screenshots in comments.) Release Notes: - Added a delete-cell action (`d d` in command mode and a toolbar button) to the notebook editor (preview-only). Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
127aa6dcd2 |
git_ui: Prevent Git panel bindings in repository selector (#61282)
# Objective Fix Git panel keybindings intercepting input intended for the repository selector. With Vim mode enabled, pressing `i` in the selector focused the commit-message editor instead of filtering repositories. Platform keybindings could also intercept printable input such as spaces. Fixes #57936 ## Solution Exclude the `GitRepositorySelector` context from the Git panel changes-list bindings in the macOS, Linux, Windows, and Vim keymaps. ## Testing Manually tested on macOS using a debug build with Vim mode enabled and a workspace containing two Git repositories ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Fixed Git repository selector input being intercepted by Git panel keybindings, including in Vim mode. Co-authored-by: Nathan Sobo <nathan@zed.dev> |
||
|
|
24237d2df5 |
recent_projects: Fix open folder keybinding (#61305)
# Objective Closes #58986 This PR fixes `Ctrl-K Ctrl-O` opening a file picker while the Recent Projects picker is focused. The keymaps globally bind `Ctrl-O` to `workspace::OpenFiles` and `Ctrl-K Ctrl-O` to `workspace::Open` The Recent Projects context also binds `Ctrl-K` to toggle its actions menu. The more specific binding ate `Ctrl-K` stopping the global `Ctrl-K Ctrl-O` bind occuring. ## Solution Add a `RecentProjects`-specific `Ctrl-K Ctrl-O` binding to `workspace::Open` after the existing contextual `Ctrl-K` binding. This matches the action associated with “Open Local Folders,” including its multiple-selection and open-mode behavior. macOS is unchanged because its primary `Cmd-O` shortcut already maps to `workspace::Open`. ## Testing Try #58986, then this. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed `Ctrl-K Ctrl-O` opening a file picker instead of the local folder picker from Recent Projects. |
||
|
|
8444030d37 |
Fix keybindings conflict for Project Search filters and Text Findex (#60677)
# Objective Fixes #60540 ## Solution I suggest to focus on new feature keybindings support `Text Finder` instead of supporting old `DeployReplace`: 1. Add `cmd+opt+f` bind for `Text Finder` in `Editor` and `BufferSearch` to all platforms (now it's not there) 2. Remove `cmd+opt+f` bind for `buffer_search::DeployReplace` from `Editor` and `BufferSearch` on macOS. 3. Add breaking changes `buffer_search::DeployReplace` has no keybind anymore on macOS. ## 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 <details> <summary>Click to view showcase</summary> Uploading github.mov… </details> --- Release Notes: - `Text Search` now opens from almost all contexts (added `Editor`, `BufferSearch`) - Breaking changes: Dropped support for toggle filters hotkey in `BufferSearch` in macOS instead of supporting new `Text Search` feature with `cmd+alt+f` |
||
|
|
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. |
||
|
|
faa7c4f534 |
branch_picker: Add design improvements (#60925)
This PR adds a series of design improvements to the branch picker, including: - Consistent icon used for filter actions - A keybinding/action to trigger the filter menu with the keyboard - Filter menu positioning depending on the picker's editor position - Error display that displays the full label without truncation/tooltip, and is placed accordingly also depending on the picker's editor position - List subheader in the search list depending on filtered option Here's a quick video: https://github.com/user-attachments/assets/70922daf-fc9f-4d94-bed8-c84d3ea73534 - - - Release Notes: - N/A |
||
|
|
ab43548338 |
a11y: Landmarks and menu improvements (#60397)
Fixes menu a11y, and adds landmarks with `F6`-navigation. Also fixes a GPUI bug, and adds debug actions for dumping a11y tree info. Since `F6` was already in use by the pause debugger keybind, also tightens up the debugger keybind context so they require an active debugger session. When there is one active, `F6` stays as pause debugger. `ctrl-F6` always works to go to the next landmark. Also adds an "accessible mode" setting. Currently, this only controls whether we show all menus all the time, but I suspect it will expand significantly in the future. Also adds `.aria_keyshortcuts()` API, but it's not wired up within accesskit adapters, so is not yet reported to screen readers. --- Release Notes: - N/A or Added/Fixed/Improved ... |
||
|
|
f233ed4687 |
feature: toggle markdown preview and source (#60867)
Toggle Markdown Preview with the Existing Preview Shortcut ## Context Markdown files already expose actions for opening a rendered preview in the current pane or to the side. The current-pane preview action focuses the preview, but there was no matching keyboard path from the preview back to the source editor. Users expect the existing preview shortcut to behave like a mode toggle: press it from the editor to preview, then press it again from the preview to return to editing. The existing preview view keeps a handle to its source editor, so the preview can return focus to that editor without adding a broader workspace-level toggle. ## Feature Add a markdown-preview-scoped action, `markdown::CloseAndReturnToEditor`, and bind the existing preview shortcut to complementary actions: - In a markdown editor, `ctrl-shift-v` on Linux and Windows, or `cmd-shift-v` on macOS, dispatches `markdown::OpenPreview`. - In a markdown preview, the same platform shortcut dispatches `markdown::CloseAndReturnToEditor`. The close action first activates and focuses the source editor. If the source editor entity is no longer open in any pane, the action adds it back to the active pane before closing the preview. The preview is closed with `SaveIntent::Skip` because the preview is not the owner of source-buffer changes. Existing markdown preview shortcuts remain available. ## Alternatives - Bind `escape` to close the preview. This is easy to discover, but it does not provide a symmetric editor/preview toggle and can overlap with transient UI such as search. - Add a new dedicated toggle chord, such as `ctrl-alt-v` / `cmd-alt-v`. This avoids changing the preview shortcut's meaning in the preview context, but it makes users learn a second shortcut for the same preview/edit workflow. - Teach `markdown::OpenPreview` to toggle based on the active item. That would mix editor-scoped preview creation with preview-scoped close behavior and make the action depend on more workspace state. ## Consequences - The toggle behavior is implemented by context-specific keybindings rather than one action that changes meaning globally. - Returning to edit mode works even when the original editor tab has been closed while the preview remains open. - The preview close path has focused GPUI tests because it relies on pane activation, focus restoration, and asynchronous item closing. Release Notes: - Add a markdown action to close the current preview and focus the related source file |
||
|
|
86a73f0035 |
git_ui: Add branch picker filter menu (#60857)
# Objective Make branch filtering consistent and more flexible across the title bar and Git panel branch pickers. ## Solution - Replace the remote-only filter toggle with a dropdown for all, local, and remote branches. - Preserve the selected filter across branch picker instances. - Add a ListFilter icon and active-filter indicator. - Prevent nested filter-menu interactions from dismissing the parent picker. - Cycle through all, local, and remote filters with the existing keyboard shortcut. ## Testing - Ran `cargo check -p git_ui --tests --no-default-features`. - Verified formatting with `cargo fmt -p git_ui`. - Manually checked the filter dropdown from the title bar and Git panel. ## 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 - Filters: All, Local, Remote - "Cmd + Shift + I" to cycle over the filters <details> <summary>New Branch Picker Filter Dropdown</summary> <img width="1624" height="1030" alt="Screenshot 2026-07-12 at 3 53 30 PM" src="https://github.com/user-attachments/assets/1323d9c9-f4b9-41ee-ba93-841299872c02" /> <img width="1624" height="1030" alt="Screenshot 2026-07-12 at 3 54 35 PM" src="https://github.com/user-attachments/assets/839345ff-de3b-48f0-b4e7-0f8d27e94204" /> </details> Release Notes: - Improved branch filtering with local, remote, and all-branch options in the branch picker. |
||
|
|
11356984fb |
agent: Fix cmd-f not working when buffer is open (#60750)
Turns out I only tested it with all tabs closed, the keybinding would only work when all tabs were closed and you focused the agent panel. If a file was opened in the center pane, cmd-f would open a search in that file instead of searching in the agent panel, even if the thread view as focused. Closes #60686 Release Notes: - agent: Fixed an issue where cmd-f would not work if file is open in center pane |
||
|
|
79b4ffe356 |
terminal_view: Forward ctrl-q to PTY when terminal is focused on Linux (#58879)
## Context On Linux, `ctrl-q` is globally bound to `zed::Quit`. When a `TerminalView` is focused, pressing `ctrl-q` quit the application instead of forwarding the keycode to the shell, breaking programs like `ftp`, `tig`, and any app that uses XON/XOFF flow control. Windows already had the fix: its `Terminal` keymap context overrides `ctrl-q` with `["terminal::SendKeystroke", "ctrl-q"]`. The Linux keymap was simply missing that override. Closes #58809 Manual test after fix below : [Screencast from 2026-06-09 00-46-37.webm](https://github.com/user-attachments/assets/3d103b2a-bff1-4559-af1d-2a52d57a6b18) ## How to Review - **`assets/keymaps/default-linux.json`** : One-line addition in the `Terminal` context under the "Overrides for conflicting keybindings" comment, mirroring the existing Windows entry. - **`crates/terminal_view/src/terminal_view.rs`** : Regression test `ctrl_q_is_forwarded_to_terminal_not_quit` (Linux-only, `#[cfg(target_os = "linux")]`): loads the default keymap, focuses a display-only terminal, simulates `ctrl-q`, and asserts the PTY receives byte `0x11` instead of the quit action firing. ## 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 `ctrl-q` quitting Zed instead of being forwarded to the shell when a terminal is focused on Linux |
||
|
|
3a415f16e8 |
agent: Make terminal threads searchable (#60292)
Makes cmd-f work for terminal threads. Since the agent panel is not part of the normal pane system we have to manually hook up the search bar. Closes #57309 Release Notes: - agent: Added support for searching (cmd-f) inside of terminal threads |
||
|
|
1d49ff0d33 |
settings_ui: Remove feature flag for AI settings and adjust design (#59860)
Closes AI-159 Closes AI-434 Closes AI-435 Release Notes: - Key agent-related settings now live in the settings editor, close to all other settings available in Zed. This specifically includes the move of LLM providers, external agents, and MCP servers to the settings editor. --------- Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com> Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> |
||
|
|
2e6d83d0aa |
Restore last picker (#59912)
Adds ability to re-open any closed picker. Release Notes: - Added: workspace::ReopenLastPicker Co-authored-by: Richard Feldman <oss@rtfeldman.com> |
||
|
|
9fd3e0ca3b |
project_panel: Add expand/collapse all to context menu (#59567)
Add `ExpandAllEntries` action, keybinding, and right-click context menu entries for expand/collapse all in the project panel. - Add `ExpandAllEntries` action + handler + `expand_all_entries()` method - Add `cmd-right` / `ctrl-right` keybinding for `ExpandAllEntries`, mirroring the existing `cmd-left` for `CollapseAllEntries` - Add "Expand All" to root-entry and folder right-click context menus - Add keybinding hint to root-entry "Collapse All" context menu entry - Per-worktree behavior: context menu actions affect only the selected worktree, subfolder "Expand All" expands from that folder down # Objective The project panel had no discoverable way to expand or collapse all entries. The only ways were keyboard shortcuts (`cmd-left` for collapse all) or the right-click context menu. The global `ExpandAllEntries` shortcut (`cmd-right`) was also missing. This PR adds that shortcut and exposes both actions in the context menu so users learn the keybindings while keeping the UI minimal. ## Solution - Add `ExpandAllEntries` action + handler + `expand_all_entries()` method - Add `cmd-right` / `ctrl-right` keybinding for `ExpandAllEntries` (global), mirroring the existing `cmd-left` for `CollapseAllEntries` - Add "Expand All" to the right-click context menu for both root entries and subfolder entries - Update root-entry "Collapse All" to show its keybinding hint via `.action(Box::new(CollapseAllEntries))` - **Per-worktree behavior**: each root entry's context menu actions affect only that worktree, subfolder "Expand All" expands from that folder down ## Testing - Added 6 GPUI tests in `project_panel_tests.rs`: - `test_expand_all_entries`: single worktree - `test_expand_all_entries_multiple_worktrees`: global expand across worktrees - `test_expand_all_entries_via_window_dispatch`: action dispatch path - `test_per_worktree_expand`: expand only the clicked worktree - `test_per_worktree_collapse`: collapse only the clicked worktree, keep root visible - `test_expand_all_entries_with_auto_fold`: expand with auto_fold_dirs - Ran `cargo test -p project_panel`: 106 pass **Manual testing for reviewers:** 1. Open a project with nested directories and open the Project Panel 2. Right-click a root entry, confirm "Expand All" and "Collapse All" appear with their keybinding hints (`⌘→` / `⌘←`) 3. Right-click a subfolder, confirm "Expand All" and "Collapse All" appear 4. Click "Expand All" on a subfolder, confirm only that folder's subtree expands 5. Click "Collapse All", confirm children collapse but the root stays visible 6. Open a multi-folder workspace. Right-click the second root and click "Expand All", confirm only that folder expands 7. Press `cmd-right` (or `ctrl-right`), confirm all worktrees expand globally Tested on macOS only. Linux and Windows should behave the same since there is no platform-specific code. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase https://github.com/user-attachments/assets/adc501d7-8e3a-4687-aef0-dc00426d232d --- Release Notes: - Added `Expand All` and `Collapse All` to the project panel right-click context menu with keybinding hints. - Added `cmd-right` / `ctrl-right` keybinding to expand all entries. --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
9da8631c14 |
agent_ui: Refactor the queue feature and add steering ability (#59310)
Closes AI-367 This PR significantly refactors the queue feature so that we don't rely on indexes being counted and synced across various state points of the thread view. Instead, I'm introducing a dedicated message queue module where we control through a stable queue entry ID all the states of a given queued message. Additionally, it's relevant to note that I changed the default behavior of queued messages on this PR so that they get sent only at the end of the generation. This makes the out-of-the-box, default behavior of the feature consistent across the native and external agents, given we never could pull off the feature with the latter. I personally never liked that behavior anyway, but I do appreciate how some people do. Because of that, though, for the Zed agent, a "Steer" toggle button is available for whenever you'd like to signal that a queued message should be sent at the turn boundary. This is not a setting, though; decided to go simpler at this moment. It's something you can choose on a per-message basis. Ultimately, I think this implementation makes the overall shape of the feature much more stable and easier to maintain overtime. Release Notes: - Agent: Changed the default behavior of queued messages for the Zed agent so that they get send at the end of the generation. The ability to steer them (i.e., send the message at the end of a turn boundary) is still possible to be toggled. |
||
|
|
be50aaccbe |
picker: Simplify presentation and sizing APIs, add preview-aware defaults (#59719)
The recent "pickers with previews" overhaul left the picker
sizing/presentation API spread across several overlapping knobs that
every call site had to set correctly — and many didn't, causing pickers
across the app to render at the wrong width, lose their container, or
stop dismissing. This PR consolidates that surface into a small,
hard-to-misuse API and makes correct sizing the default.
Net effect: a plain `Picker::uniform_list(delegate, …)` now renders
correctly out of the box (standard width, standard max-height, shrinks
to fit, dismisses properly), and the ~35 call sites only specify what
genuinely differs.
## API changes
**Presentation** — three overlapping booleans (`is_modal`, `is_popover`,
`is_resizable`) collapsed into one enum, with resizability living inside
the only variant where it's meaningful:
```rust
enum Presentation {
Modal { resizable: bool }, // own chrome, dismisses on blur, optionally resizable
Popover, // own chrome, dismisses on blur, never resizable
Embedded, // host container owns chrome + dismissal
}
```
- `modal(bool)` is **removed** in favor of explicit, self-documenting
builders:
- *(default)* → `Modal` (resizable iff it has a preview)
- `.popover()` → `Popover` (menu-attached surfaces)
- `.embedded()` → `Embedded` (pickers nested in a larger modal/view)
- Dynamic callers use `.when(cond, Picker::embedded)` (added `impl
FluentBuilder for Picker`).
**Sizing** — preview-vs-not now drives everything; the manual padding
knob is gone:
| Before | After |
|---|---|
| `vertical_padding` field + `no_vertical_padding()` | removed — derived
from whether a preview is visible |
| `height(...)` (ambiguous: fixed vs max) | `max_height(...)` (plain
pickers shrink-to-fit, capped here) |
| `minimum_results_width(...)` | removed — a plain picker's min width
tracks its opening width; preview pickers use standard internal pane
mins |
| default size = 60% viewport | default = `DEFAULT_MODAL_WIDTH` (34rem)
× `DEFAULT_MODAL_MAX_HEIGHT` (24rem, max) |
| resize handles gated on `is_modal` | gated on `is_resizable` (new
`resizable(bool)` builder; auto-`true` for preview pickers) |
Call sites now only override the exceptions: narrow popover selectors
(`initial_width`), the taller outline view (`max_height`), and preview
pickers (constructed via `*_with_preview`).
## Behavior fixes
- **Wrong widths everywhere**: pickers were falling back to
60%-of-viewport because the original migration set
`minimum_results_width` but never `initial_width`. Fixed at the source
via the new defaults.
- **Popovers had no container and wouldn't dismiss**: `is_modal=false`
was suppressing both the elevated background *and* blur-dismiss. Split
out so popovers keep their chrome and dismiss on click-away/escape. This
fixed the agent-panel model/profile selectors, sidebar recent projects,
and the settings theme/font/icon/ollama pickers (which were incorrectly
using `modal(false)`).
- **Sidebar recent projects stretched to full height**: was missing the
shrink-to-fit behavior; now capped and content-sized like other
popovers.
- **Preview crash**: removed an over-strict `debug_assert!` that
panicked when previewing an empty file (`message == None && editor
empty` is valid).
- **Preview-aware default size**: pickers open at standard width with
the preview hidden, and expand to the larger "telescope" size when a
preview is shown. Fixes the text finder rendering super-wide by default,
and makes the file finder expand (rather than cram its results) when you
toggle the preview.
---
Release Notes:
- N/A
|
||
|
|
6a6fcbebc4 |
Add preview to pickers and make them resizable (#59604)
Overhauls Zed's pickers to make them resizable and give them a preview. Closes #8279 ### Background The most requested Zed feature has the last year has been a [Telescope like search box](https://github.com/zed-industries/zed/issues/8279) [discussion](https://github.com/zed-industries/zed/discussions/22581). To understand why this is so popular we need to understand search can serve thee goals: - Navigation: fuzzy search is faster & easier then clicking in a file tree - Exploration: example, find a function by a word in its doc comment - Collecting: example, getting a list of functions to change The project search which shows results in a multibuffer is the perfect way to operate on a list of items. Navigation and Exploration need a lot of context around each result and offer fast navigation between them. For both of these live searching is also critical. The `telescope UI` is a picker with a preview to the right or below. It's offered in various editors and IDE's most famously Neovim (through the Telescope plugin), IntelliJ (natively), Helix (natively) and of course VScode (plugins) and it's _many_ forks. While having a UI like that for text search (our project search) is most requested the UX pattern is applied widely, from `find_all_references` to `bookmarks`. It enhances most pickers. Note that we have over 50 different picker modals! The community has tried to build something like this for Zed: - https://github.com/zed-industries/zed/pull/44530 - https://github.com/zed-industries/zed/pull/45307 - https://github.com/zed-industries/zed/pull/46478 - https://github.com/zed-industries/zed/pull/43790 These all became huge PR's that we could not merge for various reasons. This is a really hard feature to integrate in Zed! This PR got started as https://github.com/zed-industries/zed/pull/46478 and supercedes that. ### Design - Extend pickers to support an optional preview with minimal changes to the pickers themselves. - Make pickers resizable. - Complement the existing search do not replace it by having both UI's share the underlying search and allow freely switching between them. - Allow extending the preview to things other then files. - Maintain a clean design on all the pickers. ### Heigh level Implementation overview - Adds an `Option<Preview>` to `Picker` - Gives `PickerDelegate` a method to communicate a preview to the Picker - Overhaul the way pickers are drawn to allow for resizing them. Implemented on the `Shape` and `SizeBouds` structs. - Adds a high level way to draw the `footer` and `editor` so we do not need to change much to the pickers. - Adds a new text finder Picker - Adds a way to take a running search from project search and hand it to the text finder Picker and the other way round - Give the file finder a preview ### Next steps A more detailed list and how to help out will be added to the tracking issue for [Pickes with previews](https://github.com/zed-industries/zed/issues/56037) - Add more previews to more pickers! - Enable selectioning multiple items in pickers and performing actions on those - Open selected items in a multibuffer - Add a way to restore the last picker - Make popovers (picker attached to some menu) resizable as well ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase TODO (will be done post merge) --- Release Notes: - Added resizing via dragging to all picker modals. - Added a preview to the File finder, the preview can be to the right or below. - Added a Text finder picker with a preview as alternative project search UI. The search is shared and allowes switch between UIs while running. --------- Co-authored-by: ozacod <47009516+ozacod@users.noreply.github.com> Co-authored-by: ozacod <ozacod@users.noreply.github.com> Co-authored-by: Danilo Leal <daniloleal09@gmail.com> |
||
|
|
b5f16f69e8 |
agent_ui: Add in-thread search bar (#57231)
This is a narrower alternative to #54816, scoped to search only the currently-loaded thread, excluding tool output or thinking blocks (happy to follow up on those, see next). It uses a custom bar confined to `agent_ui` rather than `BufferSearchBar` + `SearchableItem`, avoiding the cross-crate plumbing that #54816 reached. Open as draft pending direction from @benbrandt on what scope/approach would be acceptable for in-thread search. <img width="959" height="609" alt="image" src="https://github.com/user-attachments/assets/8971e432-61d3-46db-a6a4-2bbd355089e7" /> ## What this PR does Adds a search bar to the agent panel, triggered by Ctrl+F (Cmd+F on macOS), that lets users grep the currently-loaded thread without leaving the agent panel; not cross-thread or cross-agent. - Searches visible content only: user messages, assistant message chunks, and tool-call labels. Thought blocks and rendered tool-call content (collapsed by default) are intentionally skipped so that: 1. The visible match count matches what the user sees. 2. The search experience is consistent between tool output blocks in the current Zed session, ans tool output blocks from past sessions, which are not rendered - see issue #57230 - Highlights matches inline via `Markdown::set_search_highlights` for markdown-rendered content and `Editor::highlight_background(HighlightKey::BufferSearchHighlights, …)` for past user messages (rendered through `MessageEditor`'s inner `Editor`, not through markdown). - Next/prev navigation, case/whole-word/regex toggles (same UI as `BufferSearchBar`). - Returns focus to the message editor on dismiss so the user can keep typing immediately. <details><summary>Commits (authored by Claude 4.7 Opus, max)</summary> ### Seven logical commits 1. **`agent_ui: Add in-thread search bar`** — initial implementation: bar UI, keymap bindings under `AcpThreadSearchBar` context, markdown highlight plumbing, focus-restore on dismiss. 2. **`agent_ui: Add unit tests for in-thread search`** — coverage of the matcher across entry kinds and the dismiss-clears-highlights path. 3. **`agent_ui: Limit search to visible tool-call text`** — UX fixes from manual testing: `track_focus` so `AcpThreadSearchBar` context lands in the editor's dispatch chain; red border on zero-match query; skip tool-call content (only search labels). 4. **`agent_ui: Fix Esc dispatch, smart toggle, error message, skip Thought blocks`** — round 2 of UX fixes: contribute `AcpThreadSearchBar` context from `ThreadView` when bar is visible, smart Ctrl/Cmd+F outside-the-bar focuses instead of closing, regex error message row, skip `AssistantMessageChunk::Thought`. 5. **`agent_ui: Polish thread search bar — Esc routing, user-message highlights, action forwarding`** — `search::*` action forwarders on `ThreadView`; `cx.defer` around the activate callback (fixes a double-borrow panic); `editor::actions::Cancel` interception so Esc dismisses our bar instead of escaping to the workspace's `BufferSearchBar`; user-message highlights via the inner `Editor`; muted zero-match counter; three new gpui regression tests. 6. **agent_ui: Fix Shift+Enter shadowing in thread search bar`** — capture-phase intercept of `editor::Newline*` on the bar's `bar_row` element so a base keymap binding `shift-enter` at the `Editor` context (e.g. JetBrains → `editor::NewlineBelow`) can't shadow the bar's `agent::SelectPreviousThreadMatch`. Adds a regression test that loads `default-linux.json` + `linux/jetbrains.json` and asserts `shift-enter` navigates instead of inserting a newline. 7. `agent_ui: Debounce thread search, refresh on thread changes, highlight user messages`** — last round before maintainer review: 150 ms debounce on the match rescan; subscribe to `AcpThread` updates so results/highlights/counter follow a streaming conversation live; navigate the list to the entry owning the active match; `.ok()` instead of `let _ =`; assorted cleanups; two new regression tests (`test_thread_search_refreshes_on_new_thread_entry`, `test_thread_search_scrolls_to_later_user_message_match`). </details> 8 gpui tests cover the load-bearing logic (`cargo test -p agent_ui --lib -- thread_search`). All pass. ## Manual testing Verified on Linux against `upstream/main` `bde5c0bdc9` (full `release` profile, with LTO and `codegen-units=1` built and tested at that commit). Branch since merged with `upstream/main` `2106e8c`. Of the 100 intervening upstream commits, several touch files in this diff; one produced a real conflict in `crates/agent_ui/src/conversation_view.rs` (`gpui::{...}` import block — both sides added new, non-overlapping symbols; resolved by union). - Bar opens / dismisses via Ctrl+F and Esc - Next/prev navigation via Enter / Shift+Enter / F3 / Shift+F3 / chevron buttons - Case / whole-word / regex toggles via buttons and via Alt+C / Alt+W / Alt+R (Linux) - Highlights inside past user messages render correctly on the `MessageEditor`'s inner `Editor` - query text turns red on no-match; bad regex shows error message; zero-match counter stays muted (not red) - `search::*` actions fire from outside the bar (focus in message editor) via the `ThreadView`-level forwarders - Workspace pane `BufferSearchBar` is unaffected; the two bars hold independent state - Feature looks great in light mode and dark mode, and with various themes - Navigating to a match in a past user message scrolls that message into view (its top to the viewport top) - Results update live as the agent streams new messages while the bar is open (debounced ~150 ms, same for typing) [Zed agent thread search subscribe to thread updates.webm](https://github.com/user-attachments/assets/75585fee-ba25-42ac-9dde-16c8e152fb06) <details><summary>Full manual test plan</summary> ### Setup (preconditions for every test below unless otherwise noted) 1. Launch the dev binary: `./target/release-fast/zed --user-data-dir ~/.local/share/zed-dev-feat` 2. Open the agent panel, start a thread, send 2–3 prompts so the thread contains: - At least one user prompt with a distinctive substring (e.g. `watermelon`) - At least one assistant message with a distinctive substring - At least one tool call with a known label substring - At least one collapsed Thinking block 3. In parallel: have at least one code editor open in a workspace pane (some tests cross-check that path). ### Core matching #### T-001 — Ctrl+F opens the bar with focus in query **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** With focus in the agent panel's message editor, press Ctrl+F (Linux) / Cmd+F (macOS). The search bar appears at the top of the thread view and the query input is focused. #### T-002a — Active match visually distinct from inactive matches **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** Type a query that produces ≥3 matches. The current ("active") match must be visually different from the others — different highlight color, not just position. If they look identical, this may be a theme issue (`search_active_match_background` vs `search_match_background` too close on the entry's background); note the theme. #### T-002b — User-prompt text gets inline highlight, not just match count **Status:** ✅ PASS 2026-05-15 17:15 (fix shipped 2026-05-15 16:15; regression-guarded by `test_thread_search_highlights_user_message_editor`) **Repro:** Send a user prompt containing a distinctive substring. Then search that substring. The user prompt text **must** show yellow highlight, not just be counted. The bar's matcher reads from `message.content.markdown()` but the on-screen render goes through a `MessageEditor`; the current code only highlights via `Markdown::set_search_highlights`, which misses the editor. **Notes:** Fix routes user-message matches through `Editor::highlight_background(HighlightKey::BufferSearchHighlights, …)` — the same path `Editor`'s own `SearchableItem` impl uses. `collect_markdowns` no longer pulls the user message's markdown (avoiding double-counting). The bar now maintains separate `highlighted_markdowns` and `highlighted_editors` lists for clean-up. Match-target enum (`MatchTarget::Markdown` vs `MatchTarget::Editor`) tags each match so active-vs-inactive re-paint can dispatch correctly. Pending runtime verification on next `release-fast` build. #### T-003 — Enter / Shift+Enter in bar navigates matches **Status:** ✅ PASS 2026-05-25 14:00 (verified on `release` build) **Repro:** With focus in the query, type a query with ≥3 matches. Press Enter → counter `1/N → 2/N → 3/N`. Press Shift+Enter → reverses (and no `\n`s are output in the search box). F3 / Shift+F3 same. ### Option toggles #### T-004 — Alt+C toggles case sensitivity from inside bar **Status:** ✅ PASS 2026-05-15 07:50 **Repro:** With focus in query, press Alt+C. `Aa` button toggles state; results re-filter. #### T-005 — Alt+W toggles whole-word from inside bar **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** Same as T-004, with Alt+W toggling `wd` button. #### T-006 — Alt+R toggles regex from inside bar (Linux) **Status:** ✅ PASS 2026-05-15 15:30 (fix shipped 2026-05-15 06:35) **Repro:** Press Alt+R. `.*` button toggles. **Notes:** macOS keymap (`alt-cmd-x`) left unchanged in this session — it matches the wider macOS Zed convention. #### T-006a — Tooltips on toggle buttons show their hotkey **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** Hover each toggle button (`Aa`, `wd`, `.*`). Tooltip shows action name AND keybinding (e.g. "Toggle Case Sensitive · Alt+C"). ### Error / empty states #### T-007 — Empty matches: no red border on bar input **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** Type `zzzzzzz`. Query text turns red. Counter shows `0/0`. Bar input border stays **neutral**, no red box. #### T-008 — Bad-regex error message **Status:** ✅ PASS 2026-05-15 15:30 (error renders aligned with the input) **Repro:** Switch to regex mode, type `[`. Error message appears below bar, aligned with the input. #### T-019 — Zero-match counter not colored red **Status:** ✅ PASS 2026-05-15 15:30 (fix shipped 2026-05-15 06:30) **Repro:** Type a query with no matches. The counter (`0/0`) stays muted, **not** red. MPS-parity. ### Dismissal & re-entry #### T-009 — Esc doesn't interrupt agent generation **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** Start a long prompt; while the agent is generating, open the search bar and press Esc. Bar closes, generation continues. #### T-010 — Close-X button position **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** Look at the bar. Close (X) button is on the right side, after the nav arrows (`<` `>` `1/N` `X`). NOT free-floating left of the input. #### T-011 — Ctrl+F in bar selects all query text **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** With bar open and query containing text, press Ctrl+F. All query text becomes selected (next keystroke replaces). #### T-012 — Ctrl+F outside the bar (bar already open) does not crash **Status:** ✅ PASS 2026-05-15 15:30 (fix shipped 2026-05-15 06:30; regression-guarded by `test_thread_search_select_next_from_thread_view_update_does_not_panic`) **Repro:** Bar visible, focus in the message editor (not the bar). Press Ctrl+F. Bar gets re-focused, query text is selected. **Must not crash.** **Notes:** Original crash also reproducible from Enter / Shift+Enter inside the bar after a search had matches. Fix wraps the `on_activate_match` callback's `view.update` in `cx.defer`. #### T-021 — Esc dismisses agent bar (not the unrelated workspace pane's BufferSearchBar) **Status:** ✅ PASS 2026-05-15 15:30 (fix shipped 2026-05-15 14:40; regression-guarded by `test_thread_search_editor_cancel_dismisses_bar`) **Repro:** Open a file in a workspace pane editor (e.g. `settings.json`). Open BufferSearchBar there. Switch focus to the agent panel, open agent search bar, type a query. Press Esc. **The agent bar must dismiss; the workspace pane's BufferSearchBar must remain.** **Notes:** Root cause: `Editor::cancel` in single-line mode calls `cx.propagate()`. The propagated `editor::actions::Cancel` walked past our bar all the way to `Workspace`, where `BufferSearchBar::register` had registered a workspace-wide handler that dismissed the active pane's bar. Fix: `ThreadView` now catches `editor::actions::Cancel` when the bar is visible. ### Action routing while bar is open, focus is in the message editor #### T-013 — F3 / Shift+F3 from outside the bar **Status:** ✅ PASS 2026-05-15 15:30 (Enter from outside is *expected* not to work — message editor's `enter` binding outranks. F3 is the canonical out-of-bar nav key.) **Repro:** Bar open with matches, focus in message editor. Press F3 → next match. Shift+F3 → previous. #### T-014 — Alt+C / Alt+W / Alt+R from outside the bar **Status:** ✅ PASS 2026-05-15 15:30 (fix shipped 2026-05-15 02:30; `ThreadView` forwarders for `search::ToggleCaseSensitive`, `ToggleWholeWord`, `ToggleRegex`, `FocusSearch`) **Repro:** Bar visible, focus in message editor. Alt+C/W/R toggles the bar's options and re-runs search. ### Nav buttons #### T-022 — `<` / `>` chevron buttons in the bar advance match **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** With ≥2 matches, click `<` → previous. Click `>` → next. Wraps at ends. ### Coexistence with workspace-pane buffer search #### T-015 — Ctrl+F in a workspace-pane editor still opens `BufferSearchBar` (no agent-panel takeover) **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** Focus a code editor in a workspace pane, press Ctrl+F. The pane's `BufferSearchBar` opens as before; agent panel's bar does NOT open. #### T-016 — Independent bars: agent vs workspace pane **Status:** ✅ PASS 2026-05-15 15:30 **Repro:** Have both bars open simultaneously. They hold independent state (different queries, different toggles, independent dismissal). ### Tool-call content (auto-expand on match) #### T-017 — Auto-expand collapsed tool calls on match **Status:** ⏸️ BLOCKED (not implemented; out of scope for current session) **Repro:** Have a tool call whose collapsed content contains a unique substring. Search that substring. The tool call auto-expands so the match is visible. After dismissal, the tool call collapses again unless the user manually expanded it before. #### T-018 — Auto-expand collapsed Thinking blocks on match **Status:** ⏸️ BLOCKED (not implemented; out of scope for current session) **Repro:** Same shape as T-017 for a collapsed Thinking block. #### T-019 — Streaming results automatically highlighted / live thread search **Status:** ✅ PASS 2026-06-08 **Repro:** Send prompt "Write a 5-paragraph story about a researcher who hated noise. The last paragraph should be a one-sentence: "So she moved to <name of the quietest continent on Earth>" (replace that <name> with the actual name)", then search for `Antarctica`. </details> ## Known limitations 1. (pre-existing, not from this PR): search highlights inside markdown table cells can be visually offset by a few characters in columns starting with the second. The bug lives in `crates/markdown`'s render layer - see issue #57229 2. (excluded vs. #54816 to keep the scope tight): raw tool-call input/output JSON and terminal scrollback are not indexed. 3. Navigating to a search hit located **below the fold of a very long user message** highlights the match but only scrolls the message's top into view, so the hit can stay off-screen until you scroll manually. Past user messages render through an `AutoHeight` `Editor` inside a virtualized `List`, which can't reliably drive intra-entry autoscroll the way markdown content does. User messages are usually shorter than a viewport, so this is left unaddressed. 4. Plain-text search across triple-backtick fences does not match (the fence characters live in the markdown source; regex search with explicit fence handling does). 5. The literal text "Thinking" rendered as the thought-disclosure header is not searchable (rendered chrome, not markdown source). Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - No new `unsafe` introduced; no network, file-system, or process APIs touched; only added dep is `search` (promoted from dev-dep to runtime), already used by this crate's tests; `MessageEditor::editor()` accessor widening is `pub(crate)` (in-crate only). Assessment: no new attack surface. - [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) — partially; see "What I did NOT verify" above - [ ] I did not verify **macOS and Windows**. Keymap entries exist for all three platforms (`AcpThreadSearchBar` context bindings) but I only verified Linux at runtime. - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable: regexp-searching for "t.e" in a thread almost at the context limit (919k tokens) felt instant, and navigation among the 2100+ results occurred at the keyboard autorepeat rate. - [ ] Haven't measured against the 8ms / 120fps frame budget. Partially closes #39338 Release Notes: - Added in-thread search to the agent panel (Ctrl/Cmd+F) --------- Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> |
||
|
|
3cdbdeaaa3 |
Fix copy shortcut in macOS notebook cells (#59431)
Fix `cmd-c` not copying text inside macOS notebook cell editors. Previously, the macOS notebook keymap bound `cmd-c` to `notebook::InterruptKernel` in notebook contexts, including `NotebookEditor > Editor`. This shadowed the normal editor copy shortcut while editing notebook cells. ## Solution Move the macOS notebook interrupt shortcut from `cmd-c` to `ctrl-c`. This keeps the notebook interrupt shortcut available while allowing the normal editor keybindings to handle: - `cmd-c` for copy - `cmd-x` for cut - `cmd-v` for paste inside notebook cell editors. - This change is macOS-specific. Release Notes: - N/A --------- Co-authored-by: dino <dinojoaocosta@gmail.com> |
||
|
|
d94376cc45 |
Allow opening a new window by default (#58805)
Adds `default_open_behavior` which let's users control which action should be the default (add to existing window/open a new window) TODO: - [x] Use sensible icon (not `IconName::Screen`) when `default_open_behavior` is set to `new_window` - [x] Tweak wording for actions in recent projects menu <img width="420" height="59" alt="image" src="https://github.com/user-attachments/assets/69ef112e-bf20-4dd1-9994-e4442266ef87" /> Release Notes: - Added `default_open_behavior` which controls which action (add to sidebar/open in new window) should be the default when selecting a project from the recent projects menu --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com> |
||
|
|
66af229b32 |
image_viewer: Reveal images in file manager from keyboard shortcut (#56438)
Resolves https://github.com/zed-industries/zed/issues/55617 This diff makes the standard Reveal in Finder/File Manager shortcut work when an image tab is focused. Image tabs already expose the reveal action from the tab context menu, but the keyboard shortcut was only bound in the `Editor` context, so pressing `cmd-k r` on macOS or `ctrl-k r` on Linux/Windows did nothing while focus was in the image viewer. With this change, `ImageView` handles the existing `editor::RevealInFileManager` action, and the default keymaps bind the same reveal shortcut in the `ImageViewer` context. This keeps image tabs consistent with text editor tabs while reusing the same project path reveal path used elsewhere. Release Notes: - Fixed Reveal in Finder/File Manager shortcuts not working when an image tab is focused. Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com> |
||
|
|
fbe923c57b |
settings_ui: Move skills management into settings UI (#58701)
Closes AI-344 Closes AI-342 Moves agent skills management out of the agent panel and into the settings UI. The skill creator (previously its own crate) now lives in `settings_ui` as a settings page, alongside the skills setup page. The agent panel's ellipsis menu now links to the settings page instead of hosting skill management directly. Release Notes: - Improved agent skills management by moving it into the settings UI --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com> |
||
|
|
195ae0893e |
git_ui: Fix Enter key selecting branch in commit modal branch picker (#58366)
## Context When the "Switch branch" picker is opened from the git commit modal and the user presses Enter, a `\n` character was inserted into the input instead of confirming the branch selection. The `"GitCommit > Editor"` keymap context bound `enter` to `editor::Newline`. This context matches *any* `Editor` descended from `GitCommit` in the element tree, including the single-line search editor inside the branch picker popover. Because a context-path binding is more specific than the global `enter: menu::Confirm` binding, it took precedence and the picker never received the confirm action. The commit message editor uses `EditorMode::AutoHeight` (reported in key context as `mode == auto_height`); the picker's search editor uses `EditorMode::SingleLine`. Narrowing the context to `"GitCommit > Editor && mode == auto_height"` restricts the `editor::Newline` binding to the commit message editor only. Single-line editors inside the same modal now fall through to the global `enter: menu::Confirm`, which correctly confirms the selection. Closes #58022 ## How to Review Three identical one-line changes, one per platform keymap (`default-linux.json`, `default-macos.json`, `default-windows.json`): - `"GitCommit > Editor"` → `"GitCommit > Editor && mode == auto_height"` Video of manual test after fix : [Screencast from 2026-06-02 23-16-32.webm](https://github.com/user-attachments/assets/67652cc5-4f8d-42f4-a5a9-ade3499ee880) ## 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 Enter key inserting a newline instead of selecting a branch in the commit modal branch picker |
||
|
|
7a780fe61d |
file_finder: Allow opening files without dismissing the finder (#57258)
Closes #4864 Adds a `file_finder::OpenWithoutDismiss` action that opens the selected file without closing the finder, so multiple files can be opened in one session. Pressing right arrow when the cursor is at the end of the search query triggers it — matching VS Code and Sublime Text behaviour. A "Keep Open" button in the footer provides mouse access and serves as a discoverability hint. Each opened file becomes the active tab without stealing keyboard focus from the finder, preserving the search state between opens. Refactors the existing `confirm` implementation into a shared `open_selected_file` helper parameterised by `dismiss_after_open` to eliminate duplicated file-opening logic. ## What's different from PR #38914 - Uses `right` arrow at `end_of_input` context instead of `cmd-shift-enter` (better ergonomics, matches VS Code/Sublime — the `end_of_input` context that was added after that PR makes this possible) - Each opened file is activated as the current tab (`activate: true`, `focus_item: false`), giving visual feedback on every open without stealing focus from the modal - Cleaner refactor: single `open_selected_file` helper instead of duplicated logic Release Notes: - Added ability to open files from the file finder without dismissing it, using right arrow at end of input or the "Keep Open" footer button --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
98224fb511 |
Remove rules library (#58067)
Rules library has been replaced by skills, so we can safely remove it Release Notes: - N/A |
||
|
|
646198a50d |
skill_creator: Use the status toast for confirming creation (#57855)
This PR uses the status toast for the Skill Creator confirming action as opposed the regular message notification. Aside from it looking a bit better, it's also auto-dismissed, which is preferred in this case. Release Notes: - Improved skill creation toast confirmation by making it auto-dismissed. --------- Co-authored-by: Martin Ye <martin@zed.dev> |
||
|
|
031085584f |
Rename agent threads from the sidebar (#57656)
Summary: - Added a rename action for agent threads in the sidebar. - Persisted renamed thread titles and kept open thread views in sync. Release Notes: - Improved agent threads by allowing them to be renamed directly from the sidebar. --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com> Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> |
||
|
|
d7fc2cae01 |
Revert "Rename agent threads from the sidebar" (#57654)
Reverts zed-industries/zed#57521 Forgot review approval Release Notes: - N/A |
||
|
|
06b478c817 |
Rename agent threads from the sidebar (#57521)
Summary: - Added a rename action for agent threads in the sidebar. - Persisted renamed thread titles and kept open thread views in sync. Release Notes: - Improved agent threads by allowing them to be renamed directly from the sidebar. |
||
|
|
37c19c17bf |
Replace Rules UI with Skills creation UI (#56924)
Replaces the legacy Rules creation UI with a focused "New Skill"
creation window when the `SkillsFeatureFlag` is on.
The new `skills_library` crate provides a single-skill form with:
- Name, Description, and Body fields (placeholders double as labels)
- Live validation matching the SKILL.md spec (name: 1–64 lowercase +
digits + hyphens, no leading/trailing hyphen; description: non-empty,
≤1024 chars)
- A scope dropdown listing every local worktree in the originating
workspace plus "Global"
- An Optional Parameters card with the `disable-model-invocation`
checkbox
- Save writes `<scope>/.agents/skills/<name>/SKILL.md` via
`serde_yaml_ng` (YAML-safe escaping), refuses to overwrite existing
skills, shows a success toast in the originating workspace, then closes
the window
The "Rules" entry in the agent panel triple-dot menu is renamed to
"Skills" when the flag is on. The existing `cmd-alt-l` keyboard shortcut
still works: `AgentPanel::deploy_rules_library` reroutes to
`deploy_skills_library` when the flag is on, so any persisted keymaps
and the menu's automatic shortcut lookup keep functioning without
changes to the default keymap files.
The old `rules_library` crate is intentionally left in place for this PR
— once the flag rolls out and the few remaining `OpenRulesLibrary {
prompt_to_select }` call sites (in thread_view link handlers and
@-mention crease) are migrated to an "open existing skill" flow, a
follow-up can delete the crate entirely.
15 unit tests cover the validation rules, frontmatter formatting
(including YAML-special-character round-tripping), and disk write
behavior (creates directory, refuses overwrite).
Closes AI-247
Release Notes:
- Added a new Skills creation UI that replaces the old Rules library
when the Skills feature flag is enabled.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
|
||
|
|
9e3515027a |
git_panel: Allow to switch between changes and history tab with keyboard (#56743)
Follow-up to https://github.com/zed-industries/zed/pull/56500. Was missing this ability very much :) Release Notes: - Git Panel: Added the ability to switch between the changes and history tabs with the keyboard. |
||
|
|
c7da585f8b |
git_ui: Add force delete for worktrees (#56519)
Follows similar approach as https://github.com/zed-industries/zed/pull/55927 Adds a force-delete path to the worktree picker. Normal delete now prompts when Git reports modified or untracked files, and Alt/Option-delete can force delete directly. Release Notes: - Added support for force deleting worktrees that contain modified or untracked files. |
||
|
|
552a5c0ae7 |
sidebar: Add terminals to thread switcher (#56388)
Allow confirming a terminal entry to activate it, track terminal access for ordering, and close selected terminals via the archive action. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A |
||
|
|
dfeeb3985e |
sidebar: Experimental Terminal Mode (#56063)
Experiment with allowing users to manage terminal sessions along with threads in the sidebar. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A --------- Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> |
||
|
|
2ef5304e89 |
git_ui: Add force delete for unmerged branches (#55927)
Git's `-d` flag deletes a branch only if it's fully merged into its upstream or HEAD - this is what we were using before, which caused the "not fully merged" error. The `-D` flag force deletes a branch even with unmerged changes (equivalent to `--delete --force`). ### Before Deleting an unmerged branch failed with a "not fully merged" error toast. ### After - Deleting an unmerged branch prompts for confirmation to force delete - Delete button tooltip shows "Hold alt to force delete" hint - Holding **alt** turns the delete icon red and tooltip changes to "Force Delete Branch" - Force delete keybinding: `cmd-alt-shift-backspace` Release Notes: - Added confirmation prompt when deleting unmerged git branches, with option to force delete. - Added alt+click on delete button to force delete a branch immediately. |