penpot/frontend
alonso.torres 768b12d68f 🐛 Refuse duplicates that expand component nesting loops
A finite repeated component tree can cut recursion with a swapped child.
Duplicating another child in its main opens an unblocked branch that sync
keeps expanding. Check component nesting against the actual destination
before generating duplicate changes, and keep safe shapes in mixed batches.
ALT duplication at the page root remains allowed.

Use the same eligibility in workspace duplication, pure nodes and generated
candidates. The portable regression fails three assertions before the fix
and passes all five afterward. The original library seed 712 case 1601
and its reduced switch/nest/duplicate program pass. Focused regression and
golden checks pass 123 tests, 2492 assertions; goldens are unchanged.
Live WASM verifies refusal, ALT duplication, undo/redo and later stable sync.

Component benchmark ratios: mains 0.47/0.55/0.55; levels 0.51;
chain 0.53; library 0.58; many shapes 0.52; variant switch 0.74.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-10-28 15:53:09 +01:00
..
2026-10-28 15:53:05 +01:00
2026-10-07 10:41:29 +02:00