mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 22:10:34 +00:00
Two operations set the touched groups of a shape: a :set of :touched, which assigns the value as given, and :set-touched, which keeps them only on a copy and drops an empty set. update-shapes and the undo of add-component wrote the first while their own undo and sync wrote the second. The contract prefers :set-touched; both builders now write it, and an update with only its touched groups changed still records their undo. A :set of :touched is still applied, for changes already stored. Case AE leaves no empty touched set on the shape a detach turned plain; both golden masters record the state again for it. comp-touched-test: an update that sets the touched groups of a copy shape writes one :set-touched operation, and its undo restores them. Benchmark (lower quantile, ms; baseline / now / ratio): deepest-edit-through-three-levels 35.2 / 16.6 / 0.47 edit-through-a-chain-of-dependents 68.9 / 32.8 / 0.48 library-update-into-copies 83.1 / 42.8 / 0.51 main-edit-among-many-shapes 4.8 / 2.3 / 0.48 main-edit-into-10-copies 1.8 / 1.0 / 0.54 main-edit-into-100-copies 15.4 / 8.9 / 0.58 main-edit-into-1000-copies 153.1 / 82.0 / 0.54 variant-switch-into-copies 32.1 / 17.7 / 0.55 AI-assisted-by: claude-opus-5-5