Commit Graph
1366 Commits
Author SHA1 Message Date
bchanot de418b29a9 test(tests): press the drawing where the sticky strip leaves it visible
The strip made sticky in f2809f20 covers the drawing's top band and the
aside's top while the page is scrolled (rev 4 point 1 ruling, accepted
cost). Three presses and one axe scan ran at that scroll after a row
click: back to the top first, and assert the press hits the drawing.
2026-11-19 14:43:19 +01:00
bchanot 05a8525455 docs(docs): rev 4 owner trial, UX tests and rendering notes 2026-11-19 14:13:59 +01:00
bchanot 682bbd4a18 chore(editor): rev 4 review nits 2026-11-19 14:12:30 +01:00
bchanot 8f036b2a8a fix(editor): a press on a held redo keeps the pending work untouched 2026-11-19 14:02:11 +01:00
bchanot 00e995a6cb feat(editor): say why redo is unavailable during pending work 2026-11-19 12:38:26 +01:00
bchanot e341f03390 fix(editor): one focus marker on every handle, proven on an SVG vertex 2026-11-19 12:32:27 +01:00
bchanot 399a5adae6 fix(editor): focus margin on the strip's targets, not a page padding 2026-11-19 12:24:34 +01:00
bchanot f2809f20ca fix(editor): the strip stays below the top bar on scroll 2026-11-19 12:15:52 +01:00
bchanot 62b400e876 fix(editor): « − » press follows Delete, discriminating focus tests 2026-11-19 12:00:48 +01:00
bchanot 03e85a7c67 fix(editor): focus follows the action after a touch commit 2026-11-19 11:26:37 +01:00
bchanot df46390bdb fix(editor): vertex keys act on the focused handle after an undo 2026-11-19 11:20:19 +01:00
bchanot 6df66f9bb9 feat(editor): Backspace and « + » on a vertex handle 2026-11-19 11:16:55 +01:00
bchanot c01c6f3145 fix(editor): resumed shape names and minor review fixes
- French fallback names: « cette nouvelle zone », « ce nouvel accès »
  (controller ruling: « Sommets de ce nouvel accès »); doc updated.
- useZoneHandle back to 5 locals.
- dropPending clears the strip hint as a kept stored change does.
- Tests: the chosen vertex cleared by finishCreation itself (document
  unchanged) and by a view change through the guard; both fail
  without their clearing.

Changed assertions, editor-creation-dialog.test.tsx:
- « Sommets de la nouvelle zone », « Sommet 1 de la nouvelle zone »
  -> « … de cette nouvelle zone » (ruling)
- « Sommets de le nouvel accès » -> « Sommets de ce nouvel accès »
- chosen null after « Créer » (cleared by the document change, not
  discriminating) -> « the chosen vertex ends with a finished
  creation, the document unchanged »
2026-11-19 09:49:27 +01:00
bchanot a5896710e5 feat(editor): resumed trace edits the closed shape with its handles
« Reprendre le tracé » keeps the pending shape closed; the zone handles
(vertex, « + », « − », vertex keys) edit it through the same press path
and useZoneEdit, the target generalised to points + drop. A drop on
PENDING_ID patches creation.pending only: document, history and unsaved
count untouched, message without « Défaire ». Strip: « Tracé repris,
saisie gardée » with « Revenir aux propriétés » and « Abandonner ».
Handle names fall back to « la nouvelle zone » / « le nouvel accès ».

Removed (resumed branch of popVertex, backToProperties -> closeTrace,
CreationCommands tracedCount and its « Retirer le dernier sommet »).

Removed assertions, editor-creation-dialog.test.tsx, « keeps the
vertices and the form; a new vertex, then the dialog again »:
- strip « Tracé repris, saisie gardée » -> kept in « keeps the shape
  closed and the form, shows its handles; two strip commands »
- « Retirer le dernier sommet » enabled -> absent; commands are exactly
  « Revenir aux propriétés », « Abandonner » (same test)
