Commit Graph
286 Commits
Author SHA1 Message Date
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 3bea19f16b test(app): e2e cleanup checks the seeded name before archiving
D4 identity check: the integrity spec reads each own sheet's name by its
captured id and archives it only when it is exactly the seeded name.
seedGrant checks the account id as a captured id, now shared from
records.ts.
2026-11-17 01:04:27 +01:00
bchanot 1e5058577f fix(app): failure row fits Réessayer and Consulter side by side
Board 30: in a three-column card at 1280 px the two buttons wrapped by a
few pixels. The failure row narrows their padding only there; the wrap
stays as the fallback. The network e2e now checks both on one row.
2026-11-17 01:04:03 +01:00
bchanot 2930f4919f style(app): wrap R4 lines over 100 columns 2026-11-17 00:59:34 +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 dadd8e5d29 test(app): catalogue card integrity and retry on the sandbox 2026-11-17 00:24:14 +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 a50796b89f fix(app): closed filters panel has no height; e2e asserts it at 375 px 2026-11-16 20:47:34 +01:00
bchanot 7a129dc763 fix(app): filters toggle layout, constant spacing, one active-count helper 2026-11-16 20:39:01 +01:00
bchanot d3b8292aaf chore(app): mark the phone filters panel shortcut at its site 2026-11-16 20:33:14 +01:00
bchanot 6d2ba0dbf2 test(app): phone filters panel on the sandbox sheet list spec 2026-11-16 20:31:36 +01:00
bchanot 9efc7b7647 feat(app): collapsible sheet filters on phone, one empty announcement 2026-11-16 20:30:27 +01:00
bchanot ea5512af02 test(app): sheet list spec binds its SQL values, pins UTC, checks Escape
- the three fixture statements pass every value through literal(); the
  sheet, draft and actor ids are refused unless they have the uuid shape
- test.use({ timezoneId: 'UTC' }): a row still in Paris time proves the
  page sets the zone itself, whatever the host's
- the home ordering loop first asserts one <time> per item
- ratifiedDate escapes the dictionary text (escaped, now exported by
  support/admin.ts)
- the long-search check types the text again and presses Escape: field
  empty and focused, count back (Chromium's native type=search included)

R-24: no assertion removed or rewritten. Added: 'one date per home item'
(toHaveLength) before the unchanged ordering loop; the Escape block after
the unchanged button block. ratifiedDate builds the same pattern for the
current dictionaries (no RegExp character in them).

Run: admin-sheets-list 4 passed (fr, en x desktop, 375).
2026-11-16 18:10:13 +01:00
bchanot 8bb2486a34 fix(app): Administration home cards laid out as board 29 B
- the grid aligns its cards at the start; Espèces and Accès et
  habilitations stack in one right-hand column at their own height
- when the sheets card is refused, that column spans the grid and lays
  its cards side by side, so no half of the page stays empty
- the card's sheet name links are 44 px tall on the phone, unchanged
  from sm up
- the card item keeps the list row's rhythm (space-y-1), a larger gap
  only above the working copy action

No test changed.
2026-11-16 17:59:47 +01:00
bchanot 1758276087 refactor(app): sheet list hooks split, rows memoised, phone clear button
- useSearch holds the query, its field and clearSearch; useListView keeps
  the filters and the sort (8 bindings down to 5)
- the search term is folded once per search (sheetNameMatcher beside
  matchesSheetName, whose signature and behaviour stay), each date read
  once before the sort, the shown rows memoised on list, filters, search,
  sort and language
- long className strings hoisted into module constants, no class changed
- the no-result block's clear button takes the page's 44 px phone height
- labels.ts: the SheetSummary alias removed; ResultsProps declared first

No test changed: the existing unit suites are the oracle.
2026-11-16 17:57:18 +01:00
bchanot b4a5254068 test(app): shell proof of the sheet list search, sort and dates
admin-sheets-list.spec.ts (sandbox, fr and en, desktop and 375 px): three
draft sheets of this run, the oldest saved last; search, count line against
the list answer of the same load, order by last modification then by name,
the Paris date format, a search cut at 100 characters and its clearing, axe
and no sideways scroll on the searched list, the empty state and
/app/admin; the home's latest changes. Teardown soft-deletes only the ids
this run created (D7).

allSheetsLink (e2e/support/admin.ts): the sheets card link named
admin.home.all_sheets or admin.home.see_all with any number.

R-24, locators rewritten (assertions unchanged):
- admin.spec.ts A1: areaCard(...).getByRole('link', { name:
  dict['admin.home.all_sheets'] }) -> allSheetsLink(areaCard(...), dict)
- admin.spec.ts access per right: sheets.getByRole('link', { name:
  dict['admin.home.all_sheets'] }) -> allSheetsLink(sheets, dict)
- editor-journey.spec.ts createSheetFromAdmin: section locator
  .getByRole('link', { name: dict['admin.home.all_sheets'] }) ->
  allSheetsLink(section locator, dict)
2026-11-16 17:34:43 +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 52d5613fe5 test(editor): keyboard-only cite and save restores in one undo 2026-11-15 20:50:49 +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 2579d4c7ae test(editor): e2e on the references dialog's edit mode 2026-11-15 16:46:05 +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 2c4c771269 test(editor): e2e on the references dialog instead of the sheet
Helpers citationsDialog, closeCitations by the dialog's ✕. Owner journey
with tap at 375, keyboard and axe; geometry checks now dialog in viewport
with focus inside; refused « Tout afficher » over a dirty form.
2026-11-15 16:15:43 +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
bchanot ee86a3a659 fix(editor): ask only the top refusing layer, safe retry notes 2026-11-14 23:17:54 +01:00
bchanot 50256b19f1 fix(editor): sub-pixel tolerance on the 375 px sheet width check 2026-11-14 19:11:39 +01:00
bchanot 96e301ab69 fix(editor): e2e for Back over the sheet and the leave over it 2026-11-14 19:09:09 +01:00
bchanot 254ad2b4aa fix(editor): type the reference dialog lookup of the cascade test 2026-11-14 19:05:47 +01:00
bchanot ec314af009 fix(editor): prove one Back reopens the sheet after the leave cascade 2026-11-14 19:04:56 +01:00
bchanot 0ea94602d1 fix(editor): e2e setup retries a GoTrue 500 step-up, drops late replays 2026-11-14 19:01:21 +01:00
bchanot bb35e86dbb fix(editor): five locals in stepHistory and MoreTabs, sync tag in tests 2026-11-14 18:52:41 +01:00
bchanot 08fab77d0e fix(editor): the delete hint names « Modifier » before « Retirer » 2026-11-14 18:51:38 +01:00
bchanot 28e298ac56 fix(editor): a sign-out with a dirty dialog is said at the next sign-in 2026-11-14 18:50:42 +01:00