docs(docs): V1-2.6 graphic editor maquettes and core feasibility audit

This commit is contained in:
bchanot committed 2026-11-05 15:16:28 +01:00
1 parent 37c9fdf6eb
commit 46ea996a61
26 files changed
+1102

No files matched your search

@@ -0,0 +1,95 @@
# V1-2.6 new editor UX: feasibility audit (read-only, 2026-11-05)
Brief « V1-2.6 : nouvelles maquettes UX approuvées sur le principe ». Read-only analysis of `crates/core` and the
V1-2.6 editor on `feature/v1-2-anatomical-sheets`; nothing built or run. Owner-facing summary in
`docs/design/v1-2-6/REVUE.md` § Faisabilité. Classes: SUPPORTED, UI-ONLY, CORE-OP MISSING, SCHEMA CHANGE.
## 1. Annotation categories: SCHEMA CHANGE (fixed categories, opacity)
- No fixed category. Equine draft: articulations #ff9500, os #a41e65, charnieres-vertebrales #ff0000, zone-colonne
#e100ff, cadrans-du-crane #1baa08; only the legacy importer names them (curation/legacy/categories.rs:15-29).
New sheet: `categories: []` (domain/sheet/create.rs:27); drawing tools disabled until one exists
(EditableAnnotations.tsx:113,138).
- Schema `{id, name, color: #rrggbb | null}` (schema.rs:219-228); `is_hex_color` = 7 chars, no alpha (domain/js.rs:180-183).
- Delete refused with `has_dependents` only while used (edit.rs:570-577, 903-908); every row has Delete
(general/CategoriesSection.tsx:108-116).
- Opacity: constants only. Point twin 0.65 main / 0.5 detail (anatomy/layer.rs:94,242), zone 0.3 (layer.rs:299),
trigger 0.06 (layer.rs:308), PDF highlight 0.85 (compose.rs:42), CSS selected 0.85 (styles/index.css:14);
ANNOTATION-RENDERING.md:25-27. No stroke-opacity.
- Displayed colour: annotation.color, else category colour, else #888888 (layer.rs:13,147-155).
- A schema change touches: ts-rs types; frozen N-1 reader `.strict()` (packages/core-wasm/tests/n-1/.../schema.ts:66-72);
PDF snapshot embeds categories (archive/snapshot_rules.rs:160-162); fingerprint = JCS of the validated document
(fingerprint.rs:1-11, equine alias :43-48); review digests (review.rs:349-382); SQL pins (migrations
20261010100000:12, 20261028110000:424); worker verdict strict read (verdict.rs:264-274); f64 breaks `Eq` on
AnnotationCategory (schema.rs:219); rendering change → ANNOTATION-RENDERING.md first, R3/R4 goldens owner decision.
## 2. Category and vertebral region: no link (UI-ONLY filter, or new rule)
- Only rule: region code exists, `annotation.region.missing` (validate.rs:348-365); also `region.code.duplicate`
(validate.rs:391), `region.count_range.invalid` (validate.rs:502-526). Code grammar: 1-16 chars, alnum, `_`, `-`,
alnum first (domain/js.rs:169-177).
- Practitioner picker keyed on `vertebral_region_code`, never on the category (domain/editor/zone.rs:101-102,
336-346; index.rs:145-164). Equine: only the 5 zone-colonne polygons carry a code.
## 3. Points: SUPPORTED (move, numeric radius); radius drag UI-ONLY
- Drag translates cx, cy after 4 CSS px, rounded 0.01 (editor/annotations/gesture.ts:5,12-22); one `update` on
pointer-up (useMoveGesture.ts:98-105; annotationCommit.ts:93-104).
- Checks after commit (issues.ts:123-175): `out_of_frame` (frame.rs:113-119,167-174), `too_small` when
2·max(2, r−12)·scale < 4 CSS px (layer.rs:260-262; frame.rs:63-67,160-165,219-221); no interior check on circles.
- r > 0 only (schema.rs:335-336). « 12 + 3 % » is a page default (editor/annotations/frame.ts:55-59).
## 4. Polygons: SUPPORTED as `update` of the points array; vertex drag / segment insert UI-ONLY
- Add vertex inserts the midpoint after the selected row (geometryEdit.ts:91-111); remove disabled at 3
(GeometryGroup.tsx:320); schema refuses < 3 (schema.rs:365-372). Overlay vertices `pointer-events-none`
(AnnotationOverlay.tsx:48-66,125).
- Checks: out_of_frame, too_small, `interior_too_small` (frame.rs:206-254; interior.rs:33-43). Self-intersection
allowed, nonzero fill decides (interior.rs:283).
- Undo: one entry per accepted commit, 8 MiB (undo.ts:7,52-74; editorEdit.ts:45-61); Ctrl+Z / Ctrl+Shift+Z
(useUndoShortcuts.ts:8-24). Preview on move, core on pointer-up (useMoveGesture.ts:90-105); < 61 ms on equine.
## 5. Paths: CORE-OP MISSING (point editing and translation)
- Core reads `d` to measure only (anatomy/path.rs:51-133): private Cursor/Pen, no segment model, no writer.
App: paths neither editable nor draggable (geometryEdit.ts:31-35; gesture.ts:32); C45 never reshaped
(repair.ts:55-70,95-100). No seed contains a path.
- Existing proposal, not built: `.claude/tasks/plans/2026-11-04-v1-2-6-path-repair-core-proposal.md`
(`sheet.path_points`, `sheet.path_move_points`, wasm 583 126 / 600 000 B gzip).
- Lossless handle editing also needs: number byte spans, relative-command compensation, H/V, implicit S/T controls,
arcs (endpoint only). Reusable: path.rs number grammar (private), `json::js_number` (json.rs:18),
`svg/number.rs:122`.
## 6. Detail views: crop SUPPORTED; derived asset not needed; remap on replacement MISSING
- `compose_canvas` clones the whole sanitised asset, root becomes `<g>` keeping defs and transforms, only the root
viewBox is the frame (compose.rs:94-160); reader strips only root class/style/transform/filter/mask/clip-path
(svg/sanitize.rs:243-249).
- Coordinates in the user space of the drawing shown (own asset, else up the parent chain) (compose.rs:74-90;
frame.rs:6-11).
- Replacement: clean_svg (crates/wasm/src/lib.rs:160) → upload → `addDrawing` (editorEdit.ts:85-104) → view
`update` of `svg_asset_id` (drawingUpload.ts:185); numbers kept, read in the new space. View box or drawing change:
geometry untouched, annotations → `to_confirm` (edit.rs:792-857); page refuses new geometry errors
(issues.ts:141-160); repair dialog only for previously unmeasured views (repair.ts:132-151, C33).
## 7. Name suggestion from a rectangle: CORE-OP MISSING
- No rectangle query or hit-test; clicks resolve through DOM `data-anno-id` (ops.rs:297,311-319;
useCanvasGestures.ts:57-64). Internal blocks: `frame::geometry_bounds`, `placement` (frame.rs:167-204), index
`name()` (index.rs:166-179). Sketch: `sheet.annotations_in_rect` {document, view_id, rect} →
[{id, name, category_id, inside|partial}].
## 8. Touch
- One pointer pans, two pinch, zoom 1-6, wheel, keyboard (catalogue/useFraming.ts:46-148; framing.ts:20);
`touch-action: none` while a tool or drag is active (useCanvasGestures.ts:76-84).
- No touch-sized handles (AnnotationOverlay.tsx:116). Move gesture has no pointerId check (useMoveGesture.ts:82-105).
- LRN-108 Chromium tap tolerance, observation only. `MIN_EDIT_WIDTH` 1024 (editor/mode.ts:21; useViewport.ts:9-13).
## 9-10. References, Général
- Only finding categories and nodes cite references (schema.rs:551,579); PDF snapshot drops them
(snapshot_rules.rs:115,133,159).
- Général: Fiche (name, description, scope disclaimer FR/EN), Attribution, Catégories (GeneralTab.tsx:22-24).
No template text anywhere; contract §7.4 « No template of scientific content is shipped »; publication needs a
non-blank disclaimer FR and EN, `publish.disclaimer.missing` (migration 20261028110000:206-214).
## 11. Reusable states
Modes edit, narrow, rights, frozen, historical, inactive (mode.ts:12-18; ModeNotice.tsx); DraftHeader statuses;
RecoveryNotice; CopyIssueNotice; ConflictDialog; BlockKind refusals (editorTypes.ts:13-23); frame refusal and repair
dialog (i18n/fr.ts:1420-1434); canvas failure (AnnotationCanvas.tsx:164-188); delete dialog.
## Constraints in force
BDR-043 (rules in Rust, no TS path parser), BDR-086, BDR-091, BDR-092, BDR-068, BDR-019, LRN-103, LRN-108; contract
§8.3 level-2 deferrals and §8.4 O14 A; `crates/**` outside V1-2.6 scope without owner approval.
+3
View File
@@ -524,3 +524,6 @@ R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_comp
- V1-2.6 lots A-M done on feature/v1-2-anatomical-sheets, HEAD 7a4ce9e. Fresh sandbox contract order green (1992 / e2e 148+46 skip / sandbox 105), check:all green, security PASS, verifier 33/34 then order fixed. Stop at owner checkpoint; R12 state files, m3, sign-out copy, labels pending owner.
- V1-2.6 owner checkpoint decisions applied (lot N: C35-C44), code 5e0aa62. Fresh sandbox contract order green (1992 / e2e 150+48 skip / sandbox 105), check:all green, security PASS, fresh verifiers: all criteria met except checkpoint-report parts. Guide run from durable worktree. Stop: ready for owner trial.
- V1-2.6 lot O: free paths never reshaped (core proposal written, not built), explicit category zone, owner trial on LAN 192.168.1.100:5193 behind a Host filter (no CORS, no ws, upgrades closed). Fresh verifier final pass CONFORME 0 NOT MET. Stop: ready for owner trial.
## 2026-11-05
- V1-2.6 new editor UX maquettes: 16 boards docs/design/v1-2-6 (desktop, tablet, phone), REVUE.md, core feasibility audit. Missing core: annotations_in_rect, path point edit/translate, remap on drawing swap; schema change for fixed categories + opacity. Reopens §8.3, O14 A, §8.2, §7.4. Design review + verifier gaps fixed. No code, no DEV. Stop at graphic checkpoint.
+3
View File
@@ -673,6 +673,9 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
- [x] L4 gates: check:all green (dcb1a94; delta = sandbox test + docs), fresh stack test-db 1965, e2e:shell 110 + 8 skipped, sandbox test 103 + 10 skipped after e2e, upgrade from M6 1965 + types match; security PASS x2; verifier ECARTS(6) -> CONFORME; two state-dependent sandbox tests fixed (0499a39, f5456f3); suites need a fresh stack in order test-db, e2e:shell, test
- [ ] V1-2.6 editor level 1: plan APPROVED by the owner 2026-11-03 (brief « GO propriétaire V1-2.6 »: 13 lots A-M, C1-C24, 8 visible choices, M8 sandbox only, no JSON export button, recovery messages exact), gated on a targeted independent re-check of the six FATAL fixes. Re-check 2026-11-03: REMAINING(2) — fixes 1-5 closed, I1-I5 hold; fix 6 (r = 12 + 3 %) opens `out_of_frame` on frames under ~25.5 units (hitbox r in frame bounds); I6 broken: the first commit overwrites a pending recovery copy before « Restaurer » / « Ignorer »; 2 MINOR (N source when the admin read fails, two-copy cap). Executor NOT launched; STOP for the owner. Owner arbitrations 2026-11-03 (« arbitrages propriétaire sur REMAINING(2) »): C25-C31 gated, plan revised; second targeted re-check: REMAINING(1), no BLOCKER, F1 MAJOR (accept trusted the core's silence on unmeasured views) + 7 MINOR, all integrated in the plan. Owner GO 2026-11-04 (« GO propriétaire après REMAINING(1) »): F1 fix approved, C26 refined by seven repair rules, minor effects approved; C32-C34 gated; execution of lots A-M authorised, no third plan review. 2026-11-04 13:08 the scratchpad worktree was removed by the harness cleanup (LRN-114): commits safe on origin (8343528), uncommitted lot H + lot G fix lost; worktree recreated at /home/bchanot/Documents/faunosteo-v1-2 (owner authorisation); resume ledger `.claude/tasks/plans/2026-11-03-v1-2-6-execution.md`. Contract `.claude/tasks/contracts/2026-11-03-v1-2-6-editor-1509.md`, plan `.claude/tasks/plans/2026-11-03-v1-2-6-editor.md`; sandbox only, no DEV, no worker on DEV, no merge, no V1-2.7; STOP at the V1-2.6 owner checkpoint (trial procedure)
- [x] A M8 draft_last_save (2f824a9) · [x] B sheet asset accessors (f7e7bf4) · [x] C preview mutators, edit ops, ids (173be59..cfd49c7) · [x] D editor store, undo, recovery (7f1d440..b14509f) · [x] E route, modes, tabs (6aba971) · [x] F Général, Références, Vertèbres (d163b2c) · [x] G views + upload (8343528, 1bbf97e, 7ea9619) · [x] H Annotations (2609785, 3f15762) · [x] I Constats (92c595c, 91d06c9) · [x] J Vérification + submit (447d0a4..3d589e1) · [x] K e2e (5097fd7..4cc27a8) · [x] L owner trial tooling (ac5fbfb) · [x] M gates, reviews, checkpoint (071b58a..7a4ce9e; checkpoint report 2026-11-04, owner trial pending) · [x] N owner checkpoint decisions (C35-C44: be4f468..5e0aa62; ready for the owner trial, guide verified from the worktree) · [x] O last decisions (C45-C48: free paths never reshaped, explicit category zone, LAN trial on 192.168.1.100:5193; a69eba5..9b86f54) · [ ] owner manual trial
- [ ] V1-2.6 new editor UX maquettes (owner brief 2026-11-05 « nouvelles maquettes UX approuvées sur le principe »; contract `.claude/tasks/contracts/2026-11-05-v1-2-6-ux-maquettes.md`): mockups + feasibility audit only, no core/app code, no DEV, no merge, no V1-2.7; STOP at the graphic checkpoint
- [x] core feasibility audit (`.claude/audits/2026-11-05-v1-2-6-ux-feasibility.md`) · [x] 16 boards + contact sheet + sources in `docs/design/v1-2-6/` · [x] REVUE.md (journey, 11 choices, contradictions, feasibility) · [x] fresh design review (6 MUST-FIX, 10 SHOULD applied; board 08 name finding wrong: frame holds Coude) + verifier ECARTS(2) U2/U9 fixed after (custom category menu, phone redraw), no re-verify · [x] commit + push branch · [ ] owner graphic checkpoint
- [ ] separate tracks kept apart: TOTP asked at sign-in; missing illustrations blocking the copy of the historical equine sheet
- [ ] MANDATORY before merging V1-2 into develop (owner 2026-11-03): registry id reconciliation. LRN-095 collides: develop 09655b2 « Port a safe runner verbatim… » (2026-11-02) vs V1-2 « pgTAP across PGlite and the real Supabase image… » (2026-10-28, cited by BDR-084 and the V1-2.1 TODO lines). BLK-013 exists on develop only (« e2e:avatar on develop reached DEV »): `memory.sh` on V1-2 would hand out BLK-013 again, so a V1-2 blocker needs its id checked against develop first. Same for the TODO release-readiness ids: RR-11 is develop's (« sandbox-only e2e follow-ups »), V1-2 uses RR-12. No renumbering during V1-2.6 unless needed; renumber one side and patch its citers at the merge
- [ ] V1-2.5 catalogue, admin space, rights, species, MFA · V1-2.6 editor level 1 · V1-2.7 preview, review, publication UI · V1-2.8 equine working copy and review preparation · V1-2.9 FR/EN acceptance and closure (owner checkpoints V1-2.3, V1-2.4, V1-2.6, V1-2.7, V1-2.8, V1-2.9 + each DEV operation of contract §16.11)
@@ -0,0 +1,34 @@
# Contract: V1-2.6 new editor UX maquettes (owner brief of 2026-11-05)
Brief « V1-2.6 : nouvelles maquettes UX approuvées sur le principe ». Deliverable: mockups and a feasibility
audit only. No change to `crates/`, `apps/`, `packages/`, `supabase/` (except reading), no DEV, no merge,
no V1-2.7. TOTP-at-login and the missing equine illustrations stay separate tracks. STOP at the graphic
checkpoint before any implementation.
## Criteria
- U1 Navigation: four tabs Général, Annotations, Constats, Vérification; views, drawings and vertebral
settings inside Annotations; references reachable from a secondary surface.
- U2 Categories: Os, Articulations, Vertèbres always present and not deletable, colour and opacity editable;
custom categories added, edited, deleted in a folding panel of Annotations; « Ajouter une catégorie » during
point or zone creation opens that panel; palette + opacity with synchronised values; annotations inherit
their category's look.
- U3 Direct editing: Point and Zone tools; points and zones moved on the drawing; radius by slider; no
coordinate shown in the normal UI.
- U4 Polygons: vertices on selection, vertex drag, + at segment midpoints, − bubble on a clicked vertex,
whole-zone move in an explicit mode, redraw tool, undo/redo for all of it; curves keep their control
points (no destructive simplification).
- U5 Touch: equivalent finger interactions on tablet and phone, handles sized for touch.
- U6 Detail views: tool, rectangle on the drawing, FR/EN name proposed, derived view framed, annotatable;
no `viewBox` numbers shown; replacement by a specific SVG; vector quality preserved.
- U7 Vertebrae: no standalone tab; « Configurer les régions vertébrales » from the Vertèbres category;
regions, codes, counts, ranges and rules kept.
- U8 Général simplified; controlled prefill of « Périmètre et limites » from a common text that never
erases sheet-specific legal or anatomical text.
- U9 Boards desktop and mobile for: main editor; point create + modify; zone create; polygon selection with
+/−; zone move and redraw; categories and colours; detail view by selection; vertebral regions; error,
read-only and save states.
- U10 Identity kept (tokens, Step 7 shell, V1-2.4 components); contact sheet, individual PNGs and sources in
`docs/design/v1-2-6/`, easy to open.
- U11 Feasibility audit against the current Rust core: missing operations named (vertex editing, path
editing, derived views, categories model), contradictions with ratified decisions listed for the owner.