docs(app): R1 delivered (Défaire / Refaire, Désélectionner, Escape, D6b)

This commit is contained in:
bchanot committed 2026-11-12 13:27:37 +01:00
1 parent 0d1edac39a
commit 90a5e7aa35
7 files changed
+64 -10

No files matched your search

+4 -2
View File
@@ -686,8 +686,10 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
- [ ] shortcut: `apps/app/src/editor/sheetDocument.ts:15` keeps the last parsed document in one module-level entry (every kept place reads the document, one parse serves them all per commit), not store state. Limit: module state against the « no global state » rule, one entry. Upgrade path: the store holds the parsed document next to its text and the places select it
- [ ] V1-2.6 U1 corrections after the owner's first trial (brief « V1-2.6 UX — Arbitrages du premier essai propriétaire », 2026-11-09, BDR-107; contract `.claude/tasks/contracts/2026-11-09-v1-2-6-trial-arbitrations.md`; plan `docs/development/V1-2-6_U1_CORRECTIONS.md`): design and docs only so far, no app/scripts/SQL/Rust code, no DEV, sandbox untouched, no merge, no U2/U2b/V1-2.7
- [x] R0 boards 23-30 `docs/design/v1-2-6-r0/`: GRAPHICALLY VALIDATED 2026-11-09 (BDR-110) after owner corrections (BDR-109 + three last: 24 A, 26, 28) and closing counter-check CONFORME; A1-A15 settled (`ARBITRAGES.md`); archive `~/faunosteo-v1-2-6-r0-maquettes.zip`; impeccable 4.1.0 offline: 2 observations kept by owner
- [ ] R1 history « Défaire » / « Refaire » + « Désélectionner » + Escape priority (after R0 validation and its own go)
- [ ] D6b (owner 2026-11-12, U1 manual test on db:trial): a click or tap on the drawing outside any annotation deselects; criteria, code change and tests in V1-2-6_U1_CORRECTIONS.md R1; scope presented, awaiting the go
- [x] R1 history « Défaire » / « Refaire » + « Désélectionner » + Escape priority + D6b: DELIVERED 2026-11-12 (`7dda61d`, `bbb1668`, `bbdfd27` + `a1ee194`, `ab823f4` + `2327d61` + `0849e54`, `0d1edac`); gates on `0d1edac`: typecheck, lint, build ok; unit app 1371, supabase 180, core-wasm 66; e2e:ui 227; e2e:shell 197 passed / 4 failed (`admin.spec.ts:717`, anomaly B, baseline) / 99 skipped; limits in `V1-2-6_U1_CORRECTIONS.md` R1
- [x] D6b (owner 2026-11-12, U1 manual test on db:trial): a click or tap on the drawing outside any annotation deselects; built and tested in Chromium
- [ ] R1 follow-ups: undo/redo glyph paths differ from board i-undo / i-redo (U1 code, deferred) · « Toutes les annotations » and « Supprimer » are 36 px below xl (touch target) · « Toutes les annotations »: focus falls to the page when its row is filtered out
- [ ] owner manual checks on db:trial: R1 (« Défaire » / « Refaire », « Désélectionner », Escape) and D6b with mouse and touch, iOS Safari included (not proven by the tests)
- [ ] R2 fifth tab « Références », tiles, search + clear, view-only sort, panel from a finding only (34 rem, 150-200 ms slide, reduced motion) (after R0 validation and its own go)
- [ ] R3 sheet list: search + name sort first; date, date sort and « most recent » home card only after the dedicated SQL checkpoint `docs/development/V1-2-6_R3_SQL_CHECKPOINT.md` (A7 ratified 2026-11-09; never a creation date shown as modification date)
- [ ] R4 catalogue card integrity warning (independent fix, = anomaly C): `useCardDetails.ts` drops a failed `loadVersion` silently; UI only, check never bypassed
+6
View File
@@ -67,6 +67,12 @@ depends on a label, an element id or a class. The canvas sets and removes
the annotation ids of every zone of that observation, whatever their view;
the custom tooltip reads the two name attributes (none on a trigger).
Deselection (D6b, R1): a press that begins outside any `[data-anno-id]`
element and ends as a click deselects the current annotation, in the editor
and in its read-only twin; the catalogue reader does not. The hit areas
themselves are unchanged. A drag, a pan, a zoom or a press with a second
finger never deselects.
## Colours
`annotations[].color` gives the colour of one annotation; otherwise the colour
+1 -1
View File
@@ -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; `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), `editor-journey` (the steps of `V1-2-6_OWNER_TRIAL.md` §4 with two editor accounts: 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` (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-equine` (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). U1 shell (V1-2.6 U1, the four-tab shell): `editor-shell` (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` (four tabs, cross-tab undo, typed text then the header undo, a refused field kept through a real Shift+Tab to « Annuler », 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` (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` (no sideways scroll at 1 024, 1 180, 1 279 and 1 280 px on the four tabs, the sections and the panel, 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, « Annuler », « Rétablir », the panel when open, then tools, canvas and Line truncated
| `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), `editor-journey` (the steps of `V1-2-6_OWNER_TRIAL.md` §4 with two editor accounts: 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` (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 panel 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), `editor-equine` (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 four-tab shell): `editor-shell` (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` (four tabs, cross-tab undo, typed text then the header undo, a refused field kept through a real Shift+Tab to « Annuler », 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` (every edit-onLine truncated
Each suite runs on two Chromium projects: `chromium-desktop` (1280 × 800) and
`chromium-375` (375 × 667, mobile viewport, touch). A test tagged `@phone`
+14 -7
View File
@@ -159,8 +159,8 @@ SVG
4. Ajoutez une vue de détail (onglet « Annotations », « Gérer les vues », formulaire « Nouvelle vue de détail »,
bouton « Ajouter la vue » ; le recadrage est facultatif ; puis « Retour au dessin »), puis l'outil « Accès à
une vue détaillée » : tracez un contour et choisissez la « Vue ouverte ». Attendu : l'accès est créé.
5. « Annuler » et « Rétablir » (à droite de la rangée d'onglets, sur chaque onglet ; nom accessible « Annuler la
dernière modification ») défont et refont chaque création. Ne les confondez pas avec « Abandonner les
5. « Défaire » et « Refaire » (à droite de la rangée d'onglets, sur chaque onglet ; noms accessibles « Défaire la
dernière modification » et « Refaire la dernière modification défaite ») défont et refont chaque création. Ne les confondez pas avec « Abandonner les
modifications » (en-tête), qui abandonne tout ce qui n'est pas enregistré et reprend la dernière révision
du serveur, après confirmation.
@@ -175,7 +175,7 @@ dans « Gérer les vues » (onglet Annotations) avec un recadrage, puis « Chois
l'illustration parente ».
2. « Annuler » ne change rien. Recommencez et confirmez. Attendu : « Utilise l'illustration de la vue parente. »
et l'annotation de la vue marquée « À confirmer ».
3. « Annuler » (à droite de la rangée d'onglets), depuis n'importe quel onglet, restaure l'illustration propre de
3. « Défaire » (à droite de la rangée d'onglets), depuis n'importe quel onglet, restaure l'illustration propre de
la vue.
### 4.3 ter Catégories de constats
@@ -246,9 +246,16 @@ vous avez créée dans l'interface.
1. Les quatre onglets : « Général », « Annotations », « Constats », « Vérification ». Passez de l'un à l'autre à
la souris, puis au clavier (flèches gauche et droite dans la rangée d'onglets). Revenez sur un onglet : ce que
vous y aviez saisi et sélectionné est resté.
2. Dans « Général », modifiez un nom sans enregistrer. Passez sur « Annotations » et cliquez « Annuler » à droite
de la rangée d'onglets. Attendu : le nom d'origine revient dans « Général » ; « Rétablir » le remet. Un champ en
cours de saisie est validé avant l'annulation, donc sa saisie est la dernière modification annulée.
2. Dans « Général », modifiez un nom sans enregistrer. Passez sur « Annotations » et cliquez « Défaire » à droite
de la rangée d'onglets. Attendu : le nom d'origine revient dans « Général » ; « Refaire » le remet. Un champ en
cours de saisie est validé avant « Défaire », donc sa saisie est la dernière modification défaite.
6. Désélection : dans « Annotations », sélectionnez une annotation (le panneau de ses propriétés s'ouvre).
« Désélectionner » (à côté de « Supprimer ») la désélectionne, de même qu'Échap, et le message « Aucune
annotation sélectionnée. » est annoncé. Sélectionnez-la de nouveau, puis cliquez sur un os du dessin, sur un
espace vide du dessin ou sur la marge de la boîte : la sélection est levée, rien n'est ajouté à l'historique.
Un clic sur une autre annotation la sélectionne ; un glisser, un panoramique ou un zoom ne désélectionne pas.
Sur un écran tactile, un appui bref fait de même, un glisser ou un pincement non. Échap depuis le menu latéral
ou l'en-tête de l'application ne fait rien. iOS Safari : à vérifier à la main, non couvert par les tests.
3. Références : le bouton « Références » de l'en-tête ouvre un panneau latéral (non modal) avec une recherche sur
la citation, le DOI et l'URL (« Rechercher une référence »). Dans « Constats », sélectionnez un constat qui cite
une référence : le bouton « n référence(s) » ouvre le même panneau limité à « Citées par « … » (n) », avec « Tout afficher (n) » pour revenir à la liste entière.
@@ -286,7 +293,7 @@ vous avez créée dans l'interface.
l'illustration parente) n'est pas perdue par un simple changement d'onglet, de section ou l'ouverture du panneau
des références : elle est retenue, signalée par une ligne « … attend votre décision » avec « Reprendre », et ne
se rouvre que par ce bouton. Elle est perdue quand sa vue disparaît (annulation, abandon des modifications,
rechargement, suppression de la vue), et « Rétablir » ne la ramène pas.
rechargement, suppression de la vue), et « Refaire » ne la ramène pas.
- Une décision en attente au moment d'une soumission reste affichée comme ligne en attente, sans bouton d'action,
tant que le brouillon est gelé.
- Une offre de copie locale peut devenir en attente en cours de session (après une soumission suivie d'une
+32
View File
@@ -55,6 +55,13 @@ reference of R1 to R4.
### R1 — History labels and deselection (D5, D6, D6b)
Delivered 2026-11-12 on `feature/v1-2-anatomical-sheets`: `7dda61d` (D5 labels), `bbb1668` (« Désélectionner » and
Escape), `bbdfd27` + `a1ee194` (D6b), `ab823f4` + `2327d61` + `0849e54` (browser specs), `0d1edac` (design review fix:
44 px touch target below xl, 6 px icon gap). Gates on `0d1edac`: typecheck, lint, build ok; unit tests app 1371,
supabase 180, core-wasm 66; `e2e:ui` 227 passed; `e2e:shell` full suite on the sandbox 197 passed, 4 failed, 99
skipped. The 4 failures are the `admin.spec.ts:717` timeouts (anomaly B, the taken working-copy slot), the same as in
the 188 / 90 / 4 baseline; every new R1 test passed. The criteria below are the contract as written.
- Labels: `editor.history.*` keys in `apps/app/src/i18n/fr.ts` and `en.ts` (FR « Défaire » / « Refaire », names
« Défaire la dernière modification » and « Refaire la dernière modification défaite »; EN « Undo » / « Redo »
unchanged); `HistoryButtons.tsx` keeps its structure. Shortcuts unchanged: Ctrl/⌘+Z undo, Ctrl/⌘+Maj+Z redo
@@ -113,6 +120,31 @@ reference of R1 to R4.
`editor-geometry.spec.ts:419`) where a tap deselects and a touch drag does not. `editor-equine.spec.ts`: one click
on a bone path of the historical horse drawing of the working copy deselects.
#### Behaviour and limits (as built)
- Owner decisions at the gates. G1: Escape moves the focus only when it was inside the properties panel (to the
annotation's list row if it still exists, else to the drawing); from anywhere else the focus stays where it was.
G2: the « Supprimer » button style is unchanged.
- D6b in plain terms: the rule follows the press, not the click target. A press that begins outside every
`[data-anno-id]` element and ends as a click deselects. A press that began on an annotation never deselects, even if
it ends elsewhere. A drag, a pan, a zoom, a pinch or a press that gained a second finger never deselects.
- Escape from outside the editor workspace (sidebar, application header) does nothing.
- A value refused as « non appliqué » in the properties panel is lost when the panel closes, as with « Toutes les
annotations ».
- « Toutes les annotations » keeps its focus behaviour: when its row is filtered out, the focus falls to the page.
- The vertex handles of a selected polygon are display-only: a press on the part of a handle outside the zone's fill
deselects.
- A touch tap whose click Chromium drops does not deselect; a second tap does. This is rare: a field blur commit
rebuilds the drawing between the synthesized mousedown and the click.
- Chromium touch adjustment can turn a tap about 6 px outside a marker into a selection of that marker (no deselect
announcement then).
- Proof of the touch guards: Chromium only, through CDP touch with a capture-phase event recorder (identical over three
runs, `.superpowers/sdd/2026-11-12-r1-history-deselect-1141/task-5a-report.md`). A tap on empty: 1 pointerdown, 1
pointerup, 0 pointercancel, 1 click, deselect. A one-finger drag on a movable point: 0 click. A two-finger tap and a
pinch: 1 non-primary pointerdown, 2 pointerup, 0 click, selection kept. A one-finger drag on the read-only twin: 1
pointercancel (the browser pan took the touch), 0 click. iOS Safari is unverified: a manual check is listed in the
TODO, it is not a proof.
### R2 — The Références tab (D1 to D4)
- Tab model: `EDITOR_TABS` gains `references` between `findings` and `verification` (`apps/app/src/editor/tabs.ts:6-11`),
+4
View File
@@ -308,6 +308,10 @@ The annotations and findings complement (sub-step U2b) has its own table, F1 to
## T15 · « Annuler » wording (ratified)
Note 2026-11-12: history labels superseded by D5 (owner 2026-11-09, built 2026-11-12): the history buttons read
« Défaire » / « Refaire » (names « Défaire la dernière modification », « Refaire la dernière modification
défaite »). The text below is the historical record.
- Owner answer, brief U0 (BDR-101): distinguish the commands. « Annuler la dernière modification » for the history;
« Abandonner » or « Abandonner les modifications » for a form.
- Applied at U1 and later:
@@ -2875,6 +2875,9 @@ carrying the role `vertebra`, Annotations offers a fallback « Régions
vertébrales » entry; once a Vertèbres category exists, the regions are
configured from it (board 09), never in two places.
**Note 2026-11-12:** history labels superseded by D5 (owner 2026-11-09, built 2026-11-12): « Défaire » /
« Refaire ». The paragraph below is the historical record.
**Wording (T15).** « Annuler la dernière modification » names the history
command (header button, tooltip and accessible name, the toast after a
gesture); « Abandonner » or « Abandonner les modifications » names leaving a