# agent_ui: Show the agent panel's full screen button as toggled \(\#62041\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 66ed3027b8ca7fed0feeee91d1ce6346ccd4ac39

Requested commit: 66ed3027b8ca7fed0feeee91d1ce6346ccd4ac39

Commit: 66ed3027b8ca7fed0feeee91d1ce6346ccd4ac39

Tree: b7c6fdae77d5b33e04a39d3ecef18cd64548be9e

Author: Vlad Gaevsky

Committer: GitHub

## Message

```
agent_ui: Show the agent panel's full screen button as toggled (#62041)

The agent panel's full screen button and a pane's zoom button drive the
same mechanism — both emit `PanelEvent::ZoomIn`/`ZoomOut`, and
`Workspace::zoomed` holds a single entry, so at most one of them is
active at a time.

The pane's button reflects that state: it is rendered with
`toggle_state(zoomed)`, so it is visibly active while zoomed
(`crates/workspace/src/pane.rs`). The agent panel's button only swapped
its icon, so while the panel was zoomed the button still looked like an
inactive control.

This makes the agent panel's button use the same `toggle_state` +
`selected_icon` pattern as the pane's. Behavior is unchanged; the button
now looks active while full screen is on. The element id is now stable
across both states instead of changing with the icon.

Unrelated to this change, but worth mentioning since it is the same
button: the two controls also disagree on wording. The pane calls it
"Zoom In"/"Zoom Out", the agent panel "Enable/Disable Full Screen".
Because `Workspace::zoomed` is a single slot, activating any other
panel's zoom drops the agent panel back out of full screen — which reads
as surprising under the "full screen" name and unsurprising under
"zoom". Happy to align the wording in a follow-up if you'd like, but I
left it alone here since it is a naming call rather than a fix.

Release Notes:

- Fixed the agent panel's full screen button not appearing active while
full screen was enabled.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
```

## Parents

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

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