# agent_ui: Fix thread archive and agent panel for empty window threads \(\#51924\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 99d51a4f3c0c57472a6197f4630daa22628858bb

Requested commit: 99d51a4f3c0c57472a6197f4630daa22628858bb

Commit: 99d51a4f3c0c57472a6197f4630daa22628858bb

Tree: 0cb72658e02cc30c3e3e3bc24c4dd973df2876eb

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_ui: Fix thread archive and agent panel for empty window threads (#51924)

This PR ensures threads created on an empty window (i.e., no
paths/worktrees associated with it) can still be displayed in the thread
archive view. They can't be unarchived, though, as we don't know where
we'd insert it, even if we had a project on the window. Lastly, I'm also
hiding the "current worktree"/"new git worktree" menu from the agent
panel if we don't have any paths as those options don't make sense in
this case.

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

## Parents

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

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