Sharang Parnerkar 3e9a988aaf
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m14s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 34s
CI / test-python-voice (push) Successful in 34s
CI / test-bqas (push) Successful in 31s
perf(pitch-deck): smooth SDK demo carousel — no blank frames, parallel preload
The SDK Live Demo was janky: AnimatePresence mode="wait" unmounted the
current Image before mounting the next, so every advance forced a cold
fetch and left an empty black frame until the new image decoded. Only
the first three screenshots had priority; the rest fetched lazily, so
the first pass through the carousel repeatedly stalled.

Replaces the single swap-in/swap-out Image with a stack of 23 images
layered in an aspect-[1920/1080] container. Cross-fades are now pure
CSS opacity on always-mounted nodes, so there is no unmount and no gap.

Key details:
- priority on the first 3 (triggers <link rel="preload">); loading=eager
  on the remaining 20 so the browser starts all fetches at mount rather
  than deferring via IntersectionObserver.
- sizes="(max-width: 1024px) 100vw, 1024px" lets next/image serve the
  actual displayed resolution instead of the 1920 hint — fewer bytes,
  faster first paint.
- Load-gated reveal: a new `shown` state trails `current` until the
  target image fires onLoadingComplete. If the user clicks ahead of
  the network, the previous loaded screenshot stays visible — no more
  black flashes before images arrive.

Second pass through the carousel is instant (images are in-cache).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:35:55 +02:00
Description
No description provided
49 MiB
Languages
Python 34.3%
TypeScript 33.6%
Go 26.7%
HTML 3.4%
Shell 0.8%
Other 1.2%