mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 09:42:01 +00:00
A copy can author a layout child attribute, such as a margin, on a shape whose main has no layout parent. Update-main pushed it into the main, where it does nothing, and sync, which sends layout child attributes only through layout parents, left the main's other copies without it. A later switch could turn one of them into a swapped head, which takes its placement from the main, with the stale value. Update-main now pushes neither the value nor the touched group of such a layout child group; the copy keeps its override. The composable model keeps those groups on the copy too, and the update-main check takes layout child groups as pushed only under a layout parent in the main. Tests: switching-to-a-head-under-a-plain-parent-keeps-the-margin-its- main-never-took (the variant gate program of round 15, seed 371855618); updating-a-main-keeps-on-the-copy-a-margin-a-switch-carried-out-of-a- layout, renamed from the test of the push it replaces. Common suite: 2439 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.015 | 21.76 | 0.6 | | edit-through-a-chain-of-dependents | 68.931 | 39.553 | 41.298 | 0.57 | | library-update-into-copies | 83.083 | 51.286 | 55.732 | 0.62 | | main-edit-among-many-shapes | 4.837 | 2.221 | 2.392 | 0.46 | | main-edit-into-10-copies | 1.79 | 1.034 | 1.069 | 0.58 | | main-edit-into-100-copies | 15.415 | 10.101 | 10.67 | 0.66 | | main-edit-into-1000-copies | 153.086 | 100.646 | 103.375 | 0.66 | | variant-switch-into-copies | 32.052 | 22.132 | 22.822 | 0.69 | AI-assisted-by: claude-opus-5-5