diff --git a/web/src/lib/components/repo/DiffView.svelte b/web/src/lib/components/repo/DiffView.svelte index 8bcc42307..28cd25166 100644 --- a/web/src/lib/components/repo/DiffView.svelte +++ b/web/src/lib/components/repo/DiffView.svelte @@ -90,10 +90,10 @@ let shell = $state(); let dock = $state(0); let diffScroll = $state(0); - const GAP = 16; - const stickyTop = $derived(stickyOffset ? stickyOffset + GAP : 0); - const maxHeight = $derived(stickyTop ? `calc(100svh - ${stickyTop + GAP}px)` : "100svh"); - const dockOffset = $derived(stickyTop || GAP); + const HEADER_GAP = 8; + const stickyTop = $derived(stickyOffset ? stickyOffset + HEADER_GAP : 0); + const maxHeight = $derived(`calc(100svh - ${stickyTop}px)`); + const dockOffset = $derived(stickyTop); const measureDock = () => { if (!shell) return; dock = window.scrollY + shell.getBoundingClientRect().top - dockOffset;