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

+7 -7
View File
@@ -56,7 +56,7 @@ used for delete confirmations. BDR-031 already rejected an `annotation_finding_m
### 1.3 What the editor and the core already offer
- Editor: one `selectedId` on the canvas (`app/editor/annotations/uiState.ts:14-67`), one marked annotation
(`useCanvasBuild.ts:70-83`); « Zone de constats » select in the annotation properties (`AnnotationFields.tsx:162-187`)
(`useCanvasBuild.ts:70-83`); « Zone de constats » select in the annotation properties (`AnnotationFields.tsx:162-187` at the time, since U2 `AnnotationEditForm.tsx`, `finding_zone_id`)
and at creation (`CreationFields.tsx:141-161`); the Constats tab as an ARIA tree over `buildItems`
(`app/editor/findings/tree.ts:161-196`), creation of zones, families and findings (`FindingCreateForm.tsx`); no search,
no filter, no link between the two tabs; the Annotations tab cannot create a finding zone.
@@ -96,7 +96,7 @@ No integration point has to be added to U1, and no amendment of the U1 plan is p
are already in the plan:
- `navigate(target)` with `zone`, `finding` and `annotation` keys (`targetOfKey`, U1 plan §1) gives both directions of
the jump; `PropertiesPanel` receives `navigate` from Lot B1 (its unmeasured-view link is retargeted there).
the jump; the annotation dialog and the strip receive `navigate` from Lot B1 (the strip's unmeasured-view link is retargeted there; `PropertiesPanel` was removed at U2).
- The Constats tab stays mounted (U1 plan §2), so search and drawing filters survive tab changes without any store.
- `usePlaceVisible()` and the « one composed copy of a view » rule (U1 plan §2) cover the filter panel's drawing: it
detaches while its place is hidden, and the Annotations drawing is hidden while Constats is shown.
@@ -133,14 +133,14 @@ before U3, with its own contract, tests and checkpoint, on its own owner authori
Not started.
- Why after U2: U2 rewrites the selection, pointer and keyboard model of the same canvas and the same
`PropertiesPanel`; the Constats segment sits in that panel and the drawing filter reuses the pointer rules
properties (`AnnotationDialog.tsx` since U2); the Constats segment sits in that dialog and the drawing filter reuses the pointer rules
(§2 G of the UX plan: a second pointer cancels, arrows pan only on the canvas box).
- Why before U3-U6: none of them changes the zone link or the findings tree; U3 and U6 touch `AnnotationFields`
- Why before U3-U6: none of them changes the zone link or the findings tree; U3 and U6 touch `AnnotationEditForm`
(colour, roles, region picker), not the zone field nor the Constats tab; U4 and U5 add views, which the view chips
list by construction; U6's internal `cat-access` and the detail triggers never carry findings, so they never appear
as filter choices.
- Alternative: after U6 (less rework risk in `AnnotationFields`, later delivery).
- Files: `app/components/editor/annotations/{PropertiesPanel,EditableAnnotations,ConstatsSegment (new),
- Alternative: after U6 (less rework risk in `AnnotationEditForm`, later delivery).
- Files: `app/components/editor/annotations/{AnnotationDialog,AnnotationReadBody,EditableAnnotations,ConstatsSegment (new),
ZoneLink (new)}.tsx`, `app/components/editor/tabs/FindingsTab.tsx`, `app/components/editor/findings/{FindingTree,
FindingDetail,FindingContent,FindingCreateForm,FindingsSearch (new),SchemaFilterPanel (new)}.tsx`,
`app/editor/findings/{tree,filter (new)}.ts`, `app/editor/annotations/zoneIndex.ts` (new), the canvas marking state,
@@ -252,7 +252,7 @@ differ, the ratification brief prevails. Owner sentences are quoted verbatim. Th
| Id | Question | Boards | Alternatives | Recommendation | Technical consequences | State |
|---|---|---|---|---|---|---|
| F1 | Sub-step | 17-22 | (a) dedicated U2b after U2, before U3; (b) after U6: less rework in `AnnotationFields`, later delivery; (c) inside U2: one larger sub-step mixing gestures and findings | (a) | Own contract, tests (section 6) and owner checkpoint; depends on U1 (navigation, kept-mounted Constats tab, `folded`) and U2 (selection, pointer and keyboard model of the canvas and of `PropertiesPanel`); no Rust op, wasm budget unchanged; U3 to U6 unaffected (section 4); listed in `V1-2-6_UX_PLAN.md` §3 | approved: « F1 : placement U2b approuvé. » and « Retenir une sous-étape U2b « Annotations et constats », après U2 et avant U3, avec son propre contrat, ses tests et son checkpoint. » Implementation not authorised |
| F1 | Sub-step | 17-22 | (a) dedicated U2b after U2, before U3; (b) after U6: less rework in `AnnotationEditForm`, later delivery; (c) inside U2: one larger sub-step mixing gestures and findings | (a) | Own contract, tests (section 6) and owner checkpoint; depends on U1 (navigation, kept-mounted Constats tab, `folded`) and U2 (selection, pointer and keyboard model of the canvas and of the annotation dialog); no Rust op, wasm budget unchanged; U3 to U6 unaffected (section 4); listed in `V1-2-6_UX_PLAN.md` §3 | approved: « F1 : placement U2b approuvé. » and « Retenir une sous-étape U2b « Annotations et constats », après U2 et avant U3, avec son propre contrat, ses tests et son checkpoint. » Implementation not authorised |
| F2 | What the counters count | 17, 20, 21, 22 | (a) every finding node at any depth, groups included (boards: grasset 29, « restriction » 108 of 730); (b) leaves only, the findings a practitioner can tick (grasset 25, 81 of 627); (c) families or zones | (b), decided 2026-11-06 (was (a) in commit 567da67) | One counting function over `buildItems` for the segment, the search count, the filter count and, under F18 (a), the no-result count; a finding counts when it is a leaf (no children, the picker's test, `app/components/observation/FindingsTreePicker.tsx:35`); identity is the zone id and the node path, never the label, so a zone shown by several annotations counts once and two findings with the same label count twice (F8); the boards show (a) and stay as they are until U2b | approved: « F2 — Compter uniquement les feuilles sélectionnables de l'arbre des constats, sans les groupes intermédiaires. Les doublons dus à plusieurs annotations d'une même zone doivent être éliminés. » (second brief, completing « F2 : les compteurs portent sur les constats réels à toute profondeur, sans compter les conteneurs de familles et sans doublonner les constats associés à une même zone par plusieurs annotations. ») |
| F3 | Search scope | 20 | Per field, language and word rule: section 7.2 | changed 2026-11-06: names of zones, families and findings at every level, French and English; a name match on a zone, family or group keeps everything under it; every typed word must match, in any order; descriptions, references, ids, annotation names, kind labels, status and flags not searched (7.2). Was: finding names in French and English, a zone name match showing all its findings, descriptions and references not searched | A page filter over `buildItems` and `folded` (no core op; same boundary as `filterCatalog`, BDR-043, BDR-095), memoised on the parsed document and the query; `folded` gains œ → oe, æ → ae and ’ → ' (7.2) at U2b, shared with the catalogue search (U1 Lot C only exports it); a row matched only in the other language shows its interface-language name and, beside it, the matched name | approved: « F3 — Recherche en français et en anglais, sur les noms des zones, familles, groupes et feuilles. Recherche insensible aux accents et à la casse. Tous les mots doivent correspondre, dans n'importe quel ordre, y compris lorsqu'ils apparaissent à différents niveaux de l'arbre. » (first brief: « F3 : recherche instantanée, insensible aux accents et à la casse. »). Details decided (ratification brief): « F3 : recherche normalisée entre catalogue et constats, avec équivalence œ/oe, æ/ae et apostrophes droites/typographiques. Une correspondance trouvée uniquement dans l'autre langue doit afficher aussi le libellé correspondant. » (interrupted brief: « F3 : harmoniser la recherche avec le catalogue. Équivalence œ/oe, æ/ae, apostrophes droites/typographiques, accents et casse. Si une correspondance n'existe que dans l'autre langue, afficher également le libellé correspondant. ») |
| F4 | Drawing filter semantics | 21, 22 | Model A (facets, board 21) or model B (picks only): section 7.3 | changed 2026-11-06: model A with the rules of 7.3, decided (was: views give all their zones until a pick, text AND drawing, applied at each click) | Filter state = chosen views and picked annotation ids, held by the kept-mounted Constats tab; zone set derived at each render from the current document; text AND drawing; picked zones by union, each once; no core op | approved: « F4 — Valider le modèle A. Sans annotation cochée, les vues sélectionnées filtrent les zones représentées. Dès qu'une annotation est cochée, les zones explicitement sélectionnées déterminent le filtre anatomique. Combiner ce filtre avec la recherche textuelle par intersection. » (first brief: « F4 : filtres texte et anatomiques combinés par intersection ; plusieurs zones anatomiques sélectionnées produisent une union sans doublon. »). Rules of 7.3 that name F10, F16, F17 or F20 follow those decisions once taken |