Skip to content

FE-1500: add editor presentation profiles - #9425

Draft
kube wants to merge 1 commit into
codex/fe-1500-routerfrom
claude/fe-1500-presentation
Draft

FE-1500: add editor presentation profiles#9425
kube wants to merge 1 commit into
codex/fe-1500-routerfrom
claude/fe-1500-presentation

Conversation

@kube

@kube kube commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

🌟 What is the purpose of this PR?

Adds a presentationProfile prop to Petrinaut (editor or review) that gates authoring-only controls, and extracts scenario and playback controls into shared components so later surfaces can compose them outside the full editor. Stacked on #9359.

🔗 Related links

🔍 What does this change?

  • New PetrinautPresentationProvider context maps a profile to capability booleans (showMutationActions, showSourceCode, showCustomVisualizers, showViewportSettings, showMinimap, compactControls). The default editor profile keeps every capability on, so existing hosts are unchanged; review suppresses authoring actions for read-only pages.
  • Gates existing editor UI on those capabilities: subnet add/rename/delete affordances, type-dimension mutation controls, source-code fields in property inspectors, the custom place visualizer, viewport settings, and the minimap.
  • Extracts shared components out of editor internals: SelectedItemProperties from PropertiesPanel/panel.tsx, SimulationScenarioControls and simulation-parameter-bounds from simulation-settings.tsx, and a compact variant of the bottom-bar SimulationControls and PlaybackSettingsMenu (with an allowedSpeeds allow-list).
  • Adds a Fit view button to the viewport controls and moves the Monaco code field and place visualizer behind React.lazy boundaries (createDeferredSubView).

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

🛡 What tests cover this?

  • New: simulation-parameter-bounds.test.ts.
  • Existing: the @hashintel/petrinaut unit suite runs the editor with the default profile.

❓ How to test this?

  1. Checkout the branch and run yarn workspace @hashintel/petrinaut dev.
  2. Confirm the editor is unchanged with the default profile: property panels, scenario controls in Simulation Settings, playback bar, viewport controls.
  3. Render <Petrinaut presentationProfile="review" /> in a host and confirm add/delete/rename affordances and source-code fields are hidden.

@kube kube self-assigned this Aug 29, 2026
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Aug 29, 2026 8:18pm
petrinaut Ready Ready Preview Aug 29, 2026 8:18pm
petrinaut-docs Ready Ready Preview Aug 29, 2026 8:18pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Aug 29, 2026 8:18pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant