Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

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

Dominic Roy6bc6cb6be4eb
diff --git a/apps/web/src/components/diffs/StyledDiffCodeView.test.tsx b/apps/web/src/components/diffs/StyledDiffCodeView.test.tsx
index 6f289de2b..dbdd10d19 100644
--- a/apps/web/src/components/diffs/StyledDiffCodeView.test.tsx
+++ b/apps/web/src/components/diffs/StyledDiffCodeView.test.tsx
@@ -44,7 +44,7 @@ describe("StyledDiffCodeView", () => {
diffHeaderHeight: 32,
hunkSeparatorHeight: 24,
paddingTop: 0,
- paddingBottom: 0,
+ paddingBottom: 8,
},
layout: { paddingTop: 0, paddingBottom: 0, gap: 0 },
});
diff --git a/apps/web/src/components/diffs/StyledDiffCodeView.tsx b/apps/web/src/components/diffs/StyledDiffCodeView.tsx
index 37ce2085b..7dbd5358a 100644
--- a/apps/web/src/components/diffs/StyledDiffCodeView.tsx
+++ b/apps/web/src/components/diffs/StyledDiffCodeView.tsx
@@ -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 },
}}