chore(memory): BLK-013, LRN-131, R1 last feedback, RR-14
This commit is contained in:
1 parent
dca33b0047
commit
c54ba5d62f
5 files changed
+116
No files matched your search
@@ -0,0 +1,95 @@
|
||||
# CONTRACT — r1-selection-tag
|
||||
- date: 2026-11-12 | flow: bugfix | branch: feature/v1-2-anatomical-sheets
|
||||
- status: active
|
||||
|
||||
## REQUEST (verbatim — IMMUTABLE)
|
||||
# FAUNOSTEO V1-2.6 — R1 — Dernier retour utilisateur
|
||||
|
||||
Les 10 tests manuels R1 sur db:trial sont réussis, y compris la désélection par clic sur le squelette, le tactile, le focus et les raccourcis.
|
||||
|
||||
Un dernier défaut UX a été constaté.
|
||||
|
||||
## Problème
|
||||
|
||||
Lorsqu'une annotation est sélectionnée, un texte apparaît au-dessus du schéma :
|
||||
|
||||
« Sélection : zone « Vertèbres cervicales » »
|
||||
|
||||
Cet affichage est redondant : l'annotation est déjà surlignée sur le dessin et son nom apparaît dans le panneau latéral.
|
||||
|
||||
Il provoque surtout un déplacement vertical du schéma, particulièrement désagréable lorsqu'on sélectionne et désélectionne plusieurs annotations.
|
||||
|
||||
## Correction autorisée
|
||||
|
||||
1. Identifier le composant responsable de cet affichage.
|
||||
2. Supprimer son affichage visuel dans l'éditeur, en modification comme en lecture seule.
|
||||
3. Ne laisser aucun espace vide réservé à cet affichage.
|
||||
4. Garantir une position stable du schéma lors des changements de sélection.
|
||||
5. Conserver le surlignage et les informations de l'annotation dans le panneau latéral.
|
||||
6. Si ce texte sert aussi d'annonce accessible, conserver une solution adaptée aux lecteurs d'écran, hors du flux visuel, sans annonce redondante ni perte d'accessibilité.
|
||||
7. Ne pas supprimer les autres messages utiles, notamment les erreurs, avertissements et états de sauvegarde.
|
||||
|
||||
## Tests attendus
|
||||
|
||||
- Sélection d'un point, d'une zone et d'un lien.
|
||||
- Désélection par clic, bouton et Échap.
|
||||
- Absence de déplacement vertical de l'interface.
|
||||
- Éditeur modifiable et consultation en lecture seule.
|
||||
- Desktop et mobile.
|
||||
- Accessibilité et absence de régression des interactions R1.
|
||||
|
||||
## Périmètre
|
||||
|
||||
Correction UX minimale, rattachée à R1.
|
||||
|
||||
Ne pas modifier les règles de sélection, le document, l'historique Défaire/Refaire, les données ou la sauvegarde.
|
||||
|
||||
Ne pas toucher à db:trial, DEV ou aux données de la sandbox, en dehors des tests automatisés autorisés sur l'environnement isolé prévu.
|
||||
|
||||
Faire relire la correction, exécuter les tests pertinents, documenter, commit et push.
|
||||
|
||||
R2, R3, R4, U2 et U2b restent bloqués.
|
||||
|
||||
Fournir le résultat et s'arrêter au checkpoint final R1.
|
||||
|
||||
## DIAGNOSIS
|
||||
- BUG: « Sélection : … » tag shown above the drawing on selection; drawing moves down by its height, back up on deselect.
|
||||
- ROOT CAUSE: `SelectionTag` (apps/app/src/components/editor/annotations/SelectionTag.tsx) renders an in-flow `inline-block` `<p>` mounted only while an annotation is selected, placed before the canvas in both twins (EditableAnnotations.tsx TagOf, tabs/AnnotationsTab.tsx). Mount/unmount changes the column height above the canvas.
|
||||
- A11y: the tag is not a live region (no role, no aria-live); selection is not announced by it today. Deselection announce (deselect.ts) is separate and untouched.
|
||||
- RELATED MEMORY: none bears (LRN on layout shift vs hit-test is general, honored by the e2e recomputing positions).
|
||||
|
||||
## CLARIFICATIONS
|
||||
Q: announce the selection politely (reviewer suggestion)? / A: no. Brief item 6 conditions it on the tag being an announcement, it is not; "sans annonce redondante". Text kept sr-only, not live.
|
||||
Q: other shift source: ToolNotes `role="alert"` hint cleared by `select` (EditableAnnotations.tsx ~373)? / A: out of scope (brief: minimal, keep warnings); reported to the owner, not changed.
|
||||
Q: design record? / A: owner brief ratifies the deviation from board 04; recorded in docs/design/README.md under the existing accepted deviations.
|
||||
Q: suites environment? / A: unit local; e2e:shell only on `pnpm db:sandbox` (already up, faunosteo_dbsandbox_*), targeted specs; never db:trial, never DEV; no sandbox up/reset/down.
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
1. SelectionTag renders `sr-only`, no visible style classes, no role/aria-live; both twins still render it.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2/apps/app && grep -q 'className="sr-only"' src/components/editor/annotations/SelectionTag.tsx && ! grep -qE "aria-live|role=|inline-block|surface-strong" src/components/editor/annotations/SelectionTag.tsx && grep -q "<SelectionTag" src/components/editor/tabs/AnnotationsTab.tsx && grep -q "<SelectionTag" src/components/editor/annotations/EditableAnnotations.tsx && echo TAG_OK
|
||||
EXPECT: TAG_OK
|
||||
EVIDENCE: MET exit=0 marker-found :: TAG_OK
|
||||
2. Regression unit test asserts sr-only and not live; typecheck, lint, full unit suite green.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && grep -q "keeps the selection tag out of the visual flow" apps/app/tests/unit/editor-annotations-tab.test.tsx && pnpm -s typecheck >/dev/null 2>&1 && pnpm -s lint >/dev/null 2>&1 && pnpm -s test:run >/dev/null 2>&1 && echo UNIT_OK
|
||||
EXPECT: UNIT_OK
|
||||
EVIDENCE: MET exit=0 marker-found :: UNIT_OK
|
||||
3. e2e: editor-deselect.spec.ts has a test asserting the canvas top is unchanged after selecting and deselecting a point, a zone and a link; editor-equine.spec.ts no longer asserts the tag visible.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2/apps/app && grep -q "the drawing does not move when the selection changes" e2e/shell/editor-deselect.spec.ts && ! grep -q "selectionTag(page)).toBeVisible" e2e/shell/editor-equine.spec.ts && echo E2E_SRC_OK
|
||||
EXPECT: E2E_SRC_OK
|
||||
EVIDENCE: MET exit=0 marker-found :: E2E_SRC_OK
|
||||
4. Shell specs editor-deselect, editor-equine, editor-access, editor-annotations run green on `pnpm db:sandbox` (manual run, counts reported); no selection rule, document, history, save or data code changed.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && [ -z "$(git diff --name-only HEAD -- apps/app/src/editor apps/app/src/state supabase crates scripts docker packages)" ] && echo SCOPE_OK
|
||||
EXPECT: SCOPE_OK
|
||||
EVIDENCE: MET exit=0 marker-found :: SCOPE_OK
|
||||
5. docs/design/README.md records the owner-ratified deviation for board 04 (2026-11-12); SelectionTag doc comment states why.
|
||||
|
||||
## FILE SCOPE
|
||||
- apps/app/src/components/editor/annotations/SelectionTag.tsx
|
||||
- apps/app/tests/unit/editor-annotations-tab.test.tsx
|
||||
- apps/app/e2e/shell/editor-deselect.spec.ts
|
||||
- apps/app/e2e/shell/editor-equine.spec.ts
|
||||
- apps/app/e2e/support/editor.ts
|
||||
- docs/design/README.md
|
||||
- docs sync (approved by owner 2026-11-12): docs/development/BROWSER_TESTS.md, docs/development/V1-2-6_U1_CORRECTIONS.md, docs/development/V1-2-6_OWNER_TRIAL.md
|
||||
- closure (owner 2026-11-12): docs/development/V1-2_ANATOMICAL_SHEETS.md §13 (RR-14 prerequisite), .claude/tasks/TODO.md
|
||||
- this contract; memory: .claude/memory/{blockers,learnings,journal}.md (BLK-013, LRN-131)
|
||||
Reference in new issue
Block a user