Skip to content

Move the worktree picker to the title bar + make it always visible (#54183) (cherry-pick to preview)#54378

Merged
eholk merged 1 commit intov0.233.xfrom
cherry-pick-v0.233.x-54183-worktree-picker
Apr 21, 2026
Merged

Move the worktree picker to the title bar + make it always visible (#54183) (cherry-pick to preview)#54378
eholk merged 1 commit intov0.233.xfrom
cherry-pick-v0.233.x-54183-worktree-picker

Conversation

@eholk
Copy link
Copy Markdown
Contributor

@eholk eholk commented Apr 21, 2026

Cherry-pick of #54183 to v0.233.x.

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.

Conflicts resolved

  • crates/migrator/src/migrations.rs and crates/migrator/src/migrator.rs — kept both the existing m_2026_04_15 (HTTP context servers) migration already on v0.233.x and the new m_2026_04_17 (branch icon) migration from this cherry-pick, in order.
  • crates/agent_ui/src/agent_panel.rs — dropped the now-removed CreateWorktree, SwitchWorktree, NewWorktreeBranchTarget, and ToggleWorktreeSelector imports while preserving ShowThreadMetadata / ShowAllSidebarThreadMetadata that landed via the omnibus cherry-pick (Cherry picks for v0.233.x preview release #54368). Removed the top-level anyhow! import (only used inside #[cfg(test)], which has its own import); kept chrono since it's still used by the metadata UI.

Release Notes:

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

…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 <[email protected]>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Ben Brandt <[email protected]>
(cherry picked from commit 9daf886)
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 21, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Apr 21, 2026
@eholk eholk enabled auto-merge (squash) April 21, 2026 03:08
@eholk eholk merged commit 2107d41 into v0.233.x Apr 21, 2026
41 checks passed
@eholk eholk deleted the cherry-pick-v0.233.x-54183-worktree-picker branch April 21, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants