# agent_panel: Prevent content from overlapping with buttons in message editor \(\#53384\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c372f246a0790da012dddbe3935ee2758a3a9c3b

Requested commit: c372f246a0790da012dddbe3935ee2758a3a9c3b

Commit: c372f246a0790da012dddbe3935ee2758a3a9c3b

Tree: 7d2c987e212d1e6b290a76624f0d10cee37b764a

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_panel: Prevent content from overlapping with buttons in message editor (#53384)

Follow up to https://github.com/zed-industries/zed/pull/53349 as I was
still seeing cases where content would overlap with buttons.

<img width="500" height="266" alt="Screenshot 2026-04-08 at 6  53@2x"
src="https://github.com/user-attachments/assets/e58742d4-a736-4509-9a29-35c135ddb980"
/>

I believe this PR makes the whole message editor more solid against
these cases because we're relying on `flex_basis` now to set the
max-width, which runs before we do any editor mode calculations. Tested
this a bunch and it seems to be pretty stable.

Release Notes:

- N/A
```

## Parents

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

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