Compare commits

...
Author SHA1 Message Date
Julius Marminge d3aa5ae0aa Fix diff panel padding and top spacing for virtualized files
- Use horizontal and bottom padding on the diff render surface
- Add top margin to the first diff file for consistent spacing
2026-03-01 10:30:46 -08:00
Julius Marminge 540e7a3995 Keep diff panel header sticky while scrolling
- Make the diffs header stick to the top of the panel
- Add header background and bottom border for readability
2026-02-28 23:28:38 -08:00
+10 -2
View File
@@ -61,6 +61,14 @@ const DIFF_PANEL_UNSAFE_CSS = `
color: var(--foreground) !important;
}
[data-diffs-header] {
position: sticky !important;
top: 0;
z-index: 4;
background-color: color-mix(in srgb, var(--card) 94%, var(--foreground)) !important;
border-bottom: 1px solid var(--border) !important;
}
[data-title] {
cursor: pointer;
transition:
@@ -539,7 +547,7 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
</div>
) : renderablePatch.kind === "files" ? (
<Virtualizer
className="diff-render-surface h-full min-h-0 overflow-auto p-2 "
className="diff-render-surface h-full min-h-0 overflow-auto px-2 pb-2"
config={{
overscrollSize: 600,
intersectionObserverMargin: 1200,
@@ -553,7 +561,7 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
<div
key={themedFileKey}
data-diff-file-path={filePath}
className="diff-render-file mb-2 rounded-md last:mb-0"
className="diff-render-file mb-2 rounded-md first:mt-2 last:mb-0"
onClickCapture={(event) => {
const nativeEvent = event.nativeEvent as MouseEvent;
const composedPath = nativeEvent.composedPath?.() ?? [];