mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 22:10:34 +00:00
The composable cases tested undo only where a case asked for it, so a change generator with a wrong inverse, or a step that splits into several undo entries, went unnoticed. Both runners now run an undo/redo round trip on every variant, unless the case turns it off with a reason. After each user step that adds an undo group, undo must give back the file before the step and redo the file after it; a user step that adds no group must change nothing. At the end of the variant, undoing back to the last assembly step and redoing everything must give back both states. Files compare through a shared normalizer that drops :modified-at and, on request, :position-data, and keeps :touched and :remote-synced. - The pure runner gets a redo stack and a Redo node; a user operation that pushes a group empties it. Case P undoes and redoes a main edit in both suites. - The frontend interpreter runs the round trip through the real undo and redo events, and checks that each step moves the workspace undo index by one entry. Each variant starts with an empty undo stack. A case can mark a failure that a known bug causes. The mark pins, per phase, the signature of the failure (the shape, page and component attributes or the undo index that differ). It covers no other failure, and it fails the case once the bug stops happening. The check found two bugs, both pinned: - F41: when sync moves a copy child to an earlier position, its undo change puts the child back at the same index, so undoing a reorder in a main leaves the copies reordered (case F). - F43: the reflow after a swap or variant switch loses the step's undo group, so its commits land in undo entries of their own and one undo leaves the step half reverted (cases L and M).