penpot/frontend
alonso.torres eed3a9ba60 🐛 Keep guides and reflows in the undo group of their step
Two derived commits that left the copies' sync in an undo entry of its own
(Phase 3c).

- Move frame guides in the undo group of their transform.

  A transform of a board sends the move of its guides before the shapes'
  update. The guide move committed every guide of the board, moved or not,
  each in a commit with an undo group of its own, so when the board was a
  main with a guide, its transform and the copies' sync landed in different
  undo entries: one undo reverted only the copies (F6).

  Both transform paths now give the shapes' update an undo group up front
  and pass it to the guide move, which commits only the guides that move,
  all in one commit in that group.

  workspace-frame-guides-undo-test: one undo reverts a rotation of a main
  with a guide, its copy included, and a move of a main together with its
  guide.

- Reflow layouts in the undo group of the step that asked for it.

  A layout reflow runs a moment after the commit that needs it: the
  :layout/update events are buffered for 100 ms and reflowed per page. The
  reflow lost the undo group of the step (F43):
  - the buffer passed no undo group to the reflow;
  - update-shapes asked for a reflow without the group of its commit;
  - the reflow's transform opened an undo transaction, so it made an entry
    of its own instead of stacking on the latest one, and the sync that a
    reflow of a main starts took that entry's fresh group.

  So one undo after a sync that reflows (a flex main's margin edit, a nested
  sync with minimal frames, a swap) reverted only the reflow, or only part
  of the step.

  update-shapes now gives a commit that needs a reflow an undo group up
  front and passes it on; the buffer reflows each page in the group an
  update of that buffer names (those that name none come from the same step,
  like update-layout-child's); the reflow stacks on the latest entry with no
  transaction of its own.

  Cases AJ and AN no longer pin F43: one undo after a nested sync reverts
  the remote change and the float noise of the reflow, and one undo after a
  flex main's margin edit reverts the margin, the sync and the reflow. The
  frontend golden master records that.

AI-assisted-by: claude-opus-5-5
2026-10-28 15:53:07 +01:00
..
2026-10-28 15:53:05 +01:00
2026-10-07 10:41:29 +02:00