Skip to content

fix(web): every picture scans in, in the same 0.4 s - #161

Merged
zyx1121 merged 1 commit into
mainfrom
feat/scan-everywhere
Nov 2, 2026
Merged

zyx1121 merged 1 commit into
mainfrom
feat/scan-everywhere

Conversation

@zyx1121

@zyx1121 zyx1121 commented Nov 2, 2026

Copy link
Copy Markdown
Owner

What

  • A cached picture could decode before its canvas had a size, so the scan was planned for zero rows and the picture showed whole at once (9 of 14 project pages on production). A scan asked for before the first resize now waits for it, and a pending scan is not treated as done.
  • The scan takes a fixed 0.4 s in 16 jittered bands whatever the picture's size, so the works window and every project page match. Stalls are 20 to 40 ms.

Verified

  • Sandbox build: all 14 /works/<slug> pages scan from 0 to 100% in about 0.4 s, with no frame of the whole picture first (Peck tops out at 92%: its OG card is letterboxed).
  • /works window scan: about 0.4 s.
  • Typecheck passes; alint 0.

🤖 Generated with Claude Code

A cached picture could decode before its canvas had a size; the scan was
then planned for zero rows, finished at once and the picture showed
whole. Nine project pages did this. A scan asked for before the first
resize now waits for it.

The scan now takes a fixed 0.4 s in 16 jittered bands, whatever the
picture's size, so the works window and every project page match.
Stalls are 20 to 40 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – ui-zyx-tw November 2, 2026 08:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – 1909-zyx-tw November 2, 2026 08:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – link-zyx-tw November 2, 2026 08:25 Inactive
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

5 Skipped Deployments
Project Deployment Actions Updated
1909-zyx-tw Skipped Skipped Nov 2, 2026 8:25am UTC
good-zyx-tw Skipped Skipped Nov 2, 2026 8:25am UTC
link-zyx-tw Skipped Skipped Nov 2, 2026 8:25am UTC
time-zyx-tw Skipped Skipped Nov 2, 2026 8:25am UTC
ui-zyx-tw Skipped Skipped Nov 2, 2026 8:25am UTC

@vercel
vercel Bot temporarily deployed to Preview – time-zyx-tw November 2, 2026 08:25 Inactive
@zyx1121
zyx1121 merged commit a7a2aea into main Nov 2, 2026
18 checks passed
@zyx1121
zyx1121 deleted the feat/scan-everywhere branch November 2, 2026 08:30

This branch was previously deployed

5 inactive deployments
Preview – time-zyx-tw — 45a814d8 Deployed Nov 2, 2026 by vercel[bot]
Preview – good-zyx-tw — 45a814d8 Deployed Nov 2, 2026 by vercel[bot]
Preview – ui-zyx-tw — 45a814d8 Deployed Nov 2, 2026 by vercel[bot]
Preview – 1909-zyx-tw — 45a814d8 Deployed Nov 2, 2026 by vercel[bot]
Preview – link-zyx-tw — 45a814d8 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant