Skip to content

docs(lighthouse): MkDocs handbook, PWA/offline, accuracy ledger#78

Merged
doublegate merged 2 commits into
mainfrom
docs/lighthouse-site
Jul 12, 2026
Merged

docs(lighthouse): MkDocs handbook, PWA/offline, accuracy ledger#78
doublegate merged 2 commits into
mainfrom
docs/lighthouse-site

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Summary

  • New mkdocs.yml (Material for MkDocs) over the existing docs/ tree.
  • Replaces pages.yml with a combined web.yml: wasm demo at /, rustdoc at /api/, MkDocs handbook at /docs/, one deployment. The existing <5MiB gzip size budget (scripts/wasm_size_budget.sh) now also gates PRs (build-only, no deploy), not just push-to-main.
  • PWA/offline for the wasm demo: manifest.webmanifest, a real icon.svg, a stale-while-revalidate sw.js service worker.
  • New docs/accuracy-ledger.md — every known approximation/divergence mapped to an explicit disposition, extracted from docs/STATUS.md's existing dashboard content.
  • docs/DOCUMENTATION_INDEX.md refresh (was stamped v0.4.0, linked a nonexistent SALVAGE_MANIFEST.md, undercounted the ADR directory).
  • Second release of the RustyNES-parity roadmap (to-dos/VERSION-PLAN.md).

Type of change

  • Documentation / release-engineering (no core emulation code touched)

Acceptance criteria

  • web.yml/mkdocs.yml valid YAML; manifest.webmanifest valid JSON; wasm_size_budget.sh passes bash -n
  • web.yml's build job actually succeeds on this PR (first real exercise of the MkDocs build + size-budget gate)
  • No Rust source touched — existing test suite unaffected

Notes for reviewer

docs/accuracy-ledger.md honestly flags one item as not-yet-implemented (a Holy-Mapperel-style regression net for the 3 unit-test-only coprocessor boards) rather than claiming something that isn't scoped in any release yet.

Adds mkdocs.yml (Material for MkDocs) over the existing docs/ tree, and
replaces pages.yml with a combined web.yml: the wasm demo at /, rustdoc at
/api/, and the new MkDocs handbook at /docs/, all deployed together. The
existing <5MiB gzip wasm size budget (scripts/wasm_size_budget.sh) now also
gates PRs, not just push-to-main.

The wasm demo gains PWA/offline support: manifest.webmanifest, a real
icon.svg (replacing the inline-SVG-only favicon for install-icon purposes),
and a stale-while-revalidate sw.js service worker.

New docs/accuracy-ledger.md maps every known approximation/divergence to an
explicit disposition (Remediated / No-stricter-oracle-available / Deferred /
Out-of-scope), extracted from docs/STATUS.md's existing dashboard content --
the "why" companion to that pass-count scoreboard. One item is honestly
flagged as not-yet-implemented (a SNES-appropriate Holy-Mapperel-style
regression net for the unit-test-only coprocessor boards) rather than
overclaimed.

docs/DOCUMENTATION_INDEX.md refreshed: was still stamped v0.4.0, linked a
SALVAGE_MANIFEST.md that doesn't exist, and undercounted the ADR directory.

Second release of the RustyNES-parity roadmap (to-dos/VERSION-PLAN.md).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 12, 2026 03:33
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a consolidated GitHub Pages build/deploy pipeline that publishes three artifacts together (wasm demo at /, rustdoc at /api/, and a new Material for MkDocs handbook at /docs/), adds PWA/offline support to the wasm demo, and documents known accuracy residuals in a dedicated “accuracy ledger” page.

Changes:

  • Add MkDocs (Material) configuration over the existing docs/ tree and publish it under /docs/.
  • Replace the previous Pages workflow with a combined web.yml build that also enforces the existing <5MiB gzip wasm size budget on PRs.
  • Add PWA/offline assets (manifest, icon, service worker) and wire them into the wasm demo entry page; update documentation index + changelog accordingly.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
to-dos/VERSION-PLAN.md Marks “Lighthouse” as in progress and itemizes the deliverables added by this PR.
scripts/wasm_size_budget.sh Adds a gzip-based wasm/JS size budget gate script (with optional brotli reporting).
README.md Updates the Pages badge text to reflect demo + rustdoc + docs.
mkdocs.yml Adds Material for MkDocs configuration and curated navigation for the docs/ tree.
docs/frontend.md Updates hosted demo deployment reference from pages.yml to web.yml.
docs/DOCUMENTATION_INDEX.md Refreshes version stamp and index links; adds references to new docs/ledger pages.
docs/accuracy-ledger.md Adds a new ledger mapping known residuals/validation gaps to explicit dispositions.
crates/rustysnes-frontend/web/sw.js Adds a stale-while-revalidate service worker for the wasm demo.
crates/rustysnes-frontend/web/manifest.webmanifest Adds a web app manifest for PWA install metadata.
crates/rustysnes-frontend/web/index.html Wires in manifest/icon/service worker registration and trunk copy-file directives.
crates/rustysnes-frontend/web/icon.svg Adds an SVG app icon used by the manifest/apple-touch-icon.
CHANGELOG.md Documents the new docs site + PWA/offline + accuracy ledger under Unreleased.
.github/workflows/web.yml New combined workflow to build wasm + rustdoc + MkDocs and deploy as one Pages artifact.
.github/workflows/pages.yml Removes the old Pages workflow superseded by web.yml.

Comment thread .github/workflows/web.yml Outdated
Comment on lines +59 to +61
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'push' }}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 26e58eb: cancel-in-progress now reads github.event_name == 'push', matching the stated intent (cancel stale main pushes, let PR size-budget checks finish).

Comment on lines +41 to +49
const network = fetch(request)
.then((response) => {
if (response && response.ok) {
cache.put(request, response.clone());
}
return response;
})
.catch(() => cached);
return cached || network;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 26e58eb: the catch handler now falls back to a synthetic 503 Response when both the network fetch fails and nothing is cached yet, instead of resolving to undefined.

…llback

Copilot review: web.yml's cancel-in-progress was inverted relative to its
own comment (PR runs got cancelled mid-flight; stale main pushes didn't).
Fixed to cancel-in-progress: github.event_name == 'push', matching stated
intent.

sw.js's fetch handler could resolve respondWith() to undefined on a truly
offline first visit (network fails AND nothing cached yet) since
.catch(() => cached) returned undefined in that case. Now falls back to a
synthetic 503 Response instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@doublegate doublegate merged commit 79cb8a9 into main Jul 12, 2026
12 checks passed
@doublegate doublegate deleted the docs/lighthouse-site branch July 12, 2026 03:41
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.

2 participants