From e1cdd9d25cedb3d0a13d4dbcd55f315aa21dde87 Mon Sep 17 00:00:00 2001 From: bchanot Date: Tue, 17 Nov 2026 00:31:52 +0100 Subject: [PATCH] docs(docs): R4 catalogue card integrity warning as built --- CHANGELOG.md | 11 ++- docs/design/README.md | 4 + docs/development/BROWSER_TESTS.md | 2 +- docs/development/RUST_ARCHITECTURE_REVIEW.md | 4 + docs/development/V1-2-6_OWNER_TRIAL.md | 74 +++++++++++++++ docs/development/V1-2-6_U1_CORRECTIONS.md | 95 +++++++++++++++++++- 6 files changed, 185 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29527aff..ca994d60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,18 @@ Versions follow [Semantic Versioning](https://semver.org/). Nothing in this section is released or deployed: faunosteo.com runs 0.1.0. Everything below is on `develop` only, accumulated since 0.1.0: the SaaS -Steps 0 to 8 and the Rust migration R0 to R5 included. One exception: the -first entry (V1-2.6 R3) lives on `feature/v1-2-anatomical-sheets`, not merged -into `develop`. `release/0.2.0` (Steps +Steps 0 to 8 and the Rust migration R0 to R5 included. Two exceptions: the +first two entries (V1-2.6 R4 and R3) live on `feature/v1-2-anatomical-sheets`, +not merged into `develop`. `release/0.2.0` (Steps 3 to 6) was cut on 2026-10-11 and never finished; its `[0.2.0]` section lives on that branch and reaches this file only if the release is finished (TODO RR-9). +### Changed (2026-11-17, V1-2.6 R4 on `feature/v1-2-anatomical-sheets`: not merged into `develop`, sandbox only) + +- A catalogue card whose version fails no longer stays silent. A version the core's integrity check refuses (fingerprint, drawing hash, missing drawing, unreadable document) shows « Contrôle d'intégrité échoué : cette version ne peut pas être affichée. » in the card (EN « Integrity check failed: this version cannot be displayed. »), with no « Réessayer »; a version over the size limits shows « Cette version dépasse les limites de taille d'une fiche. », also without retry. A load that failed for another reason (network, session, access, rate, server, engine) shows its own line and « Réessayer » for that card only, with a « no network » glyph for the network. A version that passes but whose main view cannot be drawn keeps its counts and says so in a neutral line. The card keeps its name, « Publiée », its version and « Consulter » in every case. The check itself, the sheet page and its notice are unchanged. The lines are not live regions; a retry that fails again is said once by a polite region, and a successful one moves the focus to « Consulter ». Board 30, wording A10. +- New browser spec `e2e/shell/catalogue-integrity.spec.ts` on the sandbox (6 passed, 0 failed, 0 skipped, 0 flaky, twice). It archives its own sheets and revokes its own grant by id at the end. `pnpm check:all` not yet run at this entry. The four « Cheval sandbox » entries of the sandbox now show the integrity line: their stored fingerprint is the fictitious value of test anomaly A, still open. Details: `docs/development/V1-2-6_U1_CORRECTIONS.md` §R4. + ### Added (2026-11-16, V1-2.6 R3 on `feature/v1-2-anatomical-sheets`: not merged into `develop`, sandbox and trial stack only) - The official sheet list (`/app/admin/sheets`) gets a search on the sheet name in French or English (accents and case ignored, instant, with « Effacer la recherche » and Escape), a « Trier par » with « Dernière modification » (default) or « Nom », a count line « {n} fiches » / « {n} fiches sur {total} », and « Modifiée le 9 nov. 2026, 12:06 » on each row, in Paris time. The four filters are unchanged and combine with the search; a search without result names the searched text with a clear button. The Administration home card lists the five most recently modified sheets under « Dernières modifications », with « Voir les {n} fiches ». diff --git a/docs/design/README.md b/docs/design/README.md index bc11dfbb..b1dad0fb 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -212,3 +212,7 @@ they still do. Finding 6 (an opening guillemet can end a line, « version / 1 » orphan in the detail line) is not in the wave. Not checked by the review: the card's badges and working copy action, the owner's layout (deduced from the code), the English wording, the 0 or 1 sheet link, distinct dates, hover, screen reader output. + +2026-11-17: R4 built against board 30 (`docs/development/V1-2-6_U1_CORRECTIONS.md` §R4 « As built 2026-11-17 »). Known +deviation, pending the design review, not fixed: at 1 280 px the network card stacks « Réessayer » above « Consulter » +(the card's width wraps the button row), where board 30 draws them side by side. diff --git a/docs/development/BROWSER_TESTS.md b/docs/development/BROWSER_TESTS.md index 4cc71b39..cb89fff4 100644 --- a/docs/development/BROWSER_TESTS.md +++ b/docs/development/BROWSER_TESTS.md @@ -10,7 +10,7 @@ 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 (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/admin-sheets-list.spec.ts` (V1-2.6 R3): the official sheet list's search, sorts, count line and dates and the Administration home's latest changes (below, « The sheet list spec »); `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 | +| `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/admin-sheets-list.spec.ts` (V1-2.6 R3): the official sheet list's search, sorts, count line and dates and the Administration home's latest changes (below, « The sheet list spec »); `e2e/shell/catalogue-integrity.spec.ts` (V1-2.6 R4, board 30): a sound and an altered catalogue sheet seeded per run; the integrity line in fr and en at desktop and 375 px (« Consulter » kept, 44 px, opening the unchanged sheet page notice, axe, no sideways scroll), the network line in fr with one version aborted (`route.fallback()` for the rest), the card remounted by search, « Réessayer » and the focus on « Consulter »; the run's sheets archived and its grant revoked by id (6 passed, 0 failed, 0 skipped, 0 flaky, twice, 2026-11-17); `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` diff --git a/docs/development/RUST_ARCHITECTURE_REVIEW.md b/docs/development/RUST_ARCHITECTURE_REVIEW.md index 270c9176..b8190b5c 100644 --- a/docs/development/RUST_ARCHITECTURE_REVIEW.md +++ b/docs/development/RUST_ARCHITECTURE_REVIEW.md @@ -308,6 +308,7 @@ concrete constraint. | `apps/app/src/components/editor/references/useReferenceView.ts` | search text and sort choice (React state), the finding filter read from the history view (navigation, not typed text), tile order handed to the tab | React hook | holds view state only and calls the pure functions above; it reaches no wasm call and no document write | no | none | none | `editor-references-view.test.tsx` | **C**: React state of a display view; BDR-114 (A) | n/a | | `apps/app/src/admin/sheetList.ts` (`searchSheets`, `sortSheets`, `SHEET_SORTS`) and `matchesSheetName` in `apps/app/src/catalogue/useCatalogue.ts` | the admin official sheet list (R3): search on the name in French or English (`folded`, the catalogue's rule, now shared), sort by `last_modified_at` (newest first) or by name, ties by name then id | TS, `Intl.Collator` of the current language | portable, but the collation needs the browser's ICU data (a Rust equivalent would ship its own); filters and orders the loaded list for display, never writes; the date itself is computed by the server (M9) and checked at the client boundary | no | none; called in the render of the list page and the home card | none | `admin.sheetList.test.ts`, the catalogue suites | **C**: display-only search and ordering over server data, no business rule, no mutation; owner validation of the R3 plan, 2026-11-16 (as BDR-114 (A)); `shortcut:` until RR-13 pages the list on the server, where search and sort move | n/a | | `formatShortParisDateTime` in `apps/app/src/admin/labels.ts` | the « 9 nov. 2026, 12:06 » / « 9 Nov 2026, 12:06 » date of the admin list and home card (A8), Paris time | TS, `Intl.DateTimeFormat` (`fr-FR`, `en-GB`, `Europe/Paris`), one formatter per language | screen date formatting needs the browser's ICU and time zone data | no | none | none | `admin.labels.test.ts` (ratified strings, the Paris summer offset) | **C**: screen date formatting (as `lib/dates.ts`); owner validation of the R3 plan, 2026-11-16 | n/a | +| `cardFailure` in `apps/app/src/catalogue/failure.ts`, `apps/app/src/components/catalogue/CardFailure.tsx` | how a catalogue card shows the closed failure kind of its version (R4, board 30): integrity class (A10 text, no retry), size limits (D1), other kinds with « Réessayer », tone and glyph | TS, React | portable (a set lookup), but it only maps kinds the core already decided to a line, a tone and a button; the check itself stays the core's `check_published` | no | none; called in the card's render | none | `routes.catalogue.test.tsx` (test 11 lists every member of `CatalogueFailure`), `components.Notice.test.tsx` | **C**: display formatting of closed kinds, no business rule, no mutation; owner validation of the R4 plan, 2026-11-17 (R-8) | n/a | | `i18n/*` (281 keys ×2, `useT`, `pickLocaleLabel`) | UI strings | TS | UI data and hook; the engine's 25 archived labels move with the engine | no | | | parity test | **C** | n/a | | `config/env.ts`, `lib/supabase.ts`, providers, guards, routes, components, styles | runtime config, React | TS | glue | no | | | | **C** | n/a | | `vite/sheet-bundle.ts`, ESLint, Vite, vitest configs | build tooling | Node | Vite plugin API is JavaScript | no | | | | **C** | n/a | @@ -343,6 +344,9 @@ concrete constraint. `apps/app/src/admin/{sheetList,labels}.ts` only filter, order and format the list the server answered; the last-modification date is the server's (M9). A rule the server must share moves to SQL or `crates/core`. + Same exception for the catalogue card's failure line (R4, owner validation + of the plan, 2026-11-17, R-8): it shows the kind the core answered, never + decides or bypasses the check. --- diff --git a/docs/development/V1-2-6_OWNER_TRIAL.md b/docs/development/V1-2-6_OWNER_TRIAL.md index ebb54705..5053dca6 100644 --- a/docs/development/V1-2-6_OWNER_TRIAL.md +++ b/docs/development/V1-2-6_OWNER_TRIAL.md @@ -599,6 +599,80 @@ Passez l'application en anglais si vous voulez relire les libellés (« Search a Résultat du 16 novembre 2026 : essai fait par le propriétaire sur db:trial, panneau des filtres sur téléphone compris. R3 est validé. « Réinitialiser les filtres » reste uniquement dans le panneau. +### 4.16 Démonstration R4 : les erreurs dans les cartes du catalogue +À faire sur la sandbox, avec `pnpm db:sandbox trial` (décision D3), pas sur `db:trial` : la pile d'essai n'a aucune +version publiée, son catalogue est vide. Planche 30 (`docs/design/v1-2-6-r0/30-catalogue-carte-integrite.png`), +libellé A10. + +Préparation. La sandbox tourne déjà et garde les données des tests automatiques : ne lancez ni `up fresh` (refusé tant +qu'elle tourne) ni `down` (tout serait effacé). Créez votre compte comme à l'étape 2 si vous n'en avez pas sur cette +sandbox, puis donnez-lui le droit de lecture du catalogue : + +```bash +pnpm db:sandbox trial-grant vous@example.com catalog_reader +``` + +Lancez l'application comme à l'étape 3 (`pnpm db:sandbox trial`, adresse en `:5193`) et connectez-vous. La double +authentification n'est pas nécessaire pour le catalogue. Ouvrez « Fiches anatomiques » dans le menu. La page est +lente à se remplir : la sandbox compte 164 fiches au catalogue et chaque carte charge sa version et son illustration +au moment où elle s'affiche. + +Ce qui vient des données, pas de R4. Un relevé en lecture seule du 17 novembre 2026 a passé les 164 fiches du +catalogue au contrôle d'intégrité du moteur, comme le fait la carte. 160 passent et dessinent leur vue principale +(80 « Cheval publié … » et 80 « Cheval refusé … », laissées par les tests du catalogue). Quatre échouent, toutes du +même genre : les quatre fiches nommées « Cheval sandbox » (deux en version 1, deux en version 2). Leur empreinte +enregistrée est une valeur fictive (`aaaa…`), écrite par des tests qui imitent le service de vérification : le +moteur recalcule l'empreinte, elle ne correspond pas, la version est refusée. C'est l'anomalie de test A. Elle existait +avant R4, elle est suivie à part, et R4 ne la corrige pas : R4 change seulement la façon dont l'échec s'affiche. Avant +R4, ces quatre cartes se taisaient (nom, version et « Consulter », sans compteurs ni explication). Aucune autre fiche +ne devrait échouer ; si une autre carte montre une ligne d'erreur, notez son nom et son message. + +Ce qui est propre à R4 : la ligne dans la carte, ce qui reste autour d'elle, et « Réessayer ». Chaque étape donne +l'action, puis l'attendu. Étapes 1 à 5 à 1 280 px, étape 6 sur un téléphone ou dans une fenêtre de 375 px. + +1. Avant de chercher, notez le nom d'une carte saine, une carte « Cheval publié … » qui montre ses compteurs (vues, + zones de constats) et une vignette. Elle sert à l'étape 4. +2. Ligne d'intégrité. Action : tapez « sandbox » dans « Rechercher une fiche ». Attendu : exactement quatre cartes + « Cheval sandbox ». Chacune garde l'espèce, « Publiée », son nom et « Version 1 » ou « Version 2 », sans date de + publication (la date vient avec les détails qui n'ont pas pu être lus). À la place des compteurs et de la + vignette, une ligne rouge avec un triangle d'alerte, en gras : « Contrôle d'intégrité échoué : cette version ne + peut pas être affichée. » Pas de « Réessayer » : relancer ne changerait rien à la version. « Consulter » reste + en bas de la carte et répond à la souris comme au clavier (Tab puis Entrée). +3. La page de la fiche, inchangée. Action : « Consulter » sur une des quatre cartes. Attendu : la page de la fiche, + telle qu'avant R4, avec son message détaillé « L'empreinte de cette version ne correspond pas à celle enregistrée à + sa publication. » et son propre bouton « Réessayer » (la page propose de réessayer pour toute erreur, R4 n'y + touche pas). Revenez au catalogue (la recherche n'est pas gardée au retour, comportement connu). +4. Ligne réseau et « Réessayer ». Une carte ne charge sa version qu'au moment où elle s'affiche : couper le réseau + après coup ne change rien aux cartes déjà là. Il faut donc la faire disparaître puis réapparaître hors ligne. + Action : tapez « sandbox » (la carte saine de l'étape 1 disparaît). Ouvrez les outils de développement (F12), + onglet « Network » (« Réseau »), réglez « No throttling » sur « Offline ». Remplacez « sandbox » par le nom noté + à l'étape 1. Attendez environ 7 secondes : la lecture de la date est retentée trois fois avant d'abandonner, et la + carte attend la fin de ces essais. Attendu : la carte saine montre une ligne ambrée avec l'icône « pas de réseau » + et « Connexion au serveur impossible. Vérifiez votre réseau. », puis « Réessayer » et « Consulter ». Remettez + « No throttling » (en ligne), puis cliquez « Réessayer ». Attendu : pendant l'essai, la ligne et le bouton restent + en place ; puis la ligne disparaît, les compteurs et la vignette apparaissent, et le focus passe sur « Consulter » + de cette carte. Si vous cliquez « Réessayer » encore hors ligne, la ligne revient après environ 7 secondes et le + focus reste sur « Réessayer ». +5. Anglais. Action : passez l'interface en « EN » et refaites l'étape 2. Attendu : « Integrity check failed: this + version cannot be displayed. » +6. Téléphone (375 px). Action : refaites les étapes 2 et 4 à 375 px (sur un téléphone, l'étape 4 demande les outils + de développement d'un ordinateur : utilisez une fenêtre de 375 px ou le mode appareil des outils). Attendu : une + carte par ligne, la phrase passe à la ligne, « Réessayer » et « Consulter » font au moins 44 px de haut, aucun + défilement horizontal. + +Écart connu, en attente de la revue graphique : à 1 280 px, la carte réseau empile « Réessayer » au-dessus de +« Consulter », alors que la planche 30 les dessine côte à côte (`docs/design/README.md`). + +Limites connues de R4 : +- Si le moteur lui-même ne se charge pas, chaque carte affiche sa ligne « moteur » avec son propre « Réessayer » ; un + clic relance le moteur et recharge cette carte seulement, les autres attendent leur propre clic. +- Une date de publication qui n'a pas pu être lue manque sans message. +- Une version saine dont la vue principale ne peut pas être dessinée garde ses compteurs et affiche la phrase neutre + déjà utilisée par la page de la fiche (« Cette vue ne peut pas être affichée : … »). La sandbox n'a pas de cas de ce + genre aujourd'hui (relevé ci-dessus). +- Les fiches « R4 … » créées par le test automatique sont archivées à la fin de chaque passage : elles ne sont plus au + catalogue, mais restent dans la liste d'administration sous « Archivée ». + ## 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). diff --git a/docs/development/V1-2-6_U1_CORRECTIONS.md b/docs/development/V1-2-6_U1_CORRECTIONS.md index ec207c2e..ff2e401e 100644 --- a/docs/development/V1-2-6_U1_CORRECTIONS.md +++ b/docs/development/V1-2-6_U1_CORRECTIONS.md @@ -787,6 +787,99 @@ Points raised before the validation (R3, as built): the test itself (never by editing an existing sheet); axe on the list. - Its own commit and verification, kept out of the U1 shell lots. +#### As built 2026-11-17 + +Owner brief 2026-11-16 (R3 closed, R4 start), plan `.claude/tasks/plans/2026-11-16-r4-card-integrity-2337.md` rev 3 +validated 2026-11-17 (« Je valide le plan R4 avec les décisions suivantes »): D1 alternative, D2 to D4 as recommended, +R-1 to R-8 accepted, precisions P1 (the trial tells the sandbox's anomalies apart from R4) and P2 (the spec cleans +only what it created) binding. Contract `.claude/tasks/contracts/2026-11-17-r4-card-integrity-0004.md`. Branch +`feature/v1-2-anatomical-sheets`, no merge, no deploy, DEV unchanged, no write on the trial stack. Board 30 +`docs/design/v1-2-6-r0/30-catalogue-carte-integrite.png`, wording A10. + +- The check is untouched: the card still runs `loadVersion` (version, drawings, `CataloguePreview`, the core's + `check_published`). Nothing changed under `crates/`, `packages/core-wasm/`, `catalogue/catalogue.ts`, + `catalogue/preview.ts`, nor on the sheet page (`SheetRoute`, `CatalogueFailureNotice`, `useSheetVersion`). +- `useCardDetails` returns `{ state, retry }`: `loading`, `ready` (date, counts, thumbnail, `viewRefused`) or + `failed` (the closed kind, `retrying`, the attempt number). `cardFailure(failure, stopped)` in + `catalogue/failure.ts` sorts the kinds; `components/catalogue/CardFailure.tsx` draws the line. A failed card keeps + the name, « Publiée », « Version n » (no date: the date comes with the details that failed) and « Consulter » + (enabled, same link); counts and thumbnail give way to the line. +- Integrity class (R-1): `fingerprint_mismatch`, `drawing_hash_mismatch`, `drawing_missing`, `invalid_document`. Text + A10 in bold, « Contrôle d'intégrité échoué : cette version ne peut pas être affichée. » (EN « Integrity check + failed: this version cannot be displayed. », key `catalogue.card.integrity_failed`), error tone, glyph `alert`, no + « Réessayer ». Storage answering 400 or 404 for a drawing is `drawing_missing` (pinned by a unit test); 401, 429, + network and other Storage answers are not integrity. +- Size limits (D1, owner alternative): `caps` shows the existing « Cette version dépasse les limites de taille d'une + fiche. », error tone, glyph `alert`, no « Réessayer », never the integrity text. +- Other failures (R-2, R-4, R-5): warning tone (the amber of board 30's network card, ink text, no new token), the + existing text (`catalogue.failure.`; `access_denied.title` « Accès non autorisé » for `denied`; the core's + text for `core_unavailable`), glyph `wifi-off` for `network` and `alert` otherwise, « Réessayer » for that card + only. No retry once the engine stopped for good. A `core_unavailable` retry calls `coreRuntime().retry()` before + reloading; a version that traps the core spends one of the tab's three recoveries per click, as on the sheet page. +- Main view not drawable (D2): a version that passes but whose main view the core refuses to compose keeps its + counts and shows the existing `catalogue.failure.view` in a neutral `info` line (no role, no retry). The engine + failing there (`core_unavailable`, `internal`) is the core line with its retry. Nothing is silent any more. +- Announcements and focus (R-3): the lines are not live regions (no burst when several cards fail at load). During + a retry the line and « Réessayer » stay mounted, the button `aria-disabled`, the card `aria-busy`, clicks ignored. + A retry that fails again keeps the focus on « Réessayer » and a visually hidden polite region, empty at load and + cleared at each attempt, says the line again. On success the focus moves to the card's « Consulter » only if it + was on that card's removed « Réessayer » or on `body`. +- `Notice` gains the tone `warning`, `icon?` and `live?` (default true); its existing call sites keep their role + and glyph (test). `Icon` gains `wifi-off`. `Card` passes an optional `aria-busy` (outside the plan's file list, + needed by R-3, accepted at review). +- Browser proof (`apps/app/e2e/shell/catalogue-integrity.spec.ts`, `BROWSER_TESTS.md`): one sound and one altered + sheet seeded per run (`storedFingerprint: '0'.repeat(64)`), integrity in fr and en at desktop and 375 px, network + in fr on both projects (one version aborted, `route.fallback()` for the rest, the card remounted by search, never a + reload). Cleanup (D4, ruling below): each own sheet archived by id through `private.set_sheet_status` as the seed + owner, then read back; the own `catalog_reader` grant revoked by id and read back; no statement matches by pattern. +- D4 ruling: archive, not soft delete. The owner authorised a soft deletion, but the application never deletes a + sheet that had a published version (§6.9, `delete_anatomical_sheet`), so a deleted row with published history is + a state no screen can reach. Archiving is reachable, takes the sheet out of the catalogue and stays inside the + authorisation. Cost: the archived test sheets stay in the admin sheet list under « Archivée », tagged « R4 ». +- Rust by default (R-8): sorting closed kinds into lines is display formatting; one class C row in + `RUST_ARCHITECTURE_REVIEW.md` Part II. +- One deviation from board 30, recorded in `docs/design/README.md`: on desktop the network card stacks + « Réessayer » above « Consulter » where the board draws them side by side (the card's width wraps the row). + Pending the design review, not fixed. + +Results (exact; nothing that failed is called green): + +| Check | Result | +|---|---| +| App unit suite (`pnpm --filter @faunosteo/app test:run`, at `6ad8d83`) | 1771 tests in 138 files passed (1753 before the card tests) | +| `pnpm typecheck`, `pnpm lint`, `pnpm build` | exit 0 at each code commit (build: the usual chunk-size notice only) | +| `catalogue-integrity.spec.ts` alone on the sandbox (`dadd8e5`) | 6 passed, 0 failed, 0 skipped, 0 flaky, twice (once with temporary screenshot lines, once as committed) | +| `catalogue.spec.ts` alone after the support change | 8 passed, 0 failed, 0 skipped, 0 flaky | +| Data guard before and after the runs (read-only) | 0 removed, 0 changed, 81 added (27 sheets, 43 versions, 11 grants). The 8 « R4 … » sheets read back archived (one `anatomical_sheet.archived` audit row each), the 4 own grants revoked (`e2e cleanup`) | +| Catalogue census of the sandbox (read-only, 2026-11-17, below) | 164 entries: 160 pass and compose their main view, 4 `fingerprint_mismatch` (anomaly A) | +| `pnpm check:all` | not yet run | + +Sandbox catalogue census (P1, read-only): every catalogue entry (active official sheet whose current version is +published) read by SQL under `default_transaction_read_only`, its drawings fetched from Storage by GET, then the +core's `PreviewBuilder` built from the version's status, document and stored fingerprint as `loadVersion` does, and +the main view composed as the card does. 164 entries: 80 « Cheval publié » and 80 « Cheval refusé » +(left by `catalogue.spec.ts`) pass and compose; the four « Cheval sandbox » entries (two at version 1, two at +version 2) answer `fingerprint_mismatch`: their stored fingerprint is `'a'.repeat(64)`, the fictitious value of the +worker stand-ins (anomaly A, section 5). No other kind was found. Limit: Storage was read with the service key, so a +drawing the reader's Storage policy would refuse is not detected by the census. + +Limits (accepted, recorded): + +- R-7: when the engine fails for the whole tab, every card shows the core line with its own « Réessayer »; one card's + retry restarts the engine and reloads that card only, the others reload on their own retry. +- R-6: a failed `listSheetVersions` drops the publication date without a word. A failed card shows « Version n » + without a date. +- D2: the view line reuses `catalogue.failure.view`, a text written for the sheet page (« Cette vue ne peut pas être + affichée : … »); no card-specific wording was asked for. +- Sandbox accumulation: each spec run adds 2 to the seed owner's row in `private.catalog_write_budgets` (created by + the first run, 8 of 300 per hour after the R4 runs, outside the data guard); the spec's reader accounts stay (as + every suite's, BLK-015); `catalogue.spec.ts` still leaves its published sheets listed and the global warm-up its + « Fiche e2e … » sheet and `sheet_editor` grant per invocation (existing accumulation, BLK-015, RR-13). +- Every card loads its version at mount: with 164 entries the sandbox catalogue is slow to settle (with RR-13). +- Unit only: the engine stopped for good in a card (`cardFailure` test), and two cards failing on the core at once. + Not checked in a browser: `aria-busy` and `aria-disabled` during an attempt, a screen reader reading the polite + region. + ## 4. Order and dependencies R0 first (validation). R1 is independent of R2 and can ship first. R2 depends on the validated boards 23 to 27. R3 @@ -801,7 +894,7 @@ depend on the working-copy slot. |---|---|---| | A. Fictitious fingerprints | Worker stand-ins publish with `'a'.repeat(64)`: `packages/supabase/tests/sandbox/sheet-fixtures.ts:115` (`openRound`), `sheets-concurrency.sandbox.ts:168`, `sheets-perf.sandbox.ts:169`. Seven published or deprecated versions on the sandbox fail `check_published`; the owner opened three of them on 2026-11-09. | Compute the real fingerprint through the core as the catalogue e2e does (`fingerprintOf`), never weaken the publish gate or the reader's check. | | B. Working copy never archived | (a) `packages/supabase/tests/sandbox/sheets-admin.sandbox.ts` created the historical sheet's working copy (`8c315a12-…`, 2026-11-08 21:00:30) and never archived it; the single slot then disables « Créer une copie de travail » (`WorkingCopyAction.tsx:88`). (b) Even on a fresh stack `editor-equine.spec.ts` flips the slot while `admin.spec.ts:717` runs in parallel. Only the historical sheet offers the action, so the test depended on shared state. | FIXED (owner, 2026-11-12, option 1): the dialog's axe, layout and keyboard checks run on the real component in `e2e/ui/working-copy.spec.ts`; `admin.spec.ts` keeps the historical page and checks the button state against its reason; the sandbox suite archives only the copies it created (`returning id` checked) and each cleanup step runs independently. Limit: the dialog is no longer checked in its real server context by this accessibility test. Open: the creation branch of the cleanup is not yet run on a fresh stack. `editor-equine.spec.ts` still archives and restores pre-existing copies on every run. | -| C. Silent card failure | Section 3, R4. | Show the failure, never hide or route around it. | +| C. Silent card failure | Section 3, R4. | Show the failure, never hide or route around it. CLOSED by R4 (2026-11-17, §R4 « As built »): the card says its failure inside itself, « Consulter » kept, the check unchanged. The four sandbox entries it shows failing are anomaly A, still open. | ## 6. Arbitrations