- a click on the drawing adds a 4th vertex -> « a click off the handles
  adds and selects nothing; a double « + » inserts once »
- dialog again with Nom (FR) « Tibia » -> « « Revenir aux propriétés »
  shows the edited shape; « Créer » inserts it »
- « Zone tracée, 4 sommets » -> « Zone tracée, 5 sommets » after « + »
  (same test)
2026-11-19 09:42:58 +01:00
bchanot 816d0f4f9a docs(docs): U2 rev 4, owner corrections before the trial 2026-11-19 00:45:08 +01:00
bchanot 1f2485ecb8 chore(memory): journal U2 T7-T10 and owner trial stop 2026-11-18 15:27:40 +01:00
bchanot 04d083ff85 docs(docs): U2 gate note gives the batch count for catalogue-integrity 2026-11-18 15:19:56 +01:00
bchanot 08458b6971 docs(docs): U2 gate notes name the serial skip and one-worker run 2026-11-18 15:00:14 +01:00
bchanot 4e2bdb5ebb docs(docs): U2 final gate results and measures on 15b23f8
UX_TESTS: gates at 15b23f8 (check:all passed; shell suite 311 passed, 14 failed, red; test 105 passed; test-db FAIL 014/021 as before U2), measures rerun, keyboard map row (Backspace only while tracing). Plan Tasks 8 and 10 and OWNER_TRIAL Mesures carry the new figures.
2026-11-18 14:54:24 +01:00
bchanot 15b23f8420 docs(docs): U2 redo hold as built and owner trial choices
UX_TESTS: redo is held while a move, a redraw or keyed steps are pending (ae80511), the message line also pauses under keyboard focus. OWNER_TRIAL 4.17: greyed redo, Mac keys (M-7), focus hold, focus back to the page after a touch or Safari commit, the new handle names.
2026-11-18 14:14:33 +01:00
bchanot 9522eb72aa test(tests): probe mode entry and exit for shifts at three widths
Criterion 5: « Déplacer le point », « Déplacer la zone », « Valider la
position », and « Redessiner » entered then cancelled, each under
expectNoShift at 1 024, 1 180 and 1 280 px (seeded point and zone, the
existing multi-width pattern). The editor-touch « Déplacer la zone » entry
joins the probe; its button is centred first, since below xl the sticky top
bar can cover the strip and Playwright would scroll inside the probe.

No assertion removed. No product shift found.
2026-11-18 14:13:53 +01:00
bchanot b6aa2819ea fix(editor): name vertex handles after their zone, in a named group
Criterion 18: « Sommet {n} de {nom} », « Ajouter un sommet après le sommet
{n} de {nom} », « Retirer le sommet {n} de {nom} » (EN « Vertex {n} of
{name} » …), {nom} the zone's display name in the current locale; the
handle group is a role="group" named « Sommets de {nom} ».

Tests: no assertion removed; every unit and e2e locator that read the old
names now reads the same handle with the zone name appended (fixtures: N,
Vertèbres thoraciques, Zone dessinée, Zone clavier). New unit tests in
editor-zone-edit cover the FR names, the group and the EN locale.
2026-11-18 14:09:24 +01:00
bchanot fab641c278 docs(docs): U2 contract records the scope oracle evidence 2026-11-18 14:04:31 +01:00
bchanot 059764ec60 test(tests): probe the measure preview port without HTTP
Fixes semgrep react-insecure-request (CWE-319): ready() now checks the preview port with a node:net TCP connect instead of fetch on http://127.0.0.1. Also ignore apps/app/e2e/test-results/ in .dockerignore so the measure build, which inlines the sandbox anon key, stays out of the Docker context.
2026-11-18 13:46:55 +01:00
bchanot a75c2999de fix(editor): commit a keyed series before a move or a redraw starts
Safari, and iPad Safari on a tap, focuses no clicked button: the
handle or the slider keeps the focus, no blur commits its series, and
« Déplacer … », « Redessiner » or « Remplacer par un polygone »
cleared it (preview: null) without a word. startMove and beginRedraw
now call commitFocusedSeries() first, the same path a drawing press
takes since 10a8767. « Propriétés » (guardDrawing) and
« Désélectionner » (useDeselect) already committed; a test pins both.

