# sidebar: Improve new thread button behavior/design \(\#53429\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 177843c3df34eae8cf7f64c7342798715087a980

Requested commit: 177843c3df34eae8cf7f64c7342798715087a980

Commit: 177843c3df34eae8cf7f64c7342798715087a980

Tree: 58760236d449f91d4bf6d48340a2dd98a594cdc4

Author: Danilo Leal

Committer: GitHub

## Message

```
sidebar: Improve new thread button behavior/design (#53429)

This PR removes the labeled "new thread" button when the project group
is empty, making it so, effectively, we only show it when you're in an
empty/draft thread in the active workspace. The "Untitled Thread" label
has also been renamed back to "New Thread". Then, we fixed an issue
where clicking on the new thread icon button would default to creating a
new thread in the main worktree as opposed to the one currently active;
this fix makes the button's behavior match with `cmd-n` from the agent
panel. Lastly, we fixed the "new thread" labeled button not opening the
agent panel when that's closed and organized the data structures a bit
by merging `DraftThread` and `NewThread` all into `DraftThread`.

Release Notes:

- Thread Sidebar: Fixed the new thread icon button not creating a thread
in the current active worktree.
- Thread Sidebar: Fixed click on the new thread button not opening the
agent panel when closed.

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
```

## Parents

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

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