From 2f6d30ebe9100fd6767858cb755445cd7a25cf84 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 4 Sep 2026 07:24:52 -0700 Subject: TEMP: trace scrollLeft per frame into window.__scroll to catch a position jump during a flick (a stutter that isn't a dropped frame) Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr --- src/app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index ab21cf9..77df9c1 100644 --- a/src/app.js +++ b/src/app.js @@ -3191,11 +3191,21 @@ function dlog(s) { } // TEMP: continuously watch for dropped frames and log any >40ms gap, so a // real drag's jank shows up in __dl next to the release/settle it overlaps. +// Also trace scrollLeft every frame into __scroll to catch a position JUMP +// (a stutter that isn't a dropped frame). try { let _lastFrame = performance.now(); + window.__scroll = []; const _fw = (t) => { const gap = t - _lastFrame; _lastFrame = t; if (gap > 40) dlog('FRAME-DROP ' + Math.round(gap) + 'ms'); + try { + const el = document.querySelector('.bal-carousel'); + if (el) { + window.__scroll.push([Math.round(t), Math.round(el.scrollLeft), Math.round(gap)]); + if (window.__scroll.length > 400) window.__scroll.shift(); + } + } catch {} requestAnimationFrame(_fw); }; requestAnimationFrame(_fw); -- cgit v1.2.3