FE-1689: Make ad-hoc scenarios the default and remove the classic scenario forms - #9686
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview Core: Adds UI: Simulation Settings always uses the two-column form (inline when No scenario, run mode when a scenario is selected). Create/edit scenario drawers use expose-mode form only; code scenarios show read-only initial-state code with save guards for exposed Settings/docs: Strips persisted Reviewed by Cursor Bugbot for commit edd867e. Bugbot is set up for automated code reviews on this repo. Configure here. |
d838982 to
b552d20
Compare
b552d20 to
1ec22f9
Compare
1ec22f9 to
b68b878
Compare
363d4e3 to
cdff081
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ac62960. Configure here.
…e AI summaries and the architecture docs
…nger has when opening the form
…the form can open and save it
…ale overrides in the architecture page
… opening a scenario in the form

Important
Experimental
The Parameter sweeps and In-browser optimization feature flags keep gating sweeps and the optimizer. The scenario form ships for everyone.
Summary
Before this PR, Petrinaut carried two scenario forms. The classic one, the default, edited scenario parameters as typed rows and the initial state as a per-place spreadsheet or a code block, and the experiment drawer showed a saved scenario's parameters as rows of its own. The ad-hoc form, Variables above Parameters beside a per-place Initial state, sat behind the Ad-hoc scenarios setting and rendered only where that setting turned it on.
This PR makes the ad-hoc form the only scenario form and removes the setting. Simulation Settings shows the form whenever no scenario is selected and the run form for a saved one. The Create Experiment drawer shows the form for No scenario and the run form with its Computed state fold for a saved scenario. Creating a scenario is the form in expose mode under Name and Description, with a Scenario Parameter toggle per Variable. Editing opens any stored kind through one core converter: a scenario saved in the form's format opens as stored minus any override, place or place block the net no longer matches, a per-place scenario opens converted and is stored in the form's format only when Save is pressed, a scenario whose initial state is code keeps that code, shown read-only, with its name, description, Variables and Parameters editable. The classic form, its mapping, its defaults and its language session are deleted.
9686.mp4
Links
Changes
One scenario form
Stored kinds
adHocStateFromScenarioin petrinaut-core seeds the form from any stored scenarioSetting removal
enableAdHocScenariosand its setter leaveUserSettingsReview fixes
Known issues
Test coverage
simulation-settings.test.tsx:create-experiment-drawer.test.tsx,experiment-scenario-run.test.tsx:scenario-to-ad-hoc-state.test.tsin petrinaut-core:create-scenario-drawer.test.tsx,view-scenario-drawer.test.tsx,ad-hoc-scenario-authoring.test.tsx,validate-scenario-name.test.ts,ad-hoc-lsp-errors.test.ts:user-settings-provider.test.tsx,viewport-settings-dialog.test.tsx:How to test
Quick simulation
Scenarios
infected_ratiodefault, then SaveExperiments