From c93787c94766833bb7abafb97e29572d91f7c3ec Mon Sep 17 00:00:00 2001 From: bchanot Date: Sun, 15 Nov 2026 20:11:54 +0100 Subject: [PATCH] docs(docs): R2 pre-closure adjustments, limits and checks --- docs/development/BROWSER_TESTS.md | 17 ++++-- docs/development/V1-2-6_OWNER_TRIAL.md | 45 +++++++++++--- docs/development/V1-2-6_R2_LABELS.md | 40 ++++++++++++- docs/development/V1-2-6_U1_CORRECTIONS.md | 71 ++++++++++++++++++++++- 4 files changed, 156 insertions(+), 17 deletions(-) diff --git a/docs/development/BROWSER_TESTS.md b/docs/development/BROWSER_TESTS.md index e917e603..8ef915b7 100644 --- a/docs/development/BROWSER_TESTS.md +++ b/docs/development/BROWSER_TESTS.md @@ -9,8 +9,8 @@ engines are installed. The suites live in `apps/app/e2e`. | Command | Backend | Dev server | Content | |---|---|---|---| -| `pnpm e2e:ui` | none | Vite on `127.0.0.1:5191` | `e2e/ui/dialog.spec.ts`: the D13 contract of the shared Dialog on a test page; `e2e/ui/working-copy.spec.ts`: the real `WorkingCopyAction` and its dialog on a test page (axe, layout, keyboard, fr and en, desktop and 375 px); `e2e/ui/local-tool.spec.ts`: the disclaimer, edit and replace dialogs on the real local-tool routes | -| `pnpm e2e:shell` | the isolated stack of `pnpm db:sandbox` | Vite on `127.0.0.1:5192` | `e2e/shell/shell.spec.ts`: sign-in, dashboard, the account photo confirmation, the phone drawer; `e2e/shell/clients.spec.ts`: the client journeys (V1-1.5); `e2e/shell/animals.spec.ts`: the animal and relation journeys (V1-1.6, contract §11.8); `e2e/shell/responsive.spec.ts`: no sideways scroll on nine shell pages, the archive confirmations and the drawer at 320, 360, 375, 390 and 430 px (phone project) and 1280 px, long values, the dashboard e-mail shown whole (RESP-01); `e2e/shell/admin.spec.ts` (V1-2.5): A0 the owner's bootstrap (two TOTP factors from Sécurité, the step-up at `/app/admin` and inside a factor action, no second factor from `aal1`, refresh keeping `aal1` and `aal2`, rights granted and revoked with their reason), A1 a sheet created by an editor on a new inactive species, S1 a species created inactive then activated by the owner, the creation page when the own-grants read fails (« Impossible de vérifier vos autorisations » and « Réessayer », never the form; Retry brings the form back), access per right (a reviewer-only account refused on the creation page), axe and no sideways scroll on every admin page; `e2e/shell/catalogue.spec.ts` (V1-2.5): P1 a reader searches, opens a sheet, picks a zone, reads a retired version, drafts and archived sheets never listed, the same refusal for an existing and an unknown sheet without access, 320, 375 and 430 px with the whole drawing in the box at opening; at 320 and 375 px the zone panel's live region present before a pick and naming the picked zone, the « Références » card starting at or below the drawing's bottom; `e2e/shell/editor-*.spec.ts` (V1-2.6, the draft editor level 1, contract C16 to C34): `editor-drawings` (A2: a hostile file refused with no cleaning box, an Inkscape export cleaned after its preview, a valid file attached, a detail view by crop, the same bytes attached twice), `editor-annotations` (A3: points, zones and links by clicks and by keyboard only, move by drag, a click with jitter never moves, numeric edits, undo and redo, review and delete), `editor-geometry` (a click near a frame edge with the corrected position confirmed and cancelled, an inherited out-of-frame point repaired through the geometry group, a crop change refused when it would invalidate a point, an unmeasured view with its tools disabled, touch-action and a touch drag in real Chromium), `editor-structures` (A4: categories, references, regions, findings tree, reorder, mark reviewed, delete with dependents; since the finish findings and references go through their dialogs, the delete dialog stacked over the finding dialog), `editor-references` (R2 and finish: read-only tiles, the reference dialog from « Modifier » and « Ajouter » with axe, its draft and its read-only flip, a tile edited out of the search keeping its place), `editor-journey` (the steps of `V1-2-6_OWNER_TRIAL.md` §4 with two editor accounts, a finding created through its dialog and the dialog closed before the next add: creation, drawing, findings, annotations, save, reload with the beforeunload dialog and the recovery offer, conflict, submission, the round read back in SQL), `editor-recovery` (two sessions, an older local copy restored then saved over a newer revision, a pending offer blocking edits, an unreadable copy kept until « Ignorer », Escape on the conflict read, the editor grant revoked, the admin role removed and the grant expired under an open session), `editor-access` (the finding dialog and the references dialog scanned by axe at the widths; a reviewer-only account read-only, the not-found screen for an editor without the admin role and for an admin without a capability, 320, 375 and 800 px read-only, 1 024 px editing, axe on every tab edit and read-only), `editor-deselect` (R1, D5 and D6b: « Désélectionner » with its live region, the focus on the list row and the document unchanged; Escape over the canvas, a field, the delete dialog, the references dialog over the finding dialog (Escape closes the references dialog, a second one the finding dialog, a third deselects) and a tracing; mouse clicks on empty parts deselecting, on annotations selecting; zoom, pan, marker drag and Ctrl+wheel keeping the selection; a typed value applied by the deselecting click; at 1 280 px with `hasTouch` and CDP touch taps near annotations and the canvas bottom deselecting once, drags, two-finger taps and pinch keeping the selection, with the pointer events counted by a recorder; the read-only twin at 375 px and Escape closing « Plus » before deselecting; the drawing's top unchanged when a point, a zone and a link are selected then deselected, on desktop and on the read-only twin at 375 px, with the selection tag out of the visual flow), `editor-equine` (the sheet and the finding dialog closed between visits since the finish; the historical equine sheet opened as a working copy, a copy left active by an earlier run set aside and put back; commit latency on it and on a synthetic document near 2 MiB, printed as `LATENCY` lines and kept as test annotations, budget 500 ms per commit on the equine copy; one empty click on a bone of the horse drawing deselects, D6b). U1 shell (V1-2.6 U1, the tabbed shell): `editor-shell` (the Références tab keeping its search; kept-mounted places, focus on a named element, the open panel leaving the header and the tab row clickable at 1 024 and 1 280 px, the sidebar from 1 280 px and the drawer, canvas widths), `editor-shell-journeys` (a finding opening in its dialog in view mode, the row holding the focus once closed; five tabs, cross-tab undo, typed text then the header undo, a refused field kept through a real Shift+Tab to « Défaire », Ctrl+Z outside and inside a field, « Aller à » for each issue kind, the save line from the count to « Enregistrement… » to the time and revision), `editor-shell-crossing` (the findings creation form kept in its dialog while narrow, draft, focus and a notice kept; every edit-only part typed, a 1 024 px crossing, no edit control and the focus on the shown tab, widening with the values back; the section and the panel open; unsaved work and the recovery copy kept; a drag across the crossing commits nothing; delete and discard confirmations closing; a decision withheld under the panel waiting for « Reprendre »), `editor-shell-layout` (since the finish a citations dialog replaces the panel, since 2026-11-15 the references dialog replaces the side sheet: inside the viewport with the focus inside, no document size change, the Tab order kept inside it, inside the screen at 667 × 375 through a rotation, the cramped-landscape and swipe-reach cases gone; before: 667 × 375 reached by touch, and the worst case placed by script; no sideways scroll at 1 024, 1 180, 1 279 and 1 280 px on the five tabs, the sections and the references dialog, and at 320, 375 and 768 px read-only; axe from the top on every place; the canvas width without and with the panel as `canvas-width` and `canvas-width-panel` annotations; the keyboard order header, tab list, « Défaire », « Refaire », the panel when open, then tools, canvas and side column); the equine spec also times commit to paint with every place visited. `editor-history` (finish, R2F-1: tabs, an Annotations section, « Retour au dessin », arrow-key walks as one entry, the scroll offset, a reload, a DeleteDialog open at Back), `editor-finding-dialog` (finish, R2F-3: click, Enter and Space opening it, a pristine and a changed « Enregistrer », « Abandonner » and a width flip keeping the draft, a dirty Escape and Back asking, deletion landing on the nearest row, creation as a layer, a vanished element, Back and Forward walking the layers, and since 2026-11-14 a deletion followed by one « Défaire » restoring the row selected and focused, then Back moving), `editor-reference-journey` (finish, R2F-5 and R2F-6: the owner's eight steps at 1280 and 375 px, ending on finding A with the references dialog open (2026-11-15), every Back, a reload keeping the filtered tab and chip but no form, the chip × removing the filter by replace, a double click and a held Escape popping one entry, a dirty reference dialog kept across Back), `editor-more-menu` (finish, R2F-7: the « Plus » overlay at several widths with axe, closing on a choice, an outside tap and Escape; since 2026-11-15 at 375 and 320 px the tab row shows Général and Annotations then « Plus », its entries stack in tab order (Constats, Références, Vérification), each at least 44 px high and inside the viewport, axe with an active row, « Plus » found without an exact name because it may carry the error count; Enter on an entry at 375 px putting the focus on that tab's panel, 2026-11-14; the sidebar fixed at 1280 and 1024 px and scrolling alone at 1280 × 500) and `editor-leave-confirm` (2026-11-14, criterion 23: a history jump of several entries made through the DevTools protocol on the pinned Chromium, from a dirty finding dialog or a dirty reference dialog, is cancelled and asks « Abandonner les modifications ? », the URL and the draft kept, « Continuer la saisie » keeping both, « Abandonner » landing on the overview with no left-draft flag and no notice; a dirty reference over the references dialog of a dirty finding asking twice, the dialog closed before the second question, which has the focus on « Continuer la saisie »; since 2026-11-15 a dirty references draft asking before the jump goes; the history entry holding a 32-hex `tag` and no `userId`). Editor accounts, drafts and drawings are prepared by `e2e/support/editor.ts` (a drawing in its stored form, written by the core); `e2e/support/warm-up.ts` is the suite's global setup (the dev server reloads the page once when a route first loads a dependency, so one throwaway session visits the editor routes before the tests). Editing needs 1 024 px: these specs skip the 375 px project | +| `pnpm e2e:ui` | none | Vite on `127.0.0.1:5191` | `e2e/ui/dialog.spec.ts`: the D13 contract of the shared Dialog on a test page (since 2026-11-15 the ✕ measured at least 44 × 44 px, inside the viewport, beside a wrapped long title at 320, 375 and 1 280 px, with axe); `e2e/ui/working-copy.spec.ts`: the real `WorkingCopyAction` and its dialog on a test page (axe, layout, keyboard, fr and en, desktop and 375 px); `e2e/ui/local-tool.spec.ts`: the disclaimer, edit and replace dialogs on the real local-tool routes | +| `pnpm e2e:shell` | the isolated stack of `pnpm db:sandbox` | Vite on `127.0.0.1:5192` | `e2e/shell/shell.spec.ts`: sign-in, dashboard, the account photo confirmation, the phone drawer; `e2e/shell/clients.spec.ts`: the client journeys (V1-1.5); `e2e/shell/animals.spec.ts`: the animal and relation journeys (V1-1.6, contract §11.8); `e2e/shell/responsive.spec.ts`: no sideways scroll on nine shell pages, the archive confirmations and the drawer at 320, 360, 375, 390 and 430 px (phone project) and 1280 px, long values, the dashboard e-mail shown whole (RESP-01); `e2e/shell/admin.spec.ts` (V1-2.5): A0 the owner's bootstrap (two TOTP factors from Sécurité, the step-up at `/app/admin` and inside a factor action, no second factor from `aal1`, refresh keeping `aal1` and `aal2`, rights granted and revoked with their reason), A1 a sheet created by an editor on a new inactive species, S1 a species created inactive then activated by the owner, the creation page when the own-grants read fails (« Impossible de vérifier vos autorisations » and « Réessayer », never the form; Retry brings the form back), access per right (a reviewer-only account refused on the creation page), axe and no sideways scroll on every admin page; `e2e/shell/catalogue.spec.ts` (V1-2.5): P1 a reader searches, opens a sheet, picks a zone, reads a retired version, drafts and archived sheets never listed, the same refusal for an existing and an unknown sheet without access, 320, 375 and 430 px with the whole drawing in the box at opening; at 320 and 375 px the zone panel's live region present before a pick and naming the picked zone, the « Références » card starting at or below the drawing's bottom; `e2e/shell/editor-*.spec.ts` (V1-2.6, the draft editor level 1, contract C16 to C34): `editor-drawings` (A2: a hostile file refused with no cleaning box, an Inkscape export cleaned after its preview, a valid file attached, a detail view by crop, the same bytes attached twice), `editor-annotations` (A3: points, zones and links by clicks and by keyboard only, move by drag, a click with jitter never moves, numeric edits, undo and redo, review and delete), `editor-geometry` (a click near a frame edge with the corrected position confirmed and cancelled, an inherited out-of-frame point repaired through the geometry group, a crop change refused when it would invalidate a point, an unmeasured view with its tools disabled, touch-action and a touch drag in real Chromium), `editor-structures` (A4: categories, references, regions, findings tree, reorder, mark reviewed, delete with dependents; since the finish findings and references go through their dialogs, the delete dialog stacked over the finding dialog), `editor-references` (R2 and finish: read-only tiles, the reference dialog from « Modifier » and « Ajouter » with axe, its draft and its read-only flip, a tile edited out of the search keeping its place), `editor-journey` (the steps of `V1-2-6_OWNER_TRIAL.md` §4 with two editor accounts, a finding created through its dialog and the dialog closed before the next add: creation, drawing, findings, annotations, save, reload with the beforeunload dialog and the recovery offer, conflict, submission, the round read back in SQL), `editor-recovery` (two sessions, an older local copy restored then saved over a newer revision, a pending offer blocking edits, an unreadable copy kept until « Ignorer », Escape on the conflict read, the editor grant revoked, the admin role removed and the grant expired under an open session), `editor-access` (the finding dialog and the references dialog scanned by axe at the widths; a reviewer-only account read-only, the not-found screen for an editor without the admin role and for an admin without a capability, 320, 375 and 800 px read-only, 1 024 px editing, axe on every tab edit and read-only), `editor-deselect` (R1, D5 and D6b: « Désélectionner » with its live region, the focus on the list row and the document unchanged; Escape over the canvas, a field, the delete dialog, the references dialog over the finding dialog (Escape closes the references dialog, a second one the finding dialog, a third deselects) and a tracing; mouse clicks on empty parts deselecting, on annotations selecting; zoom, pan, marker drag and Ctrl+wheel keeping the selection; a typed value applied by the deselecting click; at 1 280 px with `hasTouch` and CDP touch taps near annotations and the canvas bottom deselecting once, drags, two-finger taps and pinch keeping the selection, with the pointer events counted by a recorder; the read-only twin at 375 px and Escape closing « Plus » before deselecting; the drawing's top unchanged when a point, a zone and a link are selected then deselected, on desktop and on the read-only twin at 375 px, with the selection tag out of the visual flow), `editor-equine` (the sheet and the finding dialog closed between visits since the finish; the historical equine sheet opened as a working copy, a copy left active by an earlier run set aside and put back; commit latency on it and on a synthetic document near 2 MiB, printed as `LATENCY` lines and kept as test annotations, budget 500 ms per commit on the equine copy; one empty click on a bone of the horse drawing deselects, D6b). U1 shell (V1-2.6 U1, the tabbed shell): `editor-shell` (the Références tab keeping its search; kept-mounted places, focus on a named element, the open panel leaving the header and the tab row clickable at 1 024 and 1 280 px, the sidebar from 1 280 px and the drawer, canvas widths), `editor-shell-journeys` (a finding opening in its dialog in view mode, the row holding the focus once closed; five tabs, cross-tab undo, typed text then the header undo, a refused field kept through a real Shift+Tab to « Défaire », Ctrl+Z outside and inside a field, « Aller à » for each issue kind, the save line from the count to « Enregistrement… » to the time and revision), `editor-shell-crossing` (the findings creation form kept in its dialog while narrow, draft, focus and a notice kept; every edit-only part typed, a 1 024 px crossing, no edit control and the focus on the shown tab, widening with the values back; the section and the panel open; unsaved work and the recovery copy kept; a drag across the crossing commits nothing; delete and discard confirmations closing; a decision withheld under the panel waiting for « Reprendre »), `editor-shell-layout` (since the finish a citations dialog replaces the panel, since 2026-11-15 the references dialog replaces the side sheet: inside the viewport with the focus inside, no document size change, the Tab order kept inside it, inside the screen at 667 × 375 through a rotation, the cramped-landscape and swipe-reach cases gone; before: 667 × 375 reached by touch, and the worst case placed by script; no sideways scroll at 1 024, 1 180, 1 279 and 1 280 px on the five tabs, the sections and the references dialog, and at 320, 375 and 768 px read-only; axe from the top on every place; the canvas width without and with the panel as `canvas-width` and `canvas-width-panel` annotations; the keyboard order header, tab list, « Défaire », « Refaire », the panel when open, then tools, canvas and side column); the equine spec also times commit to paint with every place visited. `editor-history` (finish, R2F-1: tabs, an Annotations section, « Retour au dessin », arrow-key walks as one entry, the scroll offset, a reload, a DeleteDialog open at Back), `editor-finding-dialog` (finish, R2F-3: click, Enter and Space opening it, a pristine and a changed « Enregistrer », « Abandonner » and a width flip keeping the draft, a dirty Escape and Back asking, deletion landing on the nearest row, creation as a layer, a vanished element, Back and Forward walking the layers, and since 2026-11-14 a deletion followed by one « Défaire » restoring the row selected and focused, then Back moving), `editor-reference-journey` (finish, R2F-5 and R2F-6: the owner's eight steps at 1280 and 375 px, ending on finding A with the references dialog open (2026-11-15), every Back, a reload keeping the filtered tab and chip but no form, the chip × removing the filter by replace, a double click and a held Escape popping one entry, a dirty reference dialog kept across Back), `editor-more-menu` (finish, R2F-7: the « Plus » overlay at several widths with axe, closing on a choice, an outside tap and Escape; since 2026-11-15 at 375 and 320 px the tab row shows Général and Annotations then « Plus », its entries stack in tab order (Constats, Références, Vérification), each at least 44 px high and inside the viewport, axe with an active row, « Plus » found without an exact name because it may carry the error count; Enter on an entry at 375 px putting the focus on that tab's panel, 2026-11-14; the sidebar fixed at 1280 and 1024 px and scrolling alone at 1280 × 500) and `editor-leave-confirm` (2026-11-14, criterion 23: a history jump of several entries made through the DevTools protocol on the pinned Chromium, from a dirty finding dialog or a dirty reference dialog, is cancelled and asks « Abandonner les modifications ? », the URL and the draft kept, « Continuer la saisie » keeping both, « Abandonner » landing on the overview with no left-draft flag and no notice; a dirty reference over the references dialog of a dirty finding asking twice, the dialog closed before the second question, which has the focus on « Continuer la saisie »; since 2026-11-15 a dirty references draft asking before the jump goes; the history entry holding a 32-hex `tag` and no `userId`). Editor accounts, drafts and drawings are prepared by `e2e/support/editor.ts` (a drawing in its stored form, written by the core); `e2e/support/warm-up.ts` is the suite's global setup (the dev server reloads the page once when a route first loads a dependency, so one throwaway session visits the editor routes before the tests). Editing needs 1 024 px: these specs skip the 375 px project; `editor-citations` since 2026-11-15 (pre-closure): « Citer » and the arrow-key case, a pending reference saved or abandoned, the family wording, the 44 px ✕ with a long finding name | Each suite runs on two Chromium projects: `chromium-desktop` (1280 × 800) and `chromium-375` (375 × 667, mobile viewport, touch). A test tagged `@phone` @@ -81,14 +81,19 @@ finish (2026-11-13), a references dialog stacked over it since the owner follow- opens over the finding dialog and only reads (no « Modifier » on its tiles; the finding's edit form cites nothing and its save keeps the citations); a family opens the same dialog with its own citations, and « Tout afficher » from it filters the library by the family, Back returning to the dialog; a long list scrolls inside the dialog and « 0 référence » -opens the empty one; « Tout afficher » closes both layers, clears the search, keeps the sort and the open tiles, and Back +opens the empty one (a family's empty line reads « Cette famille ne cite aucune référence. »); « Tout afficher » closes both layers, clears the search, keeps the sort and the open tiles, and Back returns to the dialog; the exiting dialog is inert and a second close finds nothing; keyboard (Enter opens, Tab in order, Escape closes only it); each close path (✕, Escape, the backdrop, Back, « Tout afficher », « Aller à ») checks where the focus lands, and the dialog scales in only when motion is allowed. Edit mode (2026-11-15, editing needs -1 024 px): cite and remove, « Enregistrer », one header « Défaire » restores, axe on the edit mode; a dirty draft makes +1 024 px): cite (choose, then « Citer ») and remove, « Enregistrer », one header « Défaire » restores, axe on the edit mode; +ArrowDown on the select only chooses, « Enregistrer » with a choice not cited refuses (the line, the focus on « Citer », +« Citer » level with the add button), and ✕ then asks nothing; the ✕ is a box of at least 44 × 44 px beside a long +finding name at 1 280 px; a dirty draft makes ✕ and Back ask, and « Abandonner » writes nothing; « Modifier la référence » stacks the reference dialog and, closed, -the draft is back; « Nouvelle référence » is created over the dialog and cited by the save. Read-only at 375 px: the -dialog inside the viewport through « Plus » then Constats, no edit control, axe; by touch, taps act on the references +the draft is back; « Nouvelle référence » stays in the draft: then « Abandonner » leaves the library unchanged (no +« Défaire », nothing listed in the Références tab, nothing announced), then « Enregistrer » writes the reference and its +citation, and one « Défaire » removes both. Read-only at 375 px: the dialog inside the viewport through « Plus » then +Constats, no edit control, axe; the ✕ at 44 × 44 px beside a long name at 375 and 320 px; by touch, taps act on the references dialog only and the finding dialog under it stays. Layout additions in `e2e/shell/editor-shell-layout.spec.ts`: five tabs everywhere the four were checked (no diff --git a/docs/development/V1-2-6_OWNER_TRIAL.md b/docs/development/V1-2-6_OWNER_TRIAL.md index 639a5679..445e7059 100644 --- a/docs/development/V1-2-6_OWNER_TRIAL.md +++ b/docs/development/V1-2-6_OWNER_TRIAL.md @@ -457,16 +457,17 @@ Claude. Chaque étape donne l'action, puis l'attendu. 3. « Modifier » du constat. Action : « Modifier » dans le constat A. Attendu : le formulaire ne montre que « Références citées » et « X références », sans liste de références, sans « Citer » ni « Retirer » ; « Enregistrer » n'y change pas les citations. -4. Modifier les références. Action : « 2 références », puis « Modifier » du dialogue ; citez une référence existante - (« Citer une référence existante »), retirez-en une (« Retirer »), « Enregistrer ». Attendu : retour en lecture avec +4. Modifier les références. Action : « 2 références », puis « Modifier » du dialogue ; choisissez une référence + existante dans la liste, cliquez « Citer » (le choix seul ne cite rien), retirez-en une (« Retirer »), + « Enregistrer ». Attendu : retour en lecture avec « Modifications enregistrées » et le focus sur « Modifier » ; après avoir fermé les dialogues, un seul « Défaire » rend les citations d'avant ; « Refaire » les remet. 5. « Nouvelle référence » et « Modifier la référence ». Action : « Modifier », « Nouvelle référence », renseignez, - « Créer » ; puis « Modifier la référence » sur une rangée, changez la citation, « Enregistrer » dans ce dialogue. + « Ajouter la référence » ; puis « Modifier la référence » sur une rangée, changez la citation, « Enregistrer » dans ce dialogue. Attendu : la référence créée est citée dans le brouillon, rien n'est écrit dans le document tant que vous n'avez pas cliqué « Enregistrer » du dialogue des références ; le dialogue de la référence s'ouvre au-dessus, et une fois - fermé le brouillon est là. Si vous abandonnez après avoir créé une référence, elle reste dans l'onglet Références, - non citée, et un « Défaire » la retire (opération à part : limite 10 de §5). + fermé le brouillon est là. Si vous abandonnez après avoir créé une référence, la bibliothèque est inchangée : rien + dans l'onglet Références, rien à défaire (limite 13 de §5, vérifiée au §4.14). 6. Annuler. Action : dans la modification, changez une citation, « Annuler » (puis refaites avec ✕ et Échap). Attendu : « Abandonner les modifications ? » avec « Continuer la saisie » (focalisé) ; « Abandonner » n'écrit rien. Sans modification, « Annuler » revient directement à la lecture. @@ -474,7 +475,7 @@ Claude. Chaque étape donne l'action, puis l'attendu. la même question ; « Continuer la saisie » garde le brouillon. 8. Une famille. Action : dans « Constats », ouvrez une famille, cliquez « X références » (même à 0), refaites les étapes 1 à 7. Attendu : le même dialogue, les mêmes comportements ; une famille sans référence ouvre le dialogue - avec « Ce constat ne cite aucune référence. ». + avec « Cette famille ne cite aucune référence. » (titres et libellés en « famille », voir 4.14). 9. Téléphone (ou fenêtre sous 640 px). Action : ouvrez l'éditeur, regardez la rangée d'onglets, touchez « Plus ». Attendu : « Général » et « Annotations » sont visibles, puis « Plus » ; la liste est verticale, dans l'ordre Constats, Références, Vérification, chaque rangée d'au moins 48 px, l'entrée active teintée avec une coche ; tant @@ -482,6 +483,24 @@ Claude. Chaque étape donne l'action, puis l'attendu. la liste et ouvre l'onglet ; le Retour d'Android (ou Échap, ou un toucher hors de la liste) la ferme. Sous 1 024 px le dialogue des références reste en lecture, sans « Modifier ». +### 4.14 Vérifications avant clôture (2026-11-15) +À faire sur la fiche de 4.13, à 1 280 px sauf la dernière. Libellés : `V1-2-6_R2_LABELS.md` §11. Chaque vérification +donne l'action, puis l'attendu. +1. Flèches sur la liste. Action : constat A, « 2 références », « Modifier » ; sur la liste des références, appuyez + sur la flèche bas, puis fermez par ✕. Attendu : la flèche choisit seulement ; ✕ ferme sans rien demander. « Citer » + ajoute la référence choisie à la liste. +2. Choix non cité. Action : choisissez une référence sans cliquer « Citer », puis « Enregistrer ». Attendu : refus, le + formulaire reste ouvert, une ligne « Référence choisie mais pas encore citée… » sous la liste, le focus sur « Citer ». +3. Création abandonnée. Action : « Nouvelle référence », renseignez, « Ajouter la référence », puis « Annuler » et + « Abandonner ». Attendu : la référence n'est pas dans l'onglet Références, et « Défaire » reste grisé. +4. Création enregistrée. Action : même création, puis « Enregistrer ». Attendu : la référence et la citation + existent ; un seul « Défaire » retire les deux. +5. Une famille. Action : ouvrez une famille, « X références ». Attendu : « Références de la famille », et + « Cette famille ne cite aucune référence. » à zéro ; avec « Tout afficher », la pastille « Références de la famille ». +6. Le ✕. Action : sur un téléphone, ouvrez un dialogue au titre long (constat à long nom) et touchez ✕. Attendu : ✕ + se touche sans viser, il reste dans l'écran. Passez l'application en anglais si vous voulez relire les libellés + (« Cite », « References of the family »). + ## 5. Limites à connaître - Risque résiduel RR-12 : les opérations du catalogue lisent la mention `aal2` du jeton, pas la session vivante. Un jeton émis à `aal2` reste accepté après la suppression du facteur, jusqu'à son expiration (une heure). @@ -586,12 +605,22 @@ la page après un choix dans « Plus ». Retouches du 2026-11-15 (construites, à vérifier au §4.13) : le dialogue des références remplace le volet, avec sa propre modification (citer, retirer, créer, ouvrir une référence, un seul « Défaire » par enregistrement) ; un seul ordre d'onglets, « Plus » est une liste verticale. Limites de cette retouche, à confirmer par vous au §4.13 : -10. Une référence créée depuis « Nouvelle référence » puis un brouillon abandonné : la référence reste dans la - bibliothèque, non citée, comme une opération à part (un « Défaire » la retire). +10. Levée le 2026-11-15 (retouches de pré-clôture, §4.14) : une référence créée depuis « Nouvelle référence » ne + reste plus dans la bibliothèque après un brouillon abandonné, elle fait partie du brouillon. 11. Dans « Plus », pas de flèches du clavier : Tab parcourt les entrées, sortir par Tab ferme la liste. 12. Résolue le 2026-11-15 : l'aide d'une référence citée nomme maintenant le chemin du dialogue des références (« Aller à », puis « X références », « Modifier » et « Retirer » dans les références du constat ou de la famille). +Retouches de pré-clôture du 2026-11-15 (construites, à vérifier au §4.14) : le bouton « Citer », la création d'une +référence dans le brouillon, les libellés « famille », un ✕ de 44 px. Elles lèvent la limite 10. Limites de cette +retouche : +13. Une référence nouvelle n'existe que dans le formulaire des références ouvert, jusqu'à « Enregistrer ». Les gardes de + sortie (✕, Échap, fond, Retour) et `beforeunload` la protègent, mais aucune copie de secours n'est gardée : un + rechargement ou un onglet fermé la perd. +14. « Modifier la référence » sur une référence existante s'enregistre par son propre dialogue : c'est un changement + de la bibliothèque, aussitôt écrit, avec son propre « Défaire ». « Annuler » du formulaire des références ne + l'annule pas. +Les essais complets de `e2e:shell` ont encore des échecs (BLK-015 et d'autres) : l'ensemble n'est pas vert. Quitter l'éditeur par un Retour de plusieurs entrées ne peut pas toujours être refusé (BDR-078, voir 7 ci-dessus) et le texte saisi n'est jamais gardé. Limites de R2 qui subsistent : diff --git a/docs/development/V1-2-6_R2_LABELS.md b/docs/development/V1-2-6_R2_LABELS.md index a0de8de0..06f30950 100644 --- a/docs/development/V1-2-6_R2_LABELS.md +++ b/docs/development/V1-2-6_R2_LABELS.md @@ -3,7 +3,7 @@ Statut : R2 construit sur `feature/v1-2-anatomical-sheets`, en attente de la validation du propriétaire. Source : `git diff 49867ba..HEAD -- apps/app/src/i18n` (`fr.ts` et `en.ts`), 47 lignes ci-dessous : 41 clés nouvelles, 2 modifiées, 4 retirées. Les deux dictionnaires portent les mêmes clés. -Ces totaux valent pour R2 seul, avant la finition. Les §5 à §7 donnent la finition du 2026-11-13 (`git diff +Ces totaux valent pour R2 seul, avant la finition (les totaux à jour sont au §11). Les §5 à §7 donnent la finition du 2026-11-13 (`git diff 36c6eb3..HEAD -- apps/app/src/i18n`) : 18 clés nouvelles, 6 retirées, aucune modifiée. Les §1 et §2 sont l'état de R2, pas l'état courant : les clés retirées en §6 y figurent encore. @@ -246,3 +246,41 @@ Les libellés EN sont provisoires. La liste « Plus » et l'ordre des onglets n' décision M-2 ne couvre que `editor.references.panel_empty` ; le libellé pour une famille reste à confirmer. - Point résolu le 2026-11-15 : `editor.references.delete_hint` nomme le chemin du dialogue des références (« Aller à », puis « X références », « Modifier » et « Retirer »), voir la ligne du tableau ci-dessus. + +## 11. Retouches de pré-clôture du 2026-11-15 (tâches 14 et 15) + +Source : `git diff ae02f48..HEAD -- apps/app/src/i18n` (`fr.ts` et `en.ts`) : 18 clés nouvelles, aucune retirée ni +modifiée. Les libellés EN sont provisoires. Une famille reprend les clés du constat avec le suffixe `_family` (une seule +fonction, `elementLabel` de `navigation.ts`, le construit ; elle s'applique à un constat dont le chemin n'a qu'un +segment). Le libellé « constat » ne change pas. + +| Clé | FR | EN (provisoire) | Où | +| --- | --- | --- | --- | +| `editor.references.dialog_title_family` | Références de la famille | References of the family | Dialogue des références d'une famille, titre en lecture | +| `editor.citations.edit_title_family` | Modifier les références de la famille | Edit the references of the family | Dialogue des références d'une famille, titre en modification | +| `editor.citations.cite` | Citer | Cite | Dialogue des références en modification, bouton à côté de la liste : ajoute au brouillon la référence choisie | +| `editor.citations.pending_choice` | Référence choisie mais pas encore citée : choisissez « Citer » ou revenez au choix vide. | Reference chosen but not cited yet: choose « Cite » or go back to the empty choice. | Même dialogue, ligne sous la liste quand « Enregistrer » trouve un choix non cité (le focus va à « Citer ») | +| `editor.citations.created_draft` | Nouvelle référence citée dans le brouillon : {citation}. Elle sera enregistrée avec les citations. | New reference cited in the draft: {citation}. It will be saved with the citations. | Même dialogue, ligne d'état après « Nouvelle référence » (écrite une fois le dialogue de la référence fermé) | +| `editor.citations.pending_removed` | Nouvelle référence retirée : {citation} | New reference removed: {citation} | Même dialogue, ligne d'état après « Retirer » sur une référence nouvelle | +| `editor.citations.pending_updated` | Nouvelle référence modifiée : {citation} | New reference edited: {citation} | Même dialogue, ligne d'état après la modification d'une référence nouvelle | +| `editor.citations.pending` | Nouvelle | New | Même dialogue, pastille d'une rangée qui n'est pas encore dans la bibliothèque | +| `editor.citations.pending_kept` | Nouvelle référence non enregistrée, toujours dans le brouillon : {citation} | New reference not saved, still in the draft: {citation} | Même dialogue, ajoutée à la ligne d'erreur d'un « Enregistrer » refusé : nomme chaque référence nouvelle restée dans le brouillon | +| `editor.references.panel_count_family_one` | {count} référence citée par cette famille | {count} reference cited by this family | Dialogue d'une famille, ligne de décompte | +| `editor.references.panel_count_family_other` | {count} références citées par cette famille | {count} references cited by this family | Dialogue d'une famille, ligne de décompte | +| `editor.references.panel_empty_family` | Cette famille ne cite aucune référence. | This family cites no reference. | Dialogue d'une famille, état à zéro | +| `editor.references.this_finding_family` | cette famille | this family | Liste des citants, rangée de la famille ouverte (sans seconde pastille « famille ») | +| `editor.references.filter_chip_family` | Références de la famille : {name} | References of the family: {name} | Barre d'outils, pastille du filtre posé par une famille | +| `editor.references.filter_remove_family` | Retirer le filtre de la famille {name} | Remove the filter of the family {name} | Pastille d'une famille, nom accessible du bouton « × » | +| `editor.references.filter_back_family` | Revenir à la famille | Back to the family | Barre d'outils tant que le filtre d'une famille est posé | +| `editor.references.filter_gone_family` | La famille n'existe plus : le filtre est retiré | The family no longer exists: the filter is removed | Annonce quand la famille du filtre disparaît | +| `editor.findings.gone_family` | Cette famille n'existe plus | This family no longer exists | Annonce, et ligne de refus d'un enregistrement, quand la famille du dialogue n'existe plus | + +- Totaux du suivi : +18 clés nouvelles, 0 retirée, soit +18 par dictionnaire. +- Totaux R2 depuis `36c6eb3` : 43 clés nouvelles, 9 retirées, 3 modifiées (`editor.references.delete_hint`, + `editor.references.panel_empty`, `editor.findings.reference_add`). +- Point du §10 sur la famille, résolu le 2026-11-15 : le dialogue d'une famille dit « Références de la famille » et + « Cette famille ne cite aucune référence. » ; la rangée d'un citeur dit « cette famille » seul. Les libellés restent + à relire par le propriétaire (§4.14 de `V1-2-6_OWNER_TRIAL.md`). +- Aucune clé `editor.reference.apply` : une référence nouvelle modifiée se valide par `common.confirm` (« Valider »), + son titre reste `editor.reference.new`. +- Le ✕ de 44 px n'ajoute aucune clé (`common.close`). diff --git a/docs/development/V1-2-6_U1_CORRECTIONS.md b/docs/development/V1-2-6_U1_CORRECTIONS.md index 5797ec05..be927160 100644 --- a/docs/development/V1-2-6_U1_CORRECTIONS.md +++ b/docs/development/V1-2-6_U1_CORRECTIONS.md @@ -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: