Commit Graph
234 Commits
Author SHA1 Message Date
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 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 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 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 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 9a0fe3784c fix(editor): veil ignores clicks, names merged apart, honest tests
U2 Task 6 fix round 1 (review minors 1 to 9).

- R-6: `Dialog` takes `veilCloses`; the annotation dialog passes false,
  so its veil ignores clicks centred too. Other dialogs unchanged.
- Save merges each name on its own (an EN refreshed meanwhile survives
  an FR-only edit); the merged annotation is typed per kind, no cast.
- Tests: the category change and the region row really run (a second
  category and a region in the fixture); EN kept under an FR edit;
  focus to the drawing when a filter hides the row; a centred veil
  ignores a click; act() around the store write; ui.Dialog restores
  innerHeight and visualViewport after each test.
- e2e: `pickAnnotation` no longer scrolls; `scrollToTop` is explicit
  where a low row leaves the drawing out of view (editor-zones x3,
  editor-geometry). editor-geometry runs the accepted repair from the
  page's end, buttons pressed in place, scroll unchanged. The touch
  and double-click tests wait on the clicks themselves; the stray
  click on the veil can fail.
- CreationPanel's `required.fields` recorded as a shortcut for Task 7;
  TODO lines updated. focusTarget comment wrapped.
2026-11-17 22:47:02 +01:00
bchanot ebcf2723a0 fix(editor): overview rows ask first, no empty save, board 31 icons
U2 Task 6 review by self:

- The overview stays shown during a selection (A3): its rows and view
  rows now go through the drawing guard, so a started move or redraw
  asks before a click there drops it (R-12). Was a regression: the
  column was unreachable while selected before Task 6.
- The edit form compares and merges trimmed names and colour: a space
  typed alone is no change and writes no `update`.
- A layer opened with no opener (reload, Forward) returns the focus
  to its row on close.
