From 604f502b448b27ff9bba737dba425852f456b08d Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 6 Nov 2026 14:56:49 +0100 Subject: [PATCH] docs(docs): U2b principle, decisions F1-F22, F2/F3/F4 detail, U2b sub-step Owner principle validation recorded: U2b after U2; full decision table with alternatives, consequences and state; F2 groups, F3 field list and F4 view semantics computed from the equine draft; boards shown with their decisions. --- docs/design/README.md | 2 +- docs/design/v1-2-6-constats/REVUE.md | 21 +- docs/development/V1-2-6_UX_DECISIONS.md | 3 + docs/development/V1-2-6_UX_FINDINGS_NAV.md | 240 ++++++++++++++++++--- docs/development/V1-2-6_UX_PLAN.md | 22 +- 5 files changed, 246 insertions(+), 42 deletions(-) diff --git a/docs/design/README.md b/docs/design/README.md index 9f63f4d2..406b9729 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -134,4 +134,4 @@ review (contract `.claude/tasks/contracts/2026-11-05-v1-2-6-ux-corrections.md`): interaction, counters computed from the draft data; boards `12` and `15` unchanged. `ARBITRAGES.md` separates the owner-confirmed choices from the open ones; `ETUDE-TECHNIQUE.md` lists the prerequisites before any development. -`v1-2-6-constats/` (proposition, non validée, 2026-11-06): boards 17-22, annotations ↔ findings complement; study `docs/development/V1-2-6_UX_FINDINGS_NAV.md`. +`v1-2-6-constats/` (proposition de conception U2b, 2026-11-06; principe approuvé par le propriétaire le 2026-11-06, planches non validées graphiquement): boards 17-22, annotations ↔ findings complement; study and decisions F1-F22 `docs/development/V1-2-6_UX_FINDINGS_NAV.md`, boards shown with their decisions in its section 7.4. diff --git a/docs/design/v1-2-6-constats/REVUE.md b/docs/design/v1-2-6-constats/REVUE.md index 7ad925ad..1acf39f2 100644 --- a/docs/design/v1-2-6-constats/REVUE.md +++ b/docs/design/v1-2-6-constats/REVUE.md @@ -1,8 +1,8 @@ -# V1-2.6 complément : annotations et constats (proposition, non validée) +# V1-2.6 complément : annotations et constats (proposition de conception U2b, principe approuvé) Brief propriétaire du 2026-11-06 « Nouvelle exigence UX : navigation bidirectionnelle entre annotations et constats ». -Contrat `.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-design.md`. Étude, placement, risques, tests et -décisions F1 à F21 : `docs/development/V1-2-6_UX_FINDINGS_NAV.md`. Aucun code n'est écrit avant l'approbation. +Contrats `.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-design.md` et `…-findings-nav-decisions.md`. Étude, +placement, risques, tests et décisions F1 à F22 : `docs/development/V1-2-6_UX_FINDINGS_NAV.md`. Aucun code n'est écrit avant l'approbation. | Fichier | Contenu | |---|---| @@ -50,3 +50,18 @@ Conventions : - Vérificateur neuf, tour 3 : CONFORME (9 critères sur 9). Ses observations hors critères ont été traitées ensuite : nom de l'accès aligné sur la règle du cœur (19 C), libellé « Catégorie » de l'onglet Constats vérifié et cité (F7). Les fonctions copiées et inutilisées des planches validées restent dans la source, sans effet sur les rendus. + +## Validation de principe (2026-11-06) + +- Le propriétaire approuve le principe (brief « Validation de principe U2b et préparation des checkpoints ») et retient + la sous-étape U2b « Annotations et constats », après U2 et avant U3. Les six planches restent la proposition de + conception de U2b, sans changement ; elles ne sont pas validées graphiquement. +- Décisions : F1, F2, F6, F8 et F22 (zone préselectionnée) approuvées, F7 pour le terme « Famille », F3 et F4 en + partie ; F5 et F9 à F21 restent à décider (`docs/development/V1-2-6_UX_FINDINGS_NAV.md`, section 7). Les planches + comptent les groupes intermédiaires (lecture (a) de F2, question encore ouverte) et cherchent sur les noms français des constats ; + l'étude donne les chiffres des autres lectures (7.1 à 7.3). +- Revue avec les décisions : section 7.4 de l'étude (planches en images, avec les décisions de chacune), lisible + dans tout aperçu Markdown. +- Portée du verdict CONFORME 9/9 : il porte sur l'état jugé au tour 3, avant le commit 567da67. Les modifications de + 567da67 (nom de l'accès en 19 C, citation de F7, texte de ce fichier) n'étaient couvertes par aucune vérification + indépendante au moment de la validation de principe. diff --git a/docs/development/V1-2-6_UX_DECISIONS.md b/docs/development/V1-2-6_UX_DECISIONS.md index 1fb5eecf..bfdba5f9 100644 --- a/docs/development/V1-2-6_UX_DECISIONS.md +++ b/docs/development/V1-2-6_UX_DECISIONS.md @@ -9,6 +9,9 @@ was authorised on 2026-11-05; every later sub-step starts only on a new explicit ## Owner decisions +The annotations and findings complement (sub-step U2b) has its own table, F1 to F22, in +`V1-2-6_UX_FINDINGS_NAV.md` section 7 (BDR-103). + | Id | Question | Owner answer (2026-11-05) | State | Blocks | |---|---|---|---|---| | T1 | Fallback if the wasm budget is exceeded | not asked; conditions kept (brief U0); measuring rule recorded (LRN-118) | open, used only if a measure exceeds 600 000 B | U5, U6 if a measure exceeds | diff --git a/docs/development/V1-2-6_UX_FINDINGS_NAV.md b/docs/development/V1-2-6_UX_FINDINGS_NAV.md index 439fbe98..9abfbf7e 100644 --- a/docs/development/V1-2-6_UX_FINDINGS_NAV.md +++ b/docs/development/V1-2-6_UX_FINDINGS_NAV.md @@ -1,10 +1,15 @@ # V1-2.6 UX complement: navigation between annotations and findings -Status: PROPOSAL for the owner, 2026-11-06 (brief « Nouvelle exigence UX : navigation bidirectionnelle entre -annotations et constats »). Design only: no application, Rust, SQL or worker change; nothing here authorises code. +Status: PRINCIPLE APPROVED by the owner, 2026-11-06 (brief « Validation de principe U2b et préparation des +checkpoints », after the brief « Nouvelle exigence UX : navigation bidirectionnelle entre annotations et constats »): +sub-step U2b retained (F1); F2, F6, F8 and the zone preselection (F22) approved, F7 approved for the term +« Famille », F3 and F4 approved in part; F5 and F9 to F21 to decide (section 7). Design only: no application, Rust, +SQL or worker change; nothing here authorises code, and U2b starts only on its own owner authorisation. The U1 plan (`.claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md`, commit 2e46c14) is unchanged by this track. -Contract: `.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-design.md`. Boards: -`docs/design/v1-2-6-constats/` (17 to 22, after the 16 validated v1-2-6 boards). +Contracts: `.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-design.md` (design), +`.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-decisions.md` (decisions). Boards: +`docs/design/v1-2-6-constats/` (17 to 22, after the 16 validated v1-2-6 boards), kept as the U2b design proposal; +section 7.4 shows them with the decisions of section 7. Paths: `core/` stands for `crates/core/src/`, `app/` for `apps/app/src/`. @@ -95,15 +100,33 @@ are already in the plan: - The secondary panel slot of the references panel (U1 plan §5) is where the filter panel goes; the reducer gains a second panel kind when this feature lands, a local change (owner precision 10: no global navigation rebuilt). Watch item for the U2b executors: the filter panel is a variant, not a copy: no scrim and no `inert` on the tab panels - (F5: the tree stays live), unlike the references panel. + (under F5 (a): the tree stays live), unlike the references panel. One watch item for the U1 executors, with no plan change: keep the Constats tab's selection, expansion and future filter state local to the kept-mounted `FindingsTab` (as the plan already does), not in the navigation reducer. +Re-checked on 2026-11-06 against the plan at 2e46c14 (owner: « Ne pas modifier le plan U1 si les points +d'intégration déjà prévus suffisent réellement »), line numbers of the plan file: + +- Jump to Constats: `targetOfKey` sends `zone` and `finding` keys to the findings tab (:93-95); `go_to` sets a focus + request with a serial (:103-104), applied once by `useFocusRequest` (:105-110). +- Jump to the drawing: an `annotation` key goes to Annotations, section `drawing` (:93-95). Opening the « Constats » + segment on arrival is U2b's own handling of that request, not a U1 field. +- Filters kept across tabs: every visited tab stays mounted in a `KeptPlace` (:135-150). +- Drawing inside the filter panel: `usePlaceVisible()` detaches a hidden canvas (:150-153), so one composition of a + view is live at a time. +- Search fold: `folded` exported in Lot C (:439). +- Second panel: the references panel's container and reducer actions (:102, :233-262). + +What U2b adds to U1's code, in its own commits: under F5 (a), a second panel kind beside `references` in `navigationReducer` and +`EditorTarget`, and the segment choice carried by its focus handling. Both are additions that leave U1's behaviour +unchanged, so neither is a U1 amendment. Conclusion unchanged: no U1 integration point to add. + ## 4. Placement (work item 2) -Recommended: a dedicated sub-step **U2b · Annotations et constats**, after U2 and before U3, on its own owner -authorisation. +Retained by the owner on 2026-11-06 (F1): a dedicated sub-step **U2b · Annotations et constats**, after U2 and +before U3, with its own contract, tests and checkpoint, on its own owner authorisation (`V1-2-6_UX_PLAN.md` §3). +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 @@ -127,7 +150,7 @@ authorisation. derivation over the 500 ms budget. - Acceptance (proposal): boards 17-22 built; A and B work with mouse, touch from 1 024 px and keyboard; every finding change undoable as one entry; filters never change the document; read-only modes show no edit control; axe clean. -- Owner demo: select the grasset, read its 29 findings, add one, undo it; search « restriction »; filter on grasset and +- Owner demo: select the grasset, read its 29 findings (25 under F2 (b), section 7.1), add one, undo it; search « restriction »; filter on grasset and jarret; reset; jump both ways. - Rollback: revert of the sub-step's commits (no data, no schema). @@ -138,12 +161,12 @@ authorisation. | Editing findings from annotation A changes them for every annotation naming the zone | medium | the segment names the zone and lists the other annotations (board 17, 19 D); edits go to the zone, never copied | | Changing an annotation's zone changes what practitioners are offered and turns the annotation `to_confirm` (`edit.rs:495-509`) | medium | the change goes through the existing field and its review rule; old reports keep their zone id and path (`core/domain/report/rebase.rs:148-157`, BDR-010) | | Search results ambiguous (repeated labels across 27 zones) | high | results always shown under their zone and family; the count names zones too | -| Count unit undefined (zones, families, findings, leaves) | high | decision F2 (recommendation: findings at any depth) | +| Count unit undefined (zones, families, findings, leaves) | high | F2 approved (findings, not families, each zone once); groups or leaves still open (section 7.1) | | Multi-annotation marking needs a new page state on the composed canvas | medium | page-side restyle only (BDR-053), `ANNOTATION-RENDERING.md` updated before the code | | A third composition of a view in the page (filter panel) | medium | U1's detach-while-hidden rule; one visible composition per view at a time | | Kept-mounted Constats tab recomputing filters on each commit | low | memoised on the parsed document and the filter state; measured with the U1 commit-to-paint check (500 ms budget) | | Duplicates never exercised by the equine data | high | unit and e2e fixtures with two annotations on one zone (main + detail, left + right), modelled on the core's synthetic fixtures | -| Terminology: « zone » is an annotation kind and a finding zone; « catégorie » is an annotation category and a family | high | labels « Zone de constats » and « Famille » proposed (decision F7), kept apart from « Zone » (shape) and « Catégorie » (colour category) | +| Terminology: « zone » is an annotation kind and a finding zone; « catégorie » is an annotation category and a family | high | « Famille » approved (F7), « Zone de constats » proposed, kept apart from « Zone » (shape) and « Catégorie » (colour category) | | Creating a zone from an annotation is two changes (zone, link) | medium | one batch commit, all or nothing, one undo entry (decision F8) | | Rework if U2, U3 or U6 change the panel structure afterwards | medium | placement after U2 (section 4) | | Laterality: a left and a right annotation on one zone show the same findings | low | expected (findings carry no side; the report adds it); stated in the segment's help | @@ -157,7 +180,9 @@ authorisation. (families in order, counts, add and edit through the existing commands, one undo entry each, change of zone, null zone, detail trigger disabled with its reason, read-only in every read-only mode); « Ouvrir dans Constats » and « Sur le schéma » focus requests (found, kept, none); filters absent from the document text and from the leave - guard; filter state kept across tab changes and pruned when an undo removes a filtered zone or annotation. + guard; filter state kept across tab changes and pruned when an undo removes a filtered zone or annotation; the + rules of sections 7.2 and 7.3 once ratified (words in any order, ancestor names, œ and ’ folded, both languages, + views with and without picks, a view deselected with picks on it, triggers and annotations without zone). - E2E (sandbox): grasset journey (select, read, add, undo, edit, change zone and back); search with count; drawing filter with mouse and touch at 1 024 and 1 180 px; keyboard-only filter through the list; reset; both jumps; narrow read-only at 375 px (search and list filter, no edit control); no horizontal scroll at 1 024, 1 180, 1 280, 375 px. @@ -166,33 +191,178 @@ authorisation. - Regression: C9 (findings detail), C13 (recovery), C14 (history bound), C16 (narrow read-only), the U1 suites; the core suites unchanged (no core change); `pnpm r5:import-equine --check` unchanged. -## 7. Decisions to take (owner) +## 7. Decisions F1 to F22 (owner) -None is decided by this proposal; each has a recommendation (F1 to F21). +Owner brief « Validation de principe U2b et préparation des checkpoints » (2026-11-06): principle of the +bidirectional navigation approved; F1, F2, F6 and F8 approved, F7 approved for the term « Famille », F3 and F4 +approved in part; the zone preselection added as F22. F5 and F9 to F21 stay to decide: their recommendations are +not owner decisions. Owner sentences are quoted verbatim. The « Question » column keeps the study's wording of commit +567da67; a recommendation changed since that commit says « changed 2026-11-06 ». Counts come from the equine draft +`document.json` (a finding = a finding node at any depth; a leaf = a node without children). -| Id | Question | Recommendation | +| 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 | +| 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 | changed 2026-11-06: (b), see 7.1 (was (a)) | One counting function over `buildItems` for the segment, the search count, the filter count and, under F18 (a), the no-result count, grouped by zone id so a zone shown by several annotations counts once; (b) uses the picker's leaf test (`app/components/observation/FindingsTreePicker.tsx:35`); the boards show (a) and stay as they are until U2b | approved: « 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. » Open point: whether the intermediate groups are containers (7.1) | +| 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 œ, æ and ’ (7.2), shared with the catalogue search; a row matched only in the other language shows that name | partially approved: « F3 : recherche instantanée, insensible aux accents et à la casse. » To ratify: the field list, the word rule and the language rule (7.2) | +| 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 (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 | partially approved: « F4 : filtres texte et anatomiques combinés par intersection ; plusieurs zones anatomiques sélectionnées produisent une union sans doublon. » To ratify: the view semantics (7.3) | +| F5 | Filter panel | 21 | (a) non-modal right panel without scrim, the tree live (board 21); (b) modal dialog over the tab (`ModalDialog`, D13), the tree hidden while choosing; (c) a section above the tree, no panel (small drawing, long scroll) | (a) | A second panel kind beside `references` in U1's navigation reducer (an addition, section 3); unlike the references panel, no scrim and no `inert` on the tab panels; one secondary panel at a time; Escape and ✕ close it, focus back to « Filtrer sur le schéma »; opening « Références » closes it and the filter stays active as a chip (unchanged since 567da67); one live composition of a view at a time (U1 plan §2) | to decide | +| F6 | Below 1 024 px | 22 | (a) consultation: search and filter, zones chosen in a list with 44 px targets, no selection on the drawing; (b) search only, no drawing filter; (c) picks on the drawing by touch as well | (a) | The same filter state with the list renderer only; O14 A unchanged; e2e at 375 px; no edit control | approved: « F6 : sous 1 024 px, consultation et filtres par liste, aucune édition graphique. » | +| F7 | Labels | 17, 18, 19, 20 | For a finding category: (a) « Famille »; (b) « Catégorie de constats », today's label; (c) « Groupe », which clashes with the intermediate groups | a detail trigger keeps the core's display name (its own, else the name of the view it opens, `core/domain/sheet/index_data.rs:39`, `core/domain/sheet/index.rs:167-179`), « Constats » for the segment, « Zone de constats » for the link, « Famille » for a finding category, « Filtrer sur le schéma », « Réinitialiser les filtres » | U2b renames the Constats tab's « Catégorie de constats », « Ajouter une catégorie », « Nouvelle catégorie dans la zone « {zone} » », « Type de catégorie », the required-fields message « … le type d'une catégorie » and « Créez d'abord une zone pour ajouter une catégorie. » (`app/i18n/fr.ts:1475`, `:1478`, `:1481`, `:1483`, `:1488-1489`, `:1491-1492`) and their English pairs, and checks the Vérification label « catégories et nœuds de constats » (`:1609`); unit and e2e selectors on these texts follow; « Catégorie » stays for annotation categories (colour) | approved for the term « Famille »: « F7 : « Famille » désigne les familles de constats, distinctes des catégories anatomiques. » The other labels of the row stay proposals for the label review (C44) | +| F8 | Creating a zone from an annotation without one | 19 | (a) allowed from the segment: one batch creating the zone named after the annotation (editable) and the link, one undo entry; (b) link to an existing zone only, creation stays in the Constats tab; (c) two steps, two undo entries | (a) | `commitBatch` (`app/editor/state/editorEdit.ts:40-62`, already used by `app/editor/repair.ts:307`): the core applies both commands on a scratch text and the store keeps the end text only when the core accepts it, one history entry, nothing kept on refusal; no core op. The core refuses a duplicate id at insertion (`core/domain/sheet/edit.rs:309-310`, `:370`; issue code `finding_zone.id.duplicate`, `validate.rs:405`), not a duplicate name, so « sans doublon silencieux » becomes a page notice: a typed name that folds to an existing zone's name names that zone and offers to link it instead; the action is disabled while its commit runs; linking a zone another annotation already shows goes through F15's notice if F15 (a) is retained; the annotation turns `to_confirm` as on any change (`core/domain/sheet/edit.rs:495-509`) | approved: « F8 : l'association d'une annotation dépourvue de zone passe par une opération logique atomique, validée et annulable, sans doublon silencieux. » The duplicate-name notice is the proposed reading of « sans doublon silencieux », to confirm in the U2b contract | +| F9 | Editing a finding from the drawing | 18 | (a) in the side column, with the shared detail component (board 18 B); (b) always in the Constats tab, through « Ouvrir dans Constats »; (c) names only, inline in the segment | (a) | `FindingDetail` and `FindingContent` reused, not copied (C9); one commit per field on blur (BDR-050); width measured at 1 024 px before any CSS (LRN-094); its references button opens the U1 panel | to decide | +| F10 | Filter lifetime | 20 | (a) while the page lives, tab changes included; cleared by « Réinitialiser les filtres » and on reload; (b) also kept per sheet in session storage across reloads; (c) cleared at each tab change | (a) | State local to the kept-mounted `FindingsTab` (U1 plan §2), never in the navigation reducer, the document, the recovery copy or the leave guard; pruned at render from the current document | to decide | +| F11 | « Sur le schéma » from a zone named by several annotations | 19, 20 | (a) the first in document order, the others listed in the segment; (b) a chooser before the jump; (c) all of them selected, which U2's single selection does not allow | (a) | `navigate` with the annotation key (U1 plan §1); a zone index (zone → annotations in document order) gives the first; the canvas switches to that annotation's view | to decide | +| F12 | Multi-annotation marking in the filter panel | 21 | (a) accent outline and check disc (board 21); (b) a change of fill colour; (c) no mark on the drawing, chips only | (a) | A new page state written in `docs/ANNOTATION-RENDERING.md` before any code; page-side restyle (BDR-053), no core change; stroke contrast measured by hand (axe does not check SVG strokes) | to decide | +| F13 | Finding detail while the filter panel is open | 21 | (a) hidden, the tree takes the width; (b) kept, the panel narrower; (c) the panel over the detail | (a) | Layout derived from the panel state; the selection is kept and the detail comes back when the panel closes | to decide | +| F14 | Grouping of the keyboard list of annotations | 22 | (a) by annotation category (colour), with a caption; (b) by view; (c) one flat alphabetical list | (a); a finding family cannot group annotations, since each family belongs to one zone | Native checkboxes on the same state as the drawing, each named with the annotation and its zone | to decide | +| F15 | Choosing a zone already shown by another annotation | 19 | (a) allowed, with a notice naming the other annotation before the change; (b) allowed silently; (c) refused | (a) | The page reads the zone index; the core accepts several annotations per zone (no uniqueness rule, `docs/development/ANATOMICAL_SHEET_MODEL.md:102-103`); (c) would be a new model rule, a document change that request C rules out without a demonstrated need | to decide | +| F16 | « Constats » segment of a detail trigger | 19 | (a) shown disabled with its reason; (b) hidden | (a) | `aria-disabled` with the reason as its description; the same panel layout for every annotation | to decide | +| F17 | Partial clears beside the general reset | 21, 22 | (a) « Effacer la sélection », « Retirer le filtre du schéma », a ✕ on each filter chip and « Réinitialiser les filtres »; (b) the general reset only; (c) the chips only | (a) | Four actions on one state (7.3, rule 10), one test each | to decide | +| F18 | No-result state | 22 | (a) the count outside the drawing filter and an offer to remove it (board 22 A); (b) « Aucun résultat » only | (a) | A second pass of the same filter without its drawing part | to decide | +| F19 | Zone picker of « Changer » | 19 | (a) current zone first with « zone actuelle », then document order, with the number of annotations per zone; (b) alphabetical; (c) search only | (a) | List built from the zone index, searchable with the F3 fold | to decide | +| F20 | Other annotation of a picked zone in the filter | 19, 21 | (a) dashed outline, the zone counted once (board 19 D); (b) the same mark as the picked one; (c) no mark | (a) | A third marking state in `docs/ANNOTATION-RENDERING.md`; never exercised by the equine draft, so synthetic fixtures (section 6) | to decide | +| F21 | How search results are shown | 20, 21 | (a) the tree with branches folded, ancestors in grey, highlights, a count and « Sur le schéma » per zone, and a compact list per zone while the filter panel takes the width (boards 20, 21); (b) the tree always; (c) a flat list always | (a) | Two renderers of one result set; the tree keeps its WAI-ARIA tree keyboard model; the compact list is a plain list of links | to decide | +| F22 | Zone of a finding added from a selected annotation (owner, 2026-11-06) | 18 | (a) the annotation's zone, with no zone field in the form (board 18 A); (b) the zone preselected in a field the user may change | (a), as board 18 A; (b) is the literal reading of « préselectionner » | (a): `FindingCreateForm` gains a fixed-zone mode (zone given, no zone field, family list of that zone only); (b): the same form with its zone field set to the annotation's zone; the Constats tab's form unchanged | approved: « Lorsqu'une annotation est sélectionnée et que l'utilisateur ajoute un constat, préselectionner sa zone de rattachement. Ne pas imposer une seconde sélection inutile. » Open: the form variant, (a) or (b), to confirm before or in the U2b contract | + +### 7.1 F2: the groups between a family and its findings + +The draft holds 730 finding nodes: 627 leaves and 103 groups, a group being a node with children (« Restrictions de +sutures » over five sutures, for example). A practitioner ticks leaves only: the picker draws a checkbox for a leaf +and opens a group (`app/components/observation/FindingsTreePicker.tsx:35`, `:195-203`, `:239-246`), and the report records the +node clicked (`core/domain/editor/finding.rs:50-63`). The boards count groups (note of board 17: « les groupes oui »). + +| Count | (a) every node | (b) leaves only | |---|---|---| -| F1 | Sub-step | dedicated U2b after U2 (alternative: after U6) | -| F2 | What the counters count | findings at any depth; families and zones are not counted as findings; the result line also names the zones (« 108 constats sur 730, dans 26 zones ») | -| F3 | Search scope | finding names in French and English, accents and case ignored; a zone whose name matches shows all its findings; descriptions and references not searched | -| F4 | Drawing filter semantics | the chosen views give the drawings to pick on, and all their zones while nothing is picked; once one annotation is picked, only the picked zones count; text and drawing combine with AND; applied at each click, no « Appliquer » | -| F5 | Filter panel | non-modal right panel without scrim (the tree stays live); one secondary panel at a time (opening « Références » closes it, the filter stays active as a chip) | -| F6 | Below 1 024 px | consultation: search and filter available, zones chosen in a list (44 px targets), no selection on the drawing | -| F7 | Labels | a detail trigger keeps the core's display name (its own, else its view's, `core/domain/sheet/index_data.rs:39`), « Constats » for the segment, « Zone de constats » for the link, « Famille » for a finding category (today the Constats tab says « Ajouter une catégorie » and « Type de catégorie », `app/i18n/fr.ts:1478`, `:1483`, to align at the label review), « Filtrer sur le schéma », « Réinitialiser les filtres » | -| F8 | Creating a zone from an annotation without one | allowed, one batch (zone with the annotation's name, editable, then the link), one undo entry | -| F9 | Editing a finding from the drawing | in the side column, with the shared detail component; « Ouvrir dans Constats » for the tree context | -| F10 | Filter lifetime | kept while the page lives (tab changes included), cleared by « Réinitialiser les filtres » and on reload; a filtered zone or annotation removed by an undo leaves the filter silently narrower with its chip updated | -| F11 | « Sur le schéma » from a zone named by several annotations | selects the first in document order and lists the others in the segment | -| F12 | Multi-annotation marking in the filter panel | accent outline and check disc (board 21; F20 for the other annotation of a picked zone), a new page state recorded in `docs/ANNOTATION-RENDERING.md` before any code | -| F13 | Finding detail while the filter panel is open | hidden, the tree takes the width; it comes back when the panel closes (board 21) | -| F14 | Grouping of the keyboard list of annotations | by annotation category (colour), as the drawing shows them, with a caption saying so; not by finding family (board 22 B) | -| F15 | Choosing a zone already shown by another annotation | allowed, with a notice naming the other annotation before the change is applied (board 19 A) | -| F16 | « Constats » segment of a detail trigger | shown disabled with its reason rather than hidden, so the panel keeps the same layout (board 19 C) | -| F17 | Partial clears beside the general reset | « Effacer la sélection » in the filter panel (board 21), « Retirer le filtre du schéma » in the empty state (board 22 A), and a ✕ on each filter chip (« Texte », « Schéma ») to drop one filter; « Réinitialiser les filtres » clears all, same button on every board | -| F18 | No-result state | says how many findings match the text outside the drawing filter and offers to remove that filter (board 22 A) | -| F19 | Zone picker of « Changer » | current zone first with a « zone actuelle » tag, then the zones in document order, each with the number of annotations that show it (board 19 A) | -| F20 | Other annotation of a picked zone in the filter | dashed outline on the drawing, the zone counted once (board 19 D); completes F12 | -| F21 | How search results are shown | in the tree: branches without a result folded, ancestors in grey, the matched text highlighted, a result count per zone and a « Sur le schéma » link (board 20); while the filter panel is open, a compact list per zone with the family as a prefix, because the panel takes the width (board 21) | +| whole draft | 730 | 627 | +| grasset, board 17 (dysfunctions, consultation, anamnesis) | 29 (16, 7, 6) | 25 (13, 6, 6) | +| « restriction », boards' rule (board 20) | 108 in 26 zones | 81 in 26 zones | +| « restriction », rule recommended in 7.2 | 167 in 26 zones | 140 in 26 zones | +| grasset, jarret and vertèbres lombaires with « restriction », boards' rule (board 21) | 15 | 12 | +| « abduction » in grasset and jarret, then outside (board 22 A) | 0, then 2 | 0, then 2 | + +Recommendation (changed 2026-11-06): (b). « Constats réels » reads as what a practitioner can record, and a group is +a container like a family. Alternative (a) keeps the boards' figures. Either way families are not counted and a zone +shown by several annotations counts once, as approved. The boards stay as they are (owner, request 5); their figures +follow (a) and change at U2b if (b) is chosen. + +### 7.2 F3: the fields searched + +Approved: instant search (each keystroke, no minimum length, a blank query is no text filter), accents and case +ignored. The boards compute their figures on French finding names only +(`docs/design/v1-2-6-constats/maquettes.html:253-258`), although the note of board 20 says French and English; on the +draft both give the same figures for « restriction » and « abduction ». Fields, with the effect on the draft in +leaves: + +| Field | Source | Recommended | Alternative | Effect on the equine draft | +|---|---|---|---|---| +| Finding name, French | `FindingNode.name.fr` (`core/domain/sheet/schema.rs:545`) | searched | none | « restriction »: 81 | +| Finding name, English | `FindingNode.name.en` | searched | the interface language only | « stifle »: 0 with French only, 1 with English | +| Group name (a node with children), French and English | the same field on a parent node | searched; a match keeps all its descendants | a match keeps the group alone, as the boards do | « restriction »: the 27 « Restrictions… » groups (mobility, fixations, sutures) bring their children, 81 → 140 | +| Family name, French and English | `FindingCategory.name` (`schema.rs:575`) | searched; a match keeps the family's findings | not searched | « anamnèse »: 0 → 162 in 27 zones | +| Zone name, French and English | `FindingZone.name` (`schema.rs:591`) | searched; a match keeps the zone's findings | not searched | « grasset »: 1 → 26 in 2 zones | +| Descriptions, French and English (82 nodes, 28 families) | `description` (`schema.rs:547`, `:577`) | not searched | searched | « douleur »: 5 → 16; « flexion »: 30 → 40 | +| References (citation, DOI, URL) | `reference_ids`, then the references | not searched | searched | 81 finding nodes and 2 families cite references; the references panel has its own search (U1 plan §5) | +| Stable ids | `id` | not searched | searched | « stifle » by id reaches 25 leaves in 1 zone, which the English zone name « Stifle joint » already reaches | +| Annotation names | `name` of an observable annotation (`schema.rs:431`) | not searched | searched | 26 of the 27 draft zones carry exactly their annotation's name, the `ssb` zone extends it; the drawing filter covers annotations | +| Family kind label (« Dysfonction »…) | `FindingCategoryKind` and the i18n labels | not searched | searched | the family names already carry these words | +| Review status, vet referral flag | `review_status`, `requires_vet_referral` | not searched (not text) | a later filter | none | + +Rules recommended with the list: + +- Normalisation: `folded` (`app/catalogue/useCatalogue.ts:53`: NFD, diacritics removed, lower case), plus œ → oe, + æ → ae, ’ → ' and runs of spaces, non-breaking ones included, as one space. The draft holds no œ, æ or ’ today + (291 straight apostrophes), but French authoring (« œdème ») and phone keyboards (’) bring them. Alternative: `folded` + unchanged. Sharing the extension changes the catalogue search the same way (BDR-095), with nothing lost. +- Words: the query is split on spaces and every word must appear in the finding's name or in one of its ancestors' + names (group, family, zone), in either language, in any order. « restriction flexion » finds 23 leaves in 16 zones, + « grasset flexion » 1. Alternative: the whole query as one substring, as the catalogue does, which finds 0 for both. +- Language: both languages whatever the interface language; a row matched only in the other language shows the + matched name. Alternative: the interface language only (an English name is then searchable only in English). +- Results under their zone and family, counted in the F2 unit, each zone once. + +### 7.3 F4: the drawing filter, complete semantics + +Approved: text and drawing combine by intersection; several zones picked give their union, each zone once. To ratify: +what the chosen views do. The state is interface state only (never in the document, the save, the recovery copy or +the leave guard): `views`, the views chosen in the panel, and `picked`, the annotation ids ticked on a drawing or in +the list. The zone set is derived from them at each render, from the current document. + +Model A, recommended (facets; the note of board 21 describes it): + +1. Views without a pick: no view chosen, or all chosen, restricts nothing; some views chosen keep the zones named by + an observable annotation of those views. +2. Picks: from the first ticked annotation, the zone set is the zones of the ticked annotations, by union, each zone + once. Ticking happens on the chosen views' drawings (on every view when none is chosen). +3. Text: a finding shows when its zone is in the zone set and it matches the text; without text, every finding of the + zone set shows. Applied at each click or keystroke, with no « Appliquer » button. +4. Deselecting a view drops the picks made on it; its chip says beforehand how many it holds (« Tête · 2 choisies »). +5. One chosen view is drawn at a time (one live composition, U1 plan §2); « Dessin affiché » switches it, and the + picks on the other views stay. +6. A zone shown by several annotations: ticking one puts the zone in the set once and draws the others dashed (F20); + ticking another changes no result; unticking one keeps the zone while another ticked annotation names it. +7. Detail triggers have no findings (F16): not tickable, and inert in the panel (views are chosen with their chips). + Alternative: a click on a trigger shows its view. +8. Annotations without a finding zone: not tickable, drawn faint, named « sans zone de constats » in the list and on + hover. +9. Zones named by no annotation (warning `finding_zone.unreferenced`) belong to no view: a view restriction or a pick + hides them; with neither they stay. The draft has none. +10. Clears (F17): « Effacer la sélection » empties the picks and keeps the views; « Retirer le filtre du schéma » and + the chip's ✕ empty both; « Réinitialiser les filtres » empties text, picks and views. +11. The keyboard list (board 22 B) and the narrow list below 1 024 px (F6) act on the same picks: one checkbox per + observable annotation of the shown view. +12. Document changes: an undo that removes a picked annotation, its zone link or a chosen view drops it silently and + updates the chips (F10); a picked annotation whose zone changes moves the zone set with it. +13. Read-only modes (rights, frozen, historical) and widths below 1 024 px keep the filter: it changes nothing in the + sheet. + +Model B, alternative (picks only): the views only choose which drawings the panel offers; nothing is restricted until +an annotation is ticked; rules 2 to 13 unchanged. Simpler, and each tick only widens the set, but the findings of a +whole view take one tick per annotation (18 on the draft's main view) or an extra « Tout cocher dans cette vue ». + +Why A: it is the usual facet convention (nothing ticked means everything in scope), it gives the findings of one view +in one click, and board 21 already shows it. Its cost is the jump at the first tick, from all the zones of the chosen +views to a single zone, which the panel's help sentence states. + +Examples on the draft with « restriction », boards' rule (leaves in brackets): + +| Drawing filter | Model A | Model B | +|---|---|---| +| head view chosen, nothing ticked | 24 (16) in 8 of its 9 zones | 108 (81) in 26 zones, no restriction | +| main view chosen, nothing ticked | 84 (65) in 18 zones | 108 (81) in 26 zones | +| both views chosen, nothing ticked | 108 (81), no restriction | the same | +| grasset, jarret and vertèbres lombaires ticked | 15 (12) in 3 zones (board 21) | the same | +| grasset and jarret ticked, « abduction » instead | 0, and 2 outside the drawing filter (board 22 A) | the same | + +### 7.4 Boards with their decisions + +The six boards of `docs/design/v1-2-6-constats/`, unchanged, kept as the U2b design proposal (not graphically +validated). Each lists the decisions whose « Boards » column names it; any Markdown preview (the forge, an editor) +shows the images. Their figures follow the boards' rules (7.1, 7.2). + +Board 17: F1, F2, F7. + +![Board 17](../design/v1-2-6-constats/17-dessin-constats-selection.png) + +Board 18: F1, F7, F9, F22. + +![Board 18](../design/v1-2-6-constats/18-dessin-ajouter-modifier.png) + +Board 19: F1, F7, F8, F11, F15, F16, F19, F20. + +![Board 19](../design/v1-2-6-constats/19-association-anatomique.png) + +Board 20: F1, F2, F3, F7, F10, F11, F21. + +![Board 20](../design/v1-2-6-constats/20-constats-recherche.png) + +Board 21: F1, F2, F4, F5, F12, F13, F17, F20, F21. + +![Board 21](../design/v1-2-6-constats/21-constats-filtre-schema.png) + +Board 22: F1, F2, F4, F6, F14, F17, F18. + +![Board 22](../design/v1-2-6-constats/22-etats.png) ## 8. Out of scope diff --git a/docs/development/V1-2-6_UX_PLAN.md b/docs/development/V1-2-6_UX_PLAN.md index 8841ac81..753bc227 100644 --- a/docs/development/V1-2-6_UX_PLAN.md +++ b/docs/development/V1-2-6_UX_PLAN.md @@ -403,9 +403,10 @@ T1 only if a measure exceeds the budget; before U7, the T12 text; at V1-2.8, T6; ## 3. Sub-steps -Order: U0, U1, then U2 to U4 (frontend), U5 (first core queries, consumer-driven), U6 (model), U7 (common text, -when its wording exists), U8 (closure). Curves are deferred to the curves lot (ex-U9, T16). Each sub-step ends at -an owner checkpoint; the next starts only on a new explicit owner authorisation. +Order: U0, U1, then U2, U2b (owner, 2026-11-06), U3 and U4 (frontend), U5 (first core queries, +consumer-driven), U6 (model), U7 (common text, when its wording exists), U8 (closure). Curves are deferred to the +curves lot (ex-U9, T16). Each sub-step ends at an owner checkpoint; the next starts only on a new explicit owner +authorisation. Common rules for every sub-step that touches code: @@ -498,6 +499,21 @@ Common rules for every sub-step that touches code: - Risk: touch and keyboard conflicts (§2 G). Rollback: revert (the core value is additive and unused once reverted). - Checkpoint: owner tries mouse and tablet. +### U2b · Annotations et constats + +- Retained by the owner on 2026-11-06 (brief « Validation de principe U2b et préparation des checkpoints », F1, + BDR-103); its own contract, tests and owner checkpoint; starts only on a new explicit owner authorisation. +- Objective: boards 17 to 22 of `docs/design/v1-2-6-constats/` (design proposal): from a selected annotation, its + zone's findings by family, add (zone preselected, F22), edit, change or create its finding zone; in Constats, + instant search, result count, « Filtrer sur le schéma » on one or more views, combined filters, reset. Filters are + interface state, never written to the sheet. +- Spec, files, risks, tests, acceptance and owner demo: `V1-2-6_UX_FINDINGS_NAV.md` sections 4 to 6; decisions F1 to + F22 there (section 7): F2 groups, F3 fields and F4 view semantics to ratify, the F22 form variant to confirm, F5 and F9 to F21 to decide + before its contract. +- Dependencies: U1 (navigation, kept-mounted tabs, `folded`), U2 (selection, pointer and keyboard model). +- Rust ops: none; wasm budget unchanged. No document structure change (request C of the complement). +- Checkpoint: owner tries the grasset journey, search and drawing filter with mouse, tablet and keyboard. + ### U3 · Category panel and own colour - Objective: board 07 states A to D without the fixed-role locks (they come at U6): foldable panel in Annotations,