U1 demo and known limits in the owner trial guide, tooling moved to U6 in the plan and tests, TODO lots A-H, AC19 and AC20 evidence.
151 lines
20 KiB
Markdown
151 lines
20 KiB
Markdown
# V1-2.6 UX redesign: test matrix per sub-step
|
||
|
||
Status: PROPOSAL, 2026-11-05, revised after the independent review and after the owner's answers of 2026-11-05.
|
||
Companion of `V1-2-6_UX_PLAN.md` (the common rules of §3 apply: absolute paths, sandbox-only database commands,
|
||
forbidden commands). No test is written before the owner authorises the sub-step that carries it.
|
||
|
||
## Common gates
|
||
|
||
| Gate | Command | When |
|
||
|---|---|---|
|
||
| Core | `pnpm rust:check` then `pnpm wasm:build` | any change under `crates/` |
|
||
| App and packages | `pnpm typecheck`, `pnpm test:run`, `pnpm lint`, `pnpm build` | always |
|
||
| Size | `packages/core-wasm/tests/size.test.ts`: Node `gzipSync(bytes, { level: 9 })` on `packages/core-wasm/pkg/faunosteo_wasm_bg.wasm`, at most 600 000 B; the figure printed by that test recorded in RUST.md; never a system `gzip` figure; the budget never raised silently (T1, LRN-118) | any change under `crates/core` or `crates/wasm` |
|
||
| Seed and pipeline | `pnpm r5:import-equine --check` with no difference | always |
|
||
| Frozen references | no change under `crates/core/tests/oracles/`, `apps/app/tests/fixtures/goldens/`, `supabase/seed/` (`git diff --stat` on those paths is empty) | always |
|
||
| Browser, no backend | `pnpm e2e:ui` | always |
|
||
| Sandbox | `pnpm db:sandbox up fresh`, then `test-db → e2e-shell → test` (LRN-113) | always |
|
||
| Worker | `pnpm worker:image`, then `pnpm db:sandbox verify-e2e` (refuses an image not built from `HEAD` after U6) | U6, U8 |
|
||
| Pre-checkpoint | `pnpm check:all` | every code sub-step |
|
||
| Reviews | fresh verifier on the sub-step contract; fresh security review on the diff | every sub-step |
|
||
|
||
Property tests: seeded generators inside Rust tests (fixed-seed linear congruential sequence, a few thousand cases
|
||
per property, a failing seed kept as a regression case); no new dependency. TypeScript arithmetic is covered by
|
||
table tests.
|
||
|
||
Accessibility: axe with zero serious or critical violations per state (`docs/development/BROWSER_TESTS.md:73-91`),
|
||
keyboard-only journeys, a text next to every colour, visible focus on every handle. Chromium only until V1-5; WebKit
|
||
and real tablets are owner trials.
|
||
|
||
Path guarantee (T16), every sub-step that touches geometry: a fixture sheet holding paths (never the seed) keeps
|
||
every path's `d` text byte for byte through the sub-step's journeys, save and reload.
|
||
|
||
## U0 · Contract and decisions
|
||
|
||
| Kind | Test |
|
||
|---|---|
|
||
| Review | fresh verifier on the U0 contract (`.claude/tasks/contracts/2026-11-05-v1-2-6-ux-u0.md`): each owner answer of 2026-11-05 recorded once (DECISIONS, contract §17.12, BDR-100, BDR-101) and cited where it applies; no contradiction between contract §6.2, §6.4, §6.7, §7.4, §8.2-8.4, §12.2 (O22 amended), §16.7, §16.12, the level-1 criteria (C3, C4, C5, C6, C7, C8, C11, C13, C16, C18, C20, C25, C28, C32, C33, C40, with the precedence rule of its header), the rules files and the boards; the two SQL checks described at save and at approval and publication and stated as not built; no normative common text written (T12); every cross-reference resolves |
|
||
| Preconditions | `pnpm r5:import-equine --check` clean; seed geometry counts (T16) re-run; wasm figure by the gate's call (LRN-118); `git diff --stat` empty under `crates/`, `apps/`, `packages/`, `supabase/`, `scripts/` |
|
||
|
||
## U1 · Shell
|
||
|
||
Implemented (contract `.claude/tasks/contracts/2026-11-06-v1-2-6-ux-u1-1123.md`). The former « Tooling » row moved to U6 (the `verify-e2e` image check and the demo sheet provisioned by the trial command).
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Unit | four-tab model, initial tab, width tiers (replaces `editor-route.test.tsx:66`, `128-170`, `editor-mode.test.ts:99-110`); header undo and redo states; undo from each tab reverts the last commit made on another tab; a typed field is flushed before the header undo (behaviour pinned); header undo accessible name and tooltip « Annuler la dernière modification » (T15); « Abandonner les modifications » for the return to the saved revision (C11 as amended); references panel open, close, return focus; « Aller à » target for every issue kind (`verification.ts:64-131`) |
|
||
| E2E shell | helpers rewritten (`e2e/support/editor.ts:326-330`, `warm-up.ts:43-45`, `editor-access.spec.ts:34-42`); every existing editor journey green on the new shell; sidebar hidden in the editor at 1 024, 1 180, 1 279 px, shown at 1 280 px, menu reachable in one tap; narrow-width read-only unchanged |
|
||
| Accessibility | axe on the four tabs and on the open references panel; Tab order header → tabs → panel → canvas |
|
||
| Regression | recovery and conflict specs unchanged; level-1 criteria C13, C14, C16, C34, C41 re-run (T11); each removed assertion mapped to its replacement in the commit message |
|
||
|
||
## U2 · Points and polygons
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Unit (tables) | slider stops = distinct radii of the view; snapping; red mark from the core value; midpoint insert after the segment start; « − » disabled at 3 vertices with its reason (board 12 B); zone translation; nearest-handle priority; keyboard map (arrows, Shift ×10, Insert or Backspace or Delete, Enter, Escape, roving focus); arrows pan only when the box is focused; handle cap fallback |
|
||
| Unit (state) | pending preview cancelled and restored on undo, redo, document replacement, tab change, second pointer; toast dismissed on any commit, undo or redo; slider commits once on release (history depth after a keyboard walk) |
|
||
| Core | the per-view minimum visible radius equals the `marker_too_small` threshold on the equine views and on edge frames |
|
||
| E2E mouse | drag a vertex, « + », « − », zone drag on a selected zone, redraw accepted, redraw refused by `interior_too_small` restores the old shape, undo and redo of each, toast « Annuler » undoes the same entry as the header; header button and toast action carry the accessible name « Annuler la dernière modification » (T15) |
|
||
| E2E touch (`hasTouch`, 1 024, 1 180, 1 280 px) | one-finger handle drag; explicit « Déplacer la zone » mode; finger 1 on a vertex handle then finger 2 elsewhere: the pinch zooms, the drag is cancelled, no commit (CDP `Input.dispatchTouchEvent` with two points); page scroll over the canvas with a selection and outside it |
|
||
| Keyboard | create a zone, add and remove a vertex, move the zone, validate, without a pointer; Ctrl+Z on a focused handle after arrow moves restores the pre-move shape |
|
||
| Paths (T16) | a path annotation gets no handle, no « + » or « − », no zone move in either mode, no keyboard move; its `d` is byte-identical after every gesture on its neighbours, a save and a reload; « Remplacer par un polygone » stays the only change: explicit, validated by the core, the path kept while tracing, on Escape and on a refusal; one undo entry restoring the exact `d`, redo restoring the polygon (owner, BDR-101) |
|
||
| Accessibility | axe on selection, tracing and move states; handle names (« sommet 3 de Thoraciques »); live-region message after a move |
|
||
| Performance | commit latency under the 500 ms budget (`editor-equine.spec.ts:25-34`) for drag, insert, remove |
|
||
|
||
## U3 · Category panel and own colour
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Unit | own colour hidden when null; « Revenir à la couleur de la catégorie » sends one `update` with `color: null`; new annotations carry no colour; staged form: preview leaves history untouched, Apply commits one batch, Cancel restores the handle; « Réaffecter à… » commits one batch and one undo entry |
|
||
| E2E | demo sheet with the equine own colours: atm shows `#ff8800`, revert, undo; recolour with preview, cancel, apply; reassign then delete a category |
|
||
| Accessibility | every swatch has its name next to it; palette keyboard-operable; axe on states A to D |
|
||
|
||
## U4 · Detail view by rectangle (manual)
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Unit | rectangle normalised from any drag direction and clamped to the parent frame; keyboard resize of its handles; toolbar without the access tool; view menu « Ajouter un accès » asks the editor for the category (no default category, T10 interim) |
|
||
| E2E | create a detail view by mouse and by keyboard, `view.unreachable` until its access exists, place the access with an explicitly chosen category, open the view in the practitioner preview |
|
||
| Core regression | `compose.rs` tests and canvas goldens unchanged |
|
||
| Accessibility | axe on creation and placement states |
|
||
|
||
## U5 · Detail view assisted
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Rust `annotations_in_rect` | circle, polygon, path, trigger; inside, partial, none; rect on an edge; empty view; unknown view; invalid rect |
|
||
| Rust replacement options (T9) | offer call before upload reads V from the candidate text; keep offered iff V equals R; reposition offered iff V differs from R, same aspect ratio on the 0.01 grid; no `viewBox` → only cancel; a point pushed out of frame by rounding refuses the remap; no path, no descendant crop, numbers in range; different aspect refused `remap.aspect`; path refused `remap.path`; descendant crop refused `remap.descendant_crop`; no frame refused; reposition output = command batch; numbers on the 0.01 grid; triggers drawn in the view remapped; descendant view with its own drawing untouched |
|
||
| Properties (seeded) | identity mapping returns the geometry exactly; mapping then inverse within 0.01 per number; `inside` ⇒ bounds within the rect; a rect equal to the frame ⇒ every annotation of the view `inside` |
|
||
| Hostile (op level) | non-finite and out-of-range rect, unknown ids, oversized command output bounded; no panic |
|
||
| Wasm | core-wasm proofs through the preview handle; size gate after each op, figure printed |
|
||
| Unit app | name formatting FR and EN (one, two, three, more with « … », none → « Vue détaillée n »); the replacement dialog: opens on every replacement, before any upload, no action preselected, unavailable actions disabled with their reason, « Annuler » sends no request and leaves document and history unchanged |
|
||
| E2E | board 08 without automatic access: rectangle over the elbow, proposed name, explicit placement, preview; replacement dialog: the seed head drawing on a crop with the same `viewBox` → keep and cancel offered, keep applied, annotations `to_confirm`; a re-based fixture drawing with the same aspect → reposition applied, all moved annotations `to_confirm`, one undo entry; a fixture with another aspect → reposition disabled with its reason; cancel → no upload request, document byte-identical; a keep or reposition failing the geometry accept → document unchanged, message |
|
||
| Accessibility | axe on the dialogs; the reason of a disabled action is announced |
|
||
|
||
## U6 · Category model
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Rust serialisation | both keys round-trip; absent keys not written (no `role` or `fill_opacity` text in the re-serialised seed); explicit `null` refused; opacity outside 10-100 or not an integer refused; unknown role refused |
|
||
| Rust identity pins (T2, BDR-068) | equine fingerprint `12d78872…` and alias `27c7383c…` recomputed equal; every seed review digest equal to its value pinned before the change; `characterisation_serde_tolerance.rs`, `sheet_fingerprint.rs`, `r5_6_switch.rs` green unchanged; `fingerprint.rs` construction unchanged in the diff |
|
||
| Rust rules, verdict tier (T4) | absolute on the draft: missing role, duplicate role, wrong FR or EN name on a role-bearing category each give an error issue mapped to `verification.validation.rules`; a first version with no base is judged the same; the base is never judged; `validate.rs` issue lists identical before and after on every fixture |
|
||
| Rust rules, editor tier (T4) | refused: remove a role-bearing category, change or clear its role, a duplicate role, a rename away from the fixed names, any `navigation` assignment; giving a role writes the fixed names in the same update; repair commands (insert a missing fixed category, restore fixed names, clear a duplicate role) turn every state a direct save can write into one that passes the rule |
|
||
| Rust empty sheet | `sheet.empty` creates the three categories with the ratified T5 ids, names, roles and colours and passes `sheet.check` and the T4 rule |
|
||
| Rust layer | absent keys → R3 trees identical; present `fill_opacity` changes only the twin and zone fill attributes; triggers unchanged; `svg_marker_isolation.rs` green |
|
||
| Rust snapshot (T2, T7) | `lean_document` and the export gate strip both keys; controlled widening: the snapshot reader accepts exactly the two keys with their types and range, and gives `Schema` (report kept) for any other unknown key, `null`, unknown role, out-of-range opacity |
|
||
| Equine history (T5) | conversion of an in-memory copy of the seed draft (roles on the T6 categories): seed bytes, fingerprint, alias and every review digest equal before and after; the copy differs only in the converted categories; `pnpm r5:import-equine --check` clean |
|
||
| App and N-1 | New-present sheet fixture and harness: exported PDFs pass the assertions of `n-1.reader.test.ts:178-196`; `contracts.types.test.ts` green with `ts(optional)`; `measure.test.ts` green; PDF goldens unchanged |
|
||
| SQL | the U6 migration: pgTAP with rounds of draft versions in `verifying`, `open`, `approved` before it and withdrawn after with the reason; core gate: a passed verdict with an older `verified_with` refused, the U6 marker accepted; `save_sheet_draft` accepts a draft without roles over a stored draft without roles; the approved declared check refuses a save where a role is carried by two categories, a role-bearing category lacks its fixed FR or EN name, or a role of the stored draft is lost, and accepts each repair save; `private.sheet_fixed_categories_ok` refuses approval and publication outside the fixed model; the rules epoch RPC answers; draft rounds withdrawn while the approved round of each published version stays approved; approval and publication refused without a current passed verdict; `pnpm db:sandbox up upgrade` from the current migration set; `types --check` |
|
||
| Worker | image rebuilt from `HEAD`; `verify-e2e` refuses an image whose commit label differs from `HEAD` (moved from U1) and the trial command provisions the demo sheet through the application upload path (moved from U1); `verify-e2e` with a New-absent draft (fails on `verification.validation.rules`), the same draft repaired, which then carries roles (passes), and a sheet created by the U6 `sheet.empty` (passes) |
|
||
| Write lock (T4) | on a sandbox with the old worker image and the U6 SQL: a role-less draft's round never opens (gate); a save stripping the roles of a role-bearing draft refused (save check); the U6 app on a stack without the rules epoch writes no key and creates no new-model sheet; publication and approval refused outside the fixed model even with a forged passed verdict (pgTAP) |
|
||
| Flipped suites | `sheet_verdict.rs:39-52`, `80-90`, `sheet-verification.sandbox.ts:27`, `209-211`, `373`, worker fixtures and `tests/verify_loop.rs` moved to converted in-memory copies, each change mapped in the commit message; seed unchanged |
|
||
| Navigation access (T10 option B, ratified) | `cat-access` with role `navigation` created on demand in the same core-built batch as the view and its access, only when the overlap list is empty; an edit that gives, changes or clears `navigation` refused; a second `cat-access` insertion refused; absent from the category panel and the pickers; an observable annotation in it and a second navigation category refused (edit) and reported (verdict); its role stripped from snapshots, N-1 reads the category |
|
||
| Unit and E2E app | board 07 locks (no delete, name read-only, role badge, « Couleur d'origine »); opacity slider and field synchronised, commit on release; board 09: regions from the vertebra-role category, picker filtered, staged « Appliquer (n erreurs) »; fallback « Régions vertébrales » entry when no category has the role, no duplicate entry once a Vertèbres category exists (T17); board 08 automatic access |
|
||
| Acceptance journey | a new non-equine sheet with the new UX (drawing, rectangle view, automatic access, points, zones, findings, custom opacity), saved, submitted, worker verdict passes, round `open`; its PDF exported, reopened by the app and read by N-1 (archive kept); the same journey with the roles stripped by a direct save: refused at save, the stored draft unchanged; a draft that never carried roles saves, its verdict fails and no round opens; no publication in either case |
|
||
| Recovery | a copy taken before an opacity edit restored after reload; conflict journey on a role-bearing category; « Garder ma version » with a role-less document: on a sheet whose stored draft carries roles, the save is refused by the declared check; on a role-less sheet it saves and shows the issue and the repair |
|
||
| Security | fresh review: no path writes the keys into an envelope; the SQL checks are exactly those declared under T4 and O22 as amended at U0 (contract §12.2: the save check and the approval and publication check, fixed-category invariants only); the core gate checks a version marker only |
|
||
| Accessibility | axe on board 07 and 09 states; the opacity value is exposed to assistive technology |
|
||
|
||
## U7 · Common text
|
||
|
||
Starts only with the owner's text, its source and its validation record (T12).
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Unit | insertion only into empty FR and EN fields; never overwrites; template id and version in the change note; comparison read-only; tests use a fixture text marked as a test value, under `tests/` only |
|
||
| Review | the shipped template module holds exactly the owner-supplied text; the commit cites the validation record; no other normative wording in `src/` or the dictionaries |
|
||
| E2E | insert, edit, undo, save, reload |
|
||
| Accessibility | axe on General with the comparison open |
|
||
|
||
## U8 · Closure
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Full run | common gates, `check:all`, sandbox order, `verify-e2e`, N-1 suite, frozen references unchanged, axe on every tab and state, keyboard-only journey, tablet touch journey |
|
||
| Acceptance | contract §16.7 journey re-run on the redesigned editor |
|
||
| Level-1 residuals (T11) | each tracked item re-checked and its state recorded (closed, still open, superseded by the redesign); level 1 still not declared validated as a whole |
|
||
| Paths (T16) | before the new model is activated on an environment and before U6 or U8 reaches any environment beyond the throwaway sandbox: read-only count of path geometries in its drafts and published versions recorded (sandbox by U6 itself; DEV and shared environments by the owner or under an explicit authorisation) |
|
||
| Owner trial | `V1-2-6_OWNER_TRIAL.md` updated; WebKit iPad and a real tablet by the owner |
|
||
|
||
## Curves lot (ex-U9, deferred out of V1-2.6, T16)
|
||
|
||
| Kind | Tests |
|
||
|---|---|
|
||
| Frozen reader oracle | before any change: `number_list`, `path_bounds`, `path_outline` on a corpus (fixtures, hostile paths, owner exports) recorded; compared byte for byte after the change |
|
||
| Rust conformance | every command absolute and relative; implicit repeats; M followed by pairs; H and V along and off axis; S and T kept or converted; arcs (endpoint move, λ rescale reported); Z then relative; numbers at ±2^20, exponent forms, `.5.5`, `1-2` separator merges |
|
||
| Properties (seeded) | untouched numbers keep their bytes; moving point i never changes the absolute position of point j ≠ i (exact decimal arithmetic); translate then inverse translate restores the path byte for byte; bounds after translate = bounds shifted |
|
||
| Hostile | unreadable `d`, 2 MiB `d`, unknown index, non-finite or out-of-range move; no panic |
|
||
| SQL | round-withdrawal migration, as U6 |
|
||
| E2E | fixture sheet with paths (never the seed): drag an anchor, a control, move the zone, save, reload, untouched bytes identical; remap of a crop view holding a path; preview transform during the drag, one core call on release |
|
||
| Size | gate with the figure printed |
|