terminal_view: Fix inline terminal clipping its first line of output (#61939)

Fixes #53518:

| before | after |
| --- | --- |
| <img width="790" height="458" alt="before"
src="https://github.com/user-attachments/assets/2314fb13-6782-4397-a022-0252c82bf7b9"
/> | <img width="790" height="458" alt="after"
src="https://github.com/user-attachments/assets/1058970c-ae0a-4a9f-8f14-84b810ddaba4"
/> |

`TerminalBounds::line_height` floors `height / line_height`, so
`TerminalElement::request_layout` does the inverse logic to calculate
the height for inline terminals with `displayed_lines * line_height`,
but intermediate rounding in `to_taffy` could break this. Fixed by
rounding up to the next integer device pixel in
`TerminalElement::request_layout`.

## 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

---

Release Notes:

- Fixed the first line of terminal output sometimes being hidden in the
agent panel.
0b3621db47Tim Vermeulen committed on 7/31/2026, 8:56:46 AM· committed by GitHubparent864ff0b
2 files changedLine totals unavailable