alonso.torres a3afd4cd76 🐛 Bring a swapped component's size to a copy child with its own constraint
A copy child whose copy sets a constraint that ties one of its
dimensions to its parent keeps the geometry it shows at sync, since
the constraint applies to later resizes. That rule also held when the
main swapped the child for another component, so the child kept the
old component's 100x100 while the other copies showed the new 120x140,
and update mains then pushed the old size into the main.

The child keeps its geometry only while it shows its main's component;
a swap reaching it brings the new component's size.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.406 |  0.58 |
| edit-through-a-chain-of-dependents |   68.931 |  38.828 |  0.56 |
| library-update-into-copies         |   83.083 |  50.763 |  0.61 |
| main-edit-among-many-shapes        |    4.837 |   2.508 |  0.52 |
| main-edit-into-10-copies           |     1.79 |   1.013 |  0.57 |
| main-edit-into-100-copies          |   15.415 |   9.418 |  0.61 |
| main-edit-into-1000-copies         |  153.086 |  91.613 |  0.60 |
| variant-switch-into-copies         |   32.052 |  21.561 |  0.67 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
..