FE-1500: add the example embed route - #9427
Draft
kube wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
kube
force-pushed
the
claude/fe-1500-embed
branch
from
August 29, 2026 14:28
a48dcd5 to
3315bbb
Compare
kube
force-pushed
the
claude/fe-1500-embed
branch
from
August 29, 2026 20:03
3315bbb to
5afc088
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌟 What is the purpose of this PR?
Adds the framed-only embed route
/embed/examples/<slug>/versions/<revision>: it lazy-loadsPetrinautPreviewwith Quick Simulation configured from the example's generated artifacts and catalog playback settings. Stacked on #9361.🔗 Related links
🔍 What does this change?
EmbeddedExamplePagelazy-importsPetrinautPreviewfrom@hashintel/petrinaut/previewand builds itsquickSimulationfromloadExampleRuntimeplus catalog playback config and parameter bounds; navigation always uses replace-history inside the iframe.navigation-search.ts(previewSearchToNavigationState,navigationStateToPreviewSearch,applyPreviewNavigationUpdate) over the shared scenario/subnet/selection search subset, and normalizes unsupported query fragments away on entry./embed/examples/*SPA rewrite tovercel.json.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:
🛡 What tests cover this?
embed-route.test.ts(framed-window guard, search normalization), the preview-codec case innavigation-search.test.ts, and fast-check properties innavigation-search.property.test.tsprovingnormalizePreviewSearchis idempotent (so the redirect inbeforeLoadterminates) and preview states survive encode then decode.❓ How to test this?
yarn workspace @hashintel/petrinaut build:lib, thenyarn workspace @apps/petrinaut-website dev.http://localhost:5173/embed/examples/gases-1-pn/versions/1directly and confirm it redirects to the canonical example page.