From 2eb1cf57e3881f6ed8430ff5cd005bfe59aa726f Mon Sep 17 00:00:00 2001 From: KeelrLeek <156356974+KeelrLeek@users.noreply.github.com> Date: Fri, 24 Jul 2026 17:02:21 -0500 Subject: [PATCH] artist page: compositor scroll pipeline + final hero design (crossfade twins, mirror seam, bloom retired) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scroll-driven animation conversion - apply() writes nothing per frame on the supported path; the hero squeeze, fade line and header curves all ride scroll-driven animations on the compositor. - Section boundaries flip via IntersectionObserver sentinels; the scroll listener is gone from the hot path. - The scrollbar thumb rides its own scroll-driven animation. - @supports-not fallback keeps the previous rAF --p path verbatim, so unsupported engines render identically. - Curves verified exact to 1e-6 against the old path, 0.000px continuity across boundary flips, correct retarget on resize. Perf fixes - Forced-layout reads pulled out of both scroll handlers. - Resize settle-reflow: a second reflow 200ms after resize quiesces, and the pane is observed too. This was the root cause of the fullscreen fade-wedge and of the long-standing intermittent where rows stayed hidden after a resize. Glass - backdrop-filter removed from chips and preview surfaces. - Bar glass blur 20 -> 12. - Choose-hero pill removed from the UI; pickArtistHero/clearArtistHero backend is untouched and the control can be re-homed later. Hero design (final) - Crossfade twins are permanent. Twin blur is baked via bakeBlur() (clamp-to-edge pad -> blur -> crop) so the frames stay pixel-aligned with no edge fringe and no geometry scaling. - Bloom strip retired everywhere; HeroGpuCanvas's internal bloom canvases are hidden by one scoped rule and the component is unchanged. - Seam is a pure mirror: the artwork's top strip flipped inside the glass band, clipped at the bar's top line, riding the squeeze with the hero and dissolving in lockstep on rotation. - GPU twin overlay crossfades on rotation instead of snapping — the incoming baked frame fades in on hero-banner-in with a 2-frame cap. - ~930 lines of experimental variants and the perf-flag system deleted; the surviving path is a pixel no-op against the approved configuration. Debug overlay - PERF/SEAM rows dropped; the overlay keeps stats plus an FPS/drops/worst counter (Ctrl+Shift+D). --- src/components/DebugOverlay.svelte | 43 +- src/lib/scrollbar.js | 47 +- src/styles/global.css | 15 + src/views/CatalogArtist.svelte | 1608 +++++++++++++++++++++++----- 4 files changed, 1453 insertions(+), 260 deletions(-) diff --git a/src/components/DebugOverlay.svelte b/src/components/DebugOverlay.svelte index 84dddae..43b6285 100644 --- a/src/components/DebugOverlay.svelte +++ b/src/components/DebugOverlay.svelte @@ -11,6 +11,8 @@ let visible = $state(false); let stats = $state(null); let fps = $state(0); + let drops = $state(0); // main-thread frames >25ms since overlay opened + let worstGap = $state(0); let dlSpeed = $state(0); // bytes/sec of the CURRENT track's stream function onKeydown(e) { @@ -45,9 +47,20 @@ let frames = 0; let fpsWindow = performance.now(); + let prevFrame = performance.now(); + drops = 0; + worstGap = 0; let raf = requestAnimationFrame(function loop() { frames += 1; const now = performance.now(); + // Main-thread frame gap — the jank signal. >25ms = a frame the + // user can feel; count it and remember the worst. + const gap = now - prevFrame; + prevFrame = now; + if (gap > 25) { + drops += 1; + if (gap > worstGap) worstGap = Math.round(gap); + } if (now - fpsWindow >= 500) { fps = Math.round((frames * 1000) / (now - fpsWindow)); frames = 0; @@ -80,7 +93,7 @@ {#if visible} -