authorgravatar for dominic@sdko.orgDominic Roy <dominic@sdko.org> 2026-08-12 23:11:53-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-12 20:11:53-07:00
log6bc6cb6be4ebecd5bd7a3b7b88f07cb61815ded5
tree3c26a0b13d3fb1ff59110f3311d20b283b380a60
parent1e59b4c4004ce3c724d09ca0b140ed4523758d1e
signature Signed by PGP key B5690EEEBB952194

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

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

2 files changed, 8 insertions(+), 3 deletions(-)

apps/web/src/components/diffs/StyledDiffCodeView.test.tsx+1-1
...@@ -44,7 +44,7 @@ describe("StyledDiffCodeView", () => {...@@ -44,7 +44,7 @@ describe("StyledDiffCodeView", () => {
44 diffHeaderHeight: 32,44 diffHeaderHeight: 32,
45 hunkSeparatorHeight: 24,45 hunkSeparatorHeight: 24,
46 paddingTop: 0,46 paddingTop: 0,
47 paddingBottom: 0,47 paddingBottom: 8,
48 },48 },
49 layout: { paddingTop: 0, paddingBottom: 0, gap: 0 },49 layout: { paddingTop: 0, paddingBottom: 0, gap: 0 },
50 });50 });
apps/web/src/components/diffs/StyledDiffCodeView.tsx+7-2
...@@ -304,11 +304,16 @@ export function StyledDiffCodeView<LAnnotation = undefined>({...@@ -304,11 +304,16 @@ export function StyledDiffCodeView<LAnnotation = undefined>({
304 diffHeaderHeight: 32,304 diffHeaderHeight: 32,
305 hunkSeparatorHeight: 24,305 hunkSeparatorHeight: 24,
306 // Pierre uses its general file spacing as a fallback in expanded-file layout paths.306 // Pierre uses its general file spacing as a fallback in expanded-file layout paths.
307 // Keep it zero alongside the explicit paddings or expanding the first file can307 // Keep it zero alongside the explicit paddingTop or expanding the first file can
308 // reintroduce the library's default 8px gap above its header.308 // reintroduce the library's default 8px gap above its header.
309 spacing: 0,309 spacing: 0,
310 paddingTop: 0,310 paddingTop: 0,
311 paddingBottom: 0,311 // Unlike the gap above, the 8px under a file's last line is painted
312 // unconditionally by Pierre's stylesheet (`--diffs-gap-fallback`), so the metric has
313 // to count it: at zero every expanded file's virtual height ran 8px short of its
314 // rendered height, and the end of the list sat past the reachable scroll range —
315 // one clipped file row per expanded file above it.
316 paddingBottom: 8,
312 },317 },
313 layout: { paddingTop: 0, paddingBottom: 0, gap: 0 },318 layout: { paddingTop: 0, paddingBottom: 0, gap: 0 },
314 }}319 }}