# agent_ui: Adjust edited files and plan lists to fit content height \(\#55189\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d2bb6502bb071086f8558da3249f580d1398e310

Requested commit: d2bb6502bb071086f8558da3249f580d1398e310

Commit: d2bb6502bb071086f8558da3249f580d1398e310

Tree: fb79b1b41cfb36c37c69e00669bed56153065ae9

Author: Oleksandr Kholiavko

Committer: GitHub

## Message

```
agent_ui: Adjust edited files and plan lists to fit content height (#55189)

When a plan contains many tasks (or the edited-files list is long),
items were being visually compressed into the fixed-height container
rather than scrolling.

<img width="1730" height="622" alt="image_2026-04-28_20-17-43"
src="https://github.com/user-attachments/assets/5ee7cab3-7f14-4870-b8d3-5038139bf115"
/>

Asking an agent to "create a plan with 20 tasks" is an easy repro.

**Root cause**

Both lists used a `v_flex()` as their scroll container, and flexbox
children have `flex-shrink: 1` by default. When the container hits
`max_h`, the flex algorithm compresses all children to fit instead of
overflowing into the scroll region — resulting in 20 items crammed into
160px.

**Fix**

Separate the scroll boundary from the flex layout. A plain `div`
(non-flex) as the outer scroll container lets its inner `v_flex` size
naturally — content then overflows the bounded `div` and scrolling works
correctly.

Result:
<img width="1676" height="474" alt="image_2026-04-29_10-09-24"
src="https://github.com/user-attachments/assets/caafe06e-d0bf-456c-a53f-c215bd5582da"
/>

Closes issue #54633.

> What's missing: vertical scrollbar, as it requires large refactoring
due to double mutable borrowing of `cx` (the second introduced by scroll
handle), which will slowdown review of this pr

Release Notes:

- Fixed plan and edited-files lists in the agent panel being squashed
when they contain many items
```

## Parents

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

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