5 Commits

Author SHA1 Message Date
alonso.torres
ad71f28e29 🐛 Give the groups around a new bool the bounds of its result
A group takes its bounds from its children. Creating a bool inside a
group left the group with its old bounds, though the bool's result can
be smaller: a difference of a 12 px shape and a 20 px one inside a 30 px
group kept the group at 30 px in the main, while sync gave the copies'
groups the bool's 12 px. Creating a bool now refreshes the groups around
it, as masking does.

Tests: a-bool-made-in-a-group-gives-the-group-its-bounds;
a-bool-made-in-a-main-group-gives-the-copy-groups-its-bounds (the shape
structure program of gate seed 660536824).

Benchmark (scripts/bench-components, ms, lower 2.5% quantile), with a
3 GB heap, alone:
|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  21.558 |  23.752 |   0.61 |
| edit-through-a-chain-of-dependents |    68.931 |  43.004 |  48.489 |   0.62 |
|         library-update-into-copies |    83.083 |  50.926 |  53.941 |   0.61 |
|        main-edit-among-many-shapes |     4.837 |   2.427 |   2.862 |    0.5 |
|           main-edit-into-10-copies |      1.79 |   1.121 |   1.214 |   0.63 |
|          main-edit-into-100-copies |    15.415 |  10.652 |  11.179 |   0.69 |
|         main-edit-into-1000-copies |   153.086 | 105.051 | 119.813 |   0.69 |
|         variant-switch-into-copies |    32.052 |  23.083 |  25.483 |   0.72 |

AI-assisted-by: claude-opus-5-5
2026-11-12 14:42:17 +01:00
alonso.torres
6c75aa6941 🐛 Scale the shapes of a bool with it, as a group's
A resize reaches the shapes of a group or bool through their constraints,
and a bool takes its bounds from its shapes. Grouping sets its shapes'
constraints to scale for this, but creating a bool kept theirs: a bool
made of a shape constrained to the left could not be resized, since its
shape kept its width and the bool its bounds. A bool now sets the
constraints of its shapes to scale, as a group does.

Test: resizing-a-bool-resizes-the-shapes-it-combines (found by a shape
structure program of seed 498).

Benchmark (scripts/bench-components, ms, lower 2.5% quantile), with a
3 GB heap while a second devenv ran on the machine; no benchmark world
creates a bool, and the two higher ratios are that load:
|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  21.819 |  24.186 |   0.62 |
| edit-through-a-chain-of-dependents |    68.931 |  49.562 |  52.525 |   0.72 |
|         library-update-into-copies |    83.083 |  57.254 |   63.14 |   0.69 |
|        main-edit-among-many-shapes |     4.837 |   2.973 |   3.289 |   0.61 |
|           main-edit-into-10-copies |      1.79 |   1.551 |   2.602 |   0.87 |
|          main-edit-into-100-copies |    15.415 |  15.578 |   24.16 |   1.01 |
|         main-edit-into-1000-copies |   153.086 | 107.415 | 126.523 |    0.7 |
|         variant-switch-into-copies |    32.052 |   25.21 |  26.393 |   0.79 |

AI-assisted-by: claude-opus-5-5
2026-11-12 13:25:36 +01:00
alonso.torres
92b072431d 🐛 Ungroup the copies of a group a main ungroups in the same change
Ungrouping a group, bool or board inside a main removed it, while its
copies kept a shape that referred to it until the next sync, so the
file failed validation in between. The ungroup now takes the file's
pages and ungroups every shape of the file that refers to an ungrouped
one, directly or through other copies, in the same change: its children
move to its parent at its place, keeping their overrides, and it is
removed. The frontend's ungroup passes the file's pages.

