mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
- generate-relocate set :component-root on the moved shapes twice. The second pass looked at the same copy heads again and wrote the values the first had written, and update-shapes had already applied them, so it emitted nothing. It goes. Delete and relocate found the masked groups whose mask leaves them with the same reduce; groups-losing-mask finds them for both. The comment "Remove the hide in viewer flag" sat above code that sets it. - generate-duplicate-shape-change took unames, update-unames! and ids only to pass them to its own recursive call, assigned each shape the name it already had, and had a 13-argument arity that nothing called. It takes the values that stay the same along the subtree in one map, and it is private. - make-component-instance collected the names used in the page and the new ids in two volatiles: the names were never read, and the ids only fed a second remap of the grid cells, which clone-shape already does. - ctk/in-component-copy-not-root? had no caller, and ctn/get-container-root and ctk/valid-touched-group? only their tests. - ctf/swapped-subhead? tells whether a copy head refers to a main shape that is not a child of the main shape its parent refers to; its docstring still spoke of swap slots. It is ref-outside-near-main?. - dump-shape-component-info built the name of a nested head's component in a branch whose condition ended in `true`, so it never ran. No behavior change: the golden masters and the suites are unchanged. Benchmark (lower quantile, ms; baseline / now / ratio): deepest-edit-through-three-levels 35.2 / 16.1 / 0.46 edit-through-a-chain-of-dependents 68.9 / 30.1 / 0.44 library-update-into-copies 83.1 / 39.4 / 0.47 main-edit-among-many-shapes 4.8 / 2.2 / 0.45 main-edit-into-10-copies 1.8 / 0.8 / 0.44 main-edit-into-100-copies 15.4 / 7.7 / 0.50 main-edit-into-1000-copies 153.1 / 78.1 / 0.51 variant-switch-into-copies 32.1 / 18.5 / 0.58 AI-assisted-by: claude-opus-5-5