alonso.torres e766345cd0 🐛 End the swap of a nested swapped shape a kept swap points at its component
A switch that keeps a copy's swapped child in place of the new copy's
child makes it a plain copy of its new position when both have the same
component, and points its descendants at the position's descendants. A
swapped shape among those descendants kept its swap though its new
reference had its own component, as a plain copy of it does: a copy
switched to a variant whose nested board its main had swapped to that
same component stayed marked as swapped, while the variant's other
copies were not. Such a descendant now drops its swap as well.

Test: switching-a-copy-takes-the-swap-of-a-nested-board-from-its-main
(the variant program of the common suite's seed 1794464684740).

Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |   21.57 |  22.621 |   0.61 |
| edit-through-a-chain-of-dependents |    68.931 |   43.16 |  45.931 |   0.63 |
|         library-update-into-copies |    83.083 |  53.172 |  58.967 |   0.64 |
|        main-edit-among-many-shapes |     4.837 |   2.439 |    2.93 |    0.5 |
|           main-edit-into-10-copies |      1.79 |    1.12 |    1.22 |   0.63 |
|          main-edit-into-100-copies |    15.415 |  10.261 |  11.179 |   0.67 |
|         main-edit-into-1000-copies |   153.086 | 102.918 | 110.051 |   0.67 |
|         variant-switch-into-copies |    32.052 |  23.136 |  24.466 |   0.72 |

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