agent_ui: Fix terminal overflow in agent terminal output (#64328)
# Objective
Fix overflow of terminal background in the Agent Thread. Related to
#64163.
## Solution
- Added `terminal_view::TerminalView::background_corner_radii` which can
be optionally set in order to render the terminal view with rounded
corners
- Updated `agent_ui::entry_view_state::create_terminal` in order to
always set the `TerminalViews` background corner radii, for the bottom
corners. Since GPUI doesn't expose the radius values used by
`rounded_md`/`rounded_b_md`, these values have been hardcoded and
documented here.
- Updated `terminal_view::terminal_element::TerminalElement::paint` in
order to use the same corner radii for the quad being painted, as the
corner radii used in the `TerminalView` it is being painted within
## Testing
Manually verified by using a light theme, overriding the
`terminal.background` color to something like `#000000` and then asking
the agent to run a terminal command.
## 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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Showcase
Before:
<img width="790" height="222" alt="Screenshot 000064 in Zed@2x"
src="https://github.com/user-attachments/assets/f1cffb94-c14e-43fa-931d-b674ce8e3da9"
/>
After:
<img width="648" height="234" alt="Screenshot 000062 in zed@2x"
src="https://github.com/user-attachments/assets/dee34713-1e82-4d30-8b5f-9b2529b2cf19"
/>
---
Release Notes:
- Fixed terminal tool call output covering the rounded corners of its
card in the Agent Panel.
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
f8adffe9d1Chris Drackett committed on 9/25/2026, 11:00:20 AM· committed by GitHubparenta84858a