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.
This commit is contained in:
bchanot committed 2026-11-17 18:10:24 +01:00
1 parent 1deb037fac
commit 7a45f1d885
9 files changed
+198 -49

No files matched your search

@@ -95,12 +95,14 @@ function tracingActions(input: PlacementInput) {
}
/** A drop commits one update; the line under the drawing says it, or the core's refusal. */
function dropAction({ doc, context, message }: PlacementInput) {
function dropAction({ doc, context, message, dispatch }: PlacementInput) {
return (id: string, geometry: Geometry) => {
const annotation = doc.annotations.find((a) => a.id === id)
if (!annotation) return
const result = updateGeometry(annotation, geometry, context)
if (result.ok) {
// A kept move ends any refusal the strip still shows.
dispatch({ type: 'hint', hint: null })
const text = context.t(
`editor.annotations.message.moved.${annotation.kind}`,
)