mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 09:42:01 +00:00
A turned copy holds a nested variant copy whose child is flipped. When the nested copy switches to a variant whose child agrees with the old one, the switch compared the old main's child with the new copy's child as they stand, and the copy's turn made their transforms disagree while their flips agreed. It carried the flip flag without the flipped transform and points, so the child stored a flip it did not show. Before carrying, the switch turns the old main's shapes as the copy turns its new main, so both variants are compared in one frame. Tests: test-switch-of-a-turned-copy-carries-the-flip-of-its-child and the regression program switching-a-turned-copy-keeps-the-flip-its-child-inherits. Full common suite: 2353 tests, 0 failures. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | :world | :baseline | :now | :mean | :ratio | |------------------------------------+-----------+--------+---------+--------| | deepest-edit-through-three-levels | 35.215 | 19.783 | 20.636 | 0.56 | | edit-through-a-chain-of-dependents | 68.931 | 42.981 | 44.139 | 0.62 | | library-update-into-copies | 83.083 | 49.497 | 51.013 | 0.6 | | main-edit-among-many-shapes | 4.837 | 2.119 | 2.197 | 0.44 | | main-edit-into-10-copies | 1.79 | 0.976 | 1.056 | 0.55 | | main-edit-into-100-copies | 15.415 | 9.563 | 9.784 | 0.62 | | main-edit-into-1000-copies | 153.086 | 95.722 | 103.356 | 0.63 | | variant-switch-into-copies | 32.052 | 21.712 | 22.187 | 0.68 | AI-assisted-by: claude-opus-5-5