Skip to content

feat(web): Astro pages site, and keep flame dev from breaking a built site - #510

Merged
gitfromwildan merged 4 commits into
mainfrom
feat/pages-site-flame-dev-fix
Nov 8, 2026
Merged

gitfromwildan merged 4 commits into
mainfrom
feat/pages-site-flame-dev-fix

Conversation

@gitfromwildan

Copy link
Copy Markdown
Member

Summary

  • pages/: new @docubook/web Astro workspace for the marketing site (home, features, plugins). Flame docs move under /docs via experimental.pages + basePath in docu.json; Vercel builds @docubook/web with Turborepo and publishes pages/dist with the copied Flame output.
  • flame fix: flame dev used to delete the build's hashed bundle and overwrite manifest.json in 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, and flame build only reuses a manifest.json it wrote itself whose bundle still exists.
  • Repo-coupled tests updated for the flag-on configuration; Astro and Vercel experimental.pages guides 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 dev run after flame build: build bundle and manifest untouched; following flame build hits the bundle cache; a planted foreign manifest.json triggers a rebundle.
  • Headless check on the combined pages/dist: all three islands mount on /docs/components/tabs, /docs/components/accordion and /docs/getting-started/introduction; tab and accordion clicks respond; no 404s.

Notes

  • changeset status warns that @docubook/flame depends on @docubook/plugin-og-image@^0.1.1 while the workspace is at 0.1.2; pre-existing, not touched here.
  • Dev bundles now accumulate in .docu/dist/docs/_flame/ until the next flame build cleans them.

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.
@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docu Ignored Ignored Preview Nov 8, 2026 9:53pm UTC

Comment thread pages/scripts/build-mascot.mjs Fixed
@gitfromwildan gitfromwildan self-assigned this Nov 8, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }) skips cleanOldBundles() and the manifest.json write. Only server.ts and server.impl.ts pass it, so the Bun and Node/Deno paths stay in parity.
  • Stricter manifest reuse on a bundle hit: resolveAssetManifest reuses the on-disk manifest only when it is a prefix of __assets__.hash and its docs.js still exists. This is sound because __assets__.hash is built as ${JSON.stringify(assetManifest)}\0${configStamp()} and parse/stringify keeps key order. The regression tests in cache-key.test.ts cover this.
  • Repo docs move under /docs: docu.json gains basePath and experimental.pages, the home block is dropped, and the repo-coupled tests are flipped to match.
  • New @docubook/web Astro workspace: home, features and plugins pages, React islands for Ask AI and the Markdown playground, and a build script that merges Flame's .docu/dist into pages/dist.
  • Vercel: builds turbo build --filter=@docubook/web... and publishes pages/dist. cleanUrls and trailingSlash: false are 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.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread pages/package.json Resolved
Comment thread pages/src/content/site.ts Resolved
Comment thread packages/flame/.docu/node/cache-key.ts Resolved
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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. All four earlier findings are fixed, and every CI check passes on 0454c12, including ci (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/web typecheck: astro check was replaced with astro sync && tsc --noEmit, which runs under TypeScript 7. In CI, @docubook/web:typecheck generated types and passed. A declare 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: manifestMatchesCache and its comment now sit above that doc block, so the extraStamp explanation 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 unused site.docs was removed.
  • Removed dead code: the unused Mascot.astro and an unused writeFileSync import in build-mascot.mjs.
  • Reduced headline sizes below 640px: hero, page-intro and section headings now start one Tailwind step smaller (text-4xl / text-3xl). Breakpoints sm and above are unchanged.
  • Gave the home page a title: index.astro passes title="Home", so the tab reads Home · DocuBook instead of the tagline fallback.

Assessment: READY. No open findings remain.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@gitfromwildan
gitfromwildan merged commit c0ace6f into main Nov 8, 2026
15 checks passed
@gitfromwildan
gitfromwildan deleted the feat/pages-site-flame-dev-fix branch November 8, 2026 21:57
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