docs(docs): R2 pre-closure adjustments, limits and checks

This commit is contained in:
bchanot committed 2026-11-15 20:11:54 +01:00
1 parent ee7912768c
commit c93787c947
4 files changed
+156 -17

No files matched your search

+69 -2
View File
@@ -171,6 +171,8 @@ The criteria below are the contract as written.
### R2 — The Références tab (D1 to D4)
Status (2026-11-15, later): four pre-closure adjustments built (« Pre-closure adjustments 2026-11-15 » below,
`V1-2-6_OWNER_TRIAL.md` §4.14), awaiting the owner's checks, then R2 closure.
Status (2026-11-15): built, awaiting the owner's `db:trial` check of two last adjustments (« Owner follow-up
2026-11-15 » below, `V1-2-6_OWNER_TRIAL.md` §4.13), then R2 closure. Several lines below describe the side sheet, the
citations in the finding's edit form or the phone tabs Annotations + Vérification: each is marked as superseded.
@@ -458,13 +460,78 @@ Controller rulings (autonomous mandate, reported to the owner):
- On phones the visible tabs are the first two of the order; no arrow-key navigation in « Plus » (Tab moves, Tab out
closes).
- A reference created from the dialog, then the draft abandoned, stays in the library uncited. The creation is its own
undo step, tested and documented.
undo step, tested and documented. Superseded 2026-11-15 (pre-closure): the creation stays in the draft until
« Enregistrer » and leaves nothing in the library after an abandon.
Labels: `V1-2-6_R2_LABELS.md` §10. Browser proofs: `BROWSER_TESTS.md`. Gates at the last Task 12 commit: typecheck and
lint 0, `test:run` 1683, `e2e:ui` 251, the touched `e2e:shell` specs green with the full-row guard clean. The full
`e2e:shell` sweep is not rerun for Rev 5 (BLK-015 `admin.spec.ts` unchanged).
Status: awaiting the owner's `db:trial` check (`V1-2-6_OWNER_TRIAL.md` §4.13), then R2 closure.
Status: awaiting the owner's `db:trial` check (`V1-2-6_OWNER_TRIAL.md` §4.13), then R2 closure. Superseded in part the
same day: see « Pre-closure adjustments 2026-11-15 » below.
#### Pre-closure adjustments 2026-11-15
Status: built on `feature/v1-2-anatomical-sheets` on top of `ae02f48` (plan « Rev 6 », contract criteria 32 to 36,
`.claude/tasks/plans/2026-11-13-r2-ux-finish-1624.md`), awaiting the owner's checks (`V1-2-6_OWNER_TRIAL.md` §4.14),
then R2 closure. Nothing merged, nothing deployed.
The owner's trial of the Rev 5 build (§4.13) asked for four more adjustments before closure.
Requests (owner brief 2026-11-15):
1. A « Citer » button. Choosing a reference in the select no longer cites it: the choice only fills the select, and
« Citer » (`type="button"`) adds it to the draft, then resets the select. Arrow keys on the select and closing with
only a choice ask nothing.
2. A reference created from the edit mode belongs to the draft. It is written with the citations by « Enregistrer »,
in one undo step, and an abandon leaves the library as it was.
3. Family wording. A family dialog and the places that name its element say « famille », not « constat ».
4. A close button easy to touch. The ✕ of every dialog is a 44 px box.
Built, by task:
- Task 14, « Citer », family labels and the ✕: `240c2ba` (the ✕), `8c3fcca` (« Citer » and the family labels, one
commit: the fr, en and e2e hunks are shared), `1d119c3` (review round: a stale choice resets at render, the pending
line sits under the add row).
- Task 15, the creation in the draft: `70eb2fc`, `ee79127` (review round: the notice waits until the reference dialog
is gone, a locale-aware list of pending references, a note when a pending reference is edited).
- Task 16, this documentation.
Rulings (controller, after a three-lens challenge of the plan):
- « Enregistrer » with a chosen reference not yet cited refuses: the form stays in edit mode, a line at the select says
so (`editor.citations.pending_choice`) and the focus goes to « Citer ». The select value is derived at render from
the available options, so a choice whose reference vanished goes back to the placeholder.
- Family rule: one helper `isFamilyKey(key)` (a finding key with a one-segment path), beside `isCitable`, drives every
« famille » variant: the dialog titles, the count and empty lines, the citer row (« cette famille » alone, no second
badge), the filter chip, its remove and back labels, the vanished-filter announcement and the « n'existe plus »
line. Plural keys keep the unchanged plural helper.
- The pending reference travels from the reference dialog to the citations form through the layer's held state, never
the navigation state or the history. « Modifier la référence » on a pending row reopens it prefilled (title
« Nouvelle référence », « Valider »); « Retirer » on it drops it. The insert is dry-run on the current document text
before it is accepted, so a refusal shows in the reference form. The pending row carries a « Nouvelle » badge.
- The save writes one `insert` per pending reference then the `update` of the citations as one batch. A clashing id is
minted again once. A refused batch keeps the draft and names the pending references.
- Notices about a pending reference (created, edited, removed) go to the citations dialog's own status line, never to
the page's live region, so an abandon leaves nothing announced.
- « Modifier la référence » on an existing reference keeps its own save: its dialog writes at once, as a library
change with its own « Défaire ». Only a reference created from the edit mode is deferred.
Superseded by these adjustments: the Rev 5 ruling that a reference created from the dialog stays in the library
uncited after an abandon; the select that cited on change; the dialog ✕ at its icon size (21 px wide in Chromium).
Limits:
1. A pending reference lives only in the open references form until « Enregistrer ». The leave guards (✕, Escape,
backdrop, Back, the leave cascade) and `beforeunload` protect it, but no recovery copy is kept: a reload, a tab
closed or a killed tab loses it, as for the other drafts of this dialog.
2. « Modifier la référence » on an existing reference is a library change at once, not part of the citations draft. It
cannot be abandoned with « Annuler » of the citations form; its own « Défaire » removes it.
3. The English wording is provisional, as for every key.
4. `useEditCommand.check` dry-runs on the document text without the store's blocked state; the form is read-only
then, so its submit is off.
5. Not seen red: the new shell cases (written with the code), the alignment assertion of « Citer » and the unit case of
the unreadable element at save (it pins existing behaviour).
Labels: `V1-2-6_R2_LABELS.md` §11. Browser proofs: `BROWSER_TESTS.md`. Gates at `ee79127`: typecheck and lint 0,
`test:run` 1719 (app), `e2e:ui` 253, `editor-citations.spec.ts` on `db:sandbox` 23 passed with the full-row guard
clean. The full `e2e:shell` sweep still has failures (BLK-015 `admin.spec.ts` and others) and is not green.
Original plan text: