Skip to content

Generate the Pages demo from web/ at deploy time#20

Merged
zbuc merged 1 commit into
mainfrom
issue-19
Jul 22, 2026
Merged

Generate the Pages demo from web/ at deploy time#20
zbuc merged 1 commit into
mainfrom
issue-19

Conversation

@zbuc

@zbuc zbuc commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Closes #19

Summary

  • Deletes the vendored demo/index.html, demo/app.css, demo/app.js — the drift risk flagged in issue Deploy a demo site with dummy-account data to GitHub Pages #15's design and PR Deploy static demo site with synthetic data to GitHub Pages #16.
  • Adds demo/build_demo.py: builds the demo site from web/ (now the single source of truth) + demo/summary.json, mechanically applying the demo deltas (static ./summary.json fetch, relative asset paths, demo title/heading, synthetic-data banner/footer). Each substitution asserts its anchor text matched exactly once — if web/ evolves in a way the transform doesn't understand, the deploy fails loudly rather than shipping a broken demo.
  • The Pages workflow runs the build script and uploads _site/ instead of demo/, and now also triggers on web/** so viewer changes redeploy the demo automatically.

Testing

  • Local build + headless Chrome render: all 1,419 senders populate, 84,000 total, banner and "public demo" heading present — equivalent to the current live demo.
  • Drift test: mutating the fetch URL in web/app.js fails the build with a clear assertion pointing at the drifted anchor; restoring it builds clean.
  • _site/ is gitignored so local builds can't be committed accidentally.

demo/ no longer vendors copies of the viewer's index.html/app.css/app.js.
The Pages workflow now runs demo/build_demo.py, which builds the site
from web/ (the single source of truth) plus demo/summary.json, applying
the demo deltas mechanically: static ./summary.json data source,
relative asset paths, demo title/heading, synthetic-data banner and
footer. Every substitution asserts its anchor matched exactly once, so
viewer drift fails the deploy instead of silently publishing a stale or
broken demo. The deploy also triggers on web/** changes now.

Closes #19
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.

Generate the Pages demo from web/ at deploy time

1 participant