diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 76db6953..8a22829b 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -749,7 +749,7 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet - [ ] Owner corrections before the trial (owner brief 2026-11-19 « Le bilan technique de U2 est encourageant », plan rev 4 Tasks 11-16, contract addendum criteria 25-31): [x] T11 « Reprendre le tracé » with board 04 C handles · [x] T12 Backspace and « + » on a vertex (Mac), group name pinned · [x] T13 focus after a touch commit · [x] T14 strip below the sticky top bar · [x] T15 why « Refaire » is unavailable · [x] T16 docs, gates, verifiers, security (final head 56a76a70; criterion 22 `up fresh`, the red environment suites and criterion 25 below 1 024 px left to the owner) · [ ] STOP for the db:trial run - [ ] Follow-up (owner approved 2026-11-19): the rights screen pages its grants (about 10 380 rows in the sandbox render at once; admin.spec axe Target crashed, lookup timeout; same on pre-U2 56c75b1). Production risk at those volumes. - [ ] Follow-up (owner approved 2026-11-19): the catalogue loads published versions progressively (`useCardDetails` loads 426 at once in the sandbox; catalogue-integrity times out; same on pre-U2 56c75b1). - - [ ] `shortcut:` the « − » bubble for a mouse is 28 × 22 px, read off board 05 (R-9 gives only the touch size), `apps/app/src/editor/annotations/handleSize.ts`. Upgrade: the owner's value at the trial (U2 Task 5). + - [x] `shortcut:` the « − » bubble for a mouse is 28 × 22 px, read off board 05 (R-9 gives only the touch size), `apps/app/src/editor/annotations/handleSize.ts`. Upgrade: the owner's value at the trial (U2 Task 5). settled by the owner trial 2026-11-20 - [x] (criterion 25, 23865071: a `scroll-margin-top` of the bar height plus 0.5 rem on the editor page's focusables outside the drawing place, `styles/index.css`) No `scroll-padding-top` under the sticky top bar (pre-existing, WCAG 2.4.11): a keyboard focus on the header's « Défaire », « Refaire » or « Enregistrer » while scrolled can stay hidden under it; axe target-size flags them once a list click scrolled the page (U2 Task 5 review M-3). - [x] At the page's end, a side panel that shortens (the issue list leaving it) clamps the scroll and moves the canvas by its height (11 px in `editor-geometry.spec.ts`, which starts from the top for that reason). Gone with Task 6: the column keeps the overview, the issue is in the strip and the dialog. `editor-geometry.spec.ts` now runs the accepted repair (the issue leaving) from the page's end under `expectNoShift`, buttons pressed in place, scroll position unchanged (U2 Task 5 fix round 1, closed by Task 6 fix round 1). - [x] (U2 Task 7: `CreationPanel`, `formProblem` and the two keys removed; the creation dialog uses `missingFields`) `shortcut:` the creation panel still shows the general lines `editor.annotations.required.fields` / `.names`, which R-3 removes (`apps/app/src/components/editor/annotations/CreationPanel.tsx`, `formProblem` in `creation.ts`). Upgrade: Task 7's creation dialog uses `missingFields` and the `editor.annotations.missing.*` keys, then the two keys and `formProblem` go (U2 Task 6 review Minor 6). diff --git a/apps/app/src/components/editor/annotations/ZoneHandles.tsx b/apps/app/src/components/editor/annotations/ZoneHandles.tsx index 9b19bfa4..f43ed0a3 100644 --- a/apps/app/src/components/editor/annotations/ZoneHandles.tsx +++ b/apps/app/src/components/editor/annotations/ZoneHandles.tsx @@ -199,10 +199,12 @@ function Remove({ onKeyDown: (event: KeyboardEvent) => void }) { const { unit, sizes } = scale - const w = sizes.bubble.w * unit - const h = sizes.bubble.h * unit - const x = at[0] - w / 2 - const y = at[1] - (sizes.vertex / 2 + 6) * unit - h + const hitW = sizes.bubble.w * unit + const hitH = sizes.bubble.h * unit + const w = sizes.bubbleMark.w * unit + const h = sizes.bubbleMark.h * unit + const cx = at[0] + const cy = at[1] - (sizes.vertex / 2 + 6) * unit - hitH / 2 const fill = disabled ? 'var(--color-ink-muted)' : 'var(--color-danger-strong)' @@ -217,23 +219,30 @@ function Remove({ onKeyDown={onKeyDown} > + + vi.spyOn(window, 'matchMedia').mockReturnValue({ matches } as MediaQueryList) + +afterEach(() => vi.restoreAllMocks()) + +describe('handle sizes (owner trial 2026-11-20)', () => { + it('a finger gets lighter marks and unchanged hit areas', () => { + coarse(true) + expect(deviceSizes()).toEqual({ + vertex: 14, + insert: 18, + hit: 22, + bubble: { w: 44, h: 36 }, + bubbleMark: { w: 32, h: 26 }, + }) + }) + it('a mouse keeps its sizes, the mark filling its hit rectangle', () => { + coarse(false) + expect(deviceSizes()).toEqual({ + vertex: 12, + insert: 16, + hit: 10, + bubble: { w: 28, h: 22 }, + bubbleMark: { w: 28, h: 22 }, + }) + }) +})