FE-1500: switch the example embed to the Petrinaut preview - #9547
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryLow Risk Overview The embed route loads Reviewed by Cursor Bugbot for commit 26f037e. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟡 Changes recommended
Preview navigation currently removes supported mode, view, and overlay URL parameters.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Switches example embeds from the full editor to the lightweight Petrinaut Preview with Quick Simulation.
Changes:
- Loads models and generated simulation artifacts concurrently.
- Adapts shared URL navigation to Preview state.
- Adds property-based Preview codec coverage.
File summaries
| File | Description |
|---|---|
apps/petrinaut-website/src/routes/embed.examples.$slug.tsx |
Loads runtime artifacts and wires Preview navigation. |
apps/petrinaut-website/src/examples/navigation-search.ts |
Adds Preview search-state conversion. |
apps/petrinaut-website/src/examples/example-search.property.test.ts |
Tests Preview codec round-tripping. |
apps/petrinaut-website/src/examples/embedded-example-page.tsx |
Replaces the full editor with Preview and Quick Simulation. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 f8d9228. Configure here.
f8d9228 to
cd2b45d
Compare
4e8ee74 to
58d9707
Compare
58d9707 to
88eae1e
Compare
88eae1e to
3789d06
Compare
3789d06 to
26f037e
Compare

Summary
Before this PR,
/embed/examples/<slug>mounted the full read-onlyPetrinautcomponent. Every embed loaded Monaco and the language server to show a model, and offered no way to run it.The route switches to
PetrinautPreviewwith Quick Simulation. The compact surface loads no language tooling and runs the model's named scenarios from build-time artifacts. The embed URL contract does not change.9448.mp4
Links
Changes
EmbeddedExamplePagelazy-loadsPetrinautPreviewfrom@hashintel/petrinaut/previewvalidateSharedExampleSearchstays the route's search contractReview fixes
Test coverage
example-search.property.test.ts:navigation-search.test.ts,example-search.test.ts:How to test
Embed on the Preview
URL contract unchanged
scenario,subnet, oritemTypeanditemIdURL from the previous embed