FE-1500: add the example embed route - #9427
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
a48dcd5 to
3315bbb
Compare
3315bbb to
5afc088
Compare
5afc088 to
690195c
Compare
690195c to
2d06143
Compare
PR SummaryLow Risk Overview The embed URL only encodes scenario, subnet, and selection. New shared-search codecs (
Reviewed by Cursor Bugbot for commit b42f4d0. Bugbot is set up for automated code reviews on this repo. Configure here. |
68b6c8f to
ec552ec
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 ec552ec. Configure here.
ec552ec to
7bf2020
Compare
7bf2020 to
b48ea84
Compare
b48ea84 to
f97741e
Compare
f97741e to
b42f4d0
Compare

🌟 What is the purpose of this PR?
Adds the embed route
/embed/examples/<slug>, rendering the regular Petrinaut component read-only with embed options. This makes the embed URL contract available for oEmbed immediately; a compact preview surface replaces the component in a later PR without changing the contract. Stacked on #9362.🔗 Related links
🔍 What does this change?
vercel.json, in the oEmbed PR), not by client-side checks.EmbeddedExamplePagelazy-loads a read-onlyPetrinautwith all net-management controls hidden and a plain title in the top bar; navigation always uses replace-history inside the iframe. (Thereviewpresentation profile that hides authoring controls arrives later in the stack, in FE-1500: add editor presentation profiles #9425.)sharedSearchToNavigationState/navigationStateToSharedSearchcodecs project the full navigation state onto that contract, andnormalizeEmbedSearchdrops anything the contract cannot represent 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:
🐾 Next steps
PetrinautPreviewsurface replaces the full component inside the embed later in this stack, keeping the URL contract property-tested identical.🛡 What tests cover this?
embed-route.test.ts(search normalization) and fast-check properties innavigation-search.property.test.tsprovingnormalizeEmbedSearchis idempotent (so the redirect inbeforeLoadterminates) and shared 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-pndirectly and confirm the read-only embed renders.