# sidebar: Fix draft threads showing up in the sidebar in some cases \(\#52974\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 29955a0d093cd7afe51a5a96347b0c98fa86ec80

Requested commit: 29955a0d093cd7afe51a5a96347b0c98fa86ec80

Commit: 29955a0d093cd7afe51a5a96347b0c98fa86ec80

Tree: 8af4d760c6fe1b76e33d308dc40f7639f5c5bc53

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
sidebar: Fix draft threads showing up in the sidebar in some cases (#52974)

We were inserting threads with no entries into the sidebar, when you
clicked on New Thread, typed a message and then added a new project to
the current workspace.
We now skip persisting threads when they are empty.

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 is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
```

## Parents

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

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