alonso.torres 56e315bd7a 🐛 Find a swapped copy's own main when its grid direction changes
A direction change in a grid copy makes its cells an override when the
reflow moves items, and the copy's main has a grid. For a copy that
keeps another component than its main's slot, the main was looked up by
its reference, the slot's board, which has no grid: the reflow moved its
items without making the cells an override, and the next sync of its
own component's main gave it the main's cells back.

The main of a swapped head is the root of its own component, the one its
content and its cells follow.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  19.155 |  0.54 |
| edit-through-a-chain-of-dependents |   68.931 |  43.042 |  0.62 |
| library-update-into-copies         |   83.083 |  50.796 |  0.61 |
| main-edit-among-many-shapes        |    4.837 |    2.12 |  0.44 |
| main-edit-into-10-copies           |     1.79 |   0.958 |  0.54 |
| main-edit-into-100-copies          |   15.415 |   9.406 |  0.61 |
| main-edit-into-1000-copies         |  153.086 |  93.765 |  0.61 |
| variant-switch-into-copies         |   32.052 |  22.183 |  0.69 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
..
2026-11-10 20:21:16 +01:00
2026-09-29 09:07:34 +02:00
2026-03-11 15:24:40 +01:00