chore(memory): R2 closure BDR-117, LRN-139..141, plan Rev 4, contract 19-25

This commit is contained in:
bchanot committed 2026-11-14 23:19:37 +01:00
1 parent be0f6d8beb
commit b41c24b29d
5 files changed
+94 -1

No files matched your search

+8
View File
@@ -963,3 +963,11 @@ Decision: finding + reference add/edit/detail in D13 modal dialogs, transactiona
Alternatives: URL params (rejected: leaks into links, A2), data router + useBlocker (rejected BDR-078), inline forms (owner asked modals).
Limits: delete replaces dialog entry (one dead Back); POP during pending Back can swallow a same-instant move; CloseWatcher stub-proved only; outside tap only closes « Plus »; multi-entry Back out of editor drops dirty dialog draft -> content-free sessionStorage flag, notice once on next mount (src/editor/leftDraft.ts).
Status: built, awaiting owner trial on db:trial. Commits 553a0e5..021685f on feature/v1-2-anatomical-sheets.
## BDR-117 — R2 closure after owner trial 2026-11-14: edit-only citing, session tag, leave confirm, U2 orientation (2026-11-14)
- **Status**: accepted
Context: owner R2 trial 2026-11-14 validated main journeys; asked last fixes + U2 orientation.
Decision: (1) citing/removing references only in finding edit form, part of transactional save (one undo); view = « Références citées » + « X références »; sheet read-only (no « Retirer de ce constat »); draft citations reach sibling sheet via zustand store citationDraft.ts (shortcut). (2) deletion pops dialog entry (first Back moves); first Défaire reveals restored finding (store `revealed`). (3) « Plus » pick focuses new tab panel. (4) history entries carry random 128-bit session tag, not account id; tag record in sessionStorage bound by FNV-1a fingerprint salted with tag (sync, works on http LAN); rotated on sign-out/mismatch. (5) multi-entry traversal leaving editor with dirty dialog: Navigation API navigate event preventDefault (cancelable same-document traverse, verified Chromium 156 incl. CDP history jump), cascade ask top-down, only layers a Back removes are asked; fallback no API/not cancelable = content-free left-draft flag + notice; sign-out with dirty dialog = salted flag, notice at same account's next sign-in.
U2 orientation: properties in modal dialog, geometry direct on canvas; click without move opens dialog, drag never does; point size slider stays on canvas strip; boards 02-06, 13 redraw + owner validation before U2 code. U2 not started.
Owner-accepted limits: same-instant move vs Back race, « Aller à » view mode, search kept across tabs, first outside tap closes « Plus » only. To confirm: CloseWatcher on real Android, cascade limit, browser matrix (Firefox/Safari unverified).
Status: built afc1051..f8be0ad, awaiting owner final manual checks (OWNER_TRIAL §4.12).
+3
View File
@@ -561,3 +561,6 @@ R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_comp
## 2026-11-13
- R2 corrections 2026-11-13: C0 admin.spec diagnosis (A/B + dose-response, accumulation, BLK-015 open), C1-C5 + final review I1 + verifier gap fixed (3303530..538ce27), sweep 221p/5f admin.spec only, guard OK, verifier CONFORME; stopped at R2 checkpoint for db:trial trial.
- 2026-11-13 R2 UX finish built (553a0e5..021685f): dialogs, history Back/Forward, filter chip, Plus overlay, sticky sidebar; final review fixes; gates green, shell sweep fails only admin.spec (BLK-015); awaiting owner db:trial trial
## 2026-11-14
- 2026-11-14 R2 closed after owner trial: edit-only citing, delete undo reveal, Plus focus, session tag in history, Navigation API leave confirm + cascade, sign-out notice; U2 orientation recorded (BDR-117); final sweep only admin.spec (BLK-015); awaiting owner manual checks OWNER_TRIAL 4.12
+12
View File
@@ -962,3 +962,15 @@ Apply: every dynamic key site gets unit test asserting heading text has no 'edit
## LRN-138 — Unblockable leave + no draft storage: content-free loss flag (2026-11-13)
Pattern: browser Back not interceptable (BDR-078) + owner forbids storing drafts + owner forbids silent loss. Resolution: on unmount with dirty dialog write one content-free flag (kind + element key, scoped sheetId+userId) to sessionStorage, try/catch; next mount of same sheet+user shows notice once, clears flag. Relies on React 19 parent-first cleanup on deletion.
Apply: any "cannot block leave, cannot keep data" conflict -> record the fact of loss, not the data, and tell user on return.
## LRN-139 — Navigation API cancels same-document Back traversal in Chromium (2026-11-14)
Pattern: Navigation API `navigate` event on same-document traverse is cancelable in Chromium 156 (probe: CDP Page.navigateToHistoryEntry -3, userInitiated true, preventDefault keeps entry). Gives real "confirm before leave" for SPA Back/history-menu jumps without data router (BDR-078). Then navigation.traverseTo(destination.key) after user confirms; pass-through flag for that follow-up event.
Apply: guard only when dirty + destination leaves route + event.cancelable; fallback (no API, Firefox/Safari unverified) = after-the-fact notice. e2e via CDP history jump; page.goBack with cancel times out. Probe browser behaviour with throwaway page before planning.
## LRN-140 — crypto.subtle missing on http LAN origin (2026-11-14)
Pattern: crypto.subtle absent on non-secure origin (http LAN dev/trial address); loopback 127.0.0.1 counts secure so tests miss it. Async SHA-256 binding broke reload restore on owner trial origin + added blank first frame.
Apply: for equality binding (not secret) use sync non-crypto hash (FNV-1a 64 BigInt) salted with random per-record value; test with crypto.subtle undefined. Check every crypto.subtle use against the LAN http origin.
## LRN-141 — Stacked modals: ask only removed layers; never rule silent loss into a limit (2026-11-14)
Pattern: stacked modal layers + "ask all layers" guard: question appeared in lower dialog hidden under still-open upper modal (citations sheet) -> looks frozen. Also ruling "accept as documented limit" for silent loss broke owner condition; reviewer caught it.
Apply: a guard asks only layers the move actually removes; before showing a question, close clean layers above the dirty one. Never rule a silent-loss case into "documented limit" when owner condition forbids silent loss: restore notice instead. Label limits owner did not see as "to confirm", never "accepted".