FE-1500: add versioned examples and read-only pages - #9362
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview A new
Unit tests assert every catalog entry loads, scenario parameters sit within declared bounds, generated HIR covers all scenarios, and loaders return singleton snapshots per revision. Reviewed by Cursor Bugbot for commit 51ca609. Bugbot is set up for automated code reviews on this repo. Configure here. |
6d3e470 to
8f9df3c
Compare
8f9df3c to
23127ef
Compare
23127ef to
27ef2b0
Compare
27ef2b0 to
43734e1
Compare
43734e1 to
a45a711
Compare
9057b60 to
51ca609
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 51ca609. Configure here.
| void navigate({ | ||
| replace: history === "replace", | ||
| search: (previous) => applyFullNavigationUpdate(previous, update), | ||
| }); |
There was a problem hiding this comment.
Example routes drop queued navigations
Medium Severity
Example onNavigate applies each Petrinaut updater to the router’s committed previous search instead of the host’s latest pending location. Sequential updates in the same event, or before the router commits, can drop earlier changes, so the URL no longer tracks selection, drawers, or subnet switches and Back/Forward can skip states.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 51ca609. Configure here.


🌟 What is the purpose of this PR?
Publishes seven Petrinaut models as immutable, versioned website examples: a catalog page, canonical
/examples/<slug>/versions/<revision>pages rendering the full Petrinaut component read-only, and app-like URL navigation for the example pages and the local demo. Stacked on the controlled-navigation PR.🔗 Related links
🔍 What does this change?
src/examples/models/v1and deterministic precompiled HIR runtime artifacts undersrc/examples/generated/v1, produced byscripts/generate-example-artifacts.ts(examples:generate/examples:check)./examplesand canonical example routes that render<Petrinaut readonly presentationProfile="review">from an in-memory read-only document handle.navigation-search.ts): mode, section, resource, scenario, subnet, selection, and creation-drawer overlays, with push for destinations and replace for normalization..optional().catch(undefined)schemas, and the"type:id"selection encoding is a bidirectionalz.codec. Cross-field rules (pair completeness, overlay precedence, tri-state scenario) stay plain code.encode(decode(s))is a fixed point (what the embed redirect relies on), and every decodable state survives encode then decode.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
industrial-gas-supply-sdcpnslug is reserved in the catalog but not yet published.🛡 What tests cover this?
catalog.test.ts(every catalog entry loads, every scenario has generated HIR, one immutable snapshot per revision),navigation-search.test.ts,navigation-search.property.test.ts(fast-check codec laws over generated search inputs),readonly-example-handle.test.ts,-index.test.tsx,local-storage-demo-app.test.tsx.examples:checkfails when the generated artifacts do not match the models.❓ How to test this?
yarn workspace @apps/petrinaut-website dev./examples, pick an example, select items, switch subnets, open a creation drawer.