mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 09:42:01 +00:00
When sync resizes a copy parent, sync-descendant-orientation places its subtree through constraints, which scales an untouched swapped head with a scale constraint. Update-swapped-placement then only moves the head, so a later sync of every component gave it back the size of its own main: the result depended on the order of the syncs. Sync cannot tell a main change from a reset of a copy sized apart from its main, which must scale the head back (#12716), as it never sees the main's earlier size. The resize now marks the geometry group of an untouched swapped head it gives another size, so later syncs keep that size. The composable model records the same: a swapped head without authored geometry whose copy parent and own size both change in a step authors its new geometry in that parent. Test: syncing-a-resized-copy-parent-authors-the-size-it-gives-a-swapped- head (the variant gate program of round 16, seed 212451915). Common suite: 2441 tests, 0 failures. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | :world | :baseline | :now | :mean | :ratio | |------------------------------------+-----------+---------+---------+--------| | deepest-edit-through-three-levels | 35.215 | 21.568 | 22.51 | 0.61 | | edit-through-a-chain-of-dependents | 68.931 | 42.762 | 46.833 | 0.62 | | library-update-into-copies | 83.083 | 52.439 | 55.324 | 0.63 | | main-edit-among-many-shapes | 4.837 | 2.443 | 2.762 | 0.51 | | main-edit-into-10-copies | 1.79 | 1.124 | 1.217 | 0.63 | | main-edit-into-100-copies | 15.415 | 10.254 | 11.046 | 0.67 | | main-edit-into-1000-copies | 153.086 | 103.629 | 107.266 | 0.68 | | variant-switch-into-copies | 32.052 | 22.861 | 23.944 | 0.71 | AI-assisted-by: claude-opus-5-5