Commit 67f0c83
Fix code review file header leaking diff content through its rounded corners (warpdotdev#13091)
## Description
Fixes the Code Review file header leaking diff content through its
rounded top corners while scrolling.
When you scroll within an expanded file in Code Review, the file header
pins to the top of the panel as a sticky overlay on top of the diff. The
diff content beneath it was only offset by a top margin to *reserve*
space for the header — it was never *clipped* — so as content scrolled
up into the header's band, the header's un-painted rounded top corners
revealed the moving code through the top-left/top-right corner notches.
This keeps the fix local to Code Review and composes existing
generalized elements. `Container::with_corner_radius` rounds the file
card/header drawing, but it does not clip descendant painting; WarpUI's
layer clips are rectangular. The PR now always passes file content
through a normal `Clipped` region. In the regular non-pinned case that
clip uses the normal content bounds; when the header is pinned, an outer
`Container` margin moves the clip below the pinned header and an inner
counter-margin keeps the editor painting at its normal scrolled
position. This keeps editor content out of the parent/header
rounded-corner area while preserving the viewported list layout, without
adding a custom element or changing shared WarpUI APIs. The header keeps
its rounded top corners, and the at-rest card (and the warpdotdev#12447
corner-fill fix) are left untouched.
Reported via the factory-client triage Slack thread:
https://warpdev.slack.com/archives/C0BCE7AELJ2/p1782483013346509?thread_ts=1782483013.346509&cid=C0BCE7AELJ2
## Linked Issue
N/A — reported via the factory-client Slack triage channel (linked
above).
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [x] Where appropriate, screenshots or a short video of the
implementation are included below (especially for user-visible or UI
changes).
## Testing
- `./script/format` passes.
- `cargo check -p warp --features local_fs` passes.
- `cargo clippy -p warp --all-targets --tests -- -D warnings` passes.
- **Manual UI verification with computer use** on the rebuilt
always-clipped existing-element implementation: opened Code Review on a
repo with a large single-file diff and scrolled so the header pins.
Confirmed the pinned header keeps its rounded top corners, no diff
content shows through the top corners (during scroll motion or at rest),
the first line below the header is fully visible with no abnormal
gap/seam, and the at-rest card still shows rounded corners with no
square-corner regression.
- **Multi-file UI verification with computer use**: opened Code Review
on a repo with three changed files (`alpha.rs`, `beta.rs`, `gamma.rs`).
Confirmed non-pinned headers for each changed file keep clean rounded
top corners and show content immediately below with no abnormal
gap/cutoff, and pinned headers for `alpha.rs`/`beta.rs` still have no
corner leakage while scrolling.
- [x] I have manually tested my changes locally
### Screenshots / Videos
After the fix, while scrolled, the pinned header's rounded corners
cleanly show the panel background with no diff content bleeding through,
and the first diff line remains fully visible below the header.




The same screenshot is also attached in the linked factory-client Slack
thread for review context.
## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
<!--
CHANGELOG-BUG-FIX: Fixed the Code Review file header showing diff
content through its rounded top corners while scrolling.
-->
<!-- factory-client:
{"source":"factory-client","slack_channel":"C0BCE7AELJ2","slack_thread_ts":"1782483013.346509","slack_permalink":"https://warpdev.slack.com/archives/C0BCE7AELJ2/p1782483013346509?thread_ts=1782483013.346509&cid=C0BCE7AELJ2","oz_run_id":"019f044b-be18-7689-ac7f-6accda2e15b1","repo":"warpdotdev/warp"}
-->
_Conversation:
https://staging.warp.dev/conversation/4f74044e-c38e-4413-a672-532537a988ff_
_Run:
https://oz.staging.warp.dev/runs/019f044b-be18-7689-ac7f-6accda2e15b1_
_This PR was generated with [Oz](https://warp.dev/oz)._
Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: Warp <agent@warp.dev>1 parent cccaed6 commit 67f0c83
1 file changed
Lines changed: 49 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4782 | 4782 | | |
4783 | 4783 | | |
4784 | 4784 | | |
| 4785 | + | |
| 4786 | + | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
| 4797 | + | |
| 4798 | + | |
4785 | 4799 | | |
4786 | 4800 | | |
4787 | 4801 | | |
| |||
4819 | 4833 | | |
4820 | 4834 | | |
4821 | 4835 | | |
4822 | | - | |
4823 | | - | |
4824 | | - | |
4825 | | - | |
4826 | | - | |
4827 | | - | |
4828 | | - | |
4829 | | - | |
4830 | | - | |
4831 | | - | |
4832 | | - | |
4833 | | - | |
4834 | | - | |
4835 | | - | |
4836 | | - | |
4837 | | - | |
4838 | | - | |
4839 | | - | |
4840 | | - | |
4841 | | - | |
4842 | | - | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
| 4840 | + | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + | |
4843 | 4846 | | |
4844 | | - | |
| 4847 | + | |
| 4848 | + | |
| 4849 | + | |
| 4850 | + | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
| 4856 | + | |
| 4857 | + | |
| 4858 | + | |
| 4859 | + | |
| 4860 | + | |
| 4861 | + | |
| 4862 | + | |
| 4863 | + | |
| 4864 | + | |
| 4865 | + | |
| 4866 | + | |
| 4867 | + | |
| 4868 | + | |
| 4869 | + | |
| 4870 | + | |
4845 | 4871 | | |
4846 | | - | |
| 4872 | + | |
4847 | 4873 | | |
4848 | 4874 | | |
4849 | 4875 | | |
| |||
0 commit comments