docs(docs): U2 tests, plan, rendering and Rust review aligned

This commit is contained in:
bchanot committed 2026-11-18 11:23:22 +01:00
1 parent 0ca1f20452
commit 6e42d2ada1
12 files changed
+93 -53

No files matched your search

+34 -25
View File
@@ -64,7 +64,7 @@ Paths below are relative to the repository root. `core/` stands for `crates/core
| Explicit save, unsaved state, conflict dialog with M8 | `editorSave.ts:43-149`, `DraftHeader.tsx:27-153`, `ConflictDialog.tsx:105-231` | REUSE |
| Local recovery (sessionStorage, key user + version, revision in the record) | `recovery.ts:10-155`, `recoveryFlow.ts:56-187` | REUSE |
| Pan, pinch, wheel, keyboard zoom | `app/catalogue/useFraming.ts:85-168` | REUSE, keys ADAPT |
| Point and polygon move after 4 CSS px, one update on pointer-up | `useMoveGesture.ts:78-116`, `gesture.ts:5-33` | ADAPT (pointerId) |
| Point and polygon move after 4 CSS px, one update on pointer-up | before U2: `useMoveGesture.ts:78-116`, `gesture.ts:5-33`; since U2: the press machine `press.ts` and `usePressGesture.ts` | ADAPT (pointerId) |
| Point, zone and link creation by clicks | `creation.ts:93-178`, `usePlacement.ts:13-85` | ADAPT |
| Geometry accept after commit | `app/editor/issues.ts:123-175` | REUSE |
| Upload, cleaning, attach, repair | `drawingUpload.ts:86-192`, `repair.ts:60-309` | REUSE, attach ADAPT (remap) |
@@ -156,7 +156,7 @@ Node `gzipSync(bytes, { level: 9 })` on the `pkg` build, re-measured on 2026-11-
| Adding a role to `os`, `articulations`, `zone-colonne` suffices | `os` (Os / Bones) and `articulations` (Articulations / Joints) already carry the fixed names; only `zone-colonne` (Segments vertébraux / Vertebral segments) differs. Three equine annotations carry an own colour that overrides any category setting |
| Not covered | A detail view without an access is a `view.unreachable` **error** (`core/domain/sheet/validate.rs:199-220`): it blocks the fingerprint, the snapshot and publication. Under choice 6 an access not created automatically must be placed before submission |
| Recovery keyed by version and revision (contract C13) | Key = user + version; the revision is a field of the record (`recovery.ts:47-49`). Code and contract text differ |
| `useMoveGesture` has a weak pointerId check | It has none (`useMoveGesture.ts:87`): a second finger feeds the drag while the pinch zooms |
| `useMoveGesture` has a weak pointerId check | It had none (`useMoveGesture.ts:87`, removed at U2): a second finger fed the drag while the pinch zoomed. The press machine cancels the press on a second pointer |
### 1.8 SQL, RLS and worker
@@ -375,10 +375,10 @@ so it can start without a new study:
panning (the browser reads `touch-action` at touchstart, `useCanvasGestures.ts:73-83`).
- Redraw: the old shape stays drawn and committed until the new trace closes and is accepted; Escape or a refusal
keeps the old one. One undo entry.
- Undo and redo: one entry per accepted commit, whatever the tab; header buttons, shortcuts and the toast call the
same `undo()`. The toast is dismissed by any commit, undo or redo, stays until then or until closed, is reachable
by keyboard, and its message is in a live region. Sliders (point size, opacity) and arrow moves commit on release,
Enter or blur only (BDR-050), so a keyboard walk never floods the 8 MiB history (about 20 entries of the equine
- Undo and redo: one entry per accepted commit, whatever the tab; header buttons, shortcuts and the message line's
« Défaire » call the same `undo()`. The message (under the drawing, not a toast) closes after 6 s or on any commit,
undo or redo, is reachable by keyboard, and sits in a live region. Sliders (point size, opacity) and arrow moves commit on release,
Enter or blur only (BDR-050), so a keyboard walk never floods the 8 MiB history (about 47 entries of the equine
document).
- Keyboard: roving focus inside a shape (Tab enters the shape, arrows between handles when the handle list is
focused, then move the chosen handle in « move » state), Shift ×10, Insert or the visible « + » button, Delete or
@@ -462,7 +462,7 @@ Status: implemented on `feature/v1-2-anatomical-sheets` (lots A to H; Lot I, gat
Annotations; References as a side panel from the header or a finding; Undo and Redo in the header on every tab;
sidebar hidden in the editor below 1 280 px with the menu one tap away; « Aller à » retargeted.
- Files: `app/editor/tabs.ts`, `EditorTabs.tsx`, `EditorTabBody.tsx`, `DraftHeader.tsx`, `components/editor/tabs/*`,
`app/editor/verification.ts:64-131`, `PropertiesPanel.tsx:169`, `components/shell/AppLayout.tsx:72-123`,
`app/editor/verification.ts:64-131`, `PropertiesPanel.tsx:169` (removed at U2), `components/shell/AppLayout.tsx:72-123`,
`ToolColumn.tsx`, i18n.
- Dependencies: U0, T11 (ratified: level-1 trial stopped, level 1 not declared validated, residuals tracked), T15
(ratified: header undo named « Annuler la dernière modification », C11 relabelled « Abandonner les
@@ -478,16 +478,25 @@ Status: implemented on `feature/v1-2-anatomical-sheets` (lots A to H; Lot I, gat
### U2 · Direct manipulation of points and polygons
- Objective: boards 02 to 06 and 13 for points and polygons (curve handles excluded, curves lot): point move and size
slider snapping to the radii of the view with the red minimum mark; vertex drag; « + » per segment; « − » on the
chosen vertex; zone drag directly with the mouse once selected, explicit « Déplacer la zone » mode by touch; redraw
keeping the old shape until accepted; 44 px touch handles; pointer rules and keyboard of §2 G; the toast;
coordinate fields leave the normal journey.
- Files: `AnnotationOverlay.tsx` (interactive handle layer), `EditableAnnotations.tsx`, `GeometryGroup.tsx`,
`PropertiesPanel.tsx`, `TracingBar.tsx`, `ToolColumn.tsx`, `KeyboardAdd.tsx`, `useMoveGesture.ts`, `gesture.ts`,
`geometryEdit.ts`, `usePlacement.ts`, `useCanvasGestures.ts`, `app/catalogue/useFraming.ts`, a toast in
`components/ui`; core: `anatomy/frame.rs` and `domain/sheet/preview.rs` (per-view minimum visible radius in
`PreviewState`), types and wrapper.
- Status: implemented on `feature/v1-2-anatomical-sheets` (plan `.claude/tasks/plans/2026-11-17-v1-2-6-u2.md`, Tasks 1
to 9; gates and owner checkpoint, Task 10, pending). The boards are `docs/design/v1-2-6-u2/` (A1 to A15 and the three
adjustments, validated 2026-11-17).
- Objective: boards 02 to 06, 13 and 31 to 33 of `v1-2-6-u2/` for points and polygons (curve handles excluded, curves
lot): point move and size slider snapping to the radii of the view with the red minimum mark; vertex drag; « + » per
segment; « − » on the chosen vertex; zone drag directly with the mouse once selected, explicit « Déplacer la zone »
mode with four arrow buttons (A11); redraw keeping the old shape until accepted; creation by placing and tracing;
44 px touch handles and a loupe; two-finger pan with its hint (A13); pointer rules and keyboard of §2 G; a message
line under the drawing with « Défaire », 6 s, in place of the toast (A14); the properties and creation dialogs over
the right column (A1, A2); nothing lost without a question (A12); coordinate fields leave the normal journey (A8).
- Files: new `editor/annotations/{press,polygonEdit,pointSize,escape,missingFields,workStore}.ts`,
`components/editor/annotations/{EditStrip,GestureMessage,SizeSlider,MoveModeBar,HandleLayer,Loupe,AnnotationDialog,
AnnotationReadBody,AnnotationEditForm,CreationDialog}.tsx`, `e2e/support/layout.ts`; changed
`AnnotationOverlay.tsx`, `EditableAnnotations.tsx`, `usePlacement.ts`, `useCanvasGestures.ts`, `gesture.ts`,
`geometryEdit.ts`, `app/catalogue/useFraming.ts` (`twoPointerPan`, opt-in), `components/ui/Dialog.tsx` (`anchor`),
navigation, history and leave guards; removed `TracingBar.tsx`, `CreationPanel.tsx`, `PropertiesPanel.tsx`,
`AnnotationFields.tsx` and `useMoveGesture.ts` (`GeometryGroup.tsx` stays for `RepairDialog`); core:
`anatomy/frame.rs` and `domain/sheet/preview.rs` (per-view minimum visible radius in `PreviewState`), types and
wrapper. The full list is the plan's « File Structure ».
- Dependencies: U1.
- Rust ops: one read-only value (minimum visible radius per view, from the `marker_too_small` threshold,
`frame.rs:67`, `220`), so the page draws the mark without a TypeScript size rule (BDR-043, C32).
@@ -504,9 +513,9 @@ Status: implemented on `feature/v1-2-anatomical-sheets` (lots A to H; Lot I, gat
Source: owner brief of 2026-11-14, applying to annotations the principle R2 uses for findings and references.
Properties and forms live in modal dialogs; geometry stays a direct manipulation on the drawing. The gestures
validated for U2 stay binding: vertex drag, « + » on a segment, « − » on a vertex, zone move, redraw, a point's
properties. Status: orientation for the U2 design and plan. U2 is not started; its contract, boards and code wait for
the U2 planning and its owner gate. Where the objective above says `PropertiesPanel.tsx` or a side panel, this
orientation replaces it with a dialog.
properties. Status: orientation for the U2 design and plan. U2 has since been planned and built (Status above).
The first objective written for U2 named `PropertiesPanel.tsx` and a side panel; this orientation replaced them
with a dialog, and U2 built it that way.
What goes where:
@@ -562,8 +571,8 @@ choices waiting for the owner, including deviations from rules 1 and 6 above (fi
Owner validation 2026-11-17: the redrawn boards and arbitrations A1 to A15 are validated as recommended (A1 to A3
deviations included), with three adjustments for the implementation (two-finger pan hint, A13; no layout shift from
the message line, A14; validation messages naming only missing fields, board 33). U2 planning starts; U2 code waits
for the owner's approval of the U2 plan.
the message line, A14; validation messages naming only missing fields, board 33). The U2 plan (rev 3) was validated the same day and
its code is written; the owner tries it before U2 closes.
Risks to settle in the U2 plan: the slop threshold for touch versus mouse; a dialog opened by a tap at a canvas edge
on a tablet; focus return after « Modifier la forme »; the ghost's contrast under the backdrop; the handle cap (T18)
@@ -593,7 +602,7 @@ with a dialog open.
the candidate document on the preview handle, the store commits one batch on Apply, Cancel restores), delete when
unused, « Réaffecter à… » when a delete is refused (one batch of annotation updates, one undo entry); own colour of
an annotation shown only when set, with « Revenir à la couleur de la catégorie »; new annotations inherit.
- Files: `components/editor/general/CategoriesSection.tsx` (moved), `AnnotationFields.tsx:96-104`,
- Files: `components/editor/general/CategoriesSection.tsx` (moved), `AnnotationEditForm.tsx` (it replaced `AnnotationFields.tsx` at U2),
`AnnotationList.tsx:53-73`, `editorEdit.ts` (preview without commit), i18n.
- Dependencies: U1.
- Rust ops: none.
@@ -715,7 +724,7 @@ with a dialog open.
letting a path enter a document. Kept here so it can start without a new study.
- Objective: board 05 curve handles (§2 D), curved zone move, remap of paths, the C45 refusal replaced by real
correction (with the path point-correction proposal `.claude/tasks/plans/2026-11-04-v1-2-6-path-repair-core-proposal.md`).
- Files: core `anatomy/path.rs`, `ops.rs`, types, wrappers; app `AnnotationOverlay.tsx`, `useMoveGesture.ts`,
- Files: core `anatomy/path.rs`, `ops.rs`, types, wrappers; app `AnnotationOverlay.tsx`, `usePressGesture.ts`, `useZoneEdit.ts`,
`repair.ts:60-100`; SQL round-withdrawal migration (the path reader feeds the frame and interior verdict rules,
`frame.rs:25`, `interior.rs:23`); `RUST.md`.
- Dependencies: U2, U5; T1 (a lever is certain); its own owner authorisation.
@@ -769,7 +778,7 @@ robustness CONCERNS(9), simplicity CONCERNS(6); no BLOCKER. Integrated:
- Remap: the seed head drawing has the crop's exact `viewBox`, so the remap is an explicit choice, never automatic;
returned as a command batch through `commitBatch`; descendant crops and paths refused with closed codes.
- Pointer and keyboard: second pointer cancels the drag; pending previews cancelled before undo, redo, replacement
or tab change; toast dismissed on any commit; sliders commit on release; `touch-action` on handle targets; roving
or tab change; the message line closes on any commit; sliders commit on release; `touch-action` on handle targets; roving
focus, Backspace, live region; touch tests at 1 024, 1 180 and 1 280 px; handle cap.
- Sandbox safety: forbidden DEV-reaching SQL commands listed; image checked against `HEAD`; shared sandbox and
owner-trial stack rules; owner demos on a provisioned demo sheet.