Commit Graph
83 Commits
Author SHA1 Message Date
Danilo Leal ed9d66d451 sidebar: Improve remote project icon display (#52726)
Follow up to https://github.com/zed-industries/zed/pull/52720

This PR renders the same icons we do in the title bar depending on the
type of remote connection (SSH, WSL, etc.).

Release Notes:

- N/A
2026-03-30 09:37:58 -03:00
Danilo Leal cdddb2cb9b sidebar: Clarify which projects are remote in the UI (#52720)
This PR adds a little server icon to the side of the project label to
clarify that's a remote project. This is particularly useful when having
the remote and non-remote version of a project open in the same
multi-workspace/window.

<img width="400" height="282" alt="Screenshot 2026-03-30 at 7  59@2x"
src="https://github.com/user-attachments/assets/9bb3e02e-a64d-412e-88ef-57b18fb5e13d"
/>

Release Notes:

- N/A
2026-03-30 08:09:49 -03:00
Bennet Bo FennerandBen Brandt 788318ffdd sidebar: Rework archive feature (#52534)
## 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. -->

## 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
- [ ] 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: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-30 10:17:48 +00:00
Ben Brandt 063dd8c780 eval_cli: Simplify build setup for more datasets (#52686)
Cleans up build setup and simplifies it a bunch so that we can use the
binary in more eval docker containers

Release Notes:

- N/A
2026-03-29 20:58:50 +00:00
Cameron Mcloughlin d64fa1b10d 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
Eric Holk 1932b01dc6 Add VecMap::entry_ref (#52601)
Thinking more on #52596, I realized the `entry` method needs a key by
value, which meant we were always cloning a path list even if it was
already in the map. This PR adds an `entry_ref` that takes the key by
reference and delays cloning the key until we know we're going to be
inserting.

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-03-27 18:06:56 -07:00
Mikayla Maki f14dcf1192 Make carve outs in property test more explicit (#52610)
Refactors the property test to be explicit about the exceptions to the
sidebar's "properties"

Self-Review Checklist:

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

Closes #ISSUE

Release Notes:

- N/A
2026-03-28 00:40:57 +00:00
Anthony EidandMikayla Maki 657cf66d00 sidebar: Add property tests (#52540)
## 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. -->

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

- N/A

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2026-03-27 23:46:53 +00:00
Eric Holk 96e2a8d3d5 Show multiple worktree chips in sidebar for threads with mismatched worktrees (#52544)
## Summary

When a thread was created in a workspace whose roots span different git
worktrees (e.g. the `olivetti` branch of project_a and the `selectric`
branch of project_b), the sidebar now shows a worktree chip for each
distinct branch name — like `{olivetti} {selectric}` — each with its own
git worktree icon. Same-named worktrees are collapsed into a single
chip. The tooltip on any chip shows the full list of worktree paths.

Previously, only one worktree chip was ever shown (from the first path).

### Implementation

- Introduces `WorktreeInfo` struct replacing the flat
`worktree_name`/`worktree_full_path`/`worktree_highlight_positions`
fields on `ThreadEntry` with `worktrees: Vec<WorktreeInfo>`
- Adds `worktree_info_from_thread_paths` which derives worktree display
info from a thread's own stored `folder_paths` metadata rather than from
the workspace path
- Updates `ThreadItem` in the UI crate to accept
`Vec<ThreadItemWorktree>` and render multiple chips, deduplicating by
name
- Updates fuzzy search to match against all worktree names
- Adds tests for multiple worktree chips and same-name deduplication

Release Notes:

- N/A
2026-03-27 14:49:41 -07:00
Eric Holk 739a532ae2 Add VecMap and use it in ProjectGroupBuilder (#52596)
This adds a collection that has a map-like API but is backed by vectors.
For small collections, this often outperforms a HashMap because you
don't have the overhead of hashing things and everything is guaranteed
to be contiguous in memory.

I hand-rolled one of these in `ProjectGroupBuilder` but this factors it
into its own collection. This implements the API that
`ProjectGroupBuilder` needed, but if this becomes more widely used we
can expand to include more of the `HashMap` API.

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-03-27 20:09:47 +00:00
Piotr Osiewicz 5bfedcb023 theme: Split out theme_settings crate (#52569)
Self-Review Checklist:

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

Closes #ISSUE

Release Notes:

- N/A
2026-03-27 14:41:25 +01:00
249dc26dd7 Group threads by canonical path lists (#52524)
## Context

With the new sidebar, we are having some bugs around multi-root projects
combined with git work trees that can cause threads to be visible in the
agent panel but not have an entry in the sidebar.

## How to Review

This PR takes a step towards resolving these issue by adding a
`ProjectGroupBuilder` which is responsible for gathering the set of
projects groups from the open workspaces and then helping to discover
threads and map them into this set.

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

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Max Brunsfeld <max@zed.dev>
2026-03-27 00:11:14 +00:00
Mikayla MakiandEric 29ab42c3d9 Add a setting for moving the sidebar to the right (#52457)
## Context

This adds a setting for controlling the sidebar side

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

---------

Co-authored-by: Eric <eric@zed.dev>
2026-03-26 01:35:10 +00:00
Danilo Leal 6c89a0cbba 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
Eric Holk edc8bafa3c Sidebar and git cleanups (#52431)
A few minor cleanups in sidebar.rs and some related areas.

Release notes:

- N/A
2026-03-25 17:16:51 +00:00
Bennet Bo FennerandGaauwe Rombouts d14c5c94e0 agent: Reduce DB load in ThreadMetadataStore (#52313)
## Context

We now batch multiple db operations together if they happen very
frequently (similar to how we handle it in `thread_history.rs`)

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

---------

Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
2026-03-25 09:09:22 +01:00
Anthony Eid ab8274b021 sidebar: Make sure workspace has git state loaded when opening a new one (#52233)
## Context

This fixes a bug where switching to a worktree workspace sometimes
briefly flashes it as a top-level project in the sidebar. This happened
because the sidebar would rebuild its entries whenever the multi
workspace emits the added workspace event.

The fix is checking from the root workspace git linked worktree list as
well to see if newly added workspaces are linked.

## 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
2026-03-24 18:11:17 +00:00
Danilo Leal 829f3af7f5 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
Max Brunsfeld f2f8d179a0 Fix thread's worktree being discarded upon archiving the previous thread in the sidebar (#52271)
This PR fixes a bug where archiving a thread could cause the *next*
thread to be opened in the current workspace, even though it belonged to
a different worktree.

Release Notes:

- N/A
2026-03-23 17:23:33 -07:00
Mikayla MakiandDanilo Leal bb42f77fe8 sidebar: Adjust the sidebar UI slightly (#52228)
This PR:
- Moves the "remove workspace" option into the context menu, so that
it's not swapping places with the + button in some circumstances. This
matches codexs behavior. Another solution to the problem could be having
the add button remain even when the "new thread" option exists.
- Adds a "go to workspace" button to the header

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

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-23 18:45:15 -03:00
Max Brunsfeld 2340e45751 Make close sidebar button work regardless of focus state (#52260)
Like https://github.com/zed-industries/zed/pull/52045, but for the
*close* button.

Release Notes:

- N/A
2026-03-23 14:35:10 -07:00
Cameron McloughlinandAnthony Eid 76ce652420 sidebar: Add "move to new window" action (#52219)
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2026-03-23 17:18:15 +00:00
Ben BrandtandBennet Bo Fenner 7c6a1f7617 agent_ui: Don't reset provisional title if we already have one (#52193)
## Context

If you went back and edited the first message, we were resetting the
provisional title, even though the title had previously already been set
from a summarization pass.

In order to achieve this, we moved the default thread title logic up the
UI layer, and allowed AcpThreads to have an optional title.

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

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-23 12:27:12 +00:00
Lukas Wirth dd8f595b5c sidebar: Fix workspace and project leaking on window close (#52169)
Release Notes:

 - n/a
2026-03-23 12:05:15 +01:00
Bennet Bo Fenner c84eb6facc agent_ui: Remove duplicated function from agent panel (#52179)
Release Notes:

- N/A
2026-03-23 09:34:42 +00:00
Danilo Leal de9e007ba0 sidebar: Fix highlighting "new thread" element after cmd-n (#52105) 2026-03-22 10:02:24 -03:00
Danilo Leal 8dde5efe02 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 2789143781 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
Eric Holk 1a9f4ba55a multiworkspace: Don't destroy workspace when git worktree is detached head (#51977)
When a git worktree is in a detached HEAD state (e.g. after `git
checkout --detach`), the workspace for that worktree would disappear
from the sidebar UI, and if the workspace was currently open your UI
would just disappear.

This happened because `parse_worktrees_from_str` silently dropped any
worktree entries without a `branch` line in the porcelain output, which
cascaded through the `linked_worktrees` list and caused
`prune_stale_worktree_workspaces` to remove the workspace.

This PR:
- Makes `Worktree::ref_name` an `Option<SharedString>` so detached
worktrees can be represented
- Renames `Worktree::branch()` to `Worktree::display_name()`, which
returns the branch name when available or the short SHA as a fallback
(mirroring how the title bar already handles detached HEAD for
repositories)
- Updates `parse_worktrees_from_str` to include detached and bare
worktree entries instead of dropping them
- Filters detached worktrees out of the worktree picker UI, preserving
the existing product decision to only show branch-based worktrees there

## 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-03-19 17:18:08 -07:00
Bennet Bo Fenner 441f27cb84 sidebar: Fix missing unread indicators in git worktree threads (#51942)
## Context

Unread indicators would not show up for threads running inside a git
worktree

## 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
2026-03-19 14:48:14 +00:00
Danilo Leal 1b44159346 sidebar: Add some small design tweaks (#51936)
- [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 11:15:24 -03:00
Bennet Bo Fenner f1cad55e44 Maintain cache in ThreadMetadataStore (#51923)
## Context

This makes it so that we maintain a cached state on the thread metadata
store itself, rather than storing it at other locations. Which is
similar to how `ThreadStore` works.

## How to Review

## 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
2026-03-19 14:18:11 +01:00
7acf82b63f sidebar: Fix sidebar and archive view content display (#51930)
- Don't filter out what we show in the archive view; unconditionally
display archived threads for all sessions
- Ensure we refresh sidebar content on startup

---

- [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: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2026-03-19 09:27:06 -03:00
Danilo Leal b7e128dcce agent_ui: Fix thread archive and agent panel for empty window threads (#51924)
This PR ensures threads created on an empty window (i.e., no
paths/worktrees associated with it) can still be displayed in the thread
archive view. They can't be unarchived, though, as we don't know where
we'd insert it, even if we had a project on the window. Lastly, I'm also
hiding the "current worktree"/"new git worktree" menu from the agent
panel if we don't have any paths as those options don't make sense in
this case.

- [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 08:49:16 -03:00
Danilo Leal 7708baed51 sidebar: Move toggle to the status bar instead (#51916)
- [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 07:41:10 -03:00
Bennet Bo Fenner 68174396d6 Rename ThreadMetadataStore to SidebarThreadMetadataStore (#51913)
## Context

Renamed ThreadMetadataStore to SidebarThreadMetadataStore.
There was some confusion yesterday on what metadata should be stored in
`ThreadMetadataStore.
Only threads that should show up in the sidebar should be stored here
(effectively all non-archived ones). Hopefully the rename + doc comment
added makes this clearer.
Unfortunately we cannot move it into the sidebar crate since we need it
in the archived history view too.

## How to Review

This is purely a cosmetical change

## 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-03-19 09:52:08 +00:00
Mikayla Maki 07bcf29dd5 Tidy up sidebar implementation (#51904)
## Context

This PR cleans up all the sidebar impl, from the over use of agentic
tools, without regard for the sidebar's construction.

## How to Review

This PR fixes the following problems:
- Overuse of inter-event guards and state management around focus state.
Simplified to just `focused_thread `, a derived value from the current
active agent panel and thread. UI can optimistically set this value for
threads that haven't been loaded yet, and it won't be unset by
`update_entries`
- Mixing data fetching and re-derivation. `update_entries` should not be
fetching the list of threads. Rather, that list should be pulled from
the threads meta data, cached on the sidebar, and then used to compute
the new state
- Similarly, removed logical state mutation from `update_entries`. It's
job is to compile the new UI state from it's data sources, not to move
selection state around. Do that elsewhere.
- The Archive pointer should be stored in the active view enum, rather
than spread across two fields
- Finally, update_entries did several linear passes over the list of
threads in a row, I had claude consolidate these passes and am relying
on our extensive test coverage to keep it functioning. If this breaks
something you built, _put that in a test_.

## 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
2026-03-19 10:16:36 +01:00
Danilo Leal 12a9e334da sidebar: Enable archiving external agents threads (#51910)
## 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
2026-03-19 05:41:32 -03:00
Danilo Leal 07f6b5c06a sidebar: Add another round of UX refinements (#51884) 2026-03-18 23:04:54 -03:00
Max BrunsfeldandEric Holk ce066d703a Show linked worktree names consistently in sidebar and titlebar (#51883)
This is a follow-up to https://github.com/zed-industries/zed/pull/51775,
making worktree names in the sidebar appear consistent with the
titlebar.

## Context

- [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: Eric Holk <eric@zed.dev>
2026-03-19 00:32:13 +00:00
Eric HolkandMax Brunsfeld 35059adb27 Show worktree thread status in sidebar (#51879)
Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects
- [X] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-03-18 23:10:49 +00:00
Danilo LealandBennet Bo Fenner 72d4c22519 sidebar: Improve behavior of the "view more" action (#51872)
This PR makes sure that threads running, waiting for confirmation, or
with a notification remain visible even after you've collapsed the list,
in case they would be naturally hidden (if the list was collapsed).

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-18 18:06:07 -03:00
87d025d863 sidebar: Improve the archive view (#51863)
- Add the ability to archive a thread from the sidebar
- Add the ability to unarchive a thread from the archive view
- Improve keyboard navigation within the archive view
- Display project names associated with a thread in the archive view

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2026-03-18 17:00:40 -03:00
Cameron Mcloughlin 3a98c67f36 sidebar: Keyboard nav improvements (and vim mode) (#51856) 2026-03-18 17:53:04 +00:00
Bennet Bo Fenner 3477967ecd sidebar: Fix date formatting (#51851)
Previously we were not showing days

Release Notes:

- N/A
2026-03-18 16:50:30 +00:00
Ben Brandtandcameron 602248b717 sidebar: Load archived threads in the correct window (#51831)
Make sure we don't create a duplicate workspace if it is already open in
another window.

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
2026-03-18 11:53:48 +00:00
Cameron Mcloughlin eeb212f6a7 agent: Collapsed project thread UI indicators (#51824) 2026-03-18 10:13:17 +00:00
Mikayla Makianderic 3f6e3cd9d8 Clean up multiworkspace (#51794)
Remove old multiworkspace commands and fix a bug where multiworkspaces
wouldn't be deserialized from the DB

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

Release Notes:

- N/A

---------

Co-authored-by: eric <eric@zed.dev>
2026-03-18 03:41:00 +00:00
Danilo Leal e9e5ee15cb sidebar: Add some more improvements (#51799)
Follow up to https://github.com/zed-industries/zed/pull/51763

Release Notes:

- N/A
2026-03-17 23:28:50 -03:00
Danilo Leal e4329538e3 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