- Board 31 A: icons on « Modifier », « Modifier la forme » (the
  shape's glyph), « Marquer comme relu »; « Supprimer » as red text
  with its trash icon.
- Tests: overview row and view row ask during a started move; a row
  asks during a started redraw; whitespace-only save; unnamed link
  read rows; focus back to the row with no opener. Dead helpers
  removed (tests/helpers openProperties, e2e propertiesDialog).

Mapping: the point-edit « Enter on the selected row … asks first »
test (which replaced « Toutes les annotations asks first ») keeps its
place; the overview-row path it did not cover now has its own test.
2026-11-17 22:17:20 +01:00
bchanot cd794f3c39 feat(editor): properties dialog over the column, transactional save
U2 Task 6 (A1, A2, A3, A9, A10, R-3, R-5, R-6, R-14, R-16).

- Dialog: `anchor` places the panel at the column's left and width,
  from its top, under a 22 % ink veil that ignores clicks; the visual
  viewport below 320 px; centred without an anchor box.
- Navigation: `annotation` layer (LAYERS, EditorView, history entry,
  leave guards, left-draft flag); Back closes, Forward reopens.
- AnnotationDialog: read body, « Modifier » form (CreationFields with
  « Couleur », missingFields, R-3 messages), one `update` on the
  current annotation by id, « Marquer comme relu », « Modifier la
  forme », « Supprimer »; read-only flip keeps the draft.
- The column always shows the overview, selected row marked; Enter on
  it, a second click or a double click, the strip's « Propriétés »
  open the dialog. « Aller à » focuses the row (R-5).
- Read-only twin: strip and read-only dialog at 1 024 px and wider,
  inline read body below. PropertiesPanel and AnnotationFields gone.
- Strip lead 256 px and a fixed status slot, so the commands fit at
  1 024 px and a status change moves nothing.
- e2e: `aside-content` exemption removed; scroll-to-top workarounds
  of editor-geometry, editor-zones and editor-journey removed.

Removed assertions mapped:
  editor-annotations-tab.test.tsx:
  - selectFromList waited for `annotation-properties` -> waits for the strip's « Propriétés » (selection without dialog, A1)
  - refused place: issues block `annotation-geometry-issues` in the panel -> the strip notice alert (present, then gone)
  - keyboard creation / C26 confirmation: `annotation-properties` after create -> strip « Propriétés » (new element selected)
  - Désélectionner from the panel -> « Désélectionner » in the strip (all 7 tests); « panel closes » -> strip has no « Propriétés »
  - undo after deselect (typed name) -> handle key series then deselect then undo
  - commits a valid typed value once without blur (name field) -> a pending handle key series committed once by the strip deselect
  - a refused typed value: the panel closes (two tests: strip deselect, tap deselect) -> removed: no field outside the dialog; the dialog's draft writes nothing before « Enregistrer » (new dialog tests)
  - not offered while a replace tracing runs: panel's Désélectionner absent -> strip offers neither « Désélectionner » nor « Propriétés » during the tracing
  - tap: isDeselected read `annotation-properties` -> strip « Propriétés » absent; link select -> strip title data-selection
  - tap: undo after tap deselect (typed name) -> handle series; typed value committed on blur -> handle series committed on blur
  - strip geometry issues: list read in the panel -> list read in the properties dialog's issues block
  - a new commit replaces the message (typed name) -> « Marquer comme relu » in the dialog
  editor-escape.test.tsx:
  - `panel()` = `annotation-properties` -> the strip's « Propriétés » or the phone twin's inline read body
  - Escape from a panel button (« Marquer comme relu ») -> from the selected row in the side column: focus on the row
  - after A then B from the panel (via « Toutes les annotations ») -> select A, select B, Escape from a button of the side column: focus on B's row
  - a text field (panel « Nom (FR) ») -> the overview « Filtrer par nom »
  - redraw via the panel's « Remplacer par un polygone » -> the strip's command
  - modal / delete dialog opened by the panel's « Supprimer » -> « Supprimer » of the properties dialog
  - read-only width: hidden `annotation-properties` -> hidden strip « Propriétés » of the kept edit body
  editor-history-buttons.test.tsx (typed text and the press, 8 tests): the annotation's committed « Nom (FR) » field of the panel -> the sheet's committed « Nom (FR) » on Général (same TextField commit-on-blur path; annotation fields are now a dialog draft)
  editor-focus-request.test.tsx: « Aller à » focuses `data-properties-heading` inside `annotation-properties` -> focuses the annotation's row, marked aria-current, no dialog (R-5)
  editor-sections.test.tsx: « Aller à » with nothing in progress focused the properties heading -> focuses the row (R-5); creation kept: no `annotation-properties` -> no strip « Propriétés »
  editor-overview.test.tsx (edit and read-only): row opens `annotation-properties`, « Toutes les annotations » returns -> row selects, stays marked aria-current, no dialog; strip « Désélectionner » returns focus to the row; filter kept across select and « Désélectionner »
  editor-citations-guards.test.tsx: LAYERS_TOP_DOWN gains 'annotation' at the bottom
  editor-keep-alive.test.tsx: `annotation-properties` visible after the round trip -> the strip's « Propriétés » visible (selection kept)
  editor-no-loss.test.tsx: ids `ro-annotation-name-fr` and `annotation-name-fr` (both panels' fields) -> the twin's inline read body (no ids), then the dialog edit form's `annotation-edit-fr`, kept through a flip to 800 px, no duplicate id; « Aller à » visible `annotation-properties` -> visible `annotation-read` (inline twin), none at 1 280
  editor-point-edit.test.tsx / editor-zone-edit.test.tsx: `select()` waited for `annotation-properties` and returned it -> waits for the strip's « Propriétés » and returns the strip (its « Désélectionner » and « Remplacer par un polygone » moved there)
  - move mode Escape: `annotation-properties` still there -> the strip's « Propriétés » back after the mode
  - « Toutes les annotations » asks first during a started move -> Enter on the selected row asks first (no dialog), and the strip offers neither « Propriétés » nor « Désélectionner » during the mode
  - Escape from the handle / slider: `annotation-properties` gone -> the strip's « Propriétés » gone
  - I-3 touch tap: `annotation-properties` gone -> the strip's « Propriétés » gone
  e2e (sandbox):
  - support/layout.ts: `aside-content` exemption removed (ShiftExemption type, the loose compare); every `swaps`/`SWAPS` argument removed (editor-annotations, editor-zones, editor-geometry)
  - support/editor.ts pickAnnotation: clicked « Toutes les annotations » first when the panel showed -> the overview is always shown: clicks the row, then scrolls back to the top (the page no longer shortens)
  - editor-annotations: `annotation-properties` visible after a creation -> strip with « Propriétés »; review toggle and « Supprimer » of the panel -> the properties dialog's; a jitter click on the selected point now opens the dialog (A1), closed by Escape before the drag; handle names exact (the marked row shares the prefix); trace close moved out of expectNoShift (creation panel until Task 7, shortcut + TODO)
  - editor-deselect: `annotation-properties` -> the strip with « Propriétés » or the twin's inline read body; Escape in a field: panel « Nom (FR) » -> overview filter; delete dialog from the panel -> from the properties dialog (Escape closes it, then the dialog); « a typed value is applied by the click that deselects » (name field, refused blank) -> a pending point-handle key series applied by the deselecting click and by « Désélectionner » (refused value: no field outside the dialog); « the selected one stays » -> a second click, double click and jitter open the dialog, Escape closes it, selection kept
  - editor-geometry: `annotation-geometry-issues` in the panel -> read in the properties dialog, then the strip notice; after the refusal the error count unchanged; scroll-to-top workaround removed
  - editor-zones: panel « Désélectionner » -> strip; scroll-to-top after pickAnnotation removed (helper does it)
  - editor-structures: panel « Supprimer » -> properties dialog « Supprimer », confirmation over it
  - editor-journey: `#annotation-name-fr` committed field + `#annotation-laterality` -> the dialog's edit form, one « Enregistrer »; scroll-to-top removed
  - editor-shell / editor-shell-journeys: « Aller à » focus on `data-properties-heading` -> the annotation's row (aria-current), no dialog (R-5)
  - editor-shell-layout: focus kind `annotation-properties` -> removed (the overview is the side)
2026-11-17 22:01:57 +01:00
bchanot e596e0765e fix(editor): no lost series, tap click absorbed, focus kept on handles
Task 5 review fix round 1.
- I-1: Insert and Delete on a vertex commit pending arrow steps first,
  then act on the stored polygon (read from the store, not the render).
- I-2: deselect commits a handle's pending series before the handle
  unmounts (commitFocusedSeries, no reliance on blur at removal).
- I-3: a touch or pen tap absorbs the click the browser synthesises at
  its place, once, within 400 ms and 8 px; mouse and later clicks pass.
  Scroll anchoring is off while the editor shows: the deselect's panel
  swap scrolled the drawing under the finger. editor-deselect step c is
  back at the page's end, and asserts the drawing does not move.
- I-4, M-2: the double-click and undo tests press what is there now;
  a hand-set stale chosen vertex removes nothing.
- I-5: editor-zones undos, the vertex choice and the refused-trace
  clicks run under expectNoShift; new e2e for I-2.
- M-1: Delete on the last vertex and Enter on « − » keep the focus on a
  vertex (the next one is chosen).
- M-4: the strip notice comment names R-18. M-5: the tracing carries a
  `refused` flag; only a refused close titles « Fermeture refusée ».
- M-7: TODO lines (bubble size shortcut, scroll-padding-top, scroll
  clamp at the page's end).

Rewritten assertions: zone-edit « − » double click and undo-then-« − »
pressed the detached bubble -> press the live bubble or the box at the
same place. editor-deselect step c: scroll-to-top removed, drawing y
asserted unchanged. editor-geometry: scroll-to-top kept with the clamp
named (reported, TODO). editor-zones and editor-journey: comment says
the scroll-to-top undoes Playwright's own auto-scroll.
2026-11-17 21:04:23 +01:00
bchanot 6211046537 feat(editor): vertex handles, insert and remove, zone move, redraw
U2 Task 5. A selected polygon gets its vertex, « + » and « − » handles
(R-9, hidden « + » under two hit radii, R-18 zoom hint in the strip),
the handle cap at 40 (R-7), vertex drag and keys, the move mode on the
zone or the chosen vertex, « Redessiner » as a redraw mode kept in step
with its tracing (R-12 guard, R-13 drop), close radius in CSS px
(R-11). The numeric group leaves the properties panel (D1).

Removed or rewritten assertions (numeric group -> replacement):
- tab « shows its exact stored numbers » (Centre x field) -> the overlay
  selection circle's cx attribute, same exact value.
- tab « a numeric edit » x3 -> « an edit on the drawing »: Enter on the
  handle without a step commits nothing, a step + Enter commits once;
  a refused handle drag keeps the stored shape then a drag inside the
  frame repairs it (issues gone); Escape drops a pending series.
- tab C26 « Centre x 15 » -> overlay cx 15.
- tab C32 unmeasured « Centre x as text » -> no handle, no field.
- tab « adds and removes a vertex as part of the whole group » -> « + »
  then « − » on the drawing; « never offers to remove below three » ->
  « − » aria-disabled at 3.
- tab H8 « refused Remplacer drops the tracing » -> keeps it open with
  « Fermeture refusée » (board 33 A); « refused vertex add/remove stay
  non appliqué » -> a refused vertex drag restores the shape exactly.
- tab Désélectionner and D6b (typed Centre x committed, refused, undone)
  x6 and strip « a new commit replaces the message » -> the same with
  the Nom (FR) field (a blank name is the refused value).
- focus-request « Centre x 20 » -> overlay cx 20.
- escape « strip commands keep their Escape » -> a redraw: Escape on the
  strip or the box cancels it (R-12 row 4); kept for a new zone tracing.
- keep-alive « Remplacer tracing kept across Aller à » -> ended by a tab
  when empty, asked once a vertex is placed (R-12).
- e2e annotations: numeric cx edit + undo/redo -> handle keys + undo/
  redo; jitter/drag and Task 4 point reads -> overlay attributes (the
  stored place during the mode -> overlay-old-place); keyboard-only cy
  and vertex x typed -> handle and vertex keys.
- e2e deselect: Centre x typed/refused/committed -> Nom (FR).
- e2e geometry, shell-crossing: Centre x/cy reads -> overlay attributes.
- e2e journey: cx +3 and vertex x +4 typed -> 3 and 4 arrow steps + Enter;
  a far typed value + revert -> a far handle drag refused.
- e2e equine latency: typed cx rounds -> handle arrow + Enter rounds.
2026-11-17 20:24:49 +01:00
bchanot 463e0a2621 fix(editor): guard keeps pending series, mode end said, R-9 hook
- guardDrawing commits a keyboard or size series the focus still holds
  (its blur) and ends only the mode: a pending series is never dropped.
- A started move ended by a selection change is said (R-13).
- handleSize: no module-level state; useHandleSizes reads the device
  once per handle layer. The layer reads ResizeObserver contentRect.
- Dead kind check removed in SelectionPointCommands; long lines wrapped
  (code, doc).
- e2e: the zoom check waits for the transform to change; the move-mode
  arrow clicks are under expectNoShift.
2026-11-17 19:25:04 +01:00
bchanot e01d8519ea fix(editor): sign-out and shell links ask the drawing guard first
With a started move, sign-out and an in-app link now ask « Abandonner
le déplacement ? » (R-12) through the page's own question, registered by
the draft route in leaveGuardStore (`ask`; the shell imports no editor
module). The generic leave and sign-out dialogs cover only sheet-level
unsaved work; with both pending the drawing asks first, then the sheet
question, as useLeaveConfirm orders them. A move with nothing started
arms nothing (it ends); a started one still guards a reload.

Tests: sign-out and link with a started move (alone and with sheet
changes), the history jump with only a move and after dirty layers, a
section entry and « Tout afficher ».
2026-11-17 19:25:04 +01:00
bchanot 44de465c6d fix(editor): no silent move loss, no empty commit, focus kept
- « Toutes les annotations » in the properties panel asks the drawing
  guard before it drops a started move (R-12); tests also cover a tool
  and « Ajouter un point ».
- A keyboard series back on its place, or a slider pinned at its stop,
  commits nothing.
- Escape that deselects from the handle or the slider moves the focus to
  the row (or the drawing) instead of losing it.
- A link circle keeps its handle, named « Accès {nom} », with no slider
  and no move mode (no label for it in REVUE).
- The move-mode drop notice waits until the body is shown (R-14).
- No layout shift: the strip's lead has a fixed width, the commands and
  the message pill get a new box per set or message.
- Doc: hit shapes use pointer-events auto; the fine « − » bubble is
  board 05's size.
- Tests: R-14 flip, A5 through the Point tool click, the repair e2e
  wrapped in expectNoShift.
2026-11-17 19:08:08 +01:00
bchanot 91e94952f0 feat(editor): point handle, size slider with core minimum, move mode
HandleLayer: its own svg over the overlay, not aria-hidden; the selected
point (or link circle) gets a focusable « Point {nom} » handle whose hit
circle (data-handle) the press machine reads, sized in CSS px under zoom
(R-9, read once from any-pointer: coarse). The Task 2 stand-in (the
selected marker as its own handle) is removed.

Keys on the handle: arrows step 0.5 % of the frame (Shift x10) as a
stamped series, Enter or blur commit once, Escape drops it (R-11, R-13).
SizeSlider in the strip for a selected point and for the Point tool (A5):
the view's sizes as ticks, the core minimum as a red mark, snap 8 px,
arrows 1 %, Page Up/Down next size, one commit on release, Enter or blur;
a refusal restores the size and draws the refused place in red dashes.
« Déplacer le point » opens the move mode (board 06 B): drag anywhere or
four arrows move a preview only, clicks select nothing, « Valider la
position » commits once, « Annuler » and Escape restore; the focus comes
back to the button. Escape follows board 32 (escapeAction). The overlay
reads the preview from the work store and draws the old place in grey
dashes. Ctrl+Z now also works from a slider (not a text field).

Rewritten assertions:
- editor-annotations-tab « a finger drags the selected point »:
  drag(marker('anno-a')) -> drag(pointHandle()), same expected geometry.
- editor-geometry.spec « a point inherited out of its frame is repaired
  through the geometry group » (cx/cy typed 200) -> « ... repaired with
  the move mode »: a partial move refused and restored (cx 110, issue
  kept), then a move inside kept (issue gone, fewer errors).
2026-11-17 18:50:29 +01:00
bchanot 2882821661 feat(editor): drawing guard before navigations drop a started move (R-12)
The move mode lives in the work store with its document stamp. guardDrawing
ends an unstarted mode at once and asks « Abandonner le déplacement ? »
(DrawingGuardDialog, at workspace level) once work is started, before a
tab, a section, « Aller à », Back and a history jump out of the editor;
the leave guard and sign-out count started work. An undo from the header,
Ctrl+Z or the message only cancels a pending mode or preview (R-13), and a
document change drops a stale mode, keeping a started one to be said.
ConfirmDialog takes an optional body. Strings for Task 4 added.
2026-11-17 18:26:49 +01:00
bchanot 8cd1bda6c2 feat(editor): new points take the view's most used size (A5, R-10)
proposePoint, correctedCircle and centreCircle take the wanted radius,
fitted to the frame; pendingForClick, keyboardPending and the C26 test
(correctionFor) use it. The size comes from newPointSize: the strip's
choice, else the most used radius of the view, else defaultRadius.
pointSize.ts (stops, snap, range) and escape.ts (board 32 order) land
with their tests; the repair dialog keeps defaultRadius (D1).

Rewritten assertions: editor-frame.test.ts calls now pass
defaultRadius(frame) explicitly, same expected values.
2026-11-17 18:20:58 +01:00
bchanot 7a45f1d885 fix(editor): message line lifecycle, own row, sound no-shift check
Task 3 review, fix round 1.
- The gesture message closes for good on any document or history
  change (store subscription): undo then redo no longer revives it.
- Hover and focus hold only the message they were taken on: after
  « Défaire » the next message expires.
- An accepted drop clears the strip's refusal hint again.
- Controller ruling: the message has its own fixed row under the add
  buttons, column width; a refused gesture's full text also shows in
  the strip notice (red, aria-hidden copy of the row's alert).
- expectNoShift: native requestAnimationFrame kept before page.clock
  (keepNativeFrames), every part box asserted non-null, message row
  measured; the e2e checks the message is not truncated.
No assertion removed; the refused-drop unit test gains the strip copy.
2026-11-17 18:10:24 +01:00
bchanot 1deb037fac feat(editor): fixed edit strip and message line without layout shift
U2 Task 3 (A6, A14, R-2). A fixed-height strip over the drawing and the
right column replaces the tool line, the sr-only selection tag of the
edit body and TracingBar: lead (name + status, type + detail), notice
(refusal, first geometry issue + n, unmeasured view with its link, no
category, no child view), commands (Fermer le trace, Retirer le dernier
sommet, Annuler le trace). A fixed-height line under the drawing holds
the add buttons and the gesture message: a kept drop says « Point
deplace » with « Defaire » (same store undo as the header), a refused
drop says « Deplacement refuse : ... » as a red alert. 6 s, held by
mouse hover and focus inside, closed by any commit, undo or redo.
trace_pop and Backspace remove the last vertex. The busy « Aller a »
target is the strip's tracing commands. scrollbar-gutter stable, scoped
to the editor. e2e helper expectNoShift (boxes, scroll height, gutter,
client width, layout-shift sum). DraftHeader untouched: no shift seen.

Rewritten assertions (old -> new):
- tab unit « Sélection : point » on annotation-selection-tag -> strip
  detail « Point »
- tab unit tag sr-only, not live -> strip lead outside any live region
- tab unit « 1 sommet posé. » -> « 1 sommet posé » (board 04 wording)
- tab unit D6b tag present / « zone » -> strip detail « Point » /
  « Zone · 3 sommets »
- keep-alive, sections, escape units: tracing-bar -> tracing-commands
- e2e selectionTag helper -> strip title with data-selection; the
  twin's tag is twinSelectionTag (deselect 375 px describe)
- e2e deselect « tag position absolute » (edit) -> strip height 64 px,
  drawing top unchanged; twin Escape test keeps tag 0, properties 0,
  overview visible
- e2e deselect and journey tracing-bar / annotation-selection-tag ->
  tracing-commands / selectionTag
- e2e historyButton scoped to history-buttons (the message's
  « Défaire » has the same accessible name)
2026-11-17 17:45:41 +01:00
bchanot b2d78f9621 fix(editor): one press is either a pan or a click
useFraming takes an optional panning gate read on each one-pointer move;
the editor passes the press machine's drag-with-pan phase, so a zoomed
pen within its 6 px slop or a mouse wiggle no longer pans and clicks.
Catalogue: no options, behaviour unchanged.

Test added: « a press is either a pan or a click, never both (R-8) »
(pen 5 px clicks without pan, pen 8 px pans without click, mouse wiggle
clicks without pan). No assertion removed.
2026-11-17 17:10:45 +01:00
bchanot 08d266c89f refactor(editor): one press machine for clicks, drags and taps on the drawing
press.ts (pure: slop per pointer kind, nearest handle, press target, click
and drag actions, double click, stepPress) is now the editor canvas's only
decider; useCanvasGestures no longer uses clickHandler, useEmptyTap,
swallowClick nor useMoveGesture (deleted), and the box has no onClick.
canPan = dragAction(press target).type === 'pan' at pointer-down; framing
keys only when the box itself is the target. workStore.ts holds the U2
work with stale stamps: dropStale on every documentText change, reset on
a new session (editorStore subscription). The catalogue keeps useFraming
defaults and useEmptyTap, unchanged.

Named change (A13): a finger drag on a selected zone's (or circle link's)
interior moves nothing; the selected point is its own handle and still
moves by any pointer. Second observable change: touch and pen taps are
decided at the pointer-up from the press target, no longer from the
following click (no browser touch adjustment toward a marker).

tests/setup.ts: happy-dom has no elementsFromPoint; a shim answers the
pointerdown target and its ancestors.

Rewritten tests (editor-annotations-tab.test.tsx, D6b):
- "a touch tap deselects in its own click, not at the pointer-up" ->
  "a touch tap deselects at the pointer-up" (deselected after pointerup)
- "a touch tap whose click lands on a marker (adjustment) selects that
  marker" -> "a touch tap is decided by its press: a click adjusted toward
  a marker selects nothing" (deselected, announced, marker b not current)
- "a pen tap deselects in its own click, like a touch tap" -> "a pen tap
  deselects at the pointer-up, like a mouse tap"
- "a pen tap whose click lands on a marker selects that marker" -> "a pen
  tap is decided by its press: a click landing on a marker selects
  nothing"
Added: "a finger drags the selected point (its handle), never a selected
zone (A13)".
Drive-only changes, assertions unchanged: canvas fireEvent.click(x, y)
-> pressAt (pointerdown + pointerup) in the tab suite (C26, tracing,
paths, H3, H6, H8, filter reselect), editor-keep-alive and
editor-sections; drag moves carry buttons: 1 (C34, polygon block move,
H8 lostpointercapture and read-only, editor-no-loss drag in flight),
since a move without a button is a hover.
2026-11-17 16:56:35 +01:00
bchanot 5ca2b7e3ad feat(domain): per-view minimum point radius in preview state
PreviewState.min_point_radius maps a view id to the smallest point
hitbox radius that passes TooSmall on the smallest preview, so the
sheet editor can mark it on a size slider. Twin constants named in
layer.rs; frame.rs shares one first-view drawing lookup.
2026-11-17 16:33:40 +01:00
bchanot 83f2d8bede test(app): card glyph per failure and focus rule after retry 2026-11-17 01:18:20 +01:00
bchanot b378cf066f fix(app): card retry keeps focus and voice when no retry is left
A retry ending on a failure with no retry (network to integrity, engine
stopped for good) keeps the polite region and moves focus to Consulter.
Busy look on Réessayer, error tone once the engine stopped, one attempt
for two calls in one tick; tests for the stopped engine, two core cards
and no blob URL after unmount.
2026-11-17 00:59:30 +01:00
bchanot 6ad8d8347c feat(app): catalogue cards say an integrity or load failure (board 30) 2026-11-17 00:14:14 +01:00
bchanot f061111e25 feat(ui): notice warning tone, glyph and non-live option 2026-11-17 00:08:45 +01:00
bchanot 7a129dc763 fix(app): filters toggle layout, constant spacing, one active-count helper 2026-11-16 20:39:01 +01:00
bchanot 9efc7b7647 feat(app): collapsible sheet filters on phone, one empty announcement 2026-11-16 20:30:27 +01:00
bchanot de2424f519 feat(app): Administration home lists the latest modified sheets
Board 29 B: five latest sheets with badges, detail line and date; footer
link shows the total from two sheets. R-24: no existing assertion removed
or rewritten; seven cases added.
2026-11-16 17:17:27 +01:00
bchanot 423125c18f feat(app): search, sort, count and date on the official sheet list
Boards 28 and 29 A: name search with clear button and Escape, « Trier
par » (last modification by default, or name), a polite count line,
« Modifiée le … » on each row in a <time>, and the search no-result
block. The detail line moves to labels.ts as sheetDetails.

R-24: no existing assertion removed or rewritten; six tests added.
2026-11-16 17:03:08 +01:00
bchanot f3b58abe70 feat(app): search, sort and date format of the admin sheet list 2026-11-16 16:45:23 +01:00
bchanot d9a5846d0d feat(supabase): admin sheet summary carries last_modified_at
Schema requires last_modified_at as an ISO 8601 timestamp with offset. Fixtures in routes.admin.test.tsx and editorRoute.tsx gain the key.
2026-11-16 15:47:54 +01:00
bchanot 3e94f732c7 fix(editor): citation notices, literal citation text, local limits 2026-11-15 20:50:48 +01:00
bchanot ee7912768c fix(editor): draft notice after the reference dialog, locale list 2026-11-15 20:08:55 +01:00
bchanot 1d119c3684 fix(editor): stale cite choice reset, pending line under the add row 2026-11-15 20:00:28 +01:00
bchanot 70eb2fcbb4 feat(editor): a reference made in the citations draft saves with it 2026-11-15 19:55:41 +01:00
bchanot 8c3fcca0b9 feat(editor): « Citer » button and family labels in references 2026-11-15 19:40:47 +01:00
bchanot 240c2ba0e7 feat(editor): dialog close button is a 44 px touch box 2026-11-15 19:40:46 +01:00
bchanot 5059641c04 fix(editor): edit mode focuses the draft, tile edit call 2026-11-15 17:43:43 +01:00
bchanot 6c0f913104 fix(editor): forget the citing form on Back, refuse sparse paths 2026-11-15 17:42:26 +01:00
bchanot 7a5684aace fix(editor): an explicit discard of the citations draft says nothing 2026-11-15 17:04:28 +01:00
bchanot 11c2b0c5ee fix(editor): Task 12 review minors, delete hint and cite label 2026-11-15 16:58:50 +01:00
bchanot 3dc5820e3a feat(editor): edit mode of the references dialog
« Modifier » turns the references dialog into a draft of adds and removes,
saved as one update on the current citations. A new layer, citations,
guards it between the finding and the reference dialogs: close, Back,
POP refusal and the leave cascade ask it. « Modifier la référence » and
« Nouvelle référence » stack the reference dialog over it; a creation it
started joins its draft.
2026-11-15 16:39:43 +01:00
bchanot d9dbcf1609 fix(editor): dialog trigger for references, Task 11 review minors 2026-11-15 16:25:32 +01:00
bchanot da755f9768 fix(editor): Plus rows hover tint, axe on an active row, line limits 2026-11-15 16:21:01 +01:00
bchanot abc781df52 feat(editor): references dialog over the finding, view mode
A modal Dialog replaces the citations side sheet; families open it too
(isCitable). The finding dialog shows only « Références citées » and
« X références », also at zero; its edit form no longer carries
reference_ids. A dirty form refusing « Aller à » or « Tout afficher »
closes the clean references dialog first.
2026-11-15 16:13:57 +01:00
bchanot ff21b0315e feat(editor): one tab order, vertical Plus list with the error count 2026-11-15 15:52:28 +01:00