fix(web): keep diff file lists scrollable past expanded files (#6423)

Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
Dominic RoyandClaude Fable 5 authored and GitHub committed 2026-08-12 20:11:53 -07:00
1 parent 1e59b4c400
commit 6bc6cb6be4
2 files changed
+8 -3

No files matched your search

@@ -44,7 +44,7 @@ describe("StyledDiffCodeView", () => {
diffHeaderHeight: 32,
hunkSeparatorHeight: 24,
paddingTop: 0,
paddingBottom: 0,
paddingBottom: 8,
},
layout: { paddingTop: 0, paddingBottom: 0, gap: 0 },
});
@@ -304,11 +304,16 @@ export function StyledDiffCodeView<LAnnotation = undefined>({
diffHeaderHeight: 32,
hunkSeparatorHeight: 24,
// Pierre uses its general file spacing as a fallback in expanded-file layout paths.
// Keep it zero alongside the explicit paddings or expanding the first file can
// Keep it zero alongside the explicit paddingTop or expanding the first file can
// reintroduce the library's default 8px gap above its header.
spacing: 0,
paddingTop: 0,
paddingBottom: 0,
// Unlike the gap above, the 8px under a file's last line is painted
// unconditionally by Pierre's stylesheet (`--diffs-gap-fallback`), so the metric has
// to count it: at zero every expanded file's virtual height ran 8px short of its
// rendered height, and the end of the list sat past the reachable scroll range —
// one clipped file row per expanded file above it.
paddingBottom: 8,
},
layout: { paddingTop: 0, paddingBottom: 0, gap: 0 },
}}