Test: ungrouping-a-group-a-main-holds-leaves-no-copy-referring-to-it
(the copy's rectangle moves to the copy root with its opacity override).

Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
|                             :world | :baseline |   :now |   :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  21.54 |  21.937 |   0.61 |
| edit-through-a-chain-of-dependents |    68.931 | 42.565 |  43.748 |   0.62 |
|         library-update-into-copies |    83.083 | 58.686 |  78.974 |   0.71 |
|        main-edit-among-many-shapes |     4.837 |  2.503 |   3.171 |   0.52 |
|           main-edit-into-10-copies |      1.79 |  1.039 |   1.105 |   0.58 |
|          main-edit-into-100-copies |    15.415 | 10.205 |  10.895 |   0.66 |
|         main-edit-into-1000-copies |   153.086 | 102.64 | 106.511 |   0.67 |
|         variant-switch-into-copies |    32.052 | 21.481 |  22.871 |   0.67 |

AI-assisted-by: claude-opus-5-5
2026-11-12 10:26:29 +01:00
alonso.torres
32ca922e47 🐛 Give a bool created in a grid the cell of the shape it replaces
Creating a bool from shapes in a grid board left the bool without a grid
cell: the JVM layout read the cell of a missing row and threw, and the
frontend laid the bool out in no cell. A group takes the cell of its
last shape and reassigns its grid's cells; the bool now takes the cell
of the shape whose place it takes in the parent, and the grid parents of
its shapes reassign their cells.

Test: a-bool-in-a-grid-takes-the-cell-of-its-last-shape (found by the new
shape structure gate).
Focused: groups-test, 6 tests, 0 failures; the full common suite runs at
the end of this series.

Benchmark (scripts/bench-components, ms, lower 2.5% quantile), measured
with the other production changes of this series in the tree; none of
them is on a measured path:
|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  22.167 |  22.682 |   0.63 |
| edit-through-a-chain-of-dependents |    68.931 |  43.218 |  44.696 |   0.63 |
|         library-update-into-copies |    83.083 |  47.824 |  50.506 |   0.58 |
|        main-edit-among-many-shapes |     4.837 |   2.216 |    2.34 |   0.46 |
|           main-edit-into-10-copies |      1.79 |   1.067 |   1.133 |    0.6 |
|          main-edit-into-100-copies |    15.415 |  10.604 |  10.813 |   0.69 |
|         main-edit-into-1000-copies |   153.086 | 106.085 | 108.631 |   0.69 |
|         variant-switch-into-copies |    32.052 |  22.556 |  23.137 |    0.7 |

AI-assisted-by: claude-opus-5-5
2026-11-12 01:34:11 +01:00
alonso.torres
6f4abafb8a ♻️ Move the group, mask and bool actions to common
The changes of grouping, ungrouping, masking, unmasking and creating
bools were built in the workspace events, which the JVM tests and the
component gates cannot run. They move to app.common.logic.groups and
app.common.logic.bool with the same behavior: the events keep their
selection and stream handling and call the common builders, and the
other callers of shapes-for-grouping and prepare-create-group use the
common namespace.

Tests: groups-test (grouping, ungrouping, copy heads left whole, mask and
unmask, bools without boards). Frontend suite: 2080 tests, 2 failures,
both the intermittent persistence-rollback-test timeout.

Benchmark (scripts/bench-components, ms, lower 2.5% quantile), measured
with the other production changes of this series in the tree; none of
them is on a measured path:
|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  22.167 |  22.682 |   0.63 |
| edit-through-a-chain-of-dependents |    68.931 |  43.218 |  44.696 |   0.63 |
|         library-update-into-copies |    83.083 |  47.824 |  50.506 |   0.58 |
|        main-edit-among-many-shapes |     4.837 |   2.216 |    2.34 |   0.46 |
|           main-edit-into-10-copies |      1.79 |   1.067 |   1.133 |    0.6 |
|          main-edit-into-100-copies |    15.415 |  10.604 |  10.813 |   0.69 |
|         main-edit-into-1000-copies |   153.086 | 106.085 | 108.631 |   0.69 |
|         variant-switch-into-copies |    32.052 |  22.556 |  23.137 |    0.7 |

AI-assisted-by: claude-opus-5-5
2026-11-12 01:34:03 +01:00