Commit Graph
22 Commits
Author SHA1 Message Date
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 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 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 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 bbdfd27311 feat(app): a click on the drawing deselects (R1, D6b)
The decision comes from the press (landed off a marker, moved <= 4 px, one
pointer), not the click target: mouse and pen act at pointerup, touch in the
tap's own click. The reader passes no onEmpty and is unchanged.
No existing assertion rewritten.
2026-11-12 12:51:59 +01:00
bchanot bbb1668406 feat(app): Désélectionner and the Escape priority (R1, D6, A5, A6)
« Désélectionner » (secondary sm, deselect glyph) sits left of « Supprimer » in a
bordered row of the properties panel, read-only too, hidden while a tracing runs.
It commits the typed field, clears the selection, focuses the row (else the drawing)
and announces. Escape deselects through one document listener per visible body
(not in a text field, only inside the workspace); G1: row focus only from the panel.
« Plus » and the references panel close first; a tracing cancel marks its Escape.

No existing assertion rewritten.
2026-11-12 12:45:45 +01:00
bchanot 0467885527 fix(editor): final review fixes (touch undo guard, focus, save line)
Important 1: a touch press fires pointer leave between up and click; only a
mouse leave (or a pointer cancel) forgets the refused field, so Annuler no
longer undoes an unrelated change. Important 2: the LAN spec reads the
revision before the attach, through shownRevision, which throws instead of NaN
(spec stays not run). Minor 1: refocusIfHidden refocuses a still shown element
the commit blurred (references search on a 1 024 px crossing). Minor 2:
discardChanges keeps lastSave (reload path still drops it). Minor 3: the
overview filter term lives in UiState / the read-only twin, not the card.
Minor 4: categories section drops its inner h3 and the unused
editor.general.categories keys. AC8: badge test.

Assertions rewritten or added (R-24):
- editor-tabs-general « Général no longer holds the categories editor »:
  queryByText of the deleted heading (now vacuous) -> queryByLabelText of the
  category name fields.
- editor-focus-request « Annotations: selects the annotation »: findAllByText
  /anno-b|Sélection/ -> the properties panel holds Centre x = 20 (anno-b) and
  owns the focused heading.
- editor-shell-layout panel walk: added after.at(-1) === 'side'.
- editor-recovery title « Annuler les modifications » -> « Abandonner ».
- new: touch/cancel/mouse press, references search crossing, discard keeps
  lastSave, filter kept, one categories heading, badge 1/2/0, shownRevision.
2026-11-09 12:19:32 +01:00
bchanot 6131225288 feat(editor): board 01 annotation card, side column from 1 024 px
Annotations of the view move from under the drawing to the overview card
(grouped by category, name filter, all rows); side column from lg.
Properties panel gains « Toutes les annotations ».

E2E mapping (R-24): after a creation the card is hidden (the new annotation is
selected), so list(...).getByText(name) became selectionTag toContainText
(annotations, geometry, journey); row clicks go through pickAnnotation
(annotations, geometry, journey, structures); geometry's list count 0 while a
creation is pending became selectionTag count 0.
2026-11-06 21:40:25 +01:00
bchanot c57af6441f feat(editor): keep edit-only forms across a width change
Edit-only parts (creation forms, submission note, crop group, annotation
edit body) mount at the first editable render and stay mounted, hidden
and detached from canvases, while read-only. Guards: the viewport hook
commits the focused field before the tier crosses 1 024 px, the route
releases focus left in a hidden part and treats a store out of step as
read-only, delete and discard confirmations close when the editor turns
read-only, a drag is dropped while the edit body is hidden. Read-only
twins take an id prefix.

