mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 09:42:01 +00:00
When update-main pushes a swap into a nested copy in the main, and the position there holds the same component, the pushed head becomes a plain copy of that position, and its children already follow the position. The head itself kept the size of the pushed copy with no geometry override, so a later sync would resize it. It now takes the position's size about its first corner, unless the child it replaces authored its geometry, as a switch back to the position already does. Test: updating-a-main-with-a-swap-to-its-position-component-gives-the-head- the-positions-size, the variant gate program of round 11 (seed 371855618). Common suite: 2419 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.869 | 23.349 | 0.62 | | edit-through-a-chain-of-dependents | 68.931 | 43.052 | 43.454 | 0.62 | | library-update-into-copies | 83.083 | 50.967 | 52.007 | 0.61 | | main-edit-among-many-shapes | 4.837 | 2.149 | 2.267 | 0.44 | | main-edit-into-10-copies | 1.79 | 1.067 | 1.097 | 0.6 | | main-edit-into-100-copies | 15.415 | 10.265 | 10.455 | 0.67 | | main-edit-into-1000-copies | 153.086 | 102.631 | 107.51 | 0.67 | | variant-switch-into-copies | 32.052 | 22.374 | 23.098 | 0.7 | AI-assisted-by: claude-opus-5-5