perf(demos): defer CliCast SVG fetch; scaffold docs accuracy pass#9
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<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). TheIntersectionObserver+ poster<img>are gone; a920/560aspect-ratio keeps layout stable when the live<object>mounts.your-own-scaffolding.md,your-own-ci.md, andgitlab-ci-scaffold.md.gitlab-ci-scaffold.mdto match the real SDK source (verified againstAgenticstiger/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) offenvironments.<env>.metadata.labels. Both renderers and test excerpts now match the upstream code..claude/to.gitignore(local Claude Code tooling state).Test plan
npm run docs:buildpasses (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<object>, animation runs,~150 KBfetched on demandgitlab-ci-scaffold.mdrenderer + test code verified byte-for-byte againstgh api repos/Agenticstiger/forge-cli-sdk/contents/examples/gitlab-ci-scaffold/...111111111111/222222222222/333333333333AWS placeholders in the three updated SDK pages🤖 Generated with Claude Code