chore(memory): BLK-013, LRN-131, R1 last feedback, RR-14

This commit is contained in:
bchanot committed 2026-11-12 15:38:39 +01:00
1 parent dca33b0047
commit c54ba5d62f
5 files changed
+116

No files matched your search

+4
View File
@@ -690,6 +690,9 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
- [x] D6b (owner 2026-11-12, U1 manual test on db:trial): a click or tap on the drawing outside any annotation deselects; built and tested in Chromium
- [ ] R1 follow-ups: undo/redo glyph paths differ from board i-undo / i-redo (U1 code, deferred) · « Toutes les annotations » and « Supprimer » are 36 px below xl (touch target) · « Toutes les annotations »: focus falls to the page when its row is filtered out
- [ ] owner manual checks on db:trial: R1 (« Défaire » / « Refaire », « Désélectionner », Escape) and D6b with mouse and touch, iOS Safari included (not proven by the tests)
- [x] last owner feedback (brief « V1-2.6 — R1 — Dernier retour utilisateur », 2026-11-12): « Sélection : … » tag above the drawing made screen-reader-only, drawing stable on select / deselect (`927537b`, docs `00936c8`, BLK-013, LRN-131); unit app 1382; e2e:shell db:sandbox 6 editor specs 37 passed / 37 skipped / 0 failed; verifier CONFORME, security PASS x2. Owner 2026-11-12: R1 accepted technically
- [ ] owner browser confirmation on db:trial of the `927537b` visual fix (drawing stays in place, no tag above it; `V1-2-6_OWNER_TRIAL.md` §4.9 step 3)
- [ ] R1 known limits kept (owner 2026-11-12): ToolNotes `role="alert"` hint above the canvas (EditableAnnotations.tsx ~373), cleared on select, still moves the drawing one line when a hint is showing (must stay visible: fixed slot or overlay, LRN-131) · the selection itself is not announced to screen readers (only the deselection is) · iOS Safari validation still needed · the other R1 deviations already documented (follow-ups line above, `V1-2-6_U1_CORRECTIONS.md` R1 « Behaviour and limits »)
- [ ] R2 fifth tab « Références », tiles, search + clear, view-only sort, panel from a finding only (34 rem, 150-200 ms slide, reduced motion) (after R0 validation and its own go)
- [ ] R3 sheet list: search + name sort first; date, date sort and « most recent » home card only after the dedicated SQL checkpoint `docs/development/V1-2-6_R3_SQL_CHECKPOINT.md` (A7 ratified 2026-11-09; never a creation date shown as modification date)
- [ ] R4 catalogue card integrity warning (independent fix, = anomaly C): `useCardDetails.ts` drops a failed `loadVersion` silently; UI only, check never bypassed
@@ -729,6 +732,7 @@ Inventory: `.claude/audits/2026-10-25-functional-inventory.md`. Each item: treat
- [ ] RR-10 census tools maintenance (LOW `#[ignore]` positions) and controlled oracle evolution on a new anatomical changeset
- [ ] RR-12 (RR-11 is taken on develop: « sandbox-only e2e follow-ups ») AAL2 token after factor removal, production security prerequisite (owner 2026-11-03, recorded at V1-2.6, NOT fixed): catalogue and sheet RPCs and Storage policies check the JWT `aal2` claim (`private.has_mfa()`), not the live session (`has_aal2_session()` serves role and rights RPCs only), so a token issued at `aal2` keeps passing them after a factor removal until it expires. Study a live-session check or a revocation strategy compatible with Supabase / GoTrue before production; no authentication change in V1-2.6. Recorded in V1-2 contract §13
- [ ] RR-13 (free on develop, max RR-11, and on V1-2, max RR-12) « Pagination côté serveur de la liste des droits et prévention de l'épuisement mémoire » (owner 2026-11-09, BDR-106; priority technical track, separate from U1 and U2; NOT implemented, needs its own plan and owner go). Cause: `list_catalog_grants()` (`supabase/migrations/20261028100000_sheet_access_hardening.sql:542`) and `GrantList.tsx` return and render every grant; on a long-lived sandbox (2 306 rows) the axe scan takes the Chromium renderer to ~2.2 GB and earlyoom kills it (« Target crashed », admin.spec 9/9 on 89da8d3, 580ff28, 606f7ba; absent at seed volume); the same memory pressure SIGTERMs DEV `pg_meta` (39 restarts in 2 days, stateless). The plan must cover: [ ] bounded server paging · [ ] deterministic result order · [ ] authorization checks unchanged · [ ] paging and large-volume tests · [ ] admin scenario independence tests (admin.spec:717 working-copy slot) · [ ] memory consumption check · [ ] Supabase DEV protected from indirect effects of the test suites
- [ ] RR-14 (on V1-2; develop max RR-11) secrets outside logs, process arguments and test artifacts, production security prerequisite (owner 2026-11-12; not blocking R2; recorded in V1-2 contract §13): no real password or secret in any log; no real secret in process arguments (argv); no real secret in test or CI/CD artifacts; these three checked before any deployment. Trigger: guardrails FAIL `API-PASSWORD-PLAINTEXT` / `API-PASSWORD-LOGGED` at `scripts/db-trial-check.sh:1340` (security gate 2026-11-12); the passwords there are fictitious, test-only. Owner: harness NOT modified, no secret rotation now
## Phase A — DONE (kept for reference)
@@ -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)