# sidebar: Fix click flicker on empty draft thread \(\#59342\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 50b2f63cfe35dd7c0095d1e996305b7c12ff0bff

Requested commit: 50b2f63cfe35dd7c0095d1e996305b7c12ff0bff

Commit: 50b2f63cfe35dd7c0095d1e996305b7c12ff0bff

Tree: d12b7280acdaaf49cb177abe648f8e1b4f8af05a

Author: Danilo Leal

Committer: GitHub

## Message

```
sidebar: Fix click flicker on empty draft thread (#59342)

Closes AI-404

This PR fixes a flicker that was happening when clicking on an empty
draft thread item in the sidebar, given we were going through the whole
regular activation flow despite the thread already being active. So, the
fix here was just extracting a boolean so we can identify whether the
thread is active in the workspace and if so, not doing nothing in the
on_click handler of the thread item.

Release Notes:

- Sidebar: Fixed a flicker when clicking on an empty draft thread.
```

## Parents

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

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