chore(memory): R2 closure BDR-117, LRN-139..141, plan Rev 4, contract 19-25
This commit is contained in:
1 parent
be0f6d8beb
commit
b41c24b29d
5 files changed
+94
-1
No files matched your search
@@ -199,7 +199,7 @@ Q: Plan rev 3 and choices 1-5 / A: approved by the owner 2026-11-13 (« je valid
|
||||
13. [gated 2026-11-13] A changed « Enregistrer » in the finding or reference dialog is exactly ONE undoable operation (undo length +1, one Défaire restores the prior state); a pristine « Enregistrer » and every « Annuler » / « Abandonner » add none (unit + e2e).
|
||||
14. [gated 2026-11-13] The citations sheet stacked over the finding dialog is fully usable by keyboard (Tab reaches every control, Escape closes the sheet only, focus returns to « X références ») and by touch (taps on its controls at 375 with hasTouch, the dialog underneath not activated) (e2e).
|
||||
15. [gated 2026-11-13] Browser history entries hold navigation state only (tab, section, open layers by element key, references filter by finding key): no typed text, no search term, no draft; an entry restores only for the same sheet and the same signed-in account, otherwise the editor opens on its default view (unit: entry state shape and mismatch rules).
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2/apps/app && f=src/editor/history/entry.ts && [ -f "$f" ] && grep -q "sheetId" "$f" && grep -q "userId" "$f" && ! grep -Eq "^\s*(query|draft|text|search)\??\s*:" src/editor/history/*.ts && echo HISTORY_SHAPE_OK
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2/apps/app && f=src/editor/history/entry.ts && [ -f "$f" ] && grep -q "sheetId" "$f" && grep -q "tag" "$f" && ! grep -Eq "^\s*(query|draft|text|search)\??\s*:" src/editor/history/*.ts && echo HISTORY_SHAPE_OK
|
||||
EXPECT: HISTORY_SHAPE_OK
|
||||
EVIDENCE: MET exit=0 marker-found :: HISTORY_SHAPE_OK
|
||||
16. [gated 2026-11-13] With the « Plus » menu open, the platform back request (CloseWatcher where the browser offers it) closes the menu before any navigation; without CloseWatcher the limit is stated (unit with a CloseWatcher stub).
|
||||
@@ -210,3 +210,21 @@ Q: Plan rev 3 and choices 1-5 / A: approved by the owner 2026-11-13 (« je valid
|
||||
apps/app/src/editor/** (navigation, history adapter, references view and filter), apps/app/src/components/editor/** (findings, references, citations, tabs, workspace, layers), apps/app/src/components/ui/{ModalDialog,Dialog}.tsx (only if a shared fix is needed), apps/app/src/components/shell/{ShellChrome,AppLayout}.tsx, apps/app/src/clients/useClientList.ts, apps/app/src/animals/useAnimalList.ts and their list routes (if the app-wide review keeps them), apps/app/src/i18n/{fr,en}.ts, apps/app/src/styles/** (only if needed), apps/app/tests/**, apps/app/e2e/{support,shell,ui}/**, docs/development/{V1-2-6_U1_CORRECTIONS,V1-2-6_OWNER_TRIAL,V1-2-6_R2_LABELS,BROWSER_TESTS,V1-2_ANATOMICAL_SHEETS}.md, docs/design/README.md, this contract, the plan, .claude/tasks/TODO.md, memory.
|
||||
|
||||
ORACLE AMENDMENT 2026-11-13 (controller): criterion 4 key renamed to the shipped key editor.references.filter_chip (chip « Références du constat : {name} »); criterion 15 path is src/editor/history/entry.ts (folder split in Task 1) and the forbidden-field scan covers every file of src/editor/history. Same assertions, no weakening.
|
||||
|
||||
## Owner trial 2026-11-14 (brief « Retour de mon essai propriétaire R2 »): additional criteria
|
||||
19. [gated 2026-11-14] Finding view mode shows « Références citées » and « X références » only (no cite or remove control); edit mode adds and removes citations in the form draft; one changed « Enregistrer » = one undoable operation covering names and citations; the side sheet has no « Retirer de ce constat » (unit + e2e).
|
||||
20. [gated 2026-11-14] After deleting a finding, the first « Défaire » restores it at once, selected, visible and focused; the first Back after a deletion has a visible effect (unit + e2e).
|
||||
21. [gated 2026-11-14] Choosing a « Plus » entry by keyboard moves the focus to the new tab's panel (e2e at 375).
|
||||
22. [gated 2026-11-14] History entries hold a random session tag, never an account id; accounts stay separated (tag bound to the account by a digest, rotated on sign-out and on mismatch); left-draft flag keyed by the tag (unit).
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2/apps/app && ! grep -q "userId" src/editor/history/entry.ts && ! grep -q "userId" src/editor/leftDraft.ts && grep -q "tag" src/editor/history/entry.ts && echo SESSION_TAG_OK
|
||||
EXPECT: SESSION_TAG_OK
|
||||
EVIDENCE: MET SESSION_TAG_OK (controller 2026-11-14, rc 0; verifier rerun)
|
||||
23. [gated 2026-11-14] With a dirty dialog, a multi-entry traversal leaving the editor asks « Abandonner les modifications ? » before anything is lost where the Navigation API can cancel it (Chromium, e2e via CDP history jump); elsewhere the after-the-fact notice stays (unit).
|
||||
24. [gated 2026-11-14] R2 closure docs: validated status, limits accepted and lifted, a short list of final manual checks (incl. Android Back on a real phone, the leave confirmation, the fallback browsers).
|
||||
25. [gated 2026-11-14] U2 orientation recorded in the U2 plan, the UX decisions and the design README (annotation property modals with direct manipulation kept; boards to redraw and validate before U2 code); U2 not started.
|
||||
|
||||
ORACLE AMENDMENT 2026-11-14 (controller): criterion 15 now reads « same sheet and same session tag » (owner decision 2026-11-14 replaces the account id); its oracle checks `sheetId` and `tag` instead of `userId`.
|
||||
|
||||
SCOPE AMENDMENT 2026-11-14 (controller): apps/app/src/app/providers/AuthProvider.tsx joins FILE SCOPE (Task 8: the session tag rotates on sign-out for the app lifetime; an editor-local subscription would miss a sign-out while the editor is unmounted).
|
||||
|
||||
SCOPE AMENDMENT 2026-11-14 (controller): docs/development/V1-2-6_UX_PLAN.md and V1-2-6_UX_DECISIONS.md join FILE SCOPE (required by criterion 25); CLAUDE.md folder map lines, useLeaveGuard.ts and components/ui/afterModalsClosed.ts accepted (helpers named by the plan).
|
||||
@@ -233,3 +233,55 @@ resolved targets and POP landings, scroll captured before dispatch (rob-11, cor-
|
||||
creation replaced before close (cor-17); fr/en prettier exemption stated (cor-18); flip notice from the mode (rob-16);
|
||||
announcer joins messages (rob-17); wrapper copied into the worktree (rob-14); skippable entry untested (rob-10);
|
||||
adapter as its own hook, MemoryRouter-tolerant (rob-15); pin off under a filter (cor-9).
|
||||
|
||||
## Rev 4: owner trial 2026-11-14 (R2 validated; last adjustments, autonomous mandate)
|
||||
|
||||
Owner brief 2026-11-14: R2 main journeys validated. Accepted limits: same-instant move vs Back race, « Aller à » opens in
|
||||
view mode, search kept across tabs, first outside tap only closes « Plus ». Android Back to verify on a real phone.
|
||||
BLK-015 tracked separately. Probe (controller, pinned Chromium 156.0.8078.4, scratch page): a same-document `traverse`
|
||||
`navigate` event is cancelable for a history-menu jump of -3 (CDP Page.navigateToHistoryEntry, userInitiated true), with
|
||||
or without prior activation, and preventDefault keeps the page on its entry.
|
||||
|
||||
### Task 6: citing references moves to the edit mode (owner item 1)
|
||||
- View mode (finding node): « Références citées » + « X références » (opens the side sheet) only; no « Citer une
|
||||
référence », no remove. Family (category, no sheet per D2): label + read-only list, no « Retirer ».
|
||||
- Edit mode (node and family): same label and button, plus the editable list of the DRAFT citations (each « Retirer »)
|
||||
and « Citer une référence ». Citation changes live in the form draft (dirty check, « Abandonner les modifications ? »),
|
||||
and « Enregistrer » writes names, descriptions, flag and citations as ONE undoable operation; pristine save none.
|
||||
- The button always agrees with what the form shows: in edit mode it counts the draft and the sheet opened from the form
|
||||
lists the draft's references. The side sheet becomes read-only for the finding: « Retirer de ce constat » leaves it
|
||||
(removal only in the edit form); « Modifier » (the reference), « Aller à », « Tout afficher » stay.
|
||||
- Creation dialog: no citations (unchanged). Tests: unit (view has no cite control; edit stages add/remove; one undo
|
||||
restores names and citations together; Annuler with only a citation change asks), e2e on the finding dialog.
|
||||
|
||||
### Task 7: deletion, undo and Back; « Plus » keyboard focus (owner item 3, points 1 and 2)
|
||||
- Deleting a finding (from its dialog or anywhere) closes its dialog by popping the dialog entry, never by replace: the
|
||||
first Back after a deletion has a visible effect (limit 1 lifted). A later Forward onto the deleted element's entry
|
||||
follows the existing gone rule.
|
||||
- The first « Défaire » after a deletion restores the finding at once and visibly: its row exists, its branch expanded,
|
||||
selected, scrolled into view and focused (Constats tab shown); no second « Défaire » needed. Same for « Refaire » of a
|
||||
creation. Tests: unit + e2e (delete, one header « Défaire », row visible and selected; one Back after delete moves).
|
||||
- « Plus »: choosing an entry (keyboard, also pointer) moves the focus to the new tab's panel (`role=tabpanel`,
|
||||
`tabIndex=-1`, labelled by its tab) once the overlay is gone; focus ring only for keyboard (`:focus-visible`). Tests
|
||||
unit + e2e at 375 (Enter on an entry: the panel of that tab is focused).
|
||||
|
||||
### Task 8: session tag in history; confirmation before a multi-entry leave (owner item 3, points 3 and 4)
|
||||
- History entries carry `tag` (random 128-bit hex, crypto.getRandomValues) instead of `userId`; `sheetId` stays.
|
||||
The tag lives in sessionStorage with the SHA-256 digest of the account id (crypto.subtle), reused only when the
|
||||
digest matches the signed-in account, rotated on sign-out and on any account mismatch; storage failure → in-memory
|
||||
tag (a reload then restores nothing). No tag yet → no restore (fail closed). The left-draft flag key uses the tag; flags
|
||||
of a rotated tag are cleared. Entries with `userId` (older shape) read as foreign.
|
||||
- Navigation API guard (`navigation` feature-detected): while a finding or reference dialog is dirty, a same-document
|
||||
`traverse` whose destination leaves the editor route is cancelled when `event.cancelable`; the dialog's own
|
||||
« Abandonner les modifications ? » shows; « Continuer la saisie » stays; « Abandonner » traverses to the destination
|
||||
(`navigation.traverseTo(key)`) with no left-draft notice. Not cancelable or no API → the existing flag and notice.
|
||||
In-editor traversals keep the existing refusal path. Tests: unit with a navigation stub; e2e with CDP
|
||||
`Page.navigateToHistoryEntry` (jump of several entries out of the editor with a dirty dialog: confirm shown, URL and
|
||||
draft kept; Abandonner lands on the destination).
|
||||
|
||||
### Task 9: R2 closure docs and the U2 orientation
|
||||
- R2 validated by the owner's trial 2026-11-14: status lines (V1-2-6_U1_CORRECTIONS §R2, V1-2_ANATOMICAL_SHEETS notes),
|
||||
limits (accepted list; lifted: delete dead Back, « Plus » focus to body; changed: tag, leave guard), §4.11 steps
|
||||
adjusted, a §4.12 « Vérifications manuelles finales » list, labels, BROWSER_TESTS.
|
||||
- U2 orientation (controller text, `u2-orientation.md` in the SDD folder) into V1-2-6_UX_PLAN §U2, V1-2-6_UX_DECISIONS
|
||||
and docs/design/README.md (boards 02 to 06 and 13 to redraw at U2 planning, validated before U2 code).
|
||||
Reference in new issue
Block a user