alonso.torres 9c539b173f 🐛 Give a copy its main's cells when its direction change moves none
Changing the direction of a grid copy without cell overrides reflowed its
auto cells and left the layout to pin those after a gap in the new order,
without making them an override. Changing the direction back kept the
pins, so the copy differed from its main with no override, and the next
sync of its main silently changed it.

A direction change that moves no item of such a copy gives it the cells
its main gives it, laid out as sync lays them out in the new direction,
so changing the direction back restores its main's grid; one that moves
items makes the cells an override, as before. The frontend and the test
operation set the cells first and then the direction, the only override
the change makes otherwise.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  21.653 |  0.61 |
| edit-through-a-chain-of-dependents |   68.931 |  40.646 |  0.59 |
| library-update-into-copies         |   83.083 |  49.282 |  0.59 |
| main-edit-among-many-shapes        |    4.837 |   2.415 |  0.50 |
| main-edit-into-10-copies           |     1.79 |   1.072 |  0.60 |
| main-edit-into-100-copies          |   15.415 |   9.683 |  0.63 |
| main-edit-into-1000-copies         |  153.086 | 103.559 |  0.68 |
| variant-switch-into-copies         |   32.052 |  21.623 |  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