chore(memory): R2 plan rev 4 after owner GO (panel from a finding only)
This commit is contained in:
1 parent
49867bad19
commit
65a8fd37b8
3 files changed
+75
-16
No files matched your search
@@ -1,10 +1,12 @@
|
||||
# PLAN — R2 « Références » tab (V1-2.6) — rev 2
|
||||
# PLAN — R2 « Références » tab (V1-2.6) — rev 4
|
||||
|
||||
Contract: `.claude/tasks/contracts/2026-11-12-r2-references-tab-1730.md`. Sources: `docs/development/V1-2-6_U1_CORRECTIONS.md`
|
||||
§R2 (D1-D4), `docs/design/v1-2-6-r0/{ARBITRAGES.md A1-A5, REVUE.md, maquettes.html boards 23-27}`, TODO R2 block
|
||||
(a1d4084), BDR-114, BDR-107..110, BDR-113. Read-before digest: analyzer 2026-11-12.
|
||||
Rev 2 = rev 1 + challenge round 1 (correctness FATAL(5), robustness FATAL(7), simplicity CONCERNS(1)); changes tagged
|
||||
[Cn] / [Rn] / [Sn] with the finding number.
|
||||
[Cn] / [Rn] / [Sn] with the finding number. Rev 3 = challenge round 2 (section at the end). Rev 4 = owner GO 2026-11-12
|
||||
(brief « GO R2 — Plan révision 3 »): panel from a finding only, arbitrations 1-5, full-row data guard (section at the end;
|
||||
in-place edits marked [O4]).
|
||||
|
||||
Plan form (deviation from writing-plans « full code », stated): ~30 files; each task gives files, behaviour, test cases
|
||||
and verification; executors write the code under TDD. Design = owner-validated boards (BDR-110), no brainstorm.
|
||||
@@ -15,7 +17,7 @@ and verification; executors write the code under TDD. Design = owner-validated b
|
||||
- Never touch supabase/, crates/, scripts/db-trial*, docker/, packages/supabase/src, components/catalogue/ (reader
|
||||
unchanged) [C9]. No db:trial, no DEV.
|
||||
- Shell runs: `pnpm db:sandbox e2e-shell <explicit spec list>`; NEVER `editor-equine.spec.ts` (owner §3).
|
||||
- Data guard [R6]: before and after each shell session, per-id snapshot of pre-existing rows of `anatomical_sheets`
|
||||
- Data guard [R6] (superseded by rev 4 G3, full rows): before and after each shell session, per-id snapshot of pre-existing rows of `anatomical_sheets`
|
||||
(id, status, archived_at, updated_at) AND `anatomical_sheet_versions` (id, status, the revision / updated_at columns,
|
||||
md5(content::text)); compared per id (changed or missing = stop); new rows counted and their sheet ids listed per run
|
||||
(owner §3 fixture tracking). Select-only through `pnpm db:sandbox sql`.
|
||||
@@ -35,7 +37,11 @@ and verification; executors write the code under TDD. Design = owner-validated b
|
||||
- P4 [C6] « Tout afficher dans l'onglet Références » = its own action `show_all_references`: closes the panel, then
|
||||
(after exit, P9) selects the tab with a reset signal (search and sort reset, open tiles and a tile in edit kept),
|
||||
focus on the tab heading. Vérification's unresolved reference path selects the tab WITHOUT reset.
|
||||
- P5 [owner] family trigger → same panel, family words.
|
||||
- P5 [O4] The panel opens ONLY from a finding (`finding_node`), never from a family (`finding_category`): owner GO
|
||||
2026-11-12 overrides the pass-B answer « same panel with family words ». The trigger « {n} références » is rendered
|
||||
only in a finding's detail; a family's detail keeps its inline citation list (« Retirer », picker) and loses the
|
||||
trigger it shows today (shared `FindingContent`). `open_citations` refuses a key that is not a finding (no-op).
|
||||
No family words in the panel. Families still count and appear in a tile's « Citée {n} fois, par : » list (A4).
|
||||
- P6 [C2][R2] focus fallbacks, in order: the trigger (re-found by `data-citations-trigger=<element key>`) if shown →
|
||||
else the active tab button via `focusActiveTab()` (« Plus » button below 640 px). Never a missing heading.
|
||||
- P7 panel: no search, add, delete, reorder (board 25).
|
||||
@@ -65,8 +71,8 @@ and verification; executors write the code under TDD. Design = owner-validated b
|
||||
- P19 [S3] one memoised `citersOf(doc): Map<refId, CiterItem[]>` (families and nodes at any depth); tile count =
|
||||
list length; `citationCounts` derived from it (or removed with its last consumer).
|
||||
- P20 [C3][R2] After « Retirer … »: focus the next tile's disclosure button, else the previous, else the panel heading;
|
||||
zero citations left → the panel stays open with the line « Ce constat ne cite plus aucune référence. » / « Cette
|
||||
famille ne cite plus aucune référence. » (new provisional labels) + « Tout afficher »; close then follows P6 (the
|
||||
zero citations left → the panel stays open with the line « Ce constat ne cite plus aucune référence. » (new
|
||||
provisional label) + « Tout afficher » [O4]; close then follows P6 (the
|
||||
trigger is gone when its count is 0).
|
||||
- P21 [C2][R2] Selecting a tab while the panel is open closes it (pending move = the tab; focus on the new tab button).
|
||||
Défaire / Refaire stay usable with the panel open; an undo that removes the element triggers P6.
|
||||
@@ -104,7 +110,8 @@ shell-layout + data guard. Commit + push.
|
||||
plumbing (P9) introduced here with the current (non-animated) panel so focus rules hold from R2.1.
|
||||
- `verification.ts` reference issues → tab; `useEditorNavigation.ts` landing on the tab heading; fallbacks P6.
|
||||
- Header button, separator and props removed (HeaderActions, DraftHeader, EditorWorkspace).
|
||||
- Trigger (FindingContent): `open_citations`, `data-citations-trigger`, `aria-expanded`, `aria-controls` (P13).
|
||||
- Trigger (FindingContent, finding nodes only [O4] P5): `open_citations`, `data-citations-trigger`, `aria-expanded`,
|
||||
`aria-controls` (P13); removed from a family's detail (R-24 row in the commit body, e2e / unit using it remapped).
|
||||
- i18n: `editor.tab.references`; removals per [R10].
|
||||
- E2E [C7][R7]: tier-aware `openTab(page, dict, tab)` (opens « Plus » below 640 px); `TABS` five; each existing
|
||||
`openReferences` call mapped explicitly (R-24 table in the commit body) to `openTab(…,'references')` (library) or
|
||||
@@ -151,11 +158,12 @@ Gate: as R2.2. Commit + push.
|
||||
|
||||
## R2.4 — contextual panel — `feat(editor): …`
|
||||
- `CitationsPanel.tsx` (board 25): overlay geometry P16; header book icon + « Références citées » + ✕ 44×44 « Fermer
|
||||
les références »; path line; count line « {n} références citées par ce constat / cette famille » + « Tout afficher dans
|
||||
l'onglet Références » (P4); tiles (meta 132 px) with « Modifier », « Retirer de ce constat / cette famille » (P15,
|
||||
P20), « Aller à »; « ce constat / cette famille » badge; P7; zero state P20.
|
||||
les références »; path line; count line « {n} références citées par ce constat » + « Tout afficher dans l'onglet Références »
|
||||
(P4); tiles (meta 132 px) with « Modifier », « Retirer de ce constat » (P15, P20), « Aller à »; « ce constat » badge;
|
||||
P7; zero state P20 [O4].
|
||||
- Motion and focus P9, P6, P21, P22 (close with a tile in edit); `ReferenceLibrary` folded into `ReferencesTab` (P25).
|
||||
- Unit: open only through the trigger; filtered; family words; Retirer removes only that id, reference stays, one undo
|
||||
- Unit: open only through a finding's trigger; a family's detail has no trigger and `open_citations` with a family key
|
||||
is a no-op [O4]; filtered; Retirer removes only that id, reference stays, one undo
|
||||
restores (and the review status); P20 focus chain and zero state; P4 reset + heading focus; every close path applies
|
||||
its pending move after exit and the focused element is the expected one (activeElement); P21; P6 after undo; reduced
|
||||
motion (no transition) vs normal; inert page and panel during exit; `ReferencesOpenContext` until exit; read-only: no
|
||||
@@ -174,8 +182,8 @@ Gate: as R2.3 + citations spec + layout spec. Commit + push.
|
||||
(no assertion lost without a mapped replacement); gaps found here are fixed in this sub-lot.
|
||||
|
||||
## R2.6 — docs, labels, closure — `docs(…): …`
|
||||
- `docs/development/V1-2-6_R2_LABELS.md`: every new / changed / removed key (key, FR, EN provisional, where, family
|
||||
variants, ambiguity notes).
|
||||
- `docs/development/V1-2-6_R2_LABELS.md`: every new / changed / removed key (key, FR, EN provisional, where, ambiguity
|
||||
notes; among them the tile badge « famille » (A4, REVUE) while the editor still says « Catégorie » until U2b F7) [O4].
|
||||
- `RUST_ARCHITECTURE_REVIEW.md` Part II §II.2 rows (class C, phase n/a) for `editor/references/{filter,citations,sort,
|
||||
safeLink}.ts` + §II.3 bullet (BDR-114 A).
|
||||
- `V1-2-6_U1_CORRECTIONS.md` §R2 status (incl. P15 « À confirmer », P20, P21); `BROWSER_TESTS.md` (new specs, equine
|
||||
@@ -243,3 +251,32 @@ commit. Fresh verifier + security + code review on the whole of R2 at the end.
|
||||
e2e/shell/editor-journey.spec.ts e2e/shell/editor-recovery.spec.ts e2e/shell/editor-drawings.spec.ts
|
||||
e2e/shell/editor-signout.spec.ts e2e/shell/admin.spec.ts e2e/shell/shell.spec.ts + the new R2 specs as they land
|
||||
- R2.5: every file of `ls e2e/shell/*.spec.ts` except editor-equine.spec.ts, written out in full in the command.
|
||||
|
||||
## Rev 4 — owner GO 2026-11-12 (brief « GO R2 — Plan révision 3 »); overrides rev 2 and rev 3 where they differ
|
||||
- O4-1 Panel from a finding only: P5 rewritten in place; criteria 3 and 6 of the contract corrected; the pass-B family
|
||||
answer is superseded (contract CLARIFICATIONS). The library stays reachable from the Références tab (R2.1).
|
||||
- O4-2 [arbitration 1] Places keeps the PERMANENT `min-h-[calc(100dvh-<top bar>)]` (P16'): `dvh` follows the mobile
|
||||
URL bar and every viewport change (rotation, resize, on-screen keyboard); `<top bar>` is the editor's real sticky
|
||||
offset, verified at every tier before use (3.5rem assumed by rev 3; any other value or a tier difference uses the
|
||||
same token as the sticky `top`). No drawing move, no horizontal overflow. E2E (layout spec): 375 × 667, then a
|
||||
height change to 375 × 560 and a rotation to 667 × 375 with the panel open: `scrollWidth` ≤ `clientWidth`, panel
|
||||
bottom = viewport bottom, drawing box unchanged across open / close. Limit stated: Chromium cannot emulate a real URL
|
||||
bar collapse; the resize stands in for it.
|
||||
- O4-3 [arbitration 2] `motion/react` accepted; P29 kept; every close path checks `document.activeElement` after exit
|
||||
in BOTH modes (normal and `emulateMedia({ reducedMotion: 'reduce' })`), unit and e2e.
|
||||
- O4-4 [arbitration 3] Provisional FR labels accepted: « Ce constat ne cite plus aucune référence. », « Référence
|
||||
introuvable », « Saisie non appliquée : … »; EN not ratified one by one; full FR/EN table at the R2.6 checkpoint.
|
||||
- O4-5 [arbitration 4] « Type » sort: REFERENCE_TYPES business order; equal types keep the stored order (position),
|
||||
so the result is deterministic and stable; unit test: same output for every input permutation of equal-type items
|
||||
restored to stored order, and inputs untouched.
|
||||
- O4-6 [arbitration 5] « Tout afficher » resets search and sort only; open tiles and any tile in edit (tab or panel) are
|
||||
kept. A panel tile in edit goes through P22'': a valid draft is committed before the close, a refused draft cancels
|
||||
the close (field focused, message shown): never a lost valid entry, never an unexpected close. Unit + e2e.
|
||||
- G3 [owner data controls] Full-row data guard replaces R6 / G2: `scratchpad/r2/guard.sh` (read-only transaction,
|
||||
`pnpm db:sandbox sql`) hashes EVERY column (metadata included: updated_at, archived_at, status…) of EVERY row of every
|
||||
base table of `public`, `audit`, `storage` and of `auth.users`, keyed by table + id; before / after each shell run;
|
||||
any pre-existing row changed or deleted, in any table = stop and present before the commit; new rows counted per
|
||||
table (fixture tracking). Baseline 2026-11-12: 197 018 rows, two consecutive snapshots identical.
|
||||
- G4 Every shell run goes through `scratchpad/r2/run-shell.sh <label> <full spec paths>`: refuses a bare argument or
|
||||
an editor-equine path, aborts if `--list` names editor-equine, then snapshot, run, snapshot, diff. editor-equine is
|
||||
never run; its helper calls are updated for typecheck only and reported « mis à jour, non exécuté, non vérifié ».
|
||||
Reference in new issue
Block a user