Repository navigation
feat(web): static-first home with layer stack and plugin graph, faster load - #512
Conversation
- Drop the "docubook / playground" header bar; the traffic lights move into the editor tab, beside index.md, in macOS red, yellow and green. - The server render is the finished page, so audits and no-JS visitors see the result. The typing replays once per page load, starting when the demo has scrolled halfway up the viewport, and no longer loops. - The editor keeps its finished height while the text regrows, so the page below does not jump on narrow screens. - React hydrates only as the demo nears its start line, not on page load.
…k AI - Inline the page stylesheet so no CSS request blocks the first paint. - Metric-matched "Inter Fallback" and "IBM Plex Mono Fallback" faces (Arial and Courier New, or their Liberation twins) take the same space as the web fonts, so the swap moves nothing; the latin cuts are preloaded. - Ask AI is a plain button with a small script: DocSearch's side panel and its styles load on the first hover, focus or click, and its CSS no longer ships inside the page stylesheet. - Read scrollY in the first frame instead of at load, avoiding a forced layout.
- The sprite sheets move to src/assets and astro:assets builds 1x/2x/3x WebP for the size each mascot is drawn at: the navbar sheet drops from 195 KB to 10-49 KB, the footer's from 195 + 214 KB to 33-88 + 37-100 KB. - Each sheet is an <img> three times the mascot's size; a cell is picked by translating it, a compositor-only change instead of a repaint. - Only the boopable footer mascot carries the reactions sheet, and it loads lazily with its directions sheet. - Pointer and scroll updates run once per frame, reading every rect before writing any cell, so aiming never forces a layout.
- [data-animate] demos (terminal, search, GitHub mark, output folder, the plugins page's search and social card previews) render their finished frame on load, so audits and the first paint see complete, readable content. The layout starts them on the first scroll and each loops only while within 120px of the viewport. - The repo stats are fetched at build time and rendered into the page; the browser refresh waits until the card is near the viewport, keeping the GitHub API call off the page load.
"A file. A compiler. The whole web." replaces its four step cards with an exploded stack of 3D plates: index.md, the Flame compiler, the static host and your-docs.com. A file drops through the layers and changes at each one (md, compile, html, publish) while the matching step lights up in the list beside it. The markup is the resting frame, every plate and step readable; the stack opens and loops only while [data-playing], on transform and opacity alone. Reduced motion keeps the static stack.
The plugin sections on the home and plugins pages trade their step cards for a graph: plugins on the left wire into the stages of Flame's build (a dark core that is never patched), and what each adds lands on the right. One 8s cycle plays the four steps: plugins light up, wires connect to their stages, the build pulse runs down the core and branches out to each output, then each plugin's source (npm, local, options) lights. Like the layer stack it renders at rest and animates only while [data-playing]. Steps.astro has no users left and is removed.
- icon.svg is the mascot's resting cell (the same panda the Astro site animates), embedded as a palette PNG so the logo matches it pixel for pixel. The plugins page's card mockup uses the same file. - favicon.ico carries the same panda at 16, 24, 32, 48, 64 and 256 px. - og.png, the default social card the Astro pages point to, is a 1200x630 render of the new home made with Takumi, replacing the old Flame home screenshot.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
ℹ️ No critical issues. One minor suggestion inline.
Reviewed changes
This review covers all 7 commits of the @docubook/web home rework (mode: standard, since this is a private marketing site and not a flame build or CSP path), plus the Flame docs logo, favicon and OG swap.
- Static-first load path: page CSS is now inlined, the latin Inter and Plex Mono cuts are preloaded, and metric-matched
local()fallback faces remove the shift when the web fonts swap in. The Vercel CSP already allowsstyle-src 'unsafe-inline', so inlining is safe. - Ask AI without React:
islands/AskAiButton.tsxis replaced byshared/AskAiButton.astro. DocSearch's JS and its two stylesheets (?url) load on the first hover, focus or click of any[data-ask-ai-trigger]. - Demos start on scroll: every
[data-animate]demo renders its finished frame.Site.astroattaches adata-playingIntersectionObserver on the first scroll, and each loop is gated on[data-playing]with!importantreduced-motion overrides. - One-shot playground:
MarkdownPlaygroundserver-renders the full source, so hydration matches the server render. It replays the typing once at mid-viewport and holdsminHeightwhile the text regrows. - Repo stats at build time:
OpenSource.astrofetches GitHub stats during the build (5 s timeout, optionalGITHUB_TOKEN). The client refresh now waits until the card is near the viewport. - Mascot via
astro:assets: per-size 1x/2x/3x WebP sheets. A cell is picked withtranslateon an<img>. Aiming is batched per rAF with all reads before writes. The reactions sheet ships only for the boopable footer mascot (lazy). - Layer stack and plugin graph:
Steps.astrois removed.Pipeline.astrobecomes an isometric layer stack, and the newPluginFlow.astrois shared by the home and plugins pages.
Assessment: READY WITH MINOR FIXES. Top priorities:
- Keep the localStorage cache from overwriting the newer build-time repo stats (inline).
No other admissible findings. I checked that nothing still references the removed public/mascots/*, Steps.astro or the React Ask AI island, and that __ASK_AI__ is still typed in src/env.d.ts.
claude-opus-5-5 | 𝕏
…bers The page now records when its stats were fetched (data-built-at). The localStorage entry only replaces them when it is newer than the build, and while the build-time numbers are younger than the 7-day TTL the browser skips the GitHub API call entirely.
There was a problem hiding this comment.
✅ No new issues found. The repo-stats cache fix works for every case.
Reviewed changes
This re-review covers the one commit since the last review (mode: standard). It fixes the earlier finding that the browser cache could override newer build-time stats.
- Build-time stamp on the stats card:
OpenSource.astrosetsdata-built-aton[data-repo]to the time the build fetched the stats. It sets0when the build kept the placeholders. - Cache defers to the build:
stats()uses a localStorage entry only when it is newer than the build and less than 7 days old. It skips the GitHub API while the build-time numbers are under 7 days old. It fetches in two cases: the build kept placeholders (builtAt = 0, so the age check always fails) or the build is older than the TTL. Thenullreturn leaves the server-rendered text in place.
Assessment: READY. The prior thread is resolved and no Pullfrog threads remain open.
claude-opus-5-5 | 𝕏

Summary
Home page rework for
@docubook/web: new section visuals, and a load path where every component renders at rest (no layout shift) and animates only once the reader scrolls.MarkdownPlayground,MarkdownDemo): the "docubook / playground" header is gone; the traffic lights sit in the editor tab in macOS colours. The server render is the finished page, the typing replays once per load when the demo reaches mid-viewport, and React hydrates only as the demo nears that line.src/assetsandastro:assetsbuilds 1x/2x/3x WebP per drawn size (navbar sheet 195 KB → 10–49 KB); cells are picked by translating an<img>(compositor only), aiming is batched per frame (no forced layout), and only the footer mascot carries the lazily loaded reactions sheet.[data-animate]demos (terminal, search, GitHub mark, output folder, and the plugins page's search and card previews) show their finished frame on load; the layout starts them on the first scroll and each loops only near the viewport. Repo stats are rendered at build time and refreshed only when the card is near the viewport.Steps.astrois removed.icon.svg,favicon.icoand the defaultog.pngnow use the site panda;og.pngis a 1200×630 Takumi render of the new home.Verification
Measured on a production build served by nginx with gzip; Lighthouse 13.6 run locally (the shared PageSpeed Insights API key was over its daily quota).
/,/featuresor/plugins; scrolling through each page totals CLS 0.0004–0.0005./docsload with no console or CSP errors; the 41 generated docs cards render the new panda logo.turbo lint,turbo build, commitlint.pagestypecheck and tests pass.Notes
astro buildneeds Node ≥ 22.23.4; the local hooks ran on 22.23.4.GITHUB_TOKENwhen set); offline or rate-limited builds keep the placeholders and the browser fills them in.og.pngkeeps its URL, whichvercel.jsoncaches for a year; social platforms may need a re-scrape to pick up the new card.packages/flame/template) are unchanged. No changeset:@docubook/webis private and Flame'sdocs/is not part of the npm package.