mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
generate-duplicate-changes looked for the instance roots of the copied shapes in the page they were copied from, and mapped them to the new ids. Pasting a main into another main creates a nested copy, but the copy was validated on its own and reported :nested-copy-not-allowed. Shapes copied from inside a component and pasted outside were not validated at all: the unchanged source root was validated instead. Look for the instance roots from the new shapes, in the objects of the changes builder, where they already are in their new place. This fixes three tests in frontend pasting_in_containers_test. AI-assisted-by: claude-opus-5-5