R-24: no existing assertion rewritten; editor-no-loss.test.tsx and two
editor-shell Chromium cases added.
2026-11-06 21:22:10 +01:00
bchanot ca184da4d9 refactor(editor): split B1 navigation hooks, category count on the overview card 2026-11-06 20:31:26 +01:00
bchanot bc2dba7c14 feat(editor): four tabs, Annotations sections, references from the header
U1 Lot B1. Four tabs (Général, Annotations, Constats, Vérification); views,
categories and regions become full-width Annotations sections opened from the
overview panel; references move to a header-toggled panel (minimal, Lot D
completes it); « Aller à » goes through EditorTarget and the navigation hook.
EditorWorkspace owns the navigation; DraftHeader split in HeaderActions and
SaveLine; EditorTabs split in TabList and MoreTabs.

R-24, assertions removed or rewritten (file: old -> new):
unit
- editor-route.test: seven tab names -> four; « Plus » at 800 px with
  Références clicked -> no « Plus »; below 640 px five others -> Général,
  Constats, and Constats opens the findings tab; + references panel cases
- editor-route-recovery.test: tab Références + editor-tab-references label ->
  header button + editor-references-panel labelled by its heading
- editor-mode.test: small tier `more` of five -> [general, findings]
- editor-focus-request.test: {key,serial} -> {target,serial}; ReferencesTab and
  VertebraeTab -> ReferencesPanel and RegionsSection; issueTarget tab/key ->
  target place/section/key (vertebrae tab -> annotations/regions); consumed
  context (serial) -> (serial, outcome); annotation case adds heading focus
- editor-verification.test: onGoTo('annotations', key) -> navigate(targetOfKey
  (key), opener); props onSelectTab/onGoTo -> navigate
- editor-annotations-tab.test: props onSelectTab -> navigate + section props;
  no_category text « (onglet Général) » -> « (Annotations, section
  Catégories) »
- editor-tabs-general.test: categories cases render GeneralTab ->
  CategoriesSection(doc); + Général holds no categories editor
- editor-tabs-lists.test: tab imports -> panel and section; read-only
  references « no button » -> only « Fermer les références »
- editor-tabs-views, editor-drawing-upload, editor-repair.test: ViewsTab ->
  ViewsSection import, assertions kept; editor-findings.test: navigate prop
e2e
- support/editor selectTab: exact name -> pattern (error badge in the name);
  + place, openSection, showDrawing, backToDrawing, openReferences, TABS
- support/warm-up: seven tabs -> four + sections + references panel
- editor-access: seven-tab axe loops -> four tabs + three sections + panel
  (edit and read-only); narrow widths add panel overflow and axe
- editor-drawings: tab Vues -> openSection views; tab Annotations ->
  showDrawing
- editor-structures: tab Général (categories) -> openSection categories, axe
  label « general tab » -> « categories section »; tab Références ->
  openReferences/closeReferences; tab Vertèbres -> openSection regions; tab
  Annotations -> showDrawing
- editor-geometry: three tab Vues -> openSection views
- editor-equine: tab Général (categories add) -> openSection categories; five
  tabs loop -> two tabs + sections + panel; tab Annotations -> showDrawing
- editor-journey: tab Vues, tab Général (category), tab Annotations ->
  openSection views/categories, showDrawing; frozen axe scrolls to the header
- lan/trial-lan (not run): tab Vues -> Annotations tab + views entry

Verified: typecheck, lint, vitest 107 files / 1125 tests, whole shell suite on
the sandbox 151 passed, 49 skipped, 0 failed.
2026-11-06 20:25:35 +01:00
bchanot 3d589e1556 fix(app): a focus request is consumed once, not replayed on tab return 2026-11-04 14:09:30 +01:00
bchanot 4f223e04cd feat(app): Aller à selects the element in its tab, reload after submit 2026-11-04 14:06:09 +01:00
bchanot 3f15762d95 fix(app): annotations tab split, editor-wide undo keys, keyboard point fits, typed radius message 2026-11-04 14:00:57 +01:00
bchanot 26097852ff feat(app): editor Annotations tab, core-decided placement, repair rules 2026-11-04 13:49:41 +01:00