alonso.torres e0bbc50c32 🐛 Leave hidden children out before deriving a layout from them
Adding a flex or grid layout derives its direction, gaps and paddings
from the board's children, leaving out the hidden ones, but it checked
for children before leaving them out. A board whose children were all
hidden then failed: flex reduced an empty list of points and grid read
the bounds of no shapes. Making a variant of a hidden main reaches it,
since the new variant board gets a flex layout around the main. Hidden
children are now left out first; with none left, the layout gets the
parameters of a board with no children.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.267 |  0.58 |
| edit-through-a-chain-of-dependents |   68.931 |  39.871 |  0.58 |
| library-update-into-copies         |   83.083 |  45.985 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |   1.943 |  0.40 |
| main-edit-into-10-copies           |    1.790 |   1.036 |  0.58 |
| main-edit-into-100-copies          |   15.415 |   9.998 |  0.65 |
| main-edit-into-1000-copies         |  153.086 |  97.836 |  0.64 |
| variant-switch-into-copies         |   32.052 |  19.658 |  0.61 |

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