sidebar: Group threads sidebar settings (#64395)

## Objective

Group the threads sidebar settings together in JSON and the Settings
Editor, using consistent “Threads Sidebar” terminology.

This follows up on #63452 now that #62883 has added configurable default
width, and includes the auto-open setting added since then.

## Solution

- Group `position`, `default_width`, and `auto_open` under
`agent.threads_sidebar`, and display their controls together in
Settings.
- Automatically migrate `agent.sidebar_side`,
`agent.threads_sidebar_default_width`, and
`agent.threads_sidebar_auto_open` across supported settings scopes,
preserving existing nested values.
- Apply changes to the default width immediately, including when the
sidebar was manually resized, and clear the saved width override.
Unrelated settings changes preserve manual sizing.
- Document all three settings, including the previously missing position
entry.

## Testing

The following targeted checks passed on the local changes:

- `cargo test -p migrator nest_agent_threads_sidebar_settings` — 7 tests
passed.
- `cargo test -p sidebar -p workspace -p agent_settings -p gpui_platform
--features gpui_platform/runtime_shaders --lib -- width
threads_sidebar_settings test_open_directory_in_existing_window` — 9
tests passed.
- `cargo fmt --all` completed successfully.
- `git diff --check` passed.
- From `docs`: `npx prettier --check src/reference/all-settings.md
src/ai/parallel-agents.md` passed.

Coverage includes migration precedence and supported scopes, settings
defaults and width limits, manual sizing and resets, persisted widths,
and auto-open behavior.

Full application tests and manual UI testing were not run. Clippy was
not rerun after the final terminology changes.

## Self-Review Checklist:

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

Release Notes:

- Improved threads sidebar settings by grouping position, default width,
and auto-open together, and applying default-width changes even after
manual resizing.
This commit is contained in:
Josh Kent authored and GitHub committed 2026-09-21 15:15:54 +00:00
1 parent 180932e1d9
commit a18b1a1026
16 files changed
+615 -170

No files matched your search

+4 -2
View File
@@ -19,9 +19,11 @@ Terminal Threads also appear as entries in the sidebar alongside agent threads,
To focus the sidebar without toggling it, use {#kb multi_workspace::FocusWorkspaceSidebar}. To search your threads, press {#kb agents_sidebar::FocusSidebarFilter} while the sidebar is focused.
To change the sidebar’s default width, open the Settings Editor and search for “Threads Sidebar Default Width”. See [`agent.threads_sidebar_default_width`](../reference/all-settings.md#agent-threads-sidebar-default-width) for values and a configuration example.
To change the sidebar’s position, open the Settings Editor and search for “Threads Sidebar Position”, which writes `agent.threads_sidebar.position`. To change its default width, search for “Threads Sidebar Default Width”. See [`agent.threads_sidebar.default_width`](../reference/all-settings.md#agent-threads-sidebar-default-width) for values and a configuration example.
Drag the divider to override the configured width. Double-click it to return to the setting and follow subsequent settings changes.
Drag the divider to resize the sidebar. Changing the default width updates even a manually resized sidebar. Double-click the divider to return to the configured width.
The “Threads Sidebar Auto Open” setting controls whether opening a folder in an existing window opens the sidebar. Its JSON key is `agent.threads_sidebar.auto_open`.
### Switching Threads {#switching-threads}
+31 -5
View File
@@ -121,10 +121,32 @@ To use a fixed reset width, disable flexible sizing in the Settings Editor. Or a
See [Agent Panel visual customization](../visual-customization.md#agent-panel) for other panel appearance settings.
### Threads Sidebar Position {#agent-threads-sidebar-position}
- Description: Which side of the window displays the [Threads Sidebar](../ai/parallel-agents.md#threads-sidebar).
- Setting: `agent.threads_sidebar.position`
- Default: `"left"`
**Options**
`"left"` or `"right"`.
Open the Settings Editor and search for “Threads Sidebar Position”. Or add this to your `settings.json`:
```json [settings]
{
"agent": {
"threads_sidebar": {
"position": "right"
}
}
}
```
### Threads Sidebar Default Width {#agent-threads-sidebar-default-width}
- Description: Default width in pixels of the [Threads Sidebar](../ai/parallel-agents.md#threads-sidebar).
- Setting: `agent.threads_sidebar_default_width`
- Setting: `agent.threads_sidebar.default_width`
- Default: `300`
**Options**
@@ -136,19 +158,21 @@ Open the Settings Editor and search for “Threads Sidebar Default Width”. Or
```json [settings]
{
"agent": {
"threads_sidebar_default_width": 360
"threads_sidebar": {
"default_width": 360
}
}
}
```
If you haven't manually resized the sidebar, its width follows changes to this setting immediately. A manually resized width takes precedence until you double-click the divider to reset it. After resetting, the sidebar follows this setting again.
Changing this setting immediately updates the sidebar width, even if you previously resized it manually. You can also double-click the divider to reset the sidebar to the configured width.
Widths saved by older versions of Zed are preserved if they differ from the previous default of 300 pixels. A saved width of 300 pixels uses this setting instead.
### Threads Sidebar Auto Open {#agent-threads-sidebar-auto-open}
- Description: Whether opening a folder in an existing window automatically opens the [Threads Sidebar](../ai/parallel-agents.md#threads-sidebar).
- Setting: `agent.threads_sidebar_auto_open`
- Setting: `agent.threads_sidebar.auto_open`
- Default: `true`
**Options**
@@ -162,7 +186,9 @@ Open the Settings Editor and search for “Threads Sidebar Auto Open”. Or add
```json [settings]
{
"agent": {
"threads_sidebar_auto_open": false
"threads_sidebar": {
"auto_open": false
}
}
}
```