Repository navigation
feat(web): Astro pages site, and keep flame dev from breaking a built site - #510
Conversation
Add the @docubook/web workspace in pages/: an Astro site for the home, features and plugins pages with a cursor-tracking panda mascot shared by the header and footer, theme preset swatches that change the site accent, live GitHub repo stats, and animated demos of the Flame terminal, search and OG image plugins. Flame's docu.json turns on experimental.pages with basePath /docs and drops the generated landing page; the Vercel project now builds @docubook/web with Turborepo and publishes pages/dist, which contains the copied Flame output.
flame dev wrote its client bundle into the same _flame/ directory as flame build, deleting the build's hashed bundle and overwriting manifest.json. Every static page then requested a bundle that no longer existed and no island initialized. Under experimental.pages the next cached build also adopted the dev manifest, whose bundle has no MDX modules. - buildClientBundle takes a dev option: the dev server skips cleanOldBundles and never writes manifest.json. - resolveAssetManifest only reuses a manifest.json this build recorded in build-cache.json and whose bundle still exists; otherwise it rebundles. manifestMatchesCache carries the check, with unit tests. - The repo-coupled tests in experimental.test.ts and base-path.test.ts now expect the flag-on configuration. - The Astro and Vercel guides document build order, the Turborepo monorepo setup and why docs pages must not be served with a trailing slash.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Important
ci (typecheck) fails on this head: the new @docubook/web workspace's astro check refuses to run under the repo's TypeScript 7. The flame dev/build fix is sound. The remaining notes are minor.
Reviewed changes
Initial review (mode: senior, because it touches the flame build pipeline and deploy config) covering the flame dev/build isolation fix, the switch to experimental.pages for the repo's own docs, and the new Astro pages/ site and its Vercel wiring.
- Dev bundles no longer clobber build output:
buildClientBundle(…, { dev: true })skipscleanOldBundles()and themanifest.jsonwrite. Onlyserver.tsandserver.impl.tspass it, so the Bun and Node/Deno paths stay in parity. - Stricter manifest reuse on a bundle hit:
resolveAssetManifestreuses the on-disk manifest only when it is a prefix of__assets__.hashand itsdocs.jsstill exists. This is sound because__assets__.hashis built as${JSON.stringify(assetManifest)}\0${configStamp()}and parse/stringify keeps key order. The regression tests incache-key.test.tscover this. - Repo docs move under
/docs:docu.jsongainsbasePathandexperimental.pages, thehomeblock is dropped, and the repo-coupled tests are flipped to match. - New
@docubook/webAstro workspace: home, features and plugins pages, React islands for Ask AI and the Markdown playground, and abuildscript that merges Flame's.docu/distintopages/dist. - Vercel: builds
turbo build --filter=@docubook/web...and publishespages/dist.cleanUrlsandtrailingSlash: falseare kept. - Guides: the Astro and Vercel guides now cover build order, the Turborepo layout and the trailing-slash pitfall.
Assessment: NOT READY until CI is green. Top priorities: (1) fix @docubook/web#typecheck, (2) point the docs nav link at /docs, (3) remove the unused Mascot.astro.
claude-opus-5-5 | 𝕏
h1 drops from 48px to 36px and section h2 from 36px to 30px on phones; breakpoints from sm up are unchanged. The home page now sets its title, so the tab and og:title read "Home · DocuBook" like Features and Plugins.
- typecheck runs astro sync && tsc --noEmit: astro check refuses TypeScript 7, and this keeps .ts/.tsx sources checked. A module declaration covers the side-effect import of @docsearch/css. Astro frontmatter is not type-checked by this script. - The docs nav link drops its trailing slash, matching the guide this PR adds; the unused site.docs goes with it. - Remove the unused Mascot.astro and an unused writeFileSync import. - Move manifestMatchesCache above hashMdxSources' JSDoc so that doc stays attached to its function.
There was a problem hiding this comment.
✅ No new issues found. All four earlier findings are fixed, and every CI check passes on
0454c12, includingci (typecheck).
Reviewed changes
Incremental re-review (mode: standard) of the two commits since the last Pullfrog review (1228c26). They address the earlier feedback and adjust the site's responsive headlines.
- Fixed the
@docubook/webtypecheck:astro checkwas replaced withastro sync && tsc --noEmit, which runs under TypeScript 7. In CI,@docubook/web:typecheckgenerated types and passed. Adeclare module "@docsearch/css"shim covers the side-effect import. Astro frontmatter is no longer type-checked, which the author accepted to keep a single toolchain. - Restored
hashMdxSources' JSDoc:manifestMatchesCacheand its comment now sit above that doc block, so theextraStampexplanation is attached to its function again. - Pointed the docs nav at
/docs: the trailing slash is gone, so the docs index no longer depends on the redirect, and the unusedsite.docswas removed. - Removed dead code: the unused
Mascot.astroand an unusedwriteFileSyncimport inbuild-mascot.mjs. - Reduced headline sizes below 640px: hero, page-intro and section headings now start one Tailwind step smaller (
text-4xl/text-3xl). Breakpointssmand above are unchanged. - Gave the home page a title:
index.astropassestitle="Home", so the tab readsHome · DocuBookinstead of the tagline fallback.
Assessment: READY. No open findings remain.
claude-opus-5-5 | 𝕏

Summary
@docubook/webAstro workspace for the marketing site (home, features, plugins). Flame docs move under/docsviaexperimental.pages+basePathindocu.json; Vercel builds@docubook/webwith Turborepo and publishespages/distwith the copied Flame output.flame devused to delete the build's hashed bundle and overwritemanifest.jsonin the shared_flame/directory, so every static docs page requested a missing bundle and no island (sidebar, TOC, tabs, accordions, copy) initialized. The dev server now leaves build artifacts alone, andflame buildonly reuses amanifest.jsonit wrote itself whose bundle still exists.experimental.pagesguides clarified (build order, Turborepo monorepo, no trailing slash on docs URLs). Changeset: patch for@docubook/flame.Verification
pnpm --filter @docubook/flame test: 42 files, 876 tests passing; oxlint and tsc clean.flame devrun afterflame build: build bundle and manifest untouched; followingflame buildhits the bundle cache; a planted foreignmanifest.jsontriggers a rebundle.pages/dist: all three islands mount on/docs/components/tabs,/docs/components/accordionand/docs/getting-started/introduction; tab and accordion clicks respond; no 404s.Notes
changeset statuswarns that@docubook/flamedepends on@docubook/plugin-og-image@^0.1.1while the workspace is at 0.1.2; pre-existing, not touched here..docu/dist/docs/_flame/until the nextflame buildcleans them.