# agent_ui: Improve the new thread worktree UX \(\#53941\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6beecae6dfbadbaffdeb8815742c800ad1695547)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6beecae6dfbadbaffdeb8815742c800ad1695547

Requested commit: 6beecae6dfbadbaffdeb8815742c800ad1695547

Commit: 6beecae6dfbadbaffdeb8815742c800ad1695547

Tree: 394db77ec322bc0564b5d02886b24da95e834bd9

Author: Danilo Leal

Committer: GitHub

## Message

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

## Parents

- [6467d4f9aff47a4064fa0df5b2b6270552781024](https://git.cafe/gitcafe/zed/commit/6467d4f9aff47a4064fa0df5b2b6270552781024?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6beecae6dfbadbaffdeb8815742c800ad1695547?format=markdown)
