9 Commits

Author SHA1 Message Date
Matt Isenhower
51761711cc Lazy-load content images while preserving screenshot readiness
Some checks failed
Checks / checks (push) Has been cancelled
2026-09-13 13:31:43 -07:00
Matt Isenhower
5deac8c8cb Use Browser binding for screenshots and local Wrangler testing 2026-09-07 18:06:15 -07:00
Matt Isenhower
a1e934d0bd Improve readability of test setup and assertions 2026-09-07 17:52:50 -07:00
Matt Isenhower
bee6bda585 Support explicit Puppeteer and Cloudflare screenshot providers 2026-09-07 17:44:11 -07:00
Matt Isenhower
d7581e3e8c Remove obsolete JPEG browser screenshot options 2026-09-07 13:46:05 -07:00
Matt Isenhower
50156e96e1 Retry transient Browser Run screenshot failures with bounded backoff 2026-09-07 13:09:31 -07:00
Matt Isenhower
9c38064843 Wait for explicit screenshot readiness with shorter browser phase limits 2026-09-07 13:09:15 -07:00
Matt Isenhower
a0badb5f39 Bound upstream and screenshot requests with network deadlines 2026-09-07 12:58:15 -07:00
Matt Isenhower
55c1d3ae81 Render screenshots with Cloudflare Browser Rendering
The screenshot module posts the deployed screenshot page's URL and the
viewport to Browser Rendering's REST endpoint and gets the image back, so
the same code runs under Node and in a Worker. It waits for network idle
as the puppeteer version did. Puppeteer, the local HTTP server, and the
browserless configuration are gone.

Posts render once per media type a client needs: PNG for the public copy
and Twitter, JPEG for Bluesky, which limits image size. That replaces the
sharp conversion in the Bluesky client, which now takes the media as
given and includes the aspect ratio when the size is known (from the
viewport for screenshots, from the PNG header for stage images).

Configuration mirrors splatoon3.ink: SITE_URL, CLOUDFLARE_ACCOUNT_ID, and
CLOUDFLARE_BROWSER_RUN_API_TOKEN.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 19:04:52 -07:00