mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
Sync and swapped children can leave finite repeated component nesting. Moving a copy out succeeds, but undo rejects its old position under the normal component-loop guard. Record restore-component-nesting only on inverses whose original position already repeats a component. Normal forward moves retain that guard. The applier still rejects physical object-tree cycles and changes to copy structure. The new optional change field defaults to the current behavior and changes no stored shape data. Portable regression: exact undo fails before the fix. Five assertions now pass, including redo, normal loop refusal and object-cycle refusal using the generated inverse. Focused JVM and golden checks: 195 tests, 2189 assertions. Both original shrunk programs pass. Live WASM undo/redo restores complete snapshots. Common/frontend lint and formatting pass. Component benchmark ratios: mains 0.57/0.62/0.67; levels 0.80; chain 0.82; library 0.56; many shapes 0.55; variant switch 0.91. All worlds pass the unchanged baseline gate. AI-assisted-by: GPT-6