Skip to content

markdown: Fix code block scrollbar track leaking past rounded corners - #64978

Merged
smitbarmase merged 6 commits into
mainfrom
sb/agent-panel-overflow-artifact
Oct 7, 2026
Merged

smitbarmase merged 6 commits into
mainfrom
sb/agent-panel-overflow-artifact

Conversation

@smitbarmase

@smitbarmase smitbarmase commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

When hovering a horizontally scrollable code block, the scrollbar track was painted with square corners. Since GPUI content masks are rectangular, the parent's rounded border didn't clip it, so a small corner of the track showed outside the code block's rounded border.

This adds Scrollbars::track_corner_radius to round the track's outer corners, and markdown code blocks now pass their inner corner radius (corner radius minus border width).

Before:
CleanShot 2026-09-30 at 3 57 50 PM@2x

After:
CleanShot 2026-09-30 at 4 00 08 PM@2x

Release Notes:

  • Fixed a visual artifact at the corners of scrollable code blocks when hovered.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Sep 30, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Sep 30, 2026
Comment thread crates/ui/src/components/scrollbar.rs Outdated
Comment thread crates/ui/src/components/scrollbar.rs Outdated

@SomeoneToIgnore SomeoneToIgnore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one small NIT found.

Comment thread crates/ui/src/components/scrollbar.rs Outdated
@smitbarmase
smitbarmase dismissed MrSubidubi’s stale review October 7, 2026 15:55

Reviewed by Kirill

@smitbarmase
smitbarmase enabled auto-merge October 7, 2026 16:15
@smitbarmase
smitbarmase added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit da0a7a7 Oct 7, 2026
83 of 85 checks passed
@smitbarmase
smitbarmase deleted the sb/agent-panel-overflow-artifact branch October 7, 2026 17:40
kaihere14 pushed a commit to kaihere14/zed that referenced this pull request Oct 13, 2026
…stries#65358)

## Summary

- Removes unwanted radius on agent terminal introduced in zed-industries#64978 and
called out in
zed-industries#64328 (review)
- Removes space above scrollbar in terminal and under header.
<img width="1002" height="692"
alt="668920502-53393680-2767-44f9-98dc-0910c34bdfb2"
src="https://github.com/user-attachments/assets/babed1ab-fe80-4235-ba4f-decb7aea95bd"
/>

## Testing

Built and tested locally.

## Self-review

- [X] I've reviewed my diff for quality, security, reliability, and
performance.
- [X] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [X] Tests cover the new or changed behavior.

Release Notes:

- Removed extra rounded corner on terminal in agent pane when a
scrollbar is present and removed space between scrollbar and terminal
header.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
amirkhakshour pushed a commit to SourceShift/zed-mini-ork that referenced this pull request Oct 18, 2026
…stries#65358)

## Summary

- Removes unwanted radius on agent terminal introduced in zed-industries#64978 and
called out in
zed-industries#64328 (review)
- Removes space above scrollbar in terminal and under header.
<img width="1002" height="692"
alt="668920502-53393680-2767-44f9-98dc-0910c34bdfb2"
src="https://github.com/user-attachments/assets/babed1ab-fe80-4235-ba4f-decb7aea95bd"
/>

## Testing

Built and tested locally.

## Self-review

- [X] I've reviewed my diff for quality, security, reliability, and
performance.
- [X] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [X] Tests cover the new or changed behavior.

Release Notes:

- Removed extra rounded corner on terminal in agent pane when a
scrollbar is present and removed space between scrollbar and terminal
header.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants