From 52aac41472be2883f26fe247fb5e268e62c7e42f Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 13 Nov 2026 01:11:25 +0100 Subject: [PATCH] chore(memory): R2 built, verifier evidence, owner decisions pending --- .claude/tasks/TODO.md | 15 ++++++++------- .../2026-11-12-r2-references-tab-1730.md | 8 +++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 78aefcbc..ba310ab0 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -697,13 +697,14 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet - Owner decisions: (A) presentation sort + search in TypeScript, never mutating document, stored order, ids or history; exception written in `RUST_ARCHITECTURE_REVIEW.md` Part II · (B) EN labels of `REVUE.md` = working basis, not ratified: exhaustive FR/EN table of new or changed R2 labels with ambiguities, app terminology kept, shown at the checkpoint before final validation · (C) anomaly B fixed apart (below) - Extra requirements: cited reference never deletable · « Retirer de ce constat » removes that one association only, undone by « Défaire » · no edit action in read-only · several findings citing one reference · panel only from a finding · focus back to its origin if it still exists · Vérification « Aller à » opens the right tile with focus · reader catalogue unchanged · panel ≤ 34 rem, never wider than available · no drawing shift on panel open / close · widths 375, 1 024, 1 180, 1 279, 1 280 · `prefers-reduced-motion` · closed panel (exit animation included) neither interactive nor keyboard-reachable · visual ops never mutate stored order · four sorts tested · A1 to A4 kept · references still reachable when a search returns nothing - Owner GO on plan rev 3 (brief « GO R2 — Plan révision 3 », 2026-11-12): arbitrations 1-5 approved (permanent dvh min-height, motion/react, 3 provisional FR labels, Type sort business order stable, « Tout afficher » keeps tiles and edits); mandatory correction folded as plan rev 4: panel from a finding ONLY (the family's existing trigger removed, family keeps inline « Retirer »); data controls on full rows incl. metadata (`guard.sh`, 197 018-row baseline); editor-equine never run, never reported verified - - [ ] R2.0 internal rename of the panel place (`references` → panel name), no visible effect - - [ ] R2.1 five-tab model (`EDITOR_TABS`, « Plus » below 640 px, header button removed, reference targets → tab, focus requests) - - [ ] R2.2 Références tiles (closed / open / edit, disclosure, citation count, hint instead of « Supprimer » when cited, A2 state) - - [ ] R2.3 search, clear, sort (four orders, pure over ids), counter, no-result line, reorder only in sheet order without search (A1), add flow - - [ ] R2.4 finding panel (filtered, Modifier, Retirer de ce constat, Aller à, Tout afficher, 34 rem, slide, reduced motion, inert through exit, focus return) - - [ ] R2.5 tests and non-regressions (unit, e2e:ui, e2e:shell on db:sandbox, axe, keyboard walk, layout widths) - - [ ] R2.6 docs, FR/EN label table, Rust exception (Part II), db:trial manual protocol, closure + - [x] R2.0 internal rename of the panel place (`references` → panel name), no visible effect + - [x] R2.1 five-tab model (`EDITOR_TABS`, « Plus » below 640 px, header button removed, reference targets → tab, focus requests) + - [x] R2.2 Références tiles (closed / open / edit, disclosure, citation count, hint instead of « Supprimer » when cited, A2 state) + - [x] R2.3 search, clear, sort (four orders, pure over ids), counter, no-result line, reorder only in sheet order without search (A1), add flow + - [x] R2.4 finding panel (filtered, Modifier, Retirer de ce constat, Aller à, Tout afficher, 34 rem, slide, reduced motion, inert through exit, focus return) + - [x] R2.5 tests and non-regressions (unit, e2e:ui, e2e:shell on db:sandbox, axe, keyboard walk, layout widths) + - [x] R2.6 docs, FR/EN label table, Rust exception (Part II), db:trial manual protocol, closure + - R2 BUILT 2026-11-13, awaiting owner validation: fc3fec7 R2.0, 4499bc7 R2.1, c21995b R2.2, 3baac4d R2.3, 8db6f42 R2.4, 4b7d254 R2.5, 2182307 R2.6 docs, 1bf2701 final-review fixes (all pushed). Verifier 18/20 (NOT-MET 9 admin.spec renderer crash from accumulated grants, 15 read-only flip keeps panel open), security PASS, final review ready-with-fixes → fixed, re-review ready. Owner decisions pending: read-only flip ratification, admin.spec closure before merge (fresh-run authorisation or separate fix: paginated grants / run-scoped cleanup), add-draft cancel control, V1-2_ANATOMICAL_SHEETS.md D1-D4 supersede note wording. editor-equine updated, never run. Parked: N1 silent draft loss on read-only flip of an unmatched tile, N2 pinned non-matching tile beside no-result, first-click loss below a refused field, landscape 667×375 panel 13 px, M10 locals over 5 in R2 hooks (/refactor) - [x] Anomaly B FIXED `2cdee42` (owner 2026-11-12 « Décision sur l'anomalie E2E », option 1): dialog checks moved to e2e:ui on the real WorkingCopyAction (`e2e/harness/working-copy.*`, `e2e/ui/working-copy.spec.ts`), shell keeps the historical page + state-consistent button check, sandbox suite archives only its own copies (`returning id` checked). Before 4 failed; after 4 passed ×2; full admin.spec 16 passed / 8 skipped; e2e:ui 251 ×2; sandbox sheets-admin 5/5; pre-existing anatomical_sheets rows identical per id (637 → 643, 6 added by A1). Verifier CONFORME, security PASS (1 LOW: optional uuid check before interpolation). Open: cleanup creation branch not run on a fresh stack; free branch of the shell check not run on this sandbox; `editor-equine.spec.ts` set-aside still archives and restores pre-existing copies (8c315a12 included, updated_at 2026-11-12 13:40 from the R1 follow-up run): owner decision. R2.0 waits for the owner's green light on this result - [ ] editor-equine risk (owner 2026-11-12 « Validation du correctif E2E et GO R2 » §3; separate fix, NOT part of R2): `editor-equine.spec.ts` beforeAll archives every active historical working copy (`update public.anatomical_sheets … private.is_historical_working_copy(id)`), afterAll restores them, and `confirmHistoricalDrawing` may upload / confirm the historical sheet's drawing; it already changed 8c315a12's `updated_at` (2026-11-12 13:40 UTC). NOT to be run on a persistent database holding data to preserve until fixed. Before any rerun: list its writes exactly, propose a reproducible non-destructive isolation of pre-existing resources, check interactions with admin.spec and parallel suites; keep 8c315a12 and its current metadata (no artificial date restore); no sandbox reset or deletion - [ ] e2e fixture accumulation (owner 2026-11-12 §3): sheets created by the suites persist on the sandbox (admin.spec A1 `fiche-e2e-` never archived, seedDraft / seedOfficialSheet sheets, editor copies); track them (count per run, owner per fixture) and propose run-scoped cleanup limited to ids each run created diff --git a/.claude/tasks/contracts/2026-11-12-r2-references-tab-1730.md b/.claude/tasks/contracts/2026-11-12-r2-references-tab-1730.md index eef8bf04..772331b3 100644 --- a/.claude/tasks/contracts/2026-11-12-r2-references-tab-1730.md +++ b/.claude/tasks/contracts/2026-11-12-r2-references-tab-1730.md @@ -136,6 +136,8 @@ Q: shell gate with editor-equine? / A: excluded from every run (owner §3, §4 Q: where does the FR/EN table live? / A: `docs/development/V1-2-6_R2_LABELS.md` (decided in plan, shown at the gate). Q: panel from a family? / A: NO. Owner GO 2026-11-12 (brief « GO R2 — Plan révision 3 », « Correction obligatoire de R2.1 »): the contextual panel opens only from a finding, per the earlier decision; never from a family without a new arbitration; the library stays reachable from the Références tab. The trigger a family's detail shows today (shared FindingContent) is removed; the family keeps its inline citation list with « Retirer ». [gated 2026-11-12] Q: arbitrations of the gate? / A: owner GO 2026-11-12: (1) permanent Places min-height on the available screen height, mobile browsers and viewport changes handled, no drawing move, no horizontal overflow; (2) motion/react instead of Tailwind motion-reduce:, prefers-reduced-motion and focus return mandatory with or without animation; (3) « Ce constat ne cite plus aucune référence », « Référence introuvable », « Saisie non appliquée : … » accepted provisionally, EN not ratified one by one, full FR/EN table at R2.6; (4) Type sort in business order, deterministic and stable for equal types; (5) « Tout afficher » resets search and sort, keeps open tiles and any edit in progress, never loses a valid entry nor closes unexpectedly. Data controls must prove no unauthorised change, metadata included. [gated 2026-11-12] +Q: read-only flip while the panel is open? / A: PENDING OWNER. Implemented: the panel stays open in read view (no edit control; existing crossing spec expects it visible); plan P22'' and criterion 15 listed it as a forced close. Verifier 2026-11-13: criterion 15 NOT-MET on this point only. Shown at the R2 checkpoint. +Q: admin.spec red at the end of R2? / A: PENDING OWNER. A0 (fr, en) and « admin screens » crash the renderer during axe on screens rendering every accumulated grant (1 282+); not proven by a base-commit run. Verifier 2026-11-13: criterion 9 NOT-MET on this point only. Separate fix proposed at the checkpoint. ## ACCEPTANCE CRITERIA Seed (from the request); design criteria appended at STEP 3 with [gated]. @@ -153,11 +155,11 @@ Seed (from the request); design criteria appended at STEP 3 with [gated]. 12. [gated 2026-11-12] The header « Références » button and its id are gone. CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && ! grep -rq "REFERENCES_BUTTON_ID" apps/app/src && ! grep -rq "editor-references-panel" apps/app/src && echo NO_HEADER_BUTTON EXPECT: NO_HEADER_BUTTON - EVIDENCE: pending + EVIDENCE: MET exit=0 marker-found :: NO_HEADER_BUTTON 13. [gated 2026-11-12] New files exist: pure sort and safe-link modules, the two new shell specs, the labels table. CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && test -f apps/app/src/editor/references/sort.ts && test -f apps/app/src/editor/references/safeLink.ts && test -f apps/app/e2e/shell/editor-references.spec.ts && test -f apps/app/e2e/shell/editor-citations.spec.ts && test -f docs/development/V1-2-6_R2_LABELS.md && echo R2_FILES_OK EXPECT: R2_FILES_OK - EVIDENCE: pending + EVIDENCE: MET exit=0 marker-found :: R2_FILES_OK 14. [gated 2026-11-12] Sorts: sheet order, citation (Intl.Collator base + numeric), citation count descending, Type in REFERENCE_TYPES order; equal keys keep the stored order (deterministic, stable); inputs never mutated; unit-tested with permutations. 15. [gated 2026-11-12] Closing: every close (✕, Escape outside text fields, scrim, « Tout afficher », « Aller à », tab switch, element gone, read-only flip) records one pending move applied after the exit; focus lands on the trigger if present, else the active tab button (« Plus » below 640 px); checked by `document.activeElement` in normal and reduced motion; page inert and panel unreachable during exit; a user close with a refused draft is cancelled (field focused), a forced close drops it with the « Saisie non appliquée : … » announcement. 16. [gated 2026-11-12] « Tout afficher » resets search and sort, keeps open tiles and any tile in edit; a valid panel draft is committed before the close. @@ -167,7 +169,7 @@ Seed (from the request); design criteria appended at STEP 3 with [gated]. 20. [gated 2026-11-12] No change outside scope since 49867ba. CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && [ -z "$(git diff --name-only 49867ba..HEAD -- supabase crates docker packages/supabase/src scripts)" ] && echo SCOPE_OK EXPECT: SCOPE_OK - EVIDENCE: pending + EVIDENCE: MET exit=0 marker-found :: SCOPE_OK ## FILE SCOPE apps/app/src/editor/{tabs,navigation,focusRequest,useEditorNavigation,verification,editingContext}.ts, apps/app/src/editor/annotations/deselect.ts, apps/app/src/editor/references/** (new sort.ts), apps/app/src/components/editor/{EditorWorkspace,EditorTabBody,EditorTabs,DraftHeader,HeaderActions,KeptPlace}.tsx, apps/app/src/components/editor/references/**, apps/app/src/components/editor/findings/{FindingsTab,FindingContent,FindingDetail}.tsx, apps/app/src/components/editor/tabs/** (new ReferencesTab), apps/app/src/i18n/{fr,en}.ts, apps/app/tests/unit/**, apps/app/e2e/{support,shell,ui}/**, docs/development/{V1-2-6_U1_CORRECTIONS,BROWSER_TESTS,V1-2-6_OWNER_TRIAL,RUST_ARCHITECTURE_REVIEW,V1-2-6_R2_LABELS}.md, docs/design/README.md, CLAUDE.md (tree), this contract, the plan, .claude/tasks/TODO.md, memory.