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.
ac09219cadᴀᴍᴛᴏᴀᴇʀ committed on 7/20/2026, 3:31:10 AM· committed by GitHubparent3c5e619