Skip to content

Viewer demo staging silently skips synthetic-mvp when gen-fixture is not built #187

Description

@DrunkOnJava

Problem

npm run build in viewer/ runs scripts/stage-demos.mjs (via prebuild). The synthetic-mvp demo is generated on the fly by the gen-fixture binary, but the script only looks for it on PATH or in target/. On a fresh clone it prints

synthetic-mvp: missing (gen-fixture not found — build with cargo build --release --bin gen-fixture)

and the gallery marks the demo unavailable. viewer/README.md describes the tier-1 demos being staged from corpus/tier1/ but never says that synthetic-mvp needs cargo build --release --bin gen-fixture first, so the warning is the first time a newcomer hears about it.

What to do

  1. Document the prerequisite in viewer/README.md next to the npm run stage:demos mention (one or two sentences and the exact cargo command).
  2. Optional, if you want a small code change too: have stage-demos.mjs try cargo build --release --bin gen-fixture (or cargo run --release --bin gen-fixture -- …) as a fallback before giving up, keeping the current warning if cargo is not available. Keep the script network-free.

Acceptance

  • Fresh clone → cargo build --release --bin gen-fixture && cd viewer && npm ci && npm run stage:demos stages synthetic-mvp: ok, and the README says how.
  • npm run typecheck and npm run build still pass (tools/check-local.sh --viewer runs both).

Scope notes

Docs (+ optional ~20-line script change); no corpus files needed; the demo is a license-free synthetic fixture.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:viewerWork in the viewer area.good first issueGood for newcomerstype:docsDocumentation or user guidance.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions