# agent_ui: Fix full screen behavior on worktree creation \(\#52269\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ae6a9c5f97106690b059fd60ac1ef8d1d88d1ed8

Requested commit: ae6a9c5f97106690b059fd60ac1ef8d1d88d1ed8

Commit: ae6a9c5f97106690b059fd60ac1ef8d1d88d1ed8

Tree: 8ca037ae01b379adb2c357b284713d5c1fbed8ad

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_ui: Fix full screen behavior on worktree creation (#52269)

## Context

This PR removes the behavior in which we turn the agent panel full
screen on worktree creation, even if there aren't any files open.
Changing the width behavior of the panel will ultimately solve this, and
auto-full screening it turned out to be surprising. Also, in reaction to
this, I've added an icon button in the agent panel's toolbar when in
full screen so it's easier to get out of it. Eventually though, we can
probably remove it (also because of the flexible width work).

## How to Review

- Create a new worktree from a thread and see the panel with the same
width
- See the "disable full screen" icon button in the toolbar when you full
screen it

--- 

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

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

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