Skip to content

perf(demos): defer CliCast SVG fetch; scaffold docs accuracy pass#9

Merged
fas89 merged 1 commit into
mainfrom
docs/cli-cast-perf-and-scaffold-fix
May 23, 2026
Merged

perf(demos): defer CliCast SVG fetch; scaffold docs accuracy pass#9
fas89 merged 1 commit into
mainfrom
docs/cli-cast-perf-and-scaffold-fix

Conversation

@fas89

@fas89 fas89 commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Perf: <CliCast> no longer fetches its SVG until the visitor clicks Play. The 14 large animated SVGs on /demos/ are no longer fetched or decoded on initial load. Measured cold load drops from ~3.8 MB (eager) to 803 KB / 80 ms / 0 SVGs; each Play click then loads only that one cast (~150 KB avg). The IntersectionObserver + poster <img> are gone; a 920/560 aspect-ratio keeps layout stable when the live <object> mounts.
  • Docs accuracy: replaced numeric AWS account-ID placeholders with GCP project examples in your-own-scaffolding.md, your-own-ci.md, and gitlab-ci-scaffold.md.
  • Docs drift fix: rewrote gitlab-ci-scaffold.md to match the real SDK source (verified against Agenticstiger/forge-cli-sdk@main). The page previously documented a fabricated AWS/GCP/Snowflake "Pick your cloud" taxonomy that doesn't exist in the plugin — the real plugin is provider-agnostic and reads two flat string labels (cloud.accountId, cloud.region) off environments.<env>.metadata.labels. Both renderers and test excerpts now match the upstream code.
  • Adds .claude/ to .gitignore (local Claude Code tooling state).

Test plan

  • npm run docs:build passes (177 pages, no new warnings)
  • /demos/ measured cold-load on production build: 803 KB total transfer, 80 ms load event, 0 SVGs fetched from /demos/ before any Play click
  • Clicking Play on a cast: SVG mounts as <object>, animation runs, ~150 KB fetched on demand
  • Clicking Play on 3 casts → exactly 3 SVGs fetched (~470 KB total), confirming on-demand behavior
  • gitlab-ci-scaffold.md renderer + test code verified byte-for-byte against gh api repos/Agenticstiger/forge-cli-sdk/contents/examples/gitlab-ci-scaffold/...
  • No remaining 111111111111/222222222222/333333333333 AWS placeholders in the three updated SDK pages

🤖 Generated with Claude Code

…y pass

CliCast now mounts a CSS-only placeholder until the visitor clicks Play —
the 14 large animated SVGs on /demos/ are no longer fetched or decoded on
initial load. Cold transfer for the page drops from ~3.8 MB to ~0.8 MB
(measured: 803 KB / 80 ms / 0 SVGs fetched before interaction; ~150 KB per
cast on Play click). The IntersectionObserver-driven poster <img> and its
state are removed; a 920/560 aspect-ratio on the viewport keeps layout
stable when the live <object> mounts.

Replaced numeric AWS account-ID placeholders with GCP project examples in
the three SDK docs pages where they appeared (your-own-scaffolding,
your-own-ci, gitlab-ci-scaffold).

Rewrote the gitlab-ci-scaffold example to match the actual SDK source
(verified against Agenticstiger/forge-cli-sdk main): the page previously
documented a fabricated "Pick your cloud" AWS/GCP/Snowflake taxonomy that
didn't exist in the plugin. The real plugin is provider-agnostic and reads
two flat string labels (cloud.accountId, cloud.region) off
environments.<env>.metadata.labels. Both renderers (_render_ci with the
when: manual prod gate, _render_env_config with the structured cloud
block) and the test excerpts now match the upstream code byte-for-byte.

Also adds .claude/ to .gitignore (local tooling state).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fas89
fas89 merged commit d9e3d38 into main May 23, 2026
3 checks passed
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