Skip to content

FE-1717: Polish ad-hoc scenario editing - #9724

Merged
kube merged 4 commits into
codex/fe-1716-experiment-scenario-viewsfrom
codex/fe-1717-adhoc-scenario-polish
Sep 16, 2026
Merged

kube merged 4 commits into
codex/fe-1716-experiment-scenario-viewsfrom
codex/fe-1717-adhoc-scenario-polish

Conversation

@kube

@kube kube commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Simulation Settings and scenario forms use consistent spacing, compact headings, and keyboard navigation. Read-only cells show computed values; selecting a cell displays its expression over the value without changing the row height. Bundled example scenarios now open directly in the ad-hoc form while preserving their simulation output.

Demo: edit integer and ratio values, see the token total update, and switch between starting places and all places.

fe-1717--scenario-form-verified.mp4

Links

Blocked by

Changes

  • Section headings stack at the top and bottom while scrolling, with links to return to each section
  • Initial state starts with default starting places and provides a smaller Show all places switch directly after the title and help icon when other places exist
  • Keyboard focus reaches scenario controls, fields, tables, place labels, and experiment actions; Left collapses an expanded place before moving to another focus group
  • Scrollbars overlay content on hover without reserving a gutter
  • Spreadsheet corners, info icons, place labels, and section spacing follow the surrounding controls
  • Validation messages remain visible while editing, including invalid values with valid optimization bounds
  • Place token totals sit at the top-right beside the place label, and spreadsheet select chevrons stay inside their cells
  • The Time Step label, units, help icon, and input align vertically
  • All 56 scenarios across 16 bundled models use ad-hoc definitions, including dynamic token generators
  • User guides and patch changesets describe the editor behavior and migrated examples

Known issues

Screenshots pending: the published image under Simulation Settings in the simulation guide still shows the previous layout. The combined preview verifies token totals beside place headings and the compact Show all places control.

Test coverage

The rebased combined branch through #9728 passed build, unit-test, TypeScript, and lint checks. Formatting, architecture validation, and the documentation site build also passed. The migration also preserved compiled parameters and initial state across 628 configurations. Tests cover stacked headings, computed expressions, place filtering, validation, focus navigation, and pointer-only help icons. Earlier browser checks confirmed fixed row heights, zero scrollbar gutters, fullscreen draft preservation, and navigation between panel controls and fields.

How to test

  • Open a bundled example and verify its scenarios open in the ad-hoc form
  • Open Simulation Settings with a saved scenario and inspect the computed parameter and place values
  • Check the smaller Show all places switch beside Initial state and expand a place

    Its token total aligns with the place title, above the table.

  • Select a computed cell and move focus away

    Its expression covers the selected value, then disappears; the row height stays fixed.

  • Scroll through sections and use the stacked headings to jump between them
  • Open scenario and experiment creation, then use arrow keys and Tab through the forms
  • Expand a place, focus its label, and press Left twice

    The first press collapses it; the next moves between focus groups.

Pre-Merge Checklist

Publishing

  • Modifies npm-publishable libraries and includes patch changesets

Documentation

  • Required user guide changes are included

Turbo Graph

  • Does not affect the execution graph

@kube
kube added this pull request to stack #9699 September 15, 2026 00:38
@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hash Ready Ready Preview Sep 16, 2026 8:58pm UTC
petrinaut Ready Ready Preview Sep 16, 2026 8:58pm UTC
petrinaut-docs Ready Ready Preview Sep 16, 2026 8:58pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 16, 2026 8:58pm UTC

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 labels Sep 15, 2026
@kube kube self-assigned this Sep 15, 2026
@kube kube changed the title codex/fe 1717 adhoc scenario polish FE-1717: Polish ad-hoc scenario editing Sep 15, 2026
@kube
kube removed this pull request from stack #9699 September 15, 2026 01:16
@kube
kube force-pushed the codex/fe-1717-adhoc-scenario-polish branch from 7ed0704 to 059c5fe Compare September 15, 2026 01:18
@kube
kube added this pull request to stack #9730 September 15, 2026 01:18
@kube
kube removed this pull request from stack #9730 September 15, 2026 02:00
@kube
kube force-pushed the codex/fe-1717-adhoc-scenario-polish branch from 059c5fe to 9bf1b0b Compare September 15, 2026 02:01
@kube
kube added this pull request to stack #9731 September 15, 2026 02:02
@kube
kube removed this pull request from stack #9731 September 15, 2026 02:30
@kube
kube force-pushed the codex/fe-1717-adhoc-scenario-polish branch from 9bf1b0b to fd2c5e1 Compare September 15, 2026 02:30
@kube
kube added this pull request to stack #9733 September 15, 2026 02:31
@cursor

cursor Bot commented Sep 16, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large example-model migration and ad-hoc lowering path affect simulation inputs for bundled demos; compilation tests mitigate regressions but semantic parity depends on the migration fidelity.

Overview
Bundled website example scenarios are migrated from code initial states to structured adhoc definitions (place counts, coloured token rows, scenario variables, and net-parameter expressions), so they open in the ad-hoc scenario editor without changing intended parameters or markings.

Example runtime artifact generation now lowers each scenario with adHocContext (places, types, net parameters), which ad-hoc initial states require for synthesis. Catalog tests assert every scenario is ad-hoc and compileScenario succeeds against the generated HIR.

Patch changesets cover @hashintel/petrinaut form polish (keyboard navigation, stacked section headers, computed-value overlays, validation while editing, layout fixes) and @hashintel/petrinaut-core editable bundled examples.

Reviewed by Cursor Bugbot for commit 221577c. Bugbot is set up for automated code reviews on this repo. Configure here.

@kube
kube force-pushed the codex/fe-1717-adhoc-scenario-polish branch from b409715 to e6249ca Compare September 16, 2026 20:13
@hash-release hash-release Bot mentioned this pull request Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps 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.

2 participants