FE-1500: switch the example embed to the Petrinaut preview - #9448
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
879319c to
ee83651
Compare
ee83651 to
1c805b2
Compare
1c805b2 to
7e9425b
Compare
7e9425b to
f5e9e25
Compare
f5e9e25 to
a3e8a69
Compare
7425768 to
1be5d59
Compare
|
Semgrep found 4
Detected a call to Semgrep found 1 Ensure that the regex used to compare with user supplied input is safe from regular expression denial of service. |
1be5d59 to
272d608
Compare
272d608 to
4438ee5
Compare
4438ee5 to
9d2da59
Compare
9d2da59 to
5de56fa
Compare
5de56fa to
8e15929
Compare
PR SummaryMedium Risk Overview The embed route loader now resolves the model and runtime together ( Reviewed by Cursor Bugbot for commit 1436c2d. 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 model and runtime artifacts concurrently.
- Adapts shared URL navigation to Preview state.
- Adds property-based codec coverage.
File summaries
| File | Description |
|---|---|
embed.examples.$slug.tsx |
Loads runtime artifacts and wires Preview navigation. |
navigation-search.ts |
Adds Preview search conversion helpers. |
example-search.property.test.ts |
Tests Preview codec behavior. |
embedded-example-page.tsx |
Renders PetrinautPreview with 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.
| ): SharedExampleSearch => | ||
| navigationStateToPreviewSearch( | ||
| update(previewSearchToNavigationState(search)), | ||
| ); |
|
Not actually merged. A bad rebase from my side briefly pushed this branch at its own base, so GitHub saw no commits between them, marked the PR merged and deleted the branch. Nothing landed in `main`. The branch is restored with its commit and the work continues in #9547. |
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 contractTest 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