Tests: no assertion removed.
2026-11-18 13:31:34 +01:00
bchanot a5af9bdd4f test(tests): measure the line's « Défaire » hit box whole
Final review M-5: the hit test now probes 1 px inside each edge of the
44 px (36 px from xl) box and reads the ::before height, so the check
proves the full height, not 42 px. Tests: no assertion removed.
2026-11-18 13:28:17 +01:00
bchanot f2bf442ecd test(tests): prove the line and redraw fixes without a shift
Final review M-3, M-4, M-5, M-6 in the sandbox suites:
- editor-annotations (A14 at 1024, 1180, 1280 px): « Défaire » on the
  line hit-tested 44 px tall below xl and 36 px from xl, its pill 36
  px; pressed under expectNoShift, the drawing then has the focus.
- editor-geometry: the same refused move twice under expectNoShift is
  a new alert pill.
- editor-zones: « Redessiner » takes the focus back after a close and
  a cancel; with the strip scrolled out and the focus on body, the
  close returns it with no scroll.

Tests: no assertion removed.
2026-11-18 13:21:32 +01:00
bchanot a6685a04e0 fix(editor): return the focus without a scroll; drop an inert tap
Final review M-4 and M-6: the line's « Défaire » focuses the drawing
through focusDrawing (preventScroll), and a mode's end focuses its
entry with preventScroll, so neither scrolls the page (A14).
M-8: the empty tap kept after the removed click was as inert; gone.

