# V1-2.6 U1 corrections after the owner's first trial Status: PROPOSAL, 2026-11-09. Owner brief « V1-2.6 UX — Arbitrages du premier essai propriétaire » (2026-11-09), answering the trial diagnosis of the same day. Design, documentation and plan only: nothing here authorises code. Lot R0 (boards) is delivered in `docs/design/v1-2-6-r0/` and awaits the owner's graphic validation; R1 to R4 start only on their own explicit authorisation. Contract: `.claude/tasks/contracts/2026-11-09-v1-2-6-trial-arbitrations.md`. Companion: `TRIAL_STACK.md` (the dedicated manual trial stack, request §5). ## 1. Owner decisions (2026-11-09) | # | Decision | |---|---| | D1 | A fifth main tab « Références » between Constats and Vérification becomes the main access to the reference library. The header « Références » button is removed. | | D2 | A contextual panel stays, opened from a finding's detail, filtered on its citations, with « Tout afficher » leading to the tab. About 34 rem wide within the available space, a lateral slide of 150 to 200 ms, `prefers-reduced-motion` honoured. | | D3 | The tab shows collapsible tiles: closed = short citation, type, citation count; open = full information, DOI, URL, actions. Instant search with a clear button. Sort by document order (default), A to Z, citation count or type. Sorting never changes the document; reorder commands only while document order is shown. | | D4 | Kept: unsaved changes, focus, « Aller à », permissions, read-only mode, accessibility tests. Below 640 px, Références goes in the « Plus » menu. Boards validated before any UI code. | | D5 | History reads « Défaire » / « Refaire » instead of « Annuler » / « Rétablir », with explicit accessible names, the keyboard shortcuts kept and the distinction from dialog « Annuler » buttons kept. | | D6 | A « Désélectionner » button near « Supprimer ». Escape deselects when no dialog, priority panel, menu or tracing in progress consumes it. Deselecting is interface state: no document change, no history entry. A click on an empty part of the drawing is left to U2 (superseded by D6b). | | D6b | Owner, 2026-11-12, after the U1 manual test on the trial stack: a click or a tap on the drawing anywhere but on an annotation deselects (a bone or any non-interactive SVG shape, an empty part of the drawing); a click on an annotation still selects it; a drag, a pan, a zoom or a touch navigation gesture never deselects; with nothing selected a click changes nothing; same behaviour with a mouse and on a touch screen. Joins R1, beside « Désélectionner » and Escape. | | D7 | Sheet list: instant search with clear, sort by last modification (default) or name, the last-modification date visible, better Administration home cards. No section built on UUIDs, names, slugs or test conventions; generic for every species; no artificial test filter. | | D8 | A dedicated, persistent manual trial stack, separate from the automated sandbox: technical plan only, nothing created, reset or deleted now (`TRIAL_STACK.md`). | | D9 | Three separate test anomalies tracked apart from U1 and U2: A fictitious fingerprints, B working copy never archived by `sheets-admin.sandbox.ts`, C integrity failure invisible in catalogue cards (section 5). | | D10 | Lots R0 (boards), R1 (history labels, deselect), R2 (References tab), R3 (sheet list), R4 (catalogue integrity warning, independent fix). Any SQL schema or Rust core change needs its own checkpoint. | ## 2. What these decisions supersede | Earlier validated item | Where | New state | |---|---|---| | U1 AC1: « no … « Références » … tab remains » | U1 contract `.claude/tasks/contracts/2026-11-06-v1-2-6-ux-u1-1123.md:373-375` | Five tabs (D1). | | U1 AC3: panel opened from the header button and from a finding; focus back to the opener, else the header button | same contract :381-389 | Opened from a finding only; focus back to the finding's « n référence(s) » button. Scrim, `inert` tab panels, Escape / ✕ / scrim close and read-only behaviour unchanged. | | U1 AC4 and T15 (history part): visible « Annuler » / « Rétablir », name « Annuler la dernière modification » | contract :390-397, `V1-2-6_UX_DECISIONS.md:309-322` | « Défaire » / « Refaire » (D5). T15's form wording (« Abandonner », « Abandonner les modifications ») unchanged. | | U1 AC10: no horizontal scroll with the references panel open | contract :420-421 | Kept, re-checked with the 34 rem panel. | | U1 AC12, AC13: « Aller à » a reference opens the side panel | contract :425-431 | « Aller à » a reference opens the Références tab, the tile open and focused. | | U1 AC17: panel tests « open from header and finding »; keyboard order with the panel | contract :439-446 | Tests rewritten for the tab and the finding-only panel; the panel keeps its place in the keyboard order when open. | | Checkpoint choice 5: Général and Constats under « Plus » below 640 px | `V1-2-6_UX_U1_CHECKPOINT.md:24` | Général, Constats and Références under « Plus ». | | Checkpoint choice 10: search on citation, DOI and URL; ↑/↓ only on the unfiltered list | same file :29 | Carried to the tab: same search fields; reorder only in document order and without an active search. | | Checkpoint choice 15: « Références » announced as a panel | same file :34 | Announced as a tab, like the four others. | | Board 11 (references side panel as the main access) | `docs/design/v1-2-6/11-constats-references-desktop.png` | Replaced by boards 23 to 27 once validated. | | BDR-099 item 5 (collapsible references rejected) | memory | Not contradicted: it concerned the catalogue page on a phone (`docs/design/README.md`, accepted deviation 2), not the editor. | | U2b F5 (filter panel in the references panel's slot) | `V1-2-6_UX_FINDINGS_NAV.md:104-126` | Unaffected: the panel slot stays, used by the contextual references panel now and by the filter panel in U2b. | ## 3. Lots Every lot: one commit or more per coherent change, pushed; gates in this order: `pnpm typecheck`, `pnpm lint`, `pnpm test:run`, `pnpm build`, `pnpm e2e:ui`, then the shell suite on the sandbox as it stands, with its exact result (the four `admin.spec.ts:717` failures of the taken working-copy slot, anomaly B, are fixed: row B of section 5). Every removed or rewritten assertion is mapped to its replacement in the commit message (R-24). Design gates: the boards of R0 as validated, `impeccable detect` on the changed components, a fresh design review before the lot closes. ### R0 — Boards and owner validation (this delivery) Boards 23 to 30 in `docs/design/v1-2-6-r0/` (sources, data generated from the equine draft, `REVUE.md`). Exit: the owner validates each board, or asks for corrections; the validated boards then join `docs/design/README.md` as the reference of R1 to R4. ### R1 — History labels and deselection (D5, D6, D6b) Delivered 2026-11-12 on `feature/v1-2-anatomical-sheets`: `7dda61d` (D5 labels), `bbb1668` (« Désélectionner » and Escape), `bbdfd27` + `a1ee194` (D6b), `ab823f4` + `2327d61` + `0849e54` (browser specs), `0d1edac` (design review fix: 44 px touch target below xl, 6 px icon gap), review fixes `132756e`, `6ed90ef`, `9807ed2`. Final gates on `a180b9e` (the source at HEAD differs only by the comment of `6ef5223`): typecheck, lint, build ok; unit tests app 1381, supabase 180, core-wasm 66; `e2e:ui` 227 passed; `e2e:shell` full suite on the sandbox 197 passed, 4 failed, 99 skipped. Status (owner, 2026-11-12): accepted technically on the report; the owner's manual validation on db:trial is still to do. Decision record BDR-113 (R1 editor only), learnings LRN-128 to LRN-130. The 4 failures are the `admin.spec.ts:717` timeouts (anomaly B, the taken working-copy slot), the same as in the 188 / 90 / 4 baseline; every new R1 test passed. Follow-up `927537b` (owner brief « V1-2.6 — R1 — Dernier retour utilisateur », 2026-11-12): the « Sélection : … » tag is screen-reader-only (`sr-only`, not a live region) in the editor and the read-only twin, so the drawing no longer moves when the selection changes; board `04` (and board `26` of `v1-2-6-r0/`) deviation recorded in `docs/design/README.md`; one unit test and two layout-stability specs in `editor-deselect.spec.ts` (desktop, read-only twin at 375 px). Gates on that commit: typecheck, lint, `pnpm test:run` (app 120 files, 1382 tests) green; `e2e:shell` on `db:sandbox`, six editor specs (deselect, equine, access, annotations, geometry, journey): 37 passed, 37 skipped (other viewport), 0 failed. Final status (owner, 2026-11-12, brief « Validation finale R1, correctif E2E et GO R2 »): R1 VALIDATED FUNCTIONALLY. The ten manual R1 checks on db:trial passed, and the owner confirmed in the browser that the drawing no longer moves on selection and deselection; `927537b` and `00936c8` accepted. Limits kept: the ToolNotes hint above the canvas still moves the drawing one line when it is cleared by a selection, the selection itself is not announced to screen readers, iOS Safari is not validated, and the graphic gaps listed under « Behaviour and limits » and the TODO R1 follow-ups. The criteria below are the contract as written. - Labels: `editor.history.*` keys in `apps/app/src/i18n/fr.ts` and `en.ts` (FR « Défaire » / « Refaire », names « Défaire la dernière modification » and « Refaire la dernière modification défaite »; EN « Undo » / « Redo » unchanged); `HistoryButtons.tsx` keeps its structure. Shortcuts unchanged: Ctrl/⌘+Z undo, Ctrl/⌘+Maj+Z redo (`apps/app/src/editor/useUndoShortcuts.ts:19-23`). Every prose string that names the history « Annuler » is reworded; dialog « Annuler » buttons untouched. - « Désélectionner »: a secondary button beside « Supprimer » (`PropertiesPanel.tsx:257-284`), shown while an annotation is selected, in read-only modes too (selection is interface state); it dispatches the existing « no selection » path that « Toutes les annotations » uses (`PropertiesPanel.tsx:93-108`). - Escape: today a tracing consumes it when the canvas box has focus (`usePlacement.ts:82`), the references panel when not already handled (`ReferencesPanel.tsx:234`), dialogs natively (`ModalDialog.tsx:111`). One handler on the workspace, at the bubbling phase, deselects only when `event.defaultPrevented` is false, no dialog is open, no menu is open and no tracing runs; each consumer marks the key handled. The « Plus » menu's own Escape path is checked first (it has no explicit handler today). - Click on the drawing (D6b). Today, with the select tool, `clickHandler` in `apps/app/src/editor/annotations/useCanvasGestures.ts:57-68` calls `onSelect` only when the target has a `[data-anno-id]` ancestor (`annotationIdOf`, `useCanvasBuild.ts:91-94`) and ignores every other click: that is the defect. Change: the other branch calls a new `onDeselect` input; `EditableAnnotations.tsx` (`CanvasStage`) wires it to the same deselect path as the button, and only when an annotation is selected (nothing selected: no dispatch, so a pending keyboard creation, its typed fields and the « Filtrer par nom » term stay). The read-only twin (`AnnotationsTab.tsx:187`) draws through `CatalogueCanvas`, whose click listener (`CatalogueCanvas.tsx:99-104`) gets an optional `onEmpty` with the same rule; the catalogue reader page (`SheetRoute.tsx:150`) passes none and is unchanged. - Interactive means any `[data-anno-id]` element of the composed view: a point (hitbox and disc), a zone (filled, `pointer-events` all, `docs/ANNOTATION-RENDERING.md`), a detail link. A click inside a zone selects that zone, as today. Everything else in the canvas box deselects: a shape of the drawing (bone, outline, any path, rect, circle or group), the drawing's background, the box margin around the drawing. - Drawing tools (point, zone, link) and a tracing: unchanged, a click places or adds a vertex. - Gestures: the existing `swallowClick` of `useFraming` (a press that moved more than 4 CSS px: pan, marker drag, pinch) already keeps the click from acting; in addition a press during which a second pointer came down (a two-finger tap or a pinch that moved less than 4 px) never deselects, tracked in the canvas hooks so that `useFraming`, shared with the catalogue reader, is unchanged. The wheel, Ctrl+wheel, the keyboard pan and zoom, the zoom buttons and a touch scroll of the page (it ends in `pointercancel`) produce no click on the drawing. - Effect: the selection and its contextual panel are reset (the overview comes back); document text, handle version, history length and the save line unchanged; no save, no history entry. A field typed in the panel and not blurred is committed by its own blur before the click, exactly as with « Toutes les annotations » today. - Focus and announcement: the click leaves the focus on the drawing box it landed on (no jump to the list row, which stays the rule of the « Désélectionner » button, A6); the same polite announcement as the button. - Unit tests for D6b (`apps/app/tests/unit/editor-annotations-tab.test.tsx`, happy-dom; the test drawing has an inner ``): with a selection, a click on the drawing's inner ``, on its root `` and on the box margin each deselect, document text, handle version and history length unchanged; a click on another marker selects it, on the selected one keeps it; nothing selected, a click on the `` changes nothing and a pending keyboard creation keeps its typed name; a press moved more than 4 px on the `` (pan), a marker drag and a press with a second pointer keep the selection; undo after a click deselect undoes the previous edit; the focus stays on the box and the announcement is made; the read-only twin deselects on the ``; `CatalogueCanvas` without `onEmpty` keeps today's behaviour. - Unit tests: deselect leaves the document text and the history length unchanged; undo after a deselect undoes the previous edit; the Escape matrix (dialog, menu, panel, tracing, nothing open) with one consumer each time; focus after « Désélectionner »: the annotation's list row if it still exists, else the drawing, with no new selection and a polite announcement (A6 as ratified); accessible names of both history buttons in FR and EN; read-only modes show « Désélectionner » and no « Supprimer ». - E2E: the journeys that name « Annuler » / « Rétablir » rewritten one for one; a new desktop spec for the button and Escape; axe on Annotations with a selection. For D6b, in that spec (Chromium, `pnpm e2e:shell` against `pnpm db:sandbox`, never the trial stack): real clicks on the inner `` and `` of the drawing written by `e2e/support/editor.ts:78-80`, on the drawing's background and on the box margin, then on another marker; a drag pan on the zoomed drawing and a marker drag keeping the selection; a touch context (`hasTouch`, as in `editor-geometry.spec.ts:419`) where a tap deselects and a touch drag does not. `editor-equine.spec.ts`: one click on a bone path of the historical horse drawing of the working copy deselects. #### Behaviour and limits (as built) - Owner decisions at the gates. G1: Escape moves the focus only when it was inside the properties panel (to the annotation's list row if it still exists, else to the drawing); from anywhere else the focus stays where it was. G2: the « Supprimer » button style is unchanged. - D6b in plain terms: the rule follows the press, not the click target. A press that begins outside every `[data-anno-id]` element and ends as a click deselects. A press that began on an annotation never deselects, even if it ends elsewhere. A drag, a pan, a zoom, a pinch or a press that gained a second finger never deselects. - Escape from outside the editor workspace (sidebar, application header) does nothing. - Escape with the focus on the page (`body`) respects the layers above: an open modal dialog (delete, phone drawer) keeps the selection, and while the references panel is open Escape closes the panel first and keeps the selection. In « Plus », Escape typed in a text field or outside the workspace is left alone. - A pen tap follows the touch rule: the decision is taken in the tap's own click, and only when that click's target is not an annotation; only the mouse acts at the pointer-up. A hover move after a press is not part of it, and a new press by the same pointer outside the box cancels a stale one. - The read-only twin keeps its keyboard pan and zoom (arrows, +, -, 0) when it deselects. - A value refused as « non appliqué » in the properties panel is lost when the panel closes, as with « Toutes les annotations ». - « Toutes les annotations » keeps its focus behaviour: when its row is filtered out, the focus falls to the page. - The vertex handles of a selected polygon are display-only: a press on the part of a handle outside the zone's fill deselects. - A touch tap whose click Chromium drops does not deselect; a second tap does. This is rare: a field blur commit rebuilds the drawing between the synthesized mousedown and the click. - Chromium touch adjustment can turn a tap about 6 px outside a marker into a selection of that marker (no deselect announcement then). - Proof of the touch guards: Chromium only, through CDP touch with a capture-phase event recorder (identical over three runs, `.superpowers/sdd/2026-11-12-r1-history-deselect-1141/task-5a-report.md`). A tap on empty: 1 pointerdown, 1 pointerup, 0 pointercancel, 1 click, deselect. A one-finger drag on a movable point: 0 click. A two-finger tap and a pinch: 1 non-primary pointerdown, 2 pointerup, 0 click, selection kept. A one-finger drag on the read-only twin: 1 pointercancel (the browser pan took the touch), 0 click. iOS Safari is unverified: a manual check is listed in the TODO, it is not a proof. - The « Sélection : … » tag is not shown (screen-reader-only text, not live): the highlight and the properties panel carry the selection, and the drawing keeps its place when the selection changes (owner, 2026-11-12). ### R2 — The Références tab (D1 to D4) Status (2026-11-14): R2 validated by the owner's trial, closed pending the final manual checks (« Owner trial and closure 2026-11-14 » below, `V1-2-6_OWNER_TRIAL.md` §4.12). Status (2026-11-13): corrected, still awaiting the owner's validation (corrections below). Status (2026-11-12): built on `feature/v1-2-anatomical-sheets`, awaiting the owner's validation (nothing merged, nothing deployed). Commits: `65a8fd3` (plan, rev 4 after the owner's GO), `fc3fec7` R2.0 (the panel's place renamed `citations`), `4499bc7` R2.1 (fifth tab, panel from a finding), `c21995b` R2.2 (collapsible tiles), `3baac4d` R2.3 (search, sort, count, add), `8db6f42` R2.4 (contextual panel, board 25), `4b7d254` R2.5 (non-regression sweep), `2182307` (documentation), `1bf2701` (final review fixes: one history entry per reference edit, focus kept). Labels: `V1-2-6_R2_LABELS.md`. Decision record: BDR-114. What the build settled against the text below: - The panel opens from a finding only (owner, 2026-11-12). The family's former trigger is removed; a family keeps its inline list and « Retirer ». - « Retirer de ce constat » removes that one citation (the reference stays in the document) and marks the finding « À confirmer » (core rule, `edit.rs`); one « Défaire » restores the citation and the status together. Superseded 2026-11-14: the sheet no longer removes a citation (read-only, « Modifier » and « Aller à » only, key `editor.references.remove_citation` deleted); a citation is removed from the finding's edit form (see « Owner trial and closure 2026-11-14 »). - Zero state: when the last citation is gone the panel stays open with « Ce constat ne cite plus aucune référence. » and closes on a tab change. - Selecting a tab closes the panel. Every close (✕, Escape outside a field, scrim, tab, « Aller à », « Tout afficher », element gone) records one pending move applied after the exit: the focus goes back to the trigger, else to the active tab button. - A read-only flip (window under 1 024 px) keeps the panel open, in its read view: implemented, pending owner ratification (the contract's criterion 15 and P22'' still say the panel closes). A refused draft the flip drops is announced (« Saisie non appliquée : … »). - Motion goes through `motion/react` (slide in 180 ms, out 140 ms, none under reduced motion, callbacks still fire), not through the Tailwind `motion-reduce:` text below: deviation approved by the owner, 2026-11-12. - The Places area keeps a permanent `dvh` minimum height so that opening the panel never changes the document's size; the panel fits the visible viewport at every scroll position. - Limits: at 667 × 375 (landscape phone) and scroll 0 about 13 px of the panel show, because the trigger sits in Places, itself below the fold, so a scroll comes first (the e2e now covers it by touch, see Corrections 2026-11-13). A control below a field whose blur-commit is refused can lose its first click, the error line shifting the layout: an editor-wide pattern, not a regression, left out of R2. `admin.spec.ts` crashes during axe (« Target crashed ») under the accumulated sandbox grants, not an R2 regression (`BROWSER_TESTS.md` §6). The add draft's cancel control was added by C2 (Corrections 2026-11-13). - Gates at `1bf2701`: typecheck, lint, `test:run` (app 1510), build, `e2e:ui` 251; `e2e:shell` 16 specs (`admin.spec.ts` and `editor-equine.spec.ts` excluded): 117 passed, 108 skipped, 1 failed (`crossing:211` stuck on the MFA step-up screen before the editor; 11 passed when rerun alone), full-row guard clean. - Gates at `4b7d254`: typecheck, lint, `test:run` (app 1488), build, `e2e:ui` 251; `e2e:shell` sweep of 21 specs without `editor-equine`: 219 passed, 116 skipped, 3 failed (all `admin.spec.ts`), full-row guard clean. `editor-equine.spec.ts` was updated for typecheck and never run. Corrections 2026-11-13 (owner brief), still awaiting the owner's validation (nothing merged, nothing deployed), on top of `52aac41`: - C1 `3303530`, `1e19479`: a refused draft is never dropped silently on a read-only flip. The tile in edit stays shown through the flip, a drop is said once in the live region and shown in its tile, a forced close of the panel names every refused field once, and the flip makes no history entry. - C2 `d177992`, `c8109af`: « Annuler l'ajout » on the draft tile, and Escape from non-text targets and from a pristine text field (never during IME composition). The document and undo/redo are untouched; the focus goes back to « Ajouter une référence ». `c8109af` also hardened a flip unit test: happy-dom 20.10.6 holds MutationObserver callbacks in a WeakRef, so a garbage collection under load stops the observation; the test now counts writes to the live region. - C3 `b1fd896`: a pinned tile that no longer matches the search shows « Ne correspond pas à la recherche » under its header (`aria-describedby`). « Aucun résultat » shows only when no tile is shown (the add draft does not count). - C4 `969a5f3`, `817f74b`, `7766929`, `f7f0aa6`, `78fb2d0` (test only): proof, no app code. One test of `editor-shell-layout` (phone project, 667 × 375), two parts. (A) Touch only: CDP `Input.dispatchTouchEvent` swipes of 200 px from scroll 0 (`Input.synthesizeScrollGesture` with `touch` scrolls nothing in this Chromium) until the trigger is wholly on screen and hit-testable (2 swipes in every run, scrollY 491 to 512); a tap opens the panel, heading and ✕ in the viewport and hit-testable, scrollY unchanged. (B) Worst case: an instant programmatic scroll puts the trigger's bottom on the viewport bottom (gap 0, scrollY 480); a tap opens the panel, heading and ✕ in view and hit-testable, scrollY unchanged. B is programmatic because a touch swipe under about 60 px scrolls nothing (slop) and the gain varies under load, so a pixel-exact touch landing is not reproducible (an earlier calibrated version oscillated by 55 px in the full sweep). - Final review `94f8a8b`, `346a8fd`: with two or more refused fields, a user leave (« Terminer », the panel's ✕, Escape or scrim, another tile's « Modifier », « Ajouter une référence ») now leaves the focus on the first refused field with its own error shown. Before, the last field tried owned the single error message (a regression of C1), and a mouse click on « Terminer » with Citation blank and a valid URL showed no error at all (present before R2's corrections). The forced close still names every refused field once. - New keys (provisional EN): `editor.references.add_cancel` fr « Annuler l'ajout », en « Cancel adding »; `editor.references.outside_search` fr « Ne correspond pas à la recherche », en « Does not match the search ». Rows in `V1-2-6_R2_LABELS.md`. Limits kept after the corrections: undo/redo replacing a pending draft in a mounted view; two drops in one flip speak only the last; the rotation to 667 × 375 with the panel open at scroll 0 keeps its cramped exception (not built, an option for the owner). An undo or redo that removes a reference whose tile holds a refused draft now names the dropped fields once in the live region, from the drop itself (V1); a full page reload is out of scope (the page is gone, the local recovery copy rules apply). `admin.spec.ts` diagnosis (C0, 2026-11-13, sandbox only, guard OK on every run, no grant pagination, no reset, no deletion): - `public.anatomical_catalog_grants` held 2 269 rows at the start (by day: 2026-11-08 234, 11-09 11, 11-12 1 896, 11-13 128), `auth.users` 2 871. Each run adds 25 grants and 25 accounts. - Interleaved A/B, `admin.spec.ts` alone (24 listed, 8 workers): the pre-R2 worktree at `65a8fd3` (same lockfile) against HEAD `52aac41`, four runs (abH1, abB1, abH2, abB2). Each gave 13 passed, 8 skipped, 3 failed, with the same « Target crashed » inside `expectAccessible` (axe): A0 « the rights screen with grants » (`/app/admin/access`) in one locale, « admin screens » desktop and 375 in one locale. Host memory stayed at 11.3 to 11.6 GiB available. - Dose-response in a quiet window (no other Playwright run): a temporary copy of the spec routed `list_catalog_grants` to its 753 newest rows. Capped (2 526 grants in base): 16 passed, 8 skipped, 0 failed. Full (2 551): 11 passed, 8 skipped, 5 failed, 4 of them « Target crashed ». Capped again (2 570): 16 passed, 0 failed. The temporary copy was deleted, never committed. - Conclusion: the accumulation of e2e grants in the persistent sandbox causes the failures (the rights screen renders every grant under axe). They are identical before R2 and on R2: not an R2 regression. Still failing on the accumulated sandbox: A0 « the rights screen with grants » and « admin screens » (fr or en, desktop and 375, the locale varies from run to run). The cure, a paginated grant list, belongs to RR-13; blocker BLK-015 stays open. #### Finition 2026-11-13 Status: built on `feature/v1-2-anatomical-sheets` on top of `36c6eb3`, awaiting the owner's trial (nothing merged, nothing deployed). Source: the owner brief « finition R2 » (items 1 to 9) and the plan `.claude/tasks/plans/2026-11-13-r2-ux-finish-1624.md` (R2F-1 to R2F-9). Labels: `V1-2-6_R2_LABELS.md` §5 to §7. Trial: `V1-2-6_OWNER_TRIAL.md` §4.11. Browser proofs: `BROWSER_TESTS.md`. Commits: - Task 1, dialog primitives and editor history: `553a0e5`, `69e225c`, `792394d`, `8e4f026`. - Task 2, finding dialog and citations side sheet: `18085ce`, `4731a33`, `c893dec`, `b703333`, `20905ad`, `af300de`, `e2d020b`. - Task 3, reference dialog, read-only tiles, filter by finding, owner journey: `8031e00`, `7a64daf`, `8b42816`, `3bb3603`, `8a60128`. - Task 4, « Plus » overlay and sticky sidebar: `ca5804a`, `dfc8965`. - Owner trial adjustments of 2026-11-14 (Tasks 6 to 8): see « Owner trial and closure 2026-11-14 » below. Behaviour: - Dialogs. A finding opens in a modal dialog (view mode, then « Modifier »); a reference opens in its own dialog (edit or create). Forms are transactional: « Enregistrer » writes one history entry (nothing when pristine), « Annuler » or any close with a change asks « Abandonner les modifications ? » first. A save is one « Défaire ». Reference tiles are read-only (disclosure, « Modifier », « Supprimer » or the cited hint). Focus returns to the opener. - Side sheet. The citations panel is a modal sheet at the right edge (34 rem at most) stacked over the finding dialog, usable by keyboard and touch. Content: read tiles, « Modifier », « Aller à », « Tout afficher » (« Retirer de ce constat » was removed from it on 2026-11-14). - History. Tab, Annotations section, finding dialog, finding creation, sheet, reference dialog, filter are browser history entries (`apps/app/src/editor/history`). Back and Forward restore the view and the scroll; a reload keeps tab and filter, never a form. Entries carry the sheet id and a random session tag (2026-11-14: no longer the account id) and hold navigation only; they are reset on a sheet or account change. A Back that would drop a dirty form re-pushes the view and shows the confirmation. - Filter. « Tout afficher dans l'onglet Références » shows only the references the finding cites, with the chip « Références du constat : » and its « × », plus « Revenir au constat ». Search and sort stay usable. The owner's eight steps (finding A, « 2 références », sheet, « Tout afficher », filtered tab, Back, back on A with the sheet open) are proved at 1280 and 375 px. - « Plus ». The menu is an overlay under the tab row (no layout shift, light fade), closed by a choice, an outside press, Escape, a tab change and, where the browser offers `CloseWatcher`, the Android Back request. - Sidebar. The left menu stays in place while the page scrolls (own scroll when taller than the window). Owner decisions (gate 2026-11-13): R2F-9 items 1 to 6 approved. Item 7: the clients and animals list searches are NOT kept in browser history (BDR-078 stands). Precisions: one undoable operation per save; the side sheet usable by keyboard and touch; history keeps navigation state, never typed data, personal searches or drafts; history reset on a sheet or account change; the Android Back request closes « Plus » first; no new mockups; the limits below are accepted provided no user change is lost silently. Stated limits: 1. Deleting a finding replaces its dialog entry, so the next Back press does nothing visible once (R2F-3). Lifted 2026-11-14: the deletion pops the dialog entry, the first Back moves. 2. Lifted by the final review: « Aller à » a finding or a zone opens its dialog in the same move, one history entry; Back returns to the place left, sheet included. 3. A move made in the same instant as a pending Back can be swallowed (not reachable at human speed). 4. « Aller à » a finding opens its dialog in view mode (accepted again by the owner, 2026-11-14). 5. The search of the References tab is not in the history: a plain tab change keeps it, « Tout afficher » clears it; Back still restores the filtered view. 6. Android Back closing « Plus » relies on `CloseWatcher` (Chrome Android). Proved by a stub test only, not on a device. Without `CloseWatcher`, Back navigates as before; Escape and an outside press still close. 7. A tap outside the open « Plus » menu only closes it (the page does not receive that tap). 8. After choosing a « Plus » entry by keyboard, focus goes to the page body (pre-existing). Lifted 2026-11-14: the focus goes to the new tab's panel. 9. BLK-015: `admin.spec.ts` still fails on the accumulated sandbox (grant accumulation; pagination is RR-13). Unchanged by the finish. Also stated in the plan: leaving the editor by Back past its first entry cannot be refused (BDR-078, recovery copy). A dirty dialog lost that way (a Back of several entries from the history menu) is no longer silent: one flag in this tab's sessionStorage (layer and element key, never the text) makes the next mount of that sheet for that session tag say once « Une saisie non enregistrée a été abandonnée en quittant l'éditeur »; the text itself is not kept. Since 2026-11-14 the browser is asked first where it can cancel the jump (see the closure subsection); the flag and the notice remain the fallback. Chromium's skippable-entry intervention and Android's close-watcher grouping of two restored dialogs are untested (Playwright's `goBack` bypasses them) and are checked in the owner's phone trial. Gone with the finish, so struck from « Limits kept after the corrections » above: the cramped view after a rotation to 667 × 375 with the panel open at scroll 0 (the panel is now a modal sheet at full height); the two refused drops spoken as one (`draft_dropped` for references and the inline drafts are removed); a pending draft lost by undo or redo in a mounted edit view (no inline draft remains, « Défaire » and « Refaire » are unreachable while a dialog is open). Still true: a button under a field whose blur-commit is refused can lose its first click (other inline editor forms). Status: validated by the owner's trial on 2026-11-14 (next subsection). Not run on a device: Android Back with a real `CloseWatcher`. #### Owner trial and closure 2026-11-14 Validation: the owner's trial of 2026-11-14 validated the R2 main journeys (`V1-2-6_OWNER_TRIAL.md` §4.11). The trial asked for last adjustments, built on `feature/v1-2-anatomical-sheets` on top of `afc1051` (plan « Rev 4 », `.claude/tasks/plans/2026-11-13-r2-ux-finish-1624.md`, contract criteria 19 to 25). Nothing merged, nothing deployed. Adjustments: - References are cited only in the edit mode of a finding (`f0e49fd`, `270444e`). The view mode of the dialog only shows the « n références » button that opens the sheet (a family shows its list read-only). The edit form keeps a draft list of the citations with « Retirer » on each and « Citer une référence »; the one « Enregistrer » writes the citations with the other fields as one undoable operation. The citations sheet is read-only for the finding (no « Retirer de ce constat »); while the form is open it lists the draft's references. The key `editor.references.remove_citation` is deleted (`V1-2-6_R2_LABELS.md` §9). - Deletion and Back (`085c568`, `4018344`): the deletion closes its dialog by popping the entry, so the first Back moves; the first « Défaire » after a deletion restores the finding at once (Constats opens, the row is selected and focused). Choosing « Plus » entry puts the focus on the new tab's panel (the panels take `tabIndex=-1` and show a ring only on keyboard focus, with a transparent outline for forced colours). - Session tag (`07bebbc`, `579d8af`): history entries carry a random 128-bit tag kept in `sessionStorage`, never the account id. The tag is bound to the account by a non-secret fingerprint (FNV-1a 64, synchronous, so it works on the http LAN origin where `crypto.subtle` is missing), rotates on another account and at sign-out, and the old left-draft flags are cleared. A record of the earlier shape, or an empty tag, reads as foreign (fail closed). `AuthProvider.tsx` starts the sign-out subscription (3 lines, outside the first file scope, amended by the controller). - Leave confirmation (`07bebbc`, `579d8af`, `791fc03`): where the browser exposes the Navigation API and the event is cancelable, a jump of several entries out of the editor with a dirty finding or reference dialog is cancelled and the top dirty dialog asks « Abandonner les modifications ? ». « Abandonner » runs the jump again with `traverseTo`, leaving no flag and no notice. With two dirty dialogs the question cascades from the top. Before the finding asks, the citations sheet and a clean reference dialog over it close, so its question is never hidden under them. Without the API or when the event is not cancelable, the earlier flag and notice stay. - Notice after the loss elsewhere: unchanged text, now keyed by the session tag. - Final review, rev 4 (2026-11-14): a Back asks only the layers it removes. A Back that closes only the citations sheet, or a clean reference dialog over it, closes it and asks nothing, even over a dirty finding form. A Back or a jump that removes the dirty finding dialog first closes the clean layers over it, so its question is visible and focused. A sign-out, or a session ending, while a dialog holds unsaved text leaves one flag with no text, keyed by the sheet id and by a fingerprint of the account salted with a random value stored in the flag: the same account's next sign-in in this tab shows the notice once on that sheet, another account never matches. The session record's fingerprint is salted with its own tag; a record of the older, unsalted shape reads as none and rotates. Support of the confirmation (what `task-8-report.md` of the run proves): verified on Chromium desktop (the pinned Playwright Chromium, a history jump through the DevTools protocol, one dirty dialog and two stacked); the fallback logic is covered by unit tests (no API, non-cancelable event). Not verified: Firefox, Safari, a click in the real toolbar history menu (editing needs 1 024 px, so a phone never reaches this case). The http-origin restore is proved by a unit test only. Accepted limits (owner, 2026-11-14): 1. A move made in the same instant as a pending Back can be swallowed (not reachable at human speed). 2. « Aller à » a finding opens its dialog in view mode. 3. The search of the References tab is kept across tabs (not in the history; « Tout afficher » clears it). 4. The first tap outside the open « Plus » menu only closes it. 5. In the leave cascade, « Continuer la saisie » on a lower dialog keeps that draft; a draft already abandoned above stays dropped (the user's choice). The sheet and a clean reference dialog over the finding close before its question; one Back then reopens the citations sheet. 6. Android Back closing « Plus » relies on `CloseWatcher` and is proved by a stub test only. 7. BLK-015 and `admin.spec.ts`: tracked apart (RR-13), unchanged. Lifted by this round: the dead Back after a deletion (finish limit 1) and the focus lost to the page body after a « Plus » choice (finish limit 8). Changed: the account id left the history entries for the session tag; a multi-entry leave is confirmed where the browser can cancel it. Status: R2 validated, closed pending the final manual checks (`V1-2-6_OWNER_TRIAL.md` §4.12). The owner still has to check Android Back on a real phone. Original plan text: - Tab model: `EDITOR_TABS` gains `references` between `findings` and `verification` (`apps/app/src/editor/tabs.ts:6-11`), `SHOWN.small` keeps it under « Plus » (:18). The id collides with the panel's `data-place` name `references`: the panel place is renamed first (internal name, no visible effect). Touched with it: `navigation.ts` `targetOfKey` (:65-81, reference keys go to the tab), `focusRequest.ts:19-22`, `useEditorNavigation.ts`, `EditorTabBody.tsx:16-23`, `EditorWorkspace.tsx:85-131`, `verification.ts`, i18n keys. - Tab content: tiles built from `ReferenceRow` / `ReferenceForm` (`components/editor/references/`), a disclosure button per tile (`aria-expanded`, `aria-controls`), the toolbar with a search field and its explicit clear button (focus back to the field), a native `