web: drive control limits from the served bounds and clamp, not 400

The store fetches {config, bounds} at startup and snaps values into
range everywhere they enter: typed fields, sliders, panel overrides,
and shared links (a ?edgesPerNode=150 link now runs at 8 instead of
showing a validation error). Shrinking numStudents pulls numEducated
and origin down with it. If the bounds fetch fails the app still
starts and the engine's validation backstops. Native min/max
attributes follow the same numbers, so spinners stop at the bounds.
This commit is contained in:
Justin Visser 2026-06-11 16:16:27 +02:00
parent bd890384e5
commit 268575ed6c
8 changed files with 337 additions and 18 deletions

View file

@ -36,8 +36,8 @@ const offendsNumEducated = computed(
label="Chance to forward"
hint="per friendship, per round"
:value="base.forwardProb"
:min="0"
:max="1"
:min="store.state.bounds?.forwardProb.min ?? 0"
:max="store.state.bounds?.forwardProb.max ?? 1"
:step="0.01"
:display-value="formatPct(base.forwardProb * 100)"
:invalid="offendsForwardProb"