web: the dashboard page, slice 3 of M3

The milestone 2 parity page becomes the spec's dashboard: app bar with
wordmark, disclaimer badge and About popover, theme toggle (persisted,
defaults to prefers-color-scheme, applied pre-mount to avoid a flash),
hero with the preset narrative and live toned percentages, scenario
toolbar, panel cards with skeleton loading and dim-while-refreshing,
legend, and footer. ComparisonTable evolves into the collapsed
ResultsTable (test moved along, plus a formatPct rounding case).

NetworkView renders the real topology with the spec's shape encodings.
The layout is seeded d3-force (mulberry32 random source, seeded initial
positions, 300 synchronous ticks, cached per graph hash); anisotropic
forceX/forceY pulls settle the cloud into the wide card shape so the
fit stays uniform-scale and the spacing organic. Justin asked for a
taller network area (380x230) and a reading caption under the legend;
the caption is study copy, so StudyPreset gains a readingCaption field.

Slices still to come keep their controls visibly parked: Export and the
panel kebab render disabled until slices 11 and 7.
This commit is contained in:
Justin Visser 2026-06-10 16:55:14 +02:00
parent 2f21248c20
commit 71baf10e73
28 changed files with 1766 additions and 300 deletions

View file

@ -19,6 +19,9 @@ export const deepfakeSchoolPreset: StudyPreset = {
'illustration, not fitted to data, so it is not a validated prediction ' +
'of any real school. Use it to build intuition about who to educate, ' +
'not to forecast outcomes.',
readingCaption:
'Each dot is one student in the same simulated year group. Every scenario ' +
'runs the identical school; only the education program differs.',
toneThresholdPct: 30,
base: {
numStudents: 120,

View file

@ -18,6 +18,7 @@ export interface StudyPreset {
narrative: string
disclaimerShort: string // badge text
disclaimerLong: string // About popover body
readingCaption: string // one quiet line under the legend: how to read the dots
toneThresholdPct: number // reached% <= threshold renders "good" (teal)
base: Config // the default world
panels: PanelSpec[] // initial panels