alonso.torres 7fd46d516b 🐛 Keep a detached nested copy child where it is
Detaching a copy links each nested copy to the next main up. A nested
copy that keeps a size of its own then places its children against the
new main's size, so a child with its own center constraint stayed in
place at the detach but moved at the next sync of that component, with
no change to the main.

Detach now marks the geometry of each shape it links to a new main as
the copy's own when its next sync would place it elsewhere, so it stays
where it is. Swapped heads still take their new place. The model
predicts the same override.

Benchmark (scripts/bench-components, ms, lower 2.5% quantile):

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.643 |  0.59 |
| edit-through-a-chain-of-dependents |   68.931 |  40.331 |  0.59 |
| library-update-into-copies         |   83.083 |  46.648 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.336 |  0.48 |
| main-edit-into-10-copies           |     1.79 |   0.995 |  0.56 |
| main-edit-into-100-copies          |   15.415 |    9.07 |  0.59 |
| main-edit-into-1000-copies         |  153.086 |  91.388 |  0.60 |
| variant-switch-into-copies         |   32.052 |  21.317 |  0.67 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
..
2022-11-08 13:02:14 +01:00