alonso.torres 37e233f6e1 🐛 Take the first equally near variant on a switch
A switch picks the variant whose properties are nearest the wanted
ones; between equally near ones it took the last child of the variant
container. Since combine as variants keeps the order of the components
it combines, that is the last of them: switching an empty variant to
"primary" gave primary/icon+test where the QA case (PENPOT-2446)
expects primary/hover, the first primary variant. It now takes the
first child among the equally near ones.

variants-switch-target-test: two variants one value away, in both
orders of the container's children.

Benchmark against the 1e baseline (lower quantile, ms):

  world                               baseline     now  ratio
  deepest-edit-through-three-levels     35.215  16.810   0.48
  edit-through-a-chain-of-dependents    68.931  32.765   0.48
  library-update-into-copies            83.083  39.232   0.47
  main-edit-among-many-shapes            4.837   2.277   0.47
  main-edit-into-10-copies               1.790   0.807   0.45
  main-edit-into-100-copies             15.415   8.054   0.52
  main-edit-into-1000-copies           153.086  81.186   0.53
  variant-switch-into-copies            32.052  17.933   0.56

AI-assisted-by: claude-opus-5-5
2026-10-16 11:05:22 +02:00
..
2026-10-16 11:05:21 +02:00
2026-09-29 09:07:34 +02:00
2026-10-06 15:12:15 +02:00
2026-10-06 15:12:15 +02:00
2026-03-11 15:24:40 +01:00