User stories
Fifteen things a person does in the browser workbench, each driven by one Playwright check against a
real arena serve with the real CAD kernel. No model is called and no key is read. Every check
compares what the page shows with what the API returns, so a page that draws a constant instead of
the API value fails.
Run them all, or a subset, from the repository root:
scripts/check-ui.sh # starts arena serve on a free loopback port, runs all fifteen
UI_ONLY=S02,S05 scripts/check-ui.sh # a subset (exit status 3 on success, because not all ran)
UI_SHOTS=assets/media scripts/check-ui.sh # also write the proof screenshots
UI_RECORD=1 scripts/check-ui.sh # after a full run, write the result lines below
The script exits 0 only when all fifteen ran and passed. A missing browser, a missing build, a
server that does not answer and a story that did not run are failures, never skips. The result line
of each story below is written from the results file of one full run, never by hand; a story the
run did not cover reads not run. tests/test_ui_stories.py keeps this page and the script in step.
When the stories were first written, each one went red under a one-line change of the page, one change per story (a constant in place of the API value, a dropped link, a removed focus ring, a changed fixed line), and the page was restored afterwards by hash. That proof covers the fifteen stories as they stood then, not the checks added since.
scripts/ui-stories/mutate.py repeats the proof for the current stories: it holds 29 one-line
changes, builds the page with each, runs the story it targets and expects red. One run of it covered
17 of the 29: 16 were killed and 1 survived (S05, "badge under a verdict that does not exist": the
search that S05 cancels has usually found a violation by then, so the badge is rightly there and the
story cannot tell). The other 12 were not run: the "replay scope left out" change of S07 and every
change of S08 to S15. Until they run, those stories carry the earlier proof only.
The workbench runs the six mechanisms of the catalog and takes no file of your own. A STEP file goes
through arena assembly with --sidecar in a terminal (Bring your own STEP).
The screenshots of the runs are assets/media/ui-analyze-*.png, ui-adversary-*.png,
ui-determinism-panel-1440-light.png and ui-guide-*.png.
Recording the workbench on screen
The stories double as the script of a screen recording. The page was laid out and checked at these settings, so a recording made with them shows what the stories checked:
- A window of 1536 by 864 pixels at a device pixel ratio of 1.25. The verdict of a finished run lands inside it without scrolling (S02).
- The address with
?quality=high. A browser on a software renderer would otherwise draw the 3D view at low quality, without shadows. - Reduced motion off. With it on, the scroll to the verdict is instant and the replay of the recorded run shows every pose at once.
- Wait for
.scene-canvas[data-ready=true]before the first frame of a 3D shot. The canvas is blank until then. ?guide=offfor a take without the guide strip and the help blocks,?guide=onto show them.- Do not resize the window during a take. The 3D view redraws after a resize (S06), but the layout moves.
S01 Choose a mechanism and read what it declares
As an engineer, I pick one of the six mechanisms and read the pair it checks, the requirement, the joint and the deviation range before I measure anything, so that I know what a verdict will be about.
- Check:
S01inscripts/ui-stories/check.cjs - The check: reads the catalog from the API, counts one card per mechanism, selects each card in turn and compares the declared box with the API (requirement text, checked pair, joint id, deviation id). The box has no editable field. The page has no file input, and its help says that a STEP file of your own is not read in the browser.
- Result: passed 2026-12-04
S02 Measure one pose and read a verdict that states its scope
As an engineer, I measure one pose and read a verdict header whose scope sentence is the API's own, so that I do not read "no violation" as more than it is.
- Check:
S02inscripts/ui-stories/check.cjs - The check: measures the built-in pin at 45 deg and 0 mm (clear, smallest gap 2 mm against 1.5 mm) and at 45 deg and -1.2 mm (violation, gap 0.8 mm). The headline, the tone, the gap and the scope sentence match the stored run and finding from the API. When the run ends, the verdict heading takes keyboard focus and sits inside a 1536 by 864 window. It is still there, within 400 px of the top, after the findings, the scene and the lattice have loaded. A polite live region announces
Run finished.and the headline. - Result: passed 2026-12-04
S03 Sweep a grid and read the gap map
As an engineer, I sweep a grid of poses and read one gap for every pose, so that I can see where the mechanism is close to the requirement.
- Check:
S03inscripts/ui-stories/check.cjs - The check: sweeps the hinged flap post over 4 joint values and 3 deviations. The map has one row per joint value and one cell per pose, and every cell shows the API gap (to four decimals) and its verdict word. The scope starts with "Sampled grid only".
- Result: passed 2026-12-04
S04 Search with a budget and a seed and read the findings
As an engineer, I search a mechanism with a budget and a seed and read the poses the search found, so that I can repeat the search.
- Check:
S04inscripts/ui-stories/check.cjs - The check: searches the pin with budget 6 and seed 42. The headline is "Violation found", the scope sentence starts "Bounded search only:", the API's summary says six evaluation credits were spent, the findings list has the API's findings, and the stored request holds the typed seed and budget. The page reads "N poses measured" from
summary.measured, which leaves out confirmations and failed kernel queries, and prints the credits ("6 evaluation credits spent") on a line of its own. The measured poses, the failed queries and the confirmations never add up to more than the credits. - Result: passed 2026-12-04
S05 Watch a run count its poses, then cancel it
As an engineer, I watch a long search count its measured poses and stop it, so that I am never stuck waiting on a run.
- Check:
S05inscripts/ui-stories/check.cjs - The check: starts a search with budget 500, waits until the progress line reports kernel queries and the budget, checks the progress bar stays between 0 and 100, then loses one status poll (the page tries again and shows no error). After a reload it finds the running run again, with its progress, its Cancel button, a disabled Start button and a clock that does not read zero. Cancel run then stops it. The header, scope and measured count match the stored run (
summary.measured; a violation measured before the stop keeps the violation headline), the cancelled run carries no determinism badge on a verdict it does not have, and the past runs list shows it as cancelled. - Result: passed 2026-12-04
S06 See the parts in 3D and switch them on and off
As an engineer, I see the two parts and the gap between them in 3D and hide a part, so that I can look at the pose the verdict is about.
- Check:
S06inscripts/ui-stories/check.cjs - The check: runs a search, waits for the canvas, and checks that its picture is not blank. The label in the view shows the gap of the API and the requirement under it, and no result identifier. Every part of the mesh manifest has a Hide button, hiding one part changes the picture, isolating one part leaves only that part drawn (the others turn transparent, which changes thousands of pixels), and Reset camera works. The canvas is an image with a label, and its description says to drag to orbit and scroll to zoom, and that the arrow keys move the view while Shift with an arrow key orbits it. The stored-poses view keeps its picture when the window is resized, and its Reset camera button sits on the scene.
- Result: passed 2026-12-04
S07 Replay a stored run and compare it with the stored result
As an engineer, I measure a finished run's pose again and see that the stored result still holds, so that I can trust the evidence.
- Check:
S07inscripts/ui-stories/check.cjs - The check: runs the violating pose, presses Replay run, and reads "Replay: match". The stored and the replayed gap and verdict in the panel equal the API's stored finding, the panel prints the replay's scope sentence from the API, and it names the pose that was replayed ("Replayed pose: 45 deg, deviation -1.2 mm").
- Result: passed 2026-12-04
S08 Export the evidence files of a run
As an engineer, I download the files of a run, so that I can keep or share the evidence.
- Check:
S08inscripts/ui-stories/check.cjs - The check: counts one link per artifact the API lists, follows each one (it stays on the origin, inside the run, and answers with bytes), and checks that a path that climbs out of the run is refused. The first link starts a real download.
- Result: passed 2026-12-04
S09 Find an earlier run again after a reload
As an engineer, I reload the page and open an earlier run, so that nothing I measured is lost.
- Check:
S09inscripts/ui-stories/check.cjs - The check: after a reload, the list shows the newest eight runs and offers the rest. The full list equals the API's list in the same order (newest first). Opening the oldest run shows its verdict, marks its row, and measures nothing (the run count does not change).
- Result: passed 2026-12-04
S10 Understand why a request was refused
As an engineer, I get a plain reason when I ask for something the server will not do, so that I know what to change.
- Check:
S10inscripts/ui-stories/check.cjs - The check: a search budget of 0 shows the limits the API states, marks the field invalid and creates no run. Editing the field clears the refusal. A second catalog analysis while one runs answers 409
busywith no filesystem path. An unknown mechanism answers 422unknown_mechanismwithout echoing what was sent, and a body over the cap is refused. - Result: passed 2026-12-04
S11 Run an analysis from the keyboard alone
As an engineer who does not use a mouse, I choose a mechanism, start an analysis and replay the result, so that every step is reachable.
- Check:
S11inscripts/ui-stories/check.cjs - The check: arrow keys move between the mechanism cards, Tab reaches the Start button with a visible focus indicator on nearly every stop (all but three), Enter starts the run, and Enter on Replay run opens the replay.
- Result: passed 2026-12-04
S12 Use the workbench on a phone, in both themes, with reduced motion
As an engineer on a phone, I use the same workbench in the light or the dark theme, with reduced motion if I ask for it, so that nothing is lost on a small screen.
- Check:
S12inscripts/ui-stories/check.cjs - The check: at 390 px wide the page has no horizontal scroll before and after a result. With reduced motion, no panel animates or transitions. The dark and light themes paint different backgrounds, the theme button flips
data-theme, and the light theme also fits 390 px. - Result: passed 2026-12-04
S13 Turn the guide off and on, and keep the choice
As a newcomer, I read a short guide and turn it off when I no longer need it, so that the page stays out of the way.
- Check:
S13inscripts/ui-stories/check.cjs - The check: with the guide on, the intro strip has three steps and every section has a help block that starts closed under "About this section". Opened, it holds "What this is", "Next" and "How to read it". The help of the analysis keeps "Not checked." in view while it is closed, and a term opens its definition. Turning the guide off removes all of it, the choice survives a reload,
?guide=onand?guide=offoverride it, and a browser with blocked storage still works. - Result: passed 2026-12-04
S14 See which steps are deterministic and why
As a reviewer, I see for each step whether it gives the same result every time or depends on a model, with the reason, so that I know what to trust.
- Check:
S14inscripts/ui-stories/check.cjs - The check: the badge of the single pose, the sweep and the search carries the class and the reason the API states. The verdict and the result id carry badges after a run. The panel "What is deterministic" lists every statement the API returns, with both classes present.
- Result: passed 2026-12-04
S15 Stress the AI adversary: the needle case first, every limit one click away
As a skeptic, I see the needle case first, with the limits and the model's weak result one click away, so that I can judge how far the AI adversary got.
- Check:
S15inscripts/ui-stories/check.cjs - The check: the page shows the fixed line "One model, one fixture. On ordinary boxes the model does no better than a grid." and the needle case is the first section. It opens with the result at a glance: boxes with a hit, the best registered baseline in boxes, and the sequential optimiser counted in attempts and marked "not a ranking". The lead figure is the largest type on the page and the chart starts within 1000 px of the top. Its counts equal the API's, every interval equals the Wilson formula written out in the script, the chart has a table with the same numbers, and "All results and limits" starts collapsed and holds every stated limit. The recorded run comes before the bounds, replays pose by pose and says it is a recording. Its pose map holds one dot per distinct pose and rings the first violated pose against the requirement. The live control stays disabled and asks for no key.
- Result: passed 2026-12-04