Skip to content

FE-1517: Scenario creation authors through the ad-hoc form - #9368

Draft
kube wants to merge 5 commits into
cf/fe-1490-ad-hoc-scenario-user-guidefrom
cf/fe-1517-scenario-creation-uses-the-ad-hoc-form
Draft

FE-1517: Scenario creation authors through the ad-hoc form#9368
kube wants to merge 5 commits into
cf/fe-1490-ad-hoc-scenario-user-guidefrom
cf/fe-1517-scenario-creation-uses-the-ad-hoc-form

Conversation

@kube

@kube kube commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #9290 (FE-1490). Part of the ad-hoc scenario stack (FE-778).

Behind the Ad-hoc scenarios setting, the scenario creation form authors scenarios through the ad-hoc Initial State + Parameters form, in a new expose selection mode:

  • Each top-level Variable row carries a Scenario Parameter toggle (AdHocVariable.exposed); exposed Variables become the saved scenario's tunable parameters (snake_cased identifier, constant expression as the default).
  • One mode only: no "Define as code" toggle on this surface.
  • The definition persists as initialState: { type: "adhoc", content }; scenarioParameters and parameterOverrides are derived from it on save and stay the compiler's inputs, so every other consumer of the saved scenario works unchanged.
  • The consolidated form spec (content/ui/ad-hoc-form.mdx) gains a persisted-format section: the initialState variants, the AdHocScenarioState tree, the derived-on-save fields, and the compile-time-only code.
  • The view/edit drawer round-trips the ad-hoc variant — always through the ad-hoc form, whatever the setting says, since the classical form cannot represent it.
  • Lowering a persisted ad-hoc scenario passes the net context through the language worker (sdcpn/lowerScenario now accepts adHocContext), the CLI, and useScenarioHir.
  • Drawer footers count the ad-hoc form's own LSP diagnostics (session-scoped, so a second mounted form never leaks its errors in).

User guide, architecture spec, and changeset included.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
petrinaut-docs Ready Ready Preview Aug 29, 2026 2:24pm
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
hash Ignored Ignored Preview Aug 29, 2026 2:24pm
hashdotdesign-tokens Ignored Ignored Preview Aug 29, 2026 2:24pm
petrinaut Skipped Skipped Aug 29, 2026 2:24pm

Request Review

@github-actions github-actions Bot added 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 type/eng > backend Owned by the @backend team labels Aug 27, 2026
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from 3d558ab to 29f63e7 Compare August 27, 2026 02:33
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from 29f63e7 to cdd5566 Compare August 27, 2026 02:50
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from cdd5566 to ae7362c Compare August 27, 2026 02:55
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from ae7362c to 7c0dda8 Compare August 27, 2026 02:58
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from 7c0dda8 to bb88a06 Compare August 27, 2026 20:09
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from 8dd4133 to 6686b34 Compare August 28, 2026 10:19
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from 6686b34 to cbf8b2e Compare August 28, 2026 10:22
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from cbf8b2e to 7363855 Compare August 28, 2026 10:33
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch from 7363855 to 676f0d2 Compare August 28, 2026 14:00
@kube
kube force-pushed the cf/fe-1517-scenario-creation-uses-the-ad-hoc-form branch 2 times, most recently from d2e132c to 6e7abd4 Compare August 28, 2026 15:18
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 > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant