fix(anatomy): V1-2.2 the visible wins on the editor canvas

Owner decision 2026-11-01. The canvas paints and hits every point hitbox,
then every zone and trigger, then every visible twin, which captures on
what it paints; a junction's disc is no longer taken by the zone drawn
after it. The PDF view keeps the document order and its bytes. Click
spec: the five fixme run unmarked, six projects incl. a 320 px phone.
This commit is contained in:
bchanot committed 2026-11-01 00:56:11 +01:00
1 parent e67715025c
commit 9c606aa567
13 files changed
+504 -64

No files matched your search

+11 -4
View File
@@ -113,10 +113,17 @@ suite needs Docker in the runner for the sandbox.
## 6. Limits
- Chromium only, but `e2e/ui/canvas-clicks.spec.ts` (V1-2.2: projects
`firefox-desktop`, `webkit-desktop`, `webkit-375`, added when
`playwright install firefox webkit` has put the pinned engines in the cache;
a missing one is named in the run's output and its projects do not run;
harness `e2e/harness/canvas.{html,tsx}`, dev server only). Firefox, WebKit
`chromium-320` (320 × 568, touch, the smallest preview the markers' visible
size is measured on), `firefox-desktop`, `webkit-desktop`, `webkit-375`, the
last three added when `playwright install firefox webkit` has put the pinned
engines in the cache; a missing one is named in the run's output and its
projects do not run; harness `e2e/harness/canvas.{html,tsx}`, dev server
only). WebKit snaps a real tap or click to whole CSS pixels (measured
2026-11-01: a tap at x 100.1 lands right of an edge at 100.4, a click at
100.9 left of it; Chromium keeps the fraction on a click, rounds a tap), so a
real press keeps 1.5 px of margin from any edge it tests; below that margin
the spec asks the browser's own hit test (`elementFromPoint`) at the exact
point. Firefox, WebKit
and the 412 × 915 viewport join every suite at V1-5
(contract §12.5). WebKit's system libraries may need `sudo` (owner action).
Desktop WebKit is not iOS Safari: the owner's manual check on a real iPhone
+31 -3
View File
@@ -4263,6 +4263,34 @@ The equine renders identically before and after (0 px, three engines, canvas and
byte-identical to `958228a`. Correction to §12.10: the class fix does not change the R4 digests; only the R4.1 call-1
`svgSha256` changes.
Open, pre-existing, owner decision: the vertebral junction points sit on the edge of zones painted and hit after them;
measured in all three engines on the plain equine sheet, 28 to 49 % of `c7-t1`, `l6-s1` and `t18-l1`'s visible disc
records the zone, 8 % of the fore fetlock's records the fore sesamoids (`fixme` in the click spec).
Junction points (open here until 2026-11-01): the vertebral junction points sat on the edge of zones painted and hit
after them; 28 to 49 % of `c7-t1`, `l6-s1` and `t18-l1`'s visible disc recorded the zone, 8 % of the fore fetlock's the
fore sesamoids. Closed by the canvas passes of §12.13.
### 12.13 Owner decisions of 2026-11-01
Brief « V1-2.2 : décisions et poursuite des corrections » on `f1bb19b`: lot B approved and committed (`4f52f5e`), the R3
transforms and the R4.1 call-1 `svgSha256` authorised (`e677150`, §12.12).
**Junctions, « the visible wins », the editor canvas only** (owner answer 2026-11-01: the PDF view is not interactive and
keeps the document order, its bytes, the R4 digests and the step6 goldens). `layer::render_canvas_layer`, drawn by
`compose_canvas`: every point hitbox, then every zone and trigger, then every visible twin, each pass in document order;
the twin captures on `visiblePainted` (its declared fill and its 1.5 stroke). `render_composed_layer` (PDF) and
`render_layer` (R3, review drawings) unchanged. Declared transform on the frozen canvas side: `with_canvas_passes`
(`tests/common/svg_tree.rs`, after `with_isolated_layer`) and `withCanvasPasses` (`tests/helpers/svgTree.ts`, inside
`withIsolatedLayer` and on each `canvas.*.layers.json` layer); the R3 highlight oracle keeps `with_isolated_layer` alone.
Visible consequence, declared: a selected point's hitbox, filled by the canvas stylesheet, sits under a neighbouring zone,
which tints the part it covers at 30 %.
| Proof | Result |
|---|---|
| `svg_marker_isolation::the_canvas_paints_hitboxes_then_shapes_then_twins_and_the_pdf_keeps_document_order` | passes sorted in both views, document order inside each pass, one twin per hitbox; the PDF view interleaved, twins `pointer-events="none"` |
| `canvas-clicks.spec.ts`, 6 projects (Chromium 1280, 375 and 320 touch, Firefox 1280, WebKit 1280 and 375 touch) | 99 passed, 0 fixme. On `e677150` (lot B alone) the junction test and the disc test fail in all 6 projects (12), the rest pass |
| junction test | `c7-t1`, `l6-s1`, `t18-l1`, fore fetlock: the centre and four points towards the disc edge (80 % of the radius, at most the radius less 1.5 px) record the point, real clicks or taps |
| disc test | every twin of the main and head views, sampled every 2 units inside 95 % of its radius: 100 % record the topmost disc, through the browser's hit test |
| zone test | every zone and the trigger, sampled every 4 units, 2 px inside their fill, away from any disc and any later shape: 100 % record the shape |
| close fetlocks | each centre records itself; the gap between their discs, inside both hitboxes, records the later hitbox (a real click where the margin is 1.5 px or more, the hit test below) |
The five `fixme` of the previous checkpoint were one test, « a click on a vertebral junction records the junction », in
each of the five projects of the time: it now runs unmarked in the six. Module: 574 234 B gzip -9 (lot B 573 134).