# workspace: Fix bottom dock clipping when resizing windows \(\#61161\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ac09219cad65e900c3da690cae272b33d834ebc0

Requested commit: ac09219cad65e900c3da690cae272b33d834ebc0

Commit: ac09219cad65e900c3da690cae272b33d834ebc0

Tree: 7771c146ca4b76b22066b84938bf628a24eda3ce

Author: ᴀᴍᴛᴏᴀᴇʀ

Committer: GitHub

## Message

```
workspace: Fix bottom dock clipping when resizing windows (#61161)

# Objective

Fixes #59983.

Reducing the Zed window height with the terminal open can clip the
Bottom Dock and terminal content. The dock should shrink to remain
within the workspace instead of extending beyond the window.

## Solution

Restore height clamping for Bottom Dock panels by skipping
`clamp_panel_size` only when a panel actually uses flexible width.
Flexible sizing remains unchanged for the Left and Right Docks, while
Bottom Dock panels once again reduce their stored height to fit the
available workspace.

## Testing

Added a regression test that distinguishes flexible Bottom and Right
Dock behavior. It confirms that the Bottom Dock is clamped while the
flexible-width Right Dock is not. The test failed with the previous
condition and passed with this change.

Manually verified the reported window-resizing scenario locally.


## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

+ Before


https://github.com/user-attachments/assets/c56995a8-47c6-45b6-aeb4-b0b56477c737

+ After


https://github.com/user-attachments/assets/97b5ca6f-cf6f-4dd5-b981-e44bd8139490

---

Release Notes:

- Fixed bottom dock clipping when resizing windows.
```

## Parents

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

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