You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Re-read page height in the lazy-load scroll pass #53
What
The lazy-load scroll pass in capture.ts reads scrollHeight once, before the loop (const h = Math.min(document.documentElement.scrollHeight, maxHeight)). Content that grows the page while it's being scrolled (infinite lists, lazy sections, images without dimensions) is never scrolled to, so it isn't loaded.
Why
The shot is still taken full-page, so the bottom of such a page is captured unloaded on both sides, or differently on each side, and shows up as a diff or quietly as matching placeholders. yanfishel/visual-regression-test re-reads the height on every step (apps/worker/src/stabilize.ts, buildScrollSettleScript).
How
Use Math.min(document.documentElement.scrollHeight, maxHeight) as the loop condition, and cap the number of steps (e.g. maxHeight / innerHeight + 1) so a page that grows forever still ends. A regression test: a fixture that appends a section when scrolled near its bottom.
Activity