Commit graph

487 commits

Author SHA1 Message Date
Danilo Leal
c937fc6e33
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.
2026-05-14 13:11:14 +00:00
Smit Barmase
64f624773f
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.
2026-05-12 19:17:49 +00:00
Ben Brandt
7d3989602d
sidebar: Add terminals to thread switcher (#56388)
Some checks are pending
Congratsbot / congrats (push) Blocked by required conditions
Congratsbot / check-author (push) Waiting to run
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
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
2026-05-11 12:21:29 +00:00
Ben Brandt
5fc8a836dd
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>
2026-05-07 15:39:16 +00:00
Smit Barmase
0de588c0c9
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.
2026-05-06 20:08:42 +00:00
Anthony Eid
1865133649
git_graph: Fix search bar Vim key handling (#55510)
#53609 introduced a regression where Git Graph keybindings could take
precedence over the search bar. As a result, typing characters like `j`
or `k` in the search field could move the table selection instead of
updating the search query.

This PR fixes that regression by scoping Vim table navigation bindings
away from the search bar. It also adds dedicated `tab` and `shift-tab`
handling for Git Graph focus traversal, with the search bar and graph
table participating as separate tab groups.

Self-Review Checklist:

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

Release Notes:

- N/A
2026-05-02 20:50:51 +00:00
Dino
4e636bf07a
git_panel: Add support for vertically expanding the commit editor (#55043)
Using the existing commit editor in the Git Panel to type out longer
commit messages has been somewhat hard. I believe this happens because
it takes a very small portion of the UI which, unfortunately, when `git:
expand commit editor` is used, a modal ends up taking the center of the
editor, making it possible to have the commit editor open on the side,
while the `git: diff` view is open.

As such, this Pull Request introduces a new
`git::ToggleFillCommitEditor` action that allows users to update the
commit editor's height so as to take as much vertical space as possible,
hiding the entries status and simply rendering the Git Panel's footer.

This makes it easier to be able to write longer commit messages while
still having the `git: branch diff` on the side, something that's very
complicated with the default number of lines in the commit editor and
impossible using the `CommitModal`.

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:

- Added a `git::ToggleFillCommitEditor` action that expands the commit
editor to fill the git panel's available vertical space.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-04-28 16:09:23 +00:00
Dino
c5354fe056
keymaps: Update no action bindings to null (#54506)
Update uses of `zed::NoAction` in default keymaps with `null` seeing as
`zed::NoAction` is being deprecated.

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
2026-04-24 09:33:26 +00:00
Justin Su
71f5dbdf26
Fix ctrl-delete keybind in the terminal (#51726)
showkey in Ghostty, iTerm2, and Terminal.app reports ctrl-delete as
`<ESC>[3;5~`.

I tested this keybind on macOS, where fish_key_reader correctly
interprets it as ctrl-delete.

Closes #51725

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:

- Fixed ctrl-delete keybind in the terminal

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-22 10:50:48 +00:00
Bennet Bo Fenner
cfebe3a85a
agent_ui: Remove history view (#54402)
Self-Review Checklist:

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

Release Notes:

- N/A
2026-04-21 14:33:38 +02:00
Max Brunsfeld
4919ca43ec
Always use ArchiveSelectedThread action for archiving threads (#54348)
This changes the action for archiving threads in the main sidebar view
from `RemoveSelectedThread` to `ArchiveSelectedThread`. It has the same
key binding as before: `shift-backspace`. I also added `ctrl-backspace`
as a binding for deleting archived threads in the history view.

Release Notes:

- N/A
2026-04-20 18:47:40 +00:00
João Soares
b204582f7e
Add NewFile keybinding to Welcome context (#52463)
## Context

`ctrl-n` / `cmd-n` doesn't work on the Welcome tab. The global binding
lives under `Workspace && !Terminal` (macOS) and similar contexts that
don't include Welcome. The fix just adds the same binding to the Welcome
context block on all three platforms — same approach the font-size and
recent-project shortcuts already use there.

Closes #52426

## Demo

### Before:




https://github.com/user-attachments/assets/69becde8-25d2-45e3-9e7c-416b7937bd17

### After:




https://github.com/user-attachments/assets/6d9ede76-7adb-4527-bfef-c18d5b8a4fb4









## How to review

One line added per platform keymap file. Check that `ctrl-n` / `cmd-n`
maps to `workspace::NewFile` in the `Welcome` block of:
- `assets/keymaps/default-macos.json`
- `assets/keymaps/default-linux.json`
- `assets/keymaps/default-windows.json`

## Self-review checklist

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

Release Notes:

- Fixed `ctrl-n` / `cmd-n` (New File) not working on the Welcome tab

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-04-20 10:28:45 -03:00
Danilo Leal
9daf886775
Move the worktree picker to the title bar + make it always visible (#54183)
This PR makes Zed only have one worktree picker, as opposed to a flavor
of it in the title bar and another in the agent panel. It then moves it
to the title bar, making it always present, so that its trigger is
separate from the branch picker (which now contains only two views:
branches and stashes). For the worktree picker, I'm mostly favoring the
behavior we've introduced in the agent-panel-flavored version.

It also updates the title bar settings migration to use the JSON
`migrate_settings` helper instead of a shallow Tree-sitter rewrite, so
old `show_branch_icon = true` values are promoted to
`show_branch_status_icon = true` across root, platform, release-channel,
and profile settings scopes.

- [x] Move worktree creation logic to the `git_ui` crate to make this
more generic and less agent-specific
- [x] Double-check the remote use case and ensure nothing broke there
- [x] Improve the UX for the detached HEAD state; better invite people
to create a branch
- [x] Migrate `show_branch_icon = true` to `show_branch_status_icon =
true` across nested settings scopes

Suggested .rules additions

When migrating renamed settings keys that can appear in platform
overrides, release-channel overrides, or profiles, prefer the JSON
`migrations::migrate_settings` helper over shallow Tree-sitter key
rewrites unless tests explicitly cover every nested scope that can
contain the key.

Release Notes:

- Improved migration of the title bar branch status icon setting.

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-04-20 09:29:51 +00:00
Nathan Sobo
3dfbfc8fff
Rename Archive view to Thread History (#54075)
This renames the Archive view to Thread History in all user-facing
surfaces. The concept of archiving a thread (the verb/state) remains
unchanged — only the view that lists all threads is renamed, since it
shows both active and archived entries.

## Changes

- Rename `ViewAllThreads` action → `ToggleThreadHistory`
- Context-sensitive tooltip: "Show Thread History" / "Hide Thread
History"
- Update action doc comment to reference "history" instead of "archive
view"
- Telemetry event: `Thread History Viewed`
- `SerializedSidebarView::Archive` → `History` (with `#[serde(alias =
"Archive")]` for backward compat)
- Add a Lucide-based clock icon adapted to 16×16 / 1.2px stroke
- Switch the history toggle button to use the new clock icon
- Update all three platform keymaps

cc @danilo-leal

Release Notes:

- Renamed the threads Archive view to Thread History and updated its
icon to a clock.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-04-16 19:24:42 -03:00
Bennet Bo Fenner
bfc34a620b
sidebar: Refine archive view (#53975)
Self-Review Checklist:

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

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-04-15 11:01:29 +00:00
Danilo Leal
6beecae6df
agent_ui: Improve the new thread worktree UX (#53941)
Closes https://github.com/zed-industries/zed/issues/53262

- Remove the ability to pick a branch from the agent panel; delegate
this to the title bar picker
- Make the worktree creation earger, just as you selected whether you
want to create it from main or current branch
- Remove flicker when creating a new worktree and switching to a
previously existing one
- Improve some UI stuff: how we display that a worktree is
creating/loading, the branch and worktree icons, etc.
- Fixed a bug where worktrees in a detached HEAD state wouldn't show up
in the worktree pickers

A big part of the diff of this PR is the removal of everything involved
with the `StartThreadIn` enum/the set up involved in only creating the
worktree by the time of the first prompt send.

Release Notes:

- Agent: Improved and simplified the UX of creating threads in Git
worktrees.
- Git: Fixed a bug where worktrees in a detached HEAD state wouldn't
show up in the worktree picker.

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2026-04-15 03:47:19 +00:00
Oleksiy Syvokon
38e1d19e06
agent_ui: Simplify thread scrolling with keyboard (#53547)
This change allows using simple navigation keys (PageDown / PageUp /
Ctrl-Home / Ctrl-End) when the message editor is focused, but only if
the cursor is at the beginning/end of the message, where pressing these
keys would normally result in no-op.

One important corollary is that when the cursor is in an empty message,
navigation keys scroll the thread.

We already have this behavior for Up/Down and this change just expands
it for other navigation keys.

Demo:


[Demo](https://github.com/user-attachments/assets/ff540c8c-a223-417b-b16a-b0d08599b1ae)



Self-Review Checklist:

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


Release Notes:

- N/A
2026-04-13 12:27:54 +03:00
Dino
e25885bbe6
project_panel: Add redo and restore support (#53311)
- Introduce `project_panel::Redo` action
- Update all platform keymaps in order to map
`redo`/`ctrl-shift-z`/`cmd-shift-z` to the `project_panel::Redo` action

### Restore Entry Support

- Update both `Project::delete_entry` and `Worktree::delete_entry` to
return the resulting `fs::TrashedEntry`
- Introduce both `Project::restore_entry` and `Worktree::restore_entry`
to allow restoring an entry in a worktree, given the `fs::TrashedEntry`
- Worth pointing out that support for restoring is not yet implemented
for remote worktrees, as that will be dealt with in a separate pull
request
  
### Undo Manager

- Split `ProjectPanelOperation` into two different enums, `Change` and
`Operation`
- While thinking through this, we noticed that simply recording the
operation that user was performing was not enough, specifically in the
case where undoing would restore the file, as in that specific case, we
needed the `trash::TrashedEntry` in order to be able to restore, so we
actually needed the result of executing the operation.
- Having that in mind, we decided to separate the operation (intent)
from the change (result), and record the change instead. With the change
being recorded, we can easily building the operation that needs to be
executed in order to invert that change.
- For example, if an user creates a new file, we record the
`ProjectPath` where the file was created, so that undoing can be a
matter of trashing that file. When undoing, we keep track of the
`trash::TrashedEntry` resulting from trashing the originally created
file, such that, redoing is a matter of restoring the
`trash::TrashedEntry`.
- Refer to the documentation in the `project_panel::undo` module for a
better breakdown on how this is implemented/handled.

- Introduce a task queue for dealing with recording changes, as well as
undo and redo requests in a sequential manner
- This meant moving some of the details in `UndoManager` to a
`project_panel::undo::Inner` implementation, and `UndoManager` now
serves as a simple wrapper/client around the inner implementation,
simply communicating with it to record changes and handle undo/redo
requests
- Callers that depend on the `UndoManager` now simply record which
changes they wish to track, which are then sent to the undo manager's
inner implementation
- Same for the undo and redo requests, those are simply sent to the undo
manager's inner implementation, which then deals with picking the
correct change from the history and executing its inverse operation
- Introduce support for tracking restore changes and operations
- `project_panel::undo::Change::Restored` – Keeps track that the
file/directory associated with the `ProjectPath` was a result of
restoring a trashed entry, for which we now that reverting is simply a
matter of trashing the path again
- `project_panel::undo::Operation::Restore` – Keeps track of both the
worktree id and the `TrashedEntry`, from which we can build the original
`ProjectPath` where the trashed entry needs to be restored
- Move project panel's undo tests to a separate module
`project_panel::tests::undo` to avoid growing the
`project::project_panel_tests` module into a monolithic test module
- Some of the functions in `project::project_panel_tests` were made
`pub(crate)` in order for us to be able to call those from
`project_panel::tests::undo`
  
### FS Changes

- Refactored the `Fs::trash_file` and `Fs::trash_dir` methods into a
single `Fs::trash` method
- This can now be done because `RealFs::trash_dir` and
`RealFs::trash_file` were simply calling `trash::delete_with_info`, so
we can simplify the trait
- Tests have also been simplified to reflect this new change, so we no
longer need a separate test for trashing a file and trashing a directory
- Update `Fs::trash` and `Fs::restore` to be async
- On the `RealFs` implementation we're now spawning a thread to perform
the trash/restore operation

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

Relates to #5039

Release Notes:

- N/A

---------

Co-authored-by: Yara <git@yara.blue>
Co-authored-by: Miguel Raz Guzmán Macedo <miguel@zed.dev>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2026-04-09 18:49:16 +01:00
ozacod
525f10a133
editor: Add action to toggle block comments (#48752)
Closes #4751

## Testing
- Manually tested by comparing the behaviors with vscode.
- Those requirements are added to unit tests.

Release Notes:

- Added action to toggle block comments

---------

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
2026-04-08 22:29:16 +03:00
MostlyK
fd667f6373
repl: Add notebook command/edit modes and keybindings (#51194)
- Introducing NotebookMode state and handlers (EnterEditMode,
EnterCommandMode, RunAndAdvance).
- Wire up UI to switch modes,focus editors appropriately, and advance
selection while in command mode.
- Update default and vim keymaps to use the new bindings (shift-enter
runs+advances, escape enters command mode,
and enter/up/down work in command mode).
- Reveal and Focus the new Cell when inserted 

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-04-07 22:58:03 +02:00
Dino
58ef3fa39b
keymaps: Avoid capturing ctrl-r in the terminal (#53301)
Update macOS and Linux's default keymaps such that, in the `Terminal`
context, `ctrl-r` does send the `ctrl-r` keystrokes. This was no longer
the case with recent changes to enable `ctrl-r` to map to
`projects::OpenRecent` which prevented users to use history search in
shells like bash and zsh, for example.

Release Notes:

- N/A
2026-04-07 17:58:10 +00:00
David Alecrim
a92b242e01
keymaps: Add Ctrl+R open recent binding for macOS and Linux (#52893)
Closes #52879

## Summary

VS Code binds `Ctrl+R` to open recent workspaces/folders on all
platforms (Windows, macOS, and Linux). Zed already had this binding in
`default-windows.json`, but it was missing from `default-macos.json` and
`default-linux.json`.

Since `BaseKeymap::VSCode` returns no supplemental keymap file and
relies entirely on the platform default keymaps, users who selected VS
Code keybindings on macOS or Linux would not get the expected `Ctrl+R`
behavior — instead getting nothing, or having to use the non-VSCode
binding (`Alt+Cmd+O` / `Alt+Ctrl+O`).

This adds the missing binding to both platform defaults, consistent with
what Windows already had.

## Screenshot
The default keybinding in VS Code:
<img width="1512" height="319" alt="Screenshot 2026-04-01 at 07 38 09"
src="https://github.com/user-attachments/assets/12d483a3-3c52-4649-a00f-ee2b8e40bc8c"
/>


Release Notes:

- Added `Ctrl+R` keybinding for opening recent projects on macOS and
Linux, matching VS Code's default behavior on all platforms.
2026-04-06 10:50:48 -06:00
Ahmet Kaan Gümüş
fd4d8444cf
markdown_preview: Add search support to markdown preview (#52502)
Context

The markdown preview had no search functionality — pressing Ctrl+F did
nothing. This PR implements the SearchableItem trait for
MarkdownPreviewView, enabling in-pane text search with match
highlighting and navigation.

  Changes span four crates:

- project: Added SearchQuery::search_str() — a synchronous method to
search plain &str text, since the existing search() only works on
BufferSnapshot.
- markdown: Added search highlight storage to the Markdown entity and
paint_search_highlights to MarkdownElement. Extracted the existing
selection painting into a reusable paint_highlight_range helper to avoid
duplicating quad-painting logic.
- markdown_preview: Implemented SearchableItem with full match
navigation, active match tracking, and proper SearchEvent emission
matching Editor behavior.
- Keymaps: Added buffer_search::Deploy bindings to the MarkdownPreview
context on all three platforms.
  
The PR hopefully Closes
https://github.com/zed-industries/zed/issues/27154

  How to Review

1. crates/project/src/search.rs — search_str method at the end of impl
SearchQuery. Handles both Text (AhoCorasick) and Regex variants with
whole-word and multiline support.
  2. crates/markdown/src/markdown.rs — Three areas:
    - New fields and methods on Markdown struct (~line 264, 512-548)
- paint_highlight_range extraction and paint_search_highlights (~line
1059-1170)
    - The single-line addition in Element::paint (~line 2003)
3. crates/markdown_preview/src/markdown_preview_view.rs — The main
change. Focus on:
- SearchEvent::MatchesInvalidated emission in schedule_markdown_update
(line 384)
    - EventEmitter<SearchEvent> and as_searchable (lines 723, 748-754)
- The SearchableItem impl (lines 779-927), especially active_match_index
which computes position from old highlights to handle query changes
correctly
  4. Keymap files — Two lines each for Linux/Windows, one for macOS.

  Self-Review Checklist

- [ x ] I've reviewed my own diff for quality, security, and reliability
- [ x ] Unsafe blocks (if any) have justifying comments (no unsafe)
- [ x ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
(should be 😄 )
- [ - ] Tests cover the new/changed behavior (not sure)
- [ - ] Performance impact has been considered and is acceptable (I'm
not sure about it and it would be nice to see experienced people to
test)


Release Notes:
- Added search support (Ctrl+F / Cmd+F) to the markdown preview

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-04-06 16:42:20 +00:00
Aleksei Gusev
cb99ab4ac7
Add PageUp/PageDown scrolling in agent view (#52657)
Fixes #52656

Self-Review Checklist:

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

Closes #52656 

Release Notes:

- Added keybindings for scrolling in agent view

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2026-04-02 18:26:18 +00:00
Danilo Leal
b3179a1e5a
recent_projects: Improve keyboard navigation (#52866)
Previously, within the recent projects modal, the ability to add a
project to the workspace, delete a project from the "this window" or
"recent projects" sections, and remove a project from the current window
were only possible to do with the mouse. This PR enables them with the
keyboard, through buttons/keybindings exposed in the modal's footer and
"actions" menu. Here's a quick video for reference:


https://github.com/user-attachments/assets/b8980ed8-ba32-4e20-93b4-c0a9ea311309

Release Notes:

- Improved keyboard navigation for the recent projects modal.
2026-04-01 17:08:25 -03:00
Ben Brandt
76c6004b27
Remove text thread and slash command crates (#52757)
🫡

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:

- Removed legacy Text Threads feature to help streamline the new agentic
workflows in Zed. Thanks to all of you who were enthusiastic Text Thread
users over the years ❤️!

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-31 17:55:05 +02:00
saberoueslati
6a95e29387
git_panel: Fix space key being swallowed in branch picker (#52779)
## Context

Fixes a regression where typing a space in the Git Panel's "Switch
Branch" picker would make no response at all instead of inserting the
character. The same picker in the title-bar Git Switcher was unaffected.

Root cause: `PopoverMenu` links the opened menu's focus handle into the
parent element's dispatch tree so that `contains_focused` returns `true`
on the parent while the popover is open. `GitPanel::dispatch_context`
uses
`contains_focused` to decide whether to add the `ChangesList` key
context, so that context is active while the branch picker is open.
Because `Picker` and `Editor` have no binding for a bare `space`,
dispatch fell through to
the `"GitPanel && ChangesList"` binding, which maps `space` to
`git::ToggleStaged`, consuming the keystroke before it could reach the
text input.

The fix narrows the context guard to `"GitPanel && ChangesList &&
!GitBranchSelector"`,
so those bindings are skipped whenever the branch picker (or any other
`GitBranchSelector` context) is focused inside the panel.

The same change is applied to the vim keymap, which would have similarly
intercepted `k`,
`j`, `x`, and other letter keys typed in the picker, this behavior was
observed in https://github.com/zed-industries/zed/issues/52617 and I
made the same fix in https://github.com/zed-industries/zed/pull/52687

Closes #52771 and potentially
https://github.com/zed-industries/zed/issues/52617

Video of the manual test of the fix below :

[Screencast from 2026-03-31
00-01-54.webm](https://github.com/user-attachments/assets/76f64507-4f5a-4a8e-8582-4cdb9bec584c)

## How to Review

- `assets/keymaps/default-linux.json`, `default-windows.json`,
`default-macos.json`, `vim.json` : identical one-line change in each: I
added `&& !GitBranchSelector` to
  the `"GitPanel && ChangesList"` 
. No Rust changes needed.

## 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 space and other keys being swallowed when typing in the Git
Panel branch picker
2026-03-30 23:56:37 -07:00
Om Chillure
3dde315a13
agent panel: Fix keybindings on Linux (#52672)
## Context

Fixes agent panel keybindings on Linux, mirroring the Windows fix from
#43692.

On Linux, `Ctrl+Y` (the previous `agent::AllowOnce` binding) is
intercepted by the focused text input as "redo", so the shortcut did
nothing when the message editor was focused. This is the same issue
fixed for Windows in #43692.

Changes (Linux and Windows):
- `agent::AllowAlways`: added `shift-alt-q` (was unbound on all
platforms)
- `agent::AllowOnce`: `ctrl-y` → `shift-alt-a` (Linux); already
`shift-alt-a` on Windows
- `agent::RejectOnce`: `shift-alt-x` on both platforms — `shift-alt-z`
conflicted with `agent::RejectAll` bound in other contexts, causing the
keybinding hint to not appear in the UI
- `agent::ToggleNavigationMenu`: `ctrl-shift-j` → `shift-alt-j` (Linux)
- `agent::ToggleOptionsMenu`: `ctrl-alt-i` → `shift-alt-i` (Linux)

Closes #52472

## How to Review

Two files changed: `assets/keymaps/default-linux.json` and
`assets/keymaps/default-windows.json`. Check the `AgentPanel` context
block in each.

## Self-Review Checklist

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


Note : Reopens previous work from closed PR #52479 (fork was deleted)

Release Notes:

- Fixed agent panel `Allow`, `Always Allow`, and `Reject` keybindings
not working when the message editor is focused on Linux
e
2026-03-30 16:23:01 +02:00
Cameron Mcloughlin
d72a03827d
sidebar: Switch with ctrl-tab (#52423)
Overrides `ctrl-tab` when the sidebar/agent panel is focused to switch
between recently viewed threads

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-03-28 17:48:34 +00:00
Danilo Leal
2a3fcb2ce4
collab_panel: Add ability to favorite a channel (#52378)
This PR adds the ability to favorite a channel in the collab panel. Note
that favorited channels:
- appear at the very top of the panel
- also appear in their normal place in the tree
- are not stored in settings but rather in the local key-value store

<img width="500" height="618" alt="Screenshot 2026-03-25 at 1  11@2x"
src="https://github.com/user-attachments/assets/dda8d5ae-7b45-4846-acc9-4a940b487ac4"
/>

Release Notes:

- Collab: Added the ability to favorite channels in the collab panel.
2026-03-26 16:24:20 -03:00
Danilo Leal
0a4dfe327a
sidebar: Fix space not working in the search editor (#52444)
We were using space as an alternative to `enter` for selecting thread
items even while the search editor was focused. The solution here was to
create a dynamic key context based on the search editor focus state.

Release Notes:

- N/A
2026-03-25 19:23:45 -03:00
Ben Kunkle
2b8e9cc633
ep: Follow-ups for binding changes (#52258)
## Context

- Updates docs for how to update edit prediction bindings
- Walks back how often we use tab to accept prediction where we
previously didn't; now just when in leading whitespace, tab does not
accept completion when completions menu is open
- migration for keymaps using the old `edit_prediction_conflict` key
context

## How to Review

The only code worth reviewing is the migration
<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
     - See the review process guidelines for comment conventions -->

## Self-Review Checklist

<!-- Check before requesting review: -->
- [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 or Added/Fixed/Improved ...

---------

Co-authored-by: Max <max@zed.dev>
2026-03-24 18:11:43 -04:00
Danilo Leal
4b598bff35
agent_ui: Add some thread view design improvements (#52322)
This PR adds some small design refinements to the thread view: making
keybinding size consistent throughout, improving the activity bar
shadow, fixing the keybinding to open a file from an edit tool diff, and
other smaller spacing/color tweaks.

Release Notes:

- N/A
2026-03-24 11:08:34 -03:00
Finn Evers
cae8d3e0ba
settings_ui: Fix open settings keybind always taking precedence (#52277)
Solves an issue introduced by
https://github.com/zed-industries/zed/pull/49527 until we land
https://github.com/zed-industries/zed/pull/52275.

No release notes since this is only on Nightly.

Release Notes:

- N/A
2026-03-24 02:13:59 +01:00
Ben Kunkle
8b822f9e10
Fix regression preventing new predictions from being previewed in subtle mode (#51887)
## Context

<!-- What does this PR do, and why? How is it expected to impact users?
     Not just what changed, but what motivated it and why this approach.

Link to Linear issue (e.g., ENG-123) or GitHub issue (e.g., Closes #456)
     if one exists — helps with traceability. -->
Fixes some issues with https://github.com/zed-industries/zed/pull/51842
Namely that the tests were scattered and not well organized (this PR
also makes them more thorough), and a regression where holding the
modifiers for the accept prediction keybind would not cause an incoming
prediction to be immediately previewed.

## How to Review

<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
     - See the review process guidelines for comment conventions -->

## Self-Review Checklist

<!-- Check before requesting review: -->
- [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:

- (Preview v0.229.x only) Fixed a regression where holding the modifiers
for the accept edit prediction keybind would not immediately preview
predictions as they arrived
2026-03-23 00:20:55 -04:00
Danilo Leal
e126857732
sidebar: Add another round of refinements (#52101)
- Change the branch button's tooltip to be more accurate given it
displays more stuff than only branches
- Hide the worktree dropdown menu when in a non-Git repo project
- Improve provisioned title truncation
- Remove the plus icon from the "view more" item to improve sidebar's
overall feel
- Remove the always visible "new thread" button but make it visible only
when you're in an empty thread state
- Add worktree icon in the thread item and tooltip with full path
- Space out the worktree name from the branch name in the git picker in
the title bar
- Swap order of views in the git picker to "worktree | branches | stash"
- Improve the "creating worktree" loading indicator

---
<!-- Check before requesting review: -->
- [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
2026-03-21 16:22:32 -03:00
Danilo Leal
690d5af735
sidebar: Add several refinements (#51980)
## Context

- Improve how we detect when the sidebar should render the empty state.
It was previously wrong using `content.entries.is_empty`, which would
also happen if there are no search matches.
- Improved archive view keyboard nav and design. Not using the ListItem
here anymore so as to avoid confusing hover and active states.
- Move archive and open folder buttons to the bottom of the sidebar.
- Add a new flavor of the recent projects for the sidebar that only
serves as a way to _add_ projects.
- Add the ability to add (and remove) folders to a given project group
in the sidebar through a dropdown menu
--- 
- [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
2026-03-19 22:11:22 -03:00
claire
b0e35b6599
Allow search/replace to span multiple lines (#50783)
Closes #49957 

Also adds `start_of_input` context, and modifies both
`{start,end}_of_input` to work for both single line and auto height
editor modes.


https://github.com/user-attachments/assets/e30f2b20-a96c-49d5-9eb6-3c95a485d14a

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:

- Added support for multi-line search and replace input in Buffer Search
and Project Search

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2026-03-19 11:10:14 -06:00
Marco Mihai Condrache
7baf5dc04e
Add basic undo in project panel (#47091)
- Add `project_panel::undo::UndoManager` with a bounded operation stack
  to track and revert project panel operations
- Support undoing file and directory creation, renaming, moving, pasting
  and drag-and-drop operations
- Revert batch operations sequentially in reverse order to handle
  dependencies between them
- Show an error notification when one or more undo operations fail
- Add "Undo" entry to the project panel context menu, disabled when
  there is nothing to undo
- Gate the feature behind the `project-panel-undo-redo` feature flag

Ref: #5039

Release Notes:

- N/A

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-03-18 22:37:21 +00:00
Cameron Mcloughlin
c842fb55dd
sidebar: Keyboard nav improvements (and vim mode) (#51856) 2026-03-18 17:53:04 +00:00
Ben Kunkle
5f12c92924
Remove edit prediction conflict state (#51842)
Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-18 12:47:46 -04:00
Danilo Leal
f9cb072798
sidebar: Improve keyboard navigation (#51796)
- In the project header, arrow keys left and right expand/collapse the
group
- Enter and space in any thread list item selects the item
- Arrow key down from the search editor moves focus to the the list
- Arrow key up from the first list item puts focus back to the editor
- At any moment while focus on the list, cmd-f moves focus back to the
search editor
- Made the `FocusWorkspaceSidebar` action always reset focus back to the
search editor

Release Notes:

- N/A
2026-03-17 21:48:42 -03:00
Danilo Leal
9f3e3be65f
agent: Improve sidebar design and behavior (#51763)
- Selection/focus improvements (reduces flickers, move selection more
correctly throughout the list)
- Adds open folder button in the sidebar header
- Fixes sidebar header design, including the thread view one, too
- Fixes behavior of cmd-n when focused in the sidebar
- Changes the design for the "new thread" button in the sidebar and adds
a preview of the prompt on it
- Rename items in the "start thread in" dropdown

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2026-03-17 20:44:20 -03:00
andrew j
4e9ffa3ee1
markdown_preview: Add ScrollToTop and ScrollToBottom actions (#50460)
Add `gg`/`G` (vim), `cmd-up`/`cmd-down` (macOS), and
`ctrl-home`/`ctrl-end` (Linux/Windows) keybindings to scroll to the top
and bottom of the markdown preview.

The markdown preview already has page scroll (`ctrl-d`/`ctrl-u`), line
scroll (`ctrl-e`/`ctrl-y`), and item scroll (`alt-up`/`alt-down`) but
was missing top/bottom navigation. This adds two new actions —
`ScrollToTop` and `ScrollToBottom` — using the existing
`ListState::scroll_to()` infrastructure, following the same pattern as
the other scroll actions.

- [x] Done a self-review taking into account security and performance
aspects

Release Notes:

- Added scroll-to-top and scroll-to-bottom keybindings for markdown
preview (`gg`/`G` in vim mode, `cmd-up`/`cmd-down` on macOS,
`ctrl-home`/`ctrl-end` on Linux/Windows)
2026-03-17 11:55:48 +02:00
Danilo Leal
e79429b51b
agent_ui: Add more UI refinements to sidebar (#51545)
- Move archive button to the header for simplicity
- Hook up the delete button in the archive view
- Improve how titles are displayed before summary is generated
- Hook up keybinding for deleting threads in both the sidebar and
archive view

Release Notes:

- N/A
2026-03-14 02:14:25 -03:00
João Soares
8e045237c4
gpui: Hide XF86 keybindings from menus and keybinding hints (#50540)
Closes #50436

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:

- Fixed XF86 multimedia key names ("New", "Save", "Open") being shown as
keybinding hints in menus instead of the actual keyboard shortcuts.
2026-03-13 02:03:51 +00: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
Danilo Leal
47cc0bac41
agent_ui: Add keybinding to cycle through new thread location options & settings (#51384)
This PR adds the ability to save in the settings whether new threads
should start in the current project or in a new Git worktree.
Additionally, it also adds a keybinding that allows cycling through the
menu options easily, with the ability to use cmd-click/enter to choose
which one is set as the default.

No release notes because this feature/settings depends on a feature flag
that isn't out yet.

Release Notes:

- N/A
2026-03-12 10:14:10 -03:00
Cameron Mcloughlin
7cd0c5d72d
agent: Fix inline assistant keymap in agent panel (#51117)
Fixes a bug that causes the new large agent panel message editor
overrides the ctrl-enter keyboard shortcut to trigger the inline
assistant, rather than sending a message

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-03-09 16:16:09 +00:00
Danilo Leal
6b64b4c6c1
agent_ui: Add keybinding and action for worktree toggle (#51092)
This PR adds an action and keybinding to trigger the worktree dropdown
in the agent panel. This is still under a feature flag, so no release
notes yet.

Release Notes:

- N/A
2026-03-09 08:55:16 -03:00