From 7159204edefcc9dfde3d961c928a1056e08b12fb Mon Sep 17 00:00:00 2001 From: Speculator55005 <50082482+fas89@users.noreply.github.com> Date: Sat, 23 May 2026 16:17:39 +0200 Subject: [PATCH] perf(demos): defer CliCast SVG fetch; docs: scaffold examples accuracy pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 and its state are removed; a 920/560 aspect-ratio on the viewport keeps layout stable when the live 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..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) --- .gitignore | 3 + docs/.vuepress/components/CliCast.vue | 87 ++--- .../examples/gitlab-ci-scaffold.md | 335 ++++++++---------- docs/sdk-and-plugins/journeys/your-own-ci.md | 6 +- .../journeys/your-own-scaffolding.md | 2 +- 5 files changed, 179 insertions(+), 254 deletions(-) diff --git a/.gitignore b/.gitignore index d753f6a..56a1e9d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,9 @@ Thumbs.db *.swo *~ +# Claude Code local tooling (launch.json, scheduled_tasks.lock) +.claude/ + # Logs *.log npm-debug.log* diff --git a/docs/.vuepress/components/CliCast.vue b/docs/.vuepress/components/CliCast.vue index b42f32a..87b3084 100644 --- a/docs/.vuepress/components/CliCast.vue +++ b/docs/.vuepress/components/CliCast.vue @@ -8,8 +8,8 @@ The svg-term output already includes the macOS three-dot title bar. This component adds: - the surrounding browser-window-style frame - - a click-to-play overlay (so the heavy SVG only animates after - the visitor opts in) + - a click-to-play overlay (so the heavy SVG is only fetched + after the visitor opts in) - a replay button - an optional caption row beneath @@ -22,19 +22,20 @@ width="900" /> - All props are optional except `src`. The SVG itself is loaded - lazily (intersection-observer) so an off-screen cast doesn't burn - bandwidth until you scroll near it. + All props are optional except `src`. The SVG is NOT fetched until + the visitor clicks Play — index pages with many casts pay zero + network cost on first paint. The placeholder uses an aspect-ratio + box so layout doesn't shift when the animation mounts. ============================================================ -->