Files
faunosteo/.claude/tasks/contracts/2026-11-17-v1-2-6-u2-implementation.md

480 lines
33 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CONTRACT — v1-2-6-u2-implementation
- date: 2026-11-17 | flow: implementation of U2 (direct manipulation of annotations, properties dialog) |
branch: feature/v1-2-anatomical-sheets
- status: open
- plan: `.claude/tasks/plans/2026-11-17-v1-2-6-u2.md` (rev 3, validated 2026-11-17)
- base: 838ae42. Commit in place, pushed by the hooks; no merge, no `gitflow.sh finish`.
- worktree: /home/bchanot/Documents/faunosteo-v1-2. Every command runs from this absolute path, checked first
(LRN-110). Never DEV: the `supabase_*_faunosteo` containers are DEV. Database work goes through `pnpm db:sandbox`
only. Claude writes nothing on the trial stack (`pnpm db:trial`), which is the owner's.
- untracked file kept: `faunosteo-v1-2-6-revue-ux-chatgpt.md`.
## REQUEST (verbatim — IMMUTABLE)
### Owner brief 2026-11-17 (U2 design validated, technical plan requested)
J'ai fait examiner l'archive graphique U2 par ChatGPT.
La revue graphique est favorable. Je valide les neuf maquettes ainsi que les arbitrages A1 à A15, y compris les trois écarts A1, A2 et A3 par rapport à l'orientation initiale.
En particulier :
- A1 : le premier clic sélectionne l'annotation sans ouvrir de modale. Un deuxième clic, un double-clic ou le bouton « Propriétés » ouvre la modale. La création ouvre automatiquement la modale après le placement du point ou la fermeture du tracé.
- A2 : la modale des propriétés s'affiche sur la colonne de droite pour préserver la visibilité du squelette.
- A3 : la colonne de droite reste présente avec les vues, catégories et annotations.
- A4 à A15 : les propositions des maquettes sont acceptées.
Trois ajustements mineurs sont demandés :
1. A13 : rendre compréhensible le déplacement du dessin à deux doigts sur tablette, avec une indication discrète et contextuelle. Ne pas surcharger l'interface.
2. A14 : s'assurer que l'apparition et la disparition des messages comme « Point déplacé · Défaire » ne provoquent aucun déplacement ni redimensionnement du schéma.
3. Planche 33 : rendre les messages de validation cohérents avec les champs réellement manquants. Si la catégorie est déjà sélectionnée, le message ne doit pas demander de la choisir à nouveau.
Ces ajustements ne nécessitent pas de refaire l'ensemble des maquettes.
Tu peux considérer la conception graphique U2 comme validée et poursuivre avec la préparation du plan technique U2, selon ton processus habituel.
Je te laisse autonome sur l'architecture, les choix techniques, les tests, les relectures et l'organisation des travaux.
L'objectif reste une édition anatomique fluide, précise et intuitive, aussi bien à la souris qu'au toucher, sans perte de données et sans déplacement intempestif de l'interface.
Présente-moi le plan technique et les éventuels arbitrages réellement nécessaires avant l'implémentation.
### Owner brief 2026-11-17 (U2 plan rev 2 validated, implementation authorised)
Je valide le plan technique U2 en révision 2, avec les décisions suivantes.
D1 : VALIDÉ.
Conserver les coordonnées dans le dialogue exceptionnel de réparation des dessins jusqu'à U5.
La suppression des champs de coordonnées prévue en A8 concerne le parcours normal d'édition des annotations. Il n'est pas nécessaire de refaire le dialogue de réparation dans U2.
D2 : VALIDÉ, avec une précision UX.
Masquer les boutons « + » lorsque les segments sont trop courts pour être manipulés correctement.
Le zoom doit permettre de les faire apparaître et de les utiliser.
En revanche, lorsqu'une zone est sélectionnée et que ses segments sont trop courts, prévoir une indication discrète permettant de comprendre qu'il faut zoomer pour ajouter un sommet.
L'objectif est d'éviter les insertions accidentelles sans rendre la fonction incompréhensible.
J'ai également une correction à apporter à l'une des règles R-1 à R-17.
Le plan indique que Retour ou un changement d'onglet annule automatiquement les modes Déplacer et Redessiner, sans confirmation.
Je souhaite distinguer deux situations :
- Aucune manipulation commencée : annulation immédiate, sans confirmation.
- Position déjà modifiée ou nouveau tracé commencé, mais pas encore validé : demander confirmation avant d'abandonner.
Cette règle doit rester cohérente avec nos décisions précédentes sur la protection des modifications en cours et l'absence de perte silencieuse.
Les autres choix visibles du plan me conviennent :
- clic sur le voile sans fermeture ;
- double-clic pour ouvrir les propriétés ;
- bandeau et messages sans déplacement du schéma ;
- lecture seule avec propriétés consultables ;
- gestion du toucher, de la loupe et des gestes.
Je valide également les trois ajustements A13, A14 et planche 33 tels que tu les as intégrés.
Tu peux finaliser le contrat d'implémentation, intégrer ces décisions et commencer U2 selon ton orchestration habituelle.
Je te laisse autonome sur les détails techniques, les relectures, les tests et l'organisation des tâches.
L'objectif est de livrer une manipulation directe des annotations fluide, précise, accessible et sans perte silencieuse de travail.
Je souhaite pouvoir essayer le résultat sur db:trial avant la clôture définitive de U2.
## CLARIFICATIONS
- Graphic reference: boards `docs/design/v1-2-6-u2/` 02 to 06, 13, 31, 32 and 33 with `REVUE.md` and
`ARBITRAGES.md` (A1 to A15 validated, three adjustments, BDR-122). Boards 14 and 16 (phone, read-only) unchanged.
- The plan's recorded choices R-1 to R-18 bind, as validated, with the owner's correction of R-12 (move mode and
redraw: immediate end when nothing was started, a question once work has started) and the D2 precision (R-18).
- Reading of the R-12 correction: the owner names Back and a tab change. The rule applies to every navigation that
would drop the mode: Back, a tab, a section, a view chip, a tool, sign-out and leaving the editor. « Annuler »,
« Annuler le tracé » and Escape are explicit cancels drawn on board 32 (row 4) and act at once.
- No silent loss, applied beyond the navigation sites:
- A read-only flip suspends a started mode instead of dropping it (R-14).
- A document change made elsewhere (reload, recovery, save refresh) that drops a started mode says so (R-13).
- D1: `RepairDialog` keeps its coordinate fields until U5. A8 governs the normal annotation editing journey.
- Rust by default: the new TypeScript modules are listed in R-17 and in the review's Part II exception table.
- Owner trial: on `pnpm db:trial` before U2 closes. U2 adds no migration. The owner runs `db:trial start` and
`db:trial app`; Claude writes nothing there.
## ACCEPTANCE CRITERIA
### Core
1. **Minimum point radius.** `PreviewState.min_point_radius` gives, for each view with a usable frame and a minimum,
the smallest radius that passes `TooSmall`, rounded up to 0.01. It is absent when the preview scale is at least
1.
- Rust tests cover the equine values (about 26.50 on the main view, 15.98 on the head) and the edge frames.
- Property: `r = value` passes and `r = value − 0.01` gives `TooSmall`.
- The ts-rs types are committed, and the wasm gzip figure and its delta are recorded in `RUST.md`, within
600 000 B.
### Press and handles
2. **Press machine.** One press machine is the editor's only click, drag and tap decider.
- Slop: 4, 6 and 10 CSS px for mouse, pen and finger, measured as displacement.
- A second pointer cancels the press: no click, no commit, and the pinch zooms.
- The topmost annotation decides; the nearest handle wins, with ranked ties.
- A double click (400 ms, 8 px) opens the properties and never acts on a handle.
- The catalogue's behaviour is unchanged.
- Table-tested (`stepPress`, `pressTarget`, `nearestHandle`, `clickAction`, `dragAction`, `isDoubleClick`), plus
e2e mouse and touch.
3. **Arrow keys.** They pan only when the canvas box itself has the focus. On a focused handle they move the handle
as a series: one commit on Enter or blur, none on Escape.
### Strip, messages, layout
4. **Strip.** One fixed-height strip above the drawing and the column replaces the tool line, the selection tag (in
the edit body) and the tracing bar. Its labels per state come from REVUE's table and R-1 to R-18.
5. **No layout shift (A14).** The boxes of the canvas, the strip, the aside and the header, the scroll height and
the client width are unchanged, with a zero layout-shift sum, around:
- select, deselect, tool change, tracing steps, the first commit,
- a message showing and expiring, the hint,
- dialog open and close, mode entry and exit.
This is checked at 1 024, 1 180 and 1 280 px. The editor carries `scrollbar-gutter: stable`, asserted as a
computed style.
6. **Message line.** It reads « Point déplacé · Défaire » and the like, lasts 6 s, pauses on mouse hover only, and
is closed by any commit, undo or redo. Its « Défaire » is the header's undo and is hidden during a creation. It
is a polite live region; a refusal is an alert with no « Défaire ».
7. **Two-finger hint (A13, R-1).** « Deux doigts pour déplacer ou zoomer le dessin » / « Use two fingers to move or
zoom the drawing » shows after a futile one-finger drag, only when the line is free, and never again in the visit
once a two-finger gesture has worked.
### Points and zones
8. **Points.**
- The handle drags at any pointer.
- The size slider has the view's stops, the red mark at the core minimum and the R-10 range. It commits once on
release, Enter or blur.
- A new point takes the most used size (A5) on every path: click, C26 and keyboard.
- « Déplacer le point » opens the move mode: four arrows, « Valider la position » commits once, « Annuler » and
Escape restore.
- The inherited out-of-frame point is repaired through the move mode, with no coordinate field.
9. **Zones.**
- Vertex choose and drag, « + » (midpoint, new vertex chosen), « − » (disabled at 3 with its reason), Insert and
Delete.
- The interior drag works by mouse and pen; « Déplacer la zone » and « Déplacer le sommet » use the mode, with a
finger or the arrows.
- « Redessiner » keeps the old outline until it is accepted, makes one commit, and keeps the trace open on a
refusal.
- Above 40 vertices, the outline and the message.
- A path keeps its `d` byte-identical and gets « Remplacer par un polygone » only.
10. **« + » and zoom (D2, R-18).** A « + » shows only when its segment is at least two hit radii long on screen,
and zooming reveals it. While a selected zone has a hidden « + », the strip shows « Zoomez pour ajouter un
sommet sur les segments courts. » / « Zoom in to add a vertex on short segments. » This line is not timed and
yields to a refusal or an issue. Insert stays available on the keyboard.
### Dialogs
11. **Properties dialog (A1, A2, A3, A9, A10).**
- Opening: a first click or Enter on a row only selects. A second click on the selection (with no vertex
chosen), a double click, Enter on the selected row or « Propriétés » opens it. A drag never opens it.
- Placement: over the right column at its width and top, never over the canvas box at 1 024, 1 180 and
1 280 px, under a 22 % veil that ignores clicks; with the tablet keyboard, the `visualViewport` fallback.
- Read mode first. « Couleur » appears only when set. « Marquer comme relu » is one undo.
- Edit mode is transactional: one save is one undo step, built from the current stored annotation. « Supprimer »
goes through `DeleteDialog`.
- The focus returns as board 32 says. The aside always shows the overview, with the selected row marked.
- It is an `annotation` history layer: Back closes it, Forward reopens it, a vanished id is sanitised away, and
another view's id switches the view.
12. **Creation (A4, A5, A7, A12, A15).**
- The point preview follows the pointer. A click or a closed trace opens « Nouveau point » or « Nouvelle zone »
by itself, with the ghost visible.
- The category is prefilled and recolours the ghost; the laterality has no default.
- « Replacer le point » and « Reprendre le tracé » keep the form.
- « Créer » is one insert. Then: « Sélectionner », the new annotation selected, its message, and the focus on
its row.
- « Abandonner », ✕, Escape and Back always ask (the shape exists).
- During a creation, the others are dimmed and unselectable, and undo is inactive.
- The keyboard add buttons place the shape and open the dialog. A link uses « Vue ouverte ». The C26 notice
shows in the dialog, without numbers.
13. **Validation messages (board 33).** Only the missing fields are named, under each field, with the summary
« À compléter : … » in form order. A chosen category is never asked for again. The general line
`editor.annotations.required.fields` is gone. The creation and the edit form share `missingFields`.
### No silent loss
14. **Guards (R-12, owner correction).**
- A creation asks before a tab, a section, a view chip, a tool, Back, Escape, sign-out and leaving the editor.
- A move mode or a redraw ends at once on those navigations while nothing is started. Once the position
differs or a vertex is placed, it asks « Abandonner le déplacement ? » or « Abandonner le nouveau tracé ? ».
- « Annuler », « Annuler le tracé » and Escape cancel a mode at once.
- « Continuer » always keeps the work intact.
15. **Pending work.**
- An undo while a move mode, a slider or a keyboard series is pending only cancels that preview (R-13).
- Previews and the chosen vertex are stamped with the document text. A stale one never commits; it is dropped,
and announced when it was a started mode.
- After undoing « + », « − » removes nothing stale.
16. **Read-only flip (R-14).** A crossing below 1 024 px, a refusal or a refresh keeps an open dialog in read-only
form with its draft, and nothing commits. It suspends a started mode. Both resume on the way back.
17. **Read-only sheet (R-16).** At 1 024 px and wider: the strip in read-only form, « Propriétés » opening the
read-only dialog, the overview kept, no handle, no slider. Below 1 024 px, boards 14 and 16 are unchanged.
### Accessibility and touch
18. **Accessibility.**
- Handles are focusable outside any `aria-hidden` subtree, with names such as « Sommet 3 de Vertèbres thoraciques » (the annotation's full name).
- Every drag has a non-drag path (WCAG 2.5.7): move mode arrows, a track click, « + » and « − » clicks,
« Redessiner ».
- axe passes on the selection, tracing, move, creation and dialog states.
- The touch hit circles are at least 44 px on a coarse pointer.
19. **Touch.**
- One finger on a handle drags it, with the loupe.
- One finger elsewhere moves nothing.
- Two fingers zoom and pan.
- A finger closes a trace within 22 px.
- Page scroll over the canvas without a selection still works.
- The smoothness measure (p95, CPU ×4, 1 180 px) is recorded in the plan. If only the loupe without the drawing
is acceptable, STOP for the owner.
### Scope, gates, process
20. **Scope.**
- `RepairDialog` keeps `GeometryGroup` (D1). No other coordinate field remains in the annotation journey.
- `PropertiesPanel.tsx`, `AnnotationFields.tsx`, `CreationPanel.tsx`, `TracingBar.tsx` and `useMoveGesture.ts`
are deleted; every removed assertion is mapped in its commit body.
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2/apps/app/src && test ! -e components/editor/annotations/PropertiesPanel.tsx && test ! -e components/editor/annotations/AnnotationFields.tsx && test ! -e components/editor/annotations/CreationPanel.tsx && test ! -e components/editor/annotations/TracingBar.tsx && test ! -e editor/annotations/useMoveGesture.ts && [ "$(grep -rl "GeometryGroup" --include=*.tsx . | grep -v "annotations/GeometryGroup.tsx" | sort | tr '\n' ' ')" = "./components/editor/views/RepairDialog.tsx " ] && echo SCOPE_OK
EXPECT: SCOPE_OK
EVIDENCE: MET exit=0 marker-found :: SCOPE_OK
21. **Documents.** All aligned as built:
- `docs/ANNOTATION-RENDERING.md` « Editor overlay », updated before the rendering changes.
- `V1-2-6_UX_TESTS.md` §U2 and `V1-2-6_UX_PLAN.md` §U2.
- `RUST.md` (size, exception row) and `RUST_ARCHITECTURE_REVIEW.md` Part II.
- `docs/design/README.md` and `CLAUDE.md` folder lines.
- `V1-2-6_OWNER_TRIAL.md` §4.17 « Démonstration U2 », in French, on `pnpm db:trial`.
22. **Gates.** Typecheck, lint, the app unit suite, build, `pnpm rust:check`, `pnpm wasm:build` and the size test.
`pnpm check:all` exits 0 at the final head. The sandbox runs `up fresh → test-db → e2e-shell → test` with exact
counts recorded. The commit latency stays under 500 ms for a vertex drag, an insert and a removal. No failed
suite is called green.
23. **Reviews.** A fresh verifier against this contract, and a fresh security auditor on the U2 diff, once each
before the checkpoint. Their exact results are recorded.
24. **Process.** No merge, no deploy, DEV unchanged, no write on the trial stack. U2 closes only after the owner's
trial on `pnpm db:trial`.
## FILE SCOPE
crates/core/src/anatomy/frame.rs, crates/core/src/domain/sheet/preview.rs, crates/core/tests/**,
packages/core-wasm/types/**, packages/core-wasm/tests/**, apps/app/src/{editor/**,components/editor/**,
components/ui/Dialog.tsx,catalogue/useFraming.ts,app/routes/app/admin/AdminSheetDraftRoute.tsx,
components/shell/SignOutButton.tsx,styles/index.css,i18n/fr.ts,i18n/en.ts}, apps/app/tests/**, apps/app/e2e/**,
docs/**, CLAUDE.md, CHANGELOG.md, .claude/tasks/**, .claude/memory/*
## ADDENDUM 2026-11-19: owner corrections before the trial
### REQUEST (verbatim — IMMUTABLE)
Le bilan technique de U2 est encourageant.
Je valide globalement les choix visibles et les comportements annoncés, sous réserve de mon essai manuel sur db:trial.
Avant cet essai définitif, je souhaite corriger quelques points.
1. Sur tablette, la barre supérieure fixe ne doit jamais recouvrir le bandeau des outils de l'éditeur pendant le défilement.
C'est un véritable défaut d'ergonomie à corriger. Le dessin et les autres éléments ne doivent pas se décaler de manière inattendue.
2. Après une interaction tactile qui valide des réglages en attente, le focus doit revenir à un endroit cohérent avec l'action, et non simplement sur la page.
3. Lorsque l'on choisit « Reprendre le tracé », je préférerais retrouver les poignées prévues sur la planche 04 C, afin de pouvoir corriger directement la forme.
4. Sur Mac, Retour arrière doit pouvoir supprimer le sommet sélectionné, dans le respect des règles de validation du polygone.
Pour la fonction Inser, prévois une alternative accessible au clavier sur Mac. Je te laisse choisir la solution la plus naturelle, sans multiplier inutilement les raccourcis.
5. Utilise le nom complet de l'annotation pour le groupe de poignées, par exemple « Sommets de Vertèbres thoraciques ».
6. Si « Refaire » est indisponible pendant une opération, une explication accessible serait appréciable.
Les autres comportements sont acceptés :
- Échap demande confirmation avant d'abandonner une création.
- « Annuler le tracé » est une action explicite d'abandon.
- Double-clic sur « + » = un seul sommet.
- Un message conserve sa visibilité pendant qu'il a le focus.
Je valide également l'ajout au suivi produit des problèmes de pagination des droits et de chargement progressif du catalogue.
Pour les mots de passe fictifs présents dans les scripts, conserve l'exigence déjà ratifiée : aucun véritable secret en clair dans les journaux, arguments de processus ou artefacts de test et CI/CD avant la production.
Je te laisse autonome pour organiser les corrections, les tests et les relectures avec ton processus habituel.
Une fois ces points traités, je souhaite procéder à l'essai manuel U2 sur db:trial, notamment sur la véritable fiche équine et sur tablette.
Je validerai la clôture de U2 après cet essai.
### Rulings carried (plan rev 4, « Owner corrections before the trial »)
The accepted behaviours (Escape asks, « Annuler le tracé » discards, a double click on « + » inserts once, the
focus hold) close criteria 2 and 6's open rulings. The plan's rev 4 rulings bind criteria 25 to 30.
### ACCEPTANCE CRITERIA (addendum)
25. **Strip under the top bar (point 1).** At 1 024 × 768, 1 180 × 820 and 1 280 × 800, at every scroll position of
the editor's annotations tab, the strip's top is at or below the top bar's bottom and the strip is fully
visible; the canvas and aside boxes do not shift; a focused or scrolled-to target is never under the bar or the
strip; below 1 024 px nothing changes.
26. **Focus after a touch commit (point 2).** A pending keyboard series or slider change commits without `blur()`;
after a tap that commits it (Safari-like: the tapped control takes no focus), the focus is on the pressed
handle, the handle that held the series, the canvas box, or the command's own keyboard target, per the path
(plan Task 13), never `body`. Real iPad Safari is a trial item, not a verified one.
27. **Resumed trace with handles (point 3, board 04 C).** « Reprendre le tracé » shows the closed pending shape with
its vertex, « + » and « − » handles; drags, « + », « − » and the vertex keys change only the pending shape
(document text, history and unsaved count unchanged); the three-vertex floor holds with its message; the strip
shows « Revenir aux propriétés » and « Abandonner » only; « Créer » writes the edited shape in one insert;
handle names use the form's name with a fallback while it is empty; the polyline reopening and its assertions
are gone, each mapped.
28. **Mac keys (point 4).** On a focused vertex handle, Backspace removes the chosen vertex exactly as Delete
(three-vertex floor, move-mode inertness, pending steps committed first) and « + » inserts after it exactly as
Insert, also when that segment's « + » is hidden; neither zooms the canvas nor reaches the tracing's Backspace;
`aria-keyshortcuts` lists them.
29. **Group name (point 5).** On the real equine sheet copy the group reads « Sommets de Vertèbres thoraciques »
(e2e assertion), its vertices « Sommet {n} de Vertèbres thoraciques ».
30. **Why redo is held (point 6).** A held « Refaire » (pending work) and a held « Défaire » or « Refaire » (creation)
carry an `aria-describedby` reason; a press on a held button shows that reason in the message line without any
shift; other disabled causes unchanged; axe passes on the held state.
Amended at the final review (controller ruling, 2026-11-19; ledger « Final fix »): a reason shows only when
removing its cause would make the button usable (« Refaire » with something to redo, « Défaire » with something
to undo); a press on « Défaire » while work is pending cancels it without committing it, by mouse, touch and
keyboard, so the redo stack is kept (rule R-13); a held press does nothing else, on any tab. Texts:
« Refaire est suspendu pendant la modification en cours : annulez-la avec Défaire pour pouvoir refaire. »,
« Refaire est suspendu pendant une création : abandonnez-la pour pouvoir refaire. », « Indisponible pendant
une création : créez l'annotation ou abandonnez-la. » (English pairs in `en.ts`). Where the reason appears on a
tablet is the owner's decision at the trial (measured: the message line is below the fold at the three sizes).
31. **Follow-ups and gates (rev 4).** TODO carries the rights paging, the catalogue progressive loading and the
passwords requirement; §4.17 is rewritten for points 1 to 6 with the accepted behaviours moved out of the
choices to judge; criteria 22 and 23 are met again on the final head (check:all, the shell suite without
editor-equine, both measures, a fresh verifier, a fresh security auditor).
### FILE SCOPE (addendum)
apps/app/src/components/shell/ShellChrome.tsx (the top bar's height variable only), apps/app/src/components/editor/HistoryButtons.tsx.
## ADDENDUM 2026-11-19 (2): owner decisions at the checkpoint, rev 5
### REQUEST (verbatim — IMMUTABLE)
« Voici mes décisions pour les cinq points de contrôle U2.
D1 : VALIDÉ.
Je choisis la petite bulle contextuelle sous le bouton « Refaire » ou « Défaire » indisponible.
Elle doit être visible à proximité du bouton concerné, accessible au toucher, à la souris et au clavier, et ne provoquer aucun déplacement de l'interface.
D2 : VALIDÉ.
Conserver le correctif de visibilité du focus à toutes les largeurs, y compris sous 1 024 px.
D3 : VALIDÉ.
J'accepte les modifications de AppLayout.tsx, leaveGuardStore.ts, anchoredPlace.ts et layer.rs. Elles sont justifiées par le périmètre fonctionnel de U2.
D4 : REFUSÉ.
Ne pas réinitialiser la sandbox.
Les données existantes doivent être préservées. Mets le contrat en cohérence avec cette contrainte et conserve les limites de vérification documentées.
D5 : ACCEPTÉ AVEC RÉSERVE.
Les 17 échecs E2E hors éditeur ne bloquent pas mon essai manuel de U2.
En revanche, ils ne doivent pas être présentés comme résolus ou tous formellement indépendants de U2.
Le passage de quatre à six échecs dans l'intégrité du catalogue mérite une vérification ciblée si elle peut être réalisée sans détruire de données.
Je te laisse déterminer le diagnostic pertinent, en tenant compte des comparaisons déjà réalisées et de la charge de la sandbox.
J'ai également une remarque importante concernant le bandeau des outils.
Tu indiques que, lorsque la page défile, la barre d'outils peut recouvrir le haut du dessin.
Ce comportement ne me convient pas complètement.
Dans un éditeur anatomique, l'utilisateur doit pouvoir manipuler toute la surface utile du dessin sans qu'une partie soit masquée par les éléments fixes de l'interface.
Je souhaite une correction ergonomique cohérente, sans décalage intempestif du schéma, sans défilement horizontal et sans régression des interactions tactiles.
Je te laisse choisir la meilleure solution technique.
Les autres comportements annoncés sont acceptés, notamment :
- Reprendre le tracé avec ses poignées ;
- Retour arrière et « + » sur Mac ;
- focus conservé après les manipulations ;
- sélection automatique du sommet suivant après suppression ;
- comportement cohérent de Défaire pendant une modification en cours.
Tu peux poursuivre les ajustements et les vérifications avec ton orchestration habituelle.
Une fois ces derniers points traités, je ferai mon essai manuel sur db:trial, à la souris et sur tablette.
U2 sera clôturé après ma validation de cet essai. »
### Amendments carried by the owner's decisions
- Criterion 22: no `db:sandbox up fresh` and no reset, ever, on this work (D4); the existing sandbox data is
preserved. The gates run on the existing sandbox; their verification limits stay documented (red environment
suites named with their evidence, never called resolved or all formally independent of U2, D5).
- Criterion 25: « below 1 024 px nothing changes » no longer covers the focus margin of the editor's own controls,
which applies at every width (D2).
- Criterion 30: the held reason appears in a bubble next to the held button (D1), replacing the message line.
The controller amendment of 2026-11-19 (texts, « reason only when it helps », « Défaire » cancels pending work)
is accepted by the owner (« comportement cohérent de Défaire pendant une modification en cours »).
- Scope (D3): AppLayout.tsx, leaveGuardStore.ts, anchoredPlace.ts and layer.rs are in scope.
### ACCEPTANCE CRITERIA (addendum 2)
32. **The drawing is never under the strip (owner remark).** On the editable layout (≥ 1 024 px), at every page
scroll position, no part of the drawing's box, its view chips, its add row or its message line is under the
sticky strip or the top bar while the user can act on it; the presses that the rev 4 tests had to move to the
page top (`scrollToTop` / `expectOnDrawing` in editor-deselect and editor-journey) pass where they were first
written; no horizontal scroll at 1 024, 1 180 and 1 280 px nor at a shorter window height probed; the canvas
keeps its size during a scroll; a row selection does not move the drawing on screen; touch drags, pinch,
page scroll and the loupe keep their behaviour; a focus on a pinned control never scrolls the page.
33. **The held reason in a bubble (D1).** A press (click, tap, Enter, Space) on a held « Défaire » or « Refaire »
shows its reason in a bubble next to that button, inside the viewport and below the top bar, at the three
sizes, on every tab; it moves nothing (`expectNoShift`, `scrollWidth` unchanged); it is announced once, keeps
the `aria-describedby` reason, passes axe while open, closes when the hold ends, on a tab change, when the focus
leaves and on Escape (whose order with the creation and pending-work Escape is defined and tested); the message
line route for the reason is removed.
34. **Catalogue-integrity count (D5).** A non-destructive diagnosis of the 4 → 6 failures is recorded (read-only
counts, a head run alone with one worker, a pre-U2 baseline run only if the head run fails them all); the
result is stated as attributed or not attributed, never assumed.
35. **Documents and gates (rev 5).** §4.17 updated (the bubble, the pinned drawing, the decisions D1 to D5 as
accepted); UX_TESTS states the environment failures per D5; criteria 22 and 23 run again on the final code
(check:all, the shell suite without editor-equine, both measures, a fresh verifier, a fresh security auditor
on the rev 5 delta).
### FILE SCOPE (addendum 2)
apps/app/src/components/shell/AppLayout.tsx, apps/app/src/state/leaveGuardStore.ts, apps/app/src/components/ui/anchoredPlace.ts, crates/core/src/anatomy/layer.rs (owner D3); apps/app/src/styles/index.css and the editor's annotations layout components for criterion 32; HistoryButtons.tsx and a bubble component under apps/app/src/components/editor/ for criterion 33.
### Owner status 2026-11-20 (addendum 2)
- Criterion 32 stays OPEN: the partly hidden drawing cases are not accepted as final limits. The owner tests on a
tablet (`db:trial`) and reports on point and zone handling and on the drawing during scroll. If a structural fix is
needed, a targeted mock-up is validated before any large layout change. U2 is not validated.
- Skipped tests, established from the code and the last full shell run (3d6aacad, `shell-3d6aacad-w2`:
347 passed, 234 skipped, 13 failed; the failures are the known ones outside U2 plus the animal-archive contrast
anomaly in TODO). The 234 are NOT five tests; the figure five matches only the chromium-desktop project:
- chromium-desktop, 5 skipped. Hand-run measures, 2 (never asserted, timing figures; skip unless the variable is
set): `editor-measure-commit.spec.ts:48` (`MEASURE_COMMIT=1`) and `editor-measure-drag.spec.ts:46`
(`MEASURE_DRAG=1`); command: `MEASURE_COMMIT=1 pnpm db:sandbox e2e-shell editor-measure-commit` (same shape for
drag), run on chromium-desktop only (1 280 px commit, 1 180 px drag). Not applicable to the desktop project, 3:
the read-only twins at 375 px of `editor-deselect.spec.ts` (:725, :814, :860), skipped by `!isPhone` (« the twin
is the phone view »), run on chromium-375.
- chromium-375, 229 skipped, not applicable: editing needs 1 024 px (C16 floor-guard skips; the phone read-only
path is covered by `editor-access`), desktop-only measurements such as the scrollbar gutter at 1 280 px
(`editor-annotations.spec.ts:924`), and the two hand-run measures above. I did not split these 229 by reason
one by one.
- Counts come from the run log; a rerun can differ. chromium-320 is not part of the run above.
### Owner decisions 2026-11-20 (addendum 3)
- Criterion 32: validated by the owner on the trial build; REOPENED by the owner (2026-11-20) until re-verified on the final code (the 44 px add buttons move the pinned thresholds): short windows and several rows of view chips (plan Task 7 Step 4b).
- Criterion 32 re-verified on the final code (2026-11-20): one row of view chips (equine sheet) passes, whole editor-geometry spec including short windows; several rows (eight long-named views, 3 to 5 rows) FAIL: the stuck column overflows the window bottom by 64.3 px (1 024 × 768), 53.3 px (1 180 × 820), 76.0 px (1 180 × 700), 24.3 px (1 280 × 800); the test is committed as test.fixme. The pinned budget counts one row of chips since Task 17 (at 1 280 px neither the add row nor the budget changed). Criterion 32 stays OPEN, owner decision pending.
- Criterion 12 reworded: « The add buttons: a pointer press (click or tap) arms their tool, the
shape is placed or traced on the drawing and the dialog opens itself; a keyboard press (Enter,
Space) places the shape at the centre and opens the dialog; a second single pointer press on an
armed button disarms it, behind the R-12 guard; a double-click leaves it armed. »
- Coarse marks lightened (vertex 14, « + » 18, « − » 32 × 26 drawn in a 44 × 36 hit); criterion 18
unchanged; the « − » bubble placed on the open side of its vertex, clear of shown « + » hit
areas, on screen. Add buttons 44 px tall below 1 280 px; the pinned column budget follows.
- Contract of the change: `.claude/tasks/contracts/2026-11-20-u2-trial-adjustments-1259.md`.