Tests removed: in « a mouse tap deselects at the pointer-up », the
second pointerDown/pointerUp on the empty drawing and its repeated
isDeselected assertion (the first tap's assertion covers it).
2026-11-18 13:12:56 +01:00
bchanot 10a8767527 fix(editor): commit a keyed series as a press starts on the drawing
Final review I-1 audit. A touch press moves no focus before its
pointer-up, so a press on « + » or « − », or a drag, committed over an
arrow or slider series still pending on the focused handle and dropped
it. A fresh press now commits it first (commitFocusedSeries, its own
blur), as the mouse's focus move already did.

Tests: no assertion removed; header « Refaire » cases added for a
started redraw and a size change.
2026-11-18 13:12:55 +01:00
bchanot 13e2503e6a fix(editor): gesture line alerts, focus after « Défaire », hit area
Final review M-3, M-4, M-5, M-8.
- M-3: the line and the strip render a refusal's role="alert" beside
  their always-mounted role="status" region, never inside it; every
  shown message carries a serial that keys its pill, so a repeated
  identical refusal is a new pill and is announced again.
- M-4: after the line's « Défaire » the focus goes to the canvas box.
- M-5: « Défaire » gets a transparent ::before, 44 px tall below xl
  (36 px from xl), within the row's reserved 44 px: the pill keeps
  its 36 px. The A14 e2e checks the hit area at 1024, 1180, 1280 px.
- M-8: the « swallows the click on a marker » test fired a click the
  canvas ignores since T2; the inert click is dropped, the title says
  what the taps prove.

Tests rewritten: « the message sits on its own row »: role="status" on
the row → a role="status" region inside the row, empty at rest.
« a mouse tap deselects … swallows the click »: the final
fireEvent.click on the marker removed (inert), its isDeselected
assertion kept after the second tap.
2026-11-18 13:00:22 +01:00
bchanot e299c3d4f6 fix(editor): give the focus back to « Redessiner » after a redraw
Final review M-6. useMoveFocusReturn becomes useModeFocusReturn: the
mode that ended picks its entry, « Déplacer … » (data-move-entry) for
a move, « Redessiner » or « Remplacer par un polygone »
(data-redraw-entry) for a redraw, the drawing when neither is shown.
A redraw counts as running while its mode or its tracing lives, so a
link polygon (no « Déplacer ») never leaves the focus on body.

Tests: no assertion removed.
2026-11-18 13:00:12 +01:00
bchanot 323a342586 fix(ui): end an anchored dialog above the tablet keyboard
Final review M-2: maxHeight runs to the visual viewport's bottom, not
the layout viewport's, so « Enregistrer » stays reachable while a
keyboard leaves 320 px or more. New unit case beside the keyboard one.
2026-11-18 13:00:11 +01:00
bchanot 9e1ec4479d fix(editor): name a moved link « Link moved » in English
Final review M-1: the kind is « Link » everywhere else (« Link redrawn »,
« Link created »). The owner trial's string list follows.
2026-11-18 13:00:10 +01:00
bchanot ae80511964 fix(editor): redo and move-mode handle keys keep pending work
Final review I-1. Redo (Ctrl+Shift+Z and the header « Refaire ») is
inactive while a started move or redraw, a keyboard series or a size
change is pending (holdsRedo): the work stays, the user commits or
cancels it first. In a move mode, Insert and Delete on a vertex and
Enter or Space on « + » and « − » do nothing, as the press machine.

Tests: no assertion removed. The history-guards move-mode helper and
reset run in act, since « Refaire » now re-renders on a started mode.
2026-11-18 13:00:03 +01:00
bchanot c6b8c7e48a docs(docs): U2 owner trial section and gate figures
OWNER_TRIAL §4.17: db:trial preparation, mouse and tablet steps, visible choices to judge, invented strings, known limits, measures. Plan Task 10 Step 3 and UX_TESTS performance row: commit latency figures. CLAUDE.md cites the two hand-run measure specs.
2026-11-18 12:20:49 +01:00
bchanot e6f47280ad test(tests): measure commit latency on a seeded draft
Opt-in spec (MEASURE_COMMIT=1, MEASURE_BUILD=preview for the production build): vertex drag, « + » and « − » on a run-seeded equine draft, three runs each, from the pointerup to the painted frame showing the new geometry with the undo entry. Never editor-equine nor the historical copy.
2026-11-18 12:20:45 +01:00
bchanot e603de39e8 docs(docs): history undo name follows D5 in U2 tests and plan 2026-11-18 11:25:42 +01:00
bchanot 6e42d2ada1 docs(docs): U2 tests, plan, rendering and Rust review aligned 2026-11-18 11:23:22 +01:00
bchanot 0ca1f20452 docs(docs): U2 plan records the loupe drag measure 2026-11-18 11:18:03 +01:00
bchanot dd3f245bca fix(editor): loupe copy without ids, two fingers counted in the pinch
Minor 1: the loupe's copy of the drawing drops every id (the equine
drawing has 142); its url(#…) and href="#…" resolve to the originals.
Minor 2: useFraming's onPinch marks the two-finger flag at the pinch
move itself; the passive effect that read the live press phase and
the press hook's multi() are removed.
2026-11-18 11:17:42 +01:00
bchanot 181f81789a test(tests): measure the drag on a production build (vite preview)
Opt-in with MEASURE_DRAG=1 MEASURE_BUILD=preview: the app built with
the shell config's sandbox environment into e2e/test-results, served
by vite preview on 127.0.0.1:5193 (--strictPort), the allowlist set
to that origin and the fake Supabase origin. Suites unchanged.
2026-11-18 11:09:06 +01:00
bchanot bc8d645554 test(tests): loupe drag without shift, a pinch at the fit unselected 2026-11-18 10:59:40 +01:00
bchanot 85231a2680 feat(editor): two-finger pan, touch hint, loupe, touch-sized handles
useFraming gains twoPointerPan (the editor's pinch also pans by the
midpoint and scales from the spread since the pinch began; the
catalogue passes nothing). A futile one-finger drag shows the R-1
hint unless two fingers already worked in this editor visit (work
store flag). A finger drag of a handle shows the loupe (technique A:
the drawing copied once, data-anno-id stripped, outline on top).
editor-touch.spec covers 1 024, 1 180 and 1 280 px with CDP touch.
measure-drag.ts is the hand-run smoothness measure (MEASURE_DRAG=1).
equineShape moved from editor-zones.spec to support/editor.ts, no
assertion changed.
2026-11-18 10:54:46 +01:00
bchanot 3a7715486b docs(docs): what changes per move under the loupe 2026-11-18 00:33:02 +01:00
bchanot d39603ab6a docs(docs): the touch loupe in the editor overlay contract 2026-11-18 00:18:14 +01:00
bchanot 837ec9f436 fix(editor): slider while replacing, announced drop, review minors
Task 7 fix round 1 (review task-7-review.md).
- Important 1: « Taille » shows beside « Revenir aux propriétés » while
  a point is replaced (still hidden under the modal dialog); it feeds
  the hover preview and the re-placed point (R-10).
- Important 2: a creation whose view leaves the document is dropped
  and said, « Création abandonnée : la fiche a changé. » (dropped:
  'creation', read by useDroppedNotice).
- Minor 3: DrawingGuardDialog leaves a creation question to the
  creation dialog only while that dialog is really on screen
  (creationShown, set by the dialog).
- Minor 7: the dialog's long className strings split into constants.
- Minor 8: dead TOOL_OF removed; trace_start is a redraw's only.

Tests added (no assertion removed): slider while replacing (unit,
RED then GREEN; e2e under expectNoShift at three widths, last strip
command inside the strip); view removed during a creation (RED then
GREEN); question shown by the workspace when the dialog is not on
screen (RED then GREEN); « Abandonner » while read-only; R-13 with a
restored copy during a started move; leaving the route resets the
work (fails with the session reset removed). The unit Back test's
comment is corrected: it does pin the modal branch.
2026-11-18 00:06:16 +01:00
bchanot fe333c2bbd fix(editor): creation question lapses, guard sites and flip tested
The creation's « Abandonner la création ? » no longer outlives it:
« Replacer le point », « Reprendre le tracé », « Créer » (« Utiliser
cette position » included) and « Annuler le tracé » clear a question
still open, which would otherwise reappear over the page. Locals
trimmed in the creation dialog and the tracing actions (5 max).

Tests added (no assertion removed): the two lapses (RED without the
fix, GREEN with it); a view chip and a tool ask during a tracing; the
mode flip keeps the dialog, its form and the ghost; a history jump out
of the editor waits for the creation's question; e2e: « Reprendre le
tracé » and « Revenir aux propriétés » under expectNoShift at 1 024,
1 180 and 1 280 px, the strip's last command inside it, axe on the
resumed state.
2026-11-17 23:41:24 +01:00
bchanot 4d2c64f57f feat(editor): creation on the drawing then the creation dialog
U2 Task 7 (A2, A4, A5, A7, A12, A15; R-3, R-4, R-12, R-13, R-14).
The work store's `creation` owns the new shape, its form, its view and
F: a click with the point tool, a closed tracing or a keyboard
« Ajouter … » opens « Nouveau point / zone / accès », a modal without
a history layer over the right column, mounted beside EditOnly so a
read-only flip keeps it (« Créer », « Replacer », « Reprendre » off).
A new zone or link is a creation from its first vertex. The ghost
takes the form's category colour; the point tool previews under a
mouse; the canvas carries data-creating (other markers dimmed,
unselectable). « Replacer le point » / « Reprendre le tracé » hide the
dialog and keep the form; the strip offers « Revenir aux propriétés »,
« Retirer le dernier sommet », « Abandonner ». « Créer »: one insert,
tool back to « Sélectionner », the new element selected, « Point
créé · Défaire », focus on its row. ✕, Échap, « Abandonner » and Back
always ask « Abandonner la création ? » (DiscardConfirm inside the
dialog; DrawingGuardDialog elsewhere); answerDrawing drops the
creation. Undo, its shortcuts and the line's « Défaire » are inactive
during a creation. missingFields replaces formProblem (MissingSummary
shared with the edit form); the C26 notice has no numbers.
CreationPanel, formProblem, withGeometry and the keys required.fields,
required.names and create_cancel are gone; GeometryGroup is imported
by RepairDialog only.

Removed or rewritten assertions:
- tab « holds a point at the frame centre »: « Centre x » = 50 ->
  the ghost circle cx = 50; plus tool back to Sélectionner, « Point
  créé », one undo step.
- tab « refuses a creation without laterality »: the general line
  « Choisissez la catégorie et la latéralité » -> only « Choisissez
  une latéralité. » and « À compléter : Latéralité. », focus on it.
- tab « applies the geometry group to a pending zone »: removed (A8,
  no coordinate field) -> « places a triangle at the centre: the ghost
  shows it, Créer inserts it »; vertex edits after Créer are the e2e
  keyboard test.
- tab C26 « proposes C »: « x = 15, y = 15 » in the notice -> the R-4
  text, the notice inside the dialog; cancel test « Centre x » = 0 ->
  ghost cx = 0.
- tab « offers the correction when the core refuses a pending point »
  (typed cx 98): removed, no typed coordinate is possible; the verdict
  path stays covered by the C26 click tests and correctionFor units.
- tab H5 « a typed radius shows the core issue »: removed (A8); the
  size refusal is the slider's (Task 4 tests).
- tab H6 « a second click moves the pending point »: -> « Replacer le
  point », then the click moves the ghost, the form kept.
- tab H7 « Centre x/y » = 30/50 -> ghost cx/cy.
- tab tracing Enter: « x du sommet 3 » -> ghost points; « drops the
  tracing on Escape » -> Escape asks first (board 32 row 3), Continuer
  keeps, Abandonner drops; new « Annuler le tracé acts at once ».
- keep-alive « a pending creation is kept and focused » and « a
  tracing … is kept and focused »: the tab now asks first (R-12) ->
  « Continuer » keeps the tracing / the form, « Abandonner » goes.
- sections « its panel takes the focus » -> its dialog's
  [data-creation-focus] takes it.
- no-loss « pending creation with its name » (hidden with the body) ->
  the dialog stays across the crossing, read-only, Créer off (R-14).
- point-edit A5 « Rayon » = 7 / 9 -> ghost r = 7 / 9.
- e2e editor-annotations keyboard test « numeric position » (cx field
  250) -> UX_TESTS Keyboard: zone added, vertex added and removed,
  moved by the move mode, validated, saved. The « Fermer le tracé »
  step runs under expectNoShift again (shortcut removed).
- e2e editor-geometry C26: the proposed x, y read from the notice
  text -> from the overlay's correction circle; the R-4 text checked
  in the dialog.
- e2e editor-deselect « Escape cancels the tracing only » -> Escape
  asks, « Abandonner » cancels it, the selection kept.
- e2e editor-shell-crossing « keeps its tool and its pending
  creation » (field hidden) -> the dialog stays read-only, Créer off,
  then editable on widening.
2026-11-17 23:32:42 +01:00
bchanot 2d58da7d01 fix(app): shell takes a link only with drawing work at stake
The draft route registers an at-stake predicate with its question;
AppLayout intercepts and replays a link through navigate(to) only when
it holds (or when unsaved changes arm the leave guard), so a Link keeps
its own replace and state. A download anchor is never taken.

Tests: the unstarted-move test no longer expects the mode ended by the
shell (the link is not intercepted; leaving the editor resets the work);
new: a Link's state reaches the page, a download link is not prevented.
2026-11-17 22:56:37 +01:00
bchanot 87528303a1 docs(docs): editor overlay creation ghost, point preview, dimming
The creation moves onto the drawing (U2 Task 7): the point tool's
hover preview, the ghost in the form's category colour on a white
halo, and data-creating dimming the other markers (A2, A4, A12).
2026-11-17 22:55:14 +01:00