689 Commits

Author SHA1 Message Date
alonso.torres
1b2c74da68 🐛 Keep the moved place of a copy child a switch replaces as its own
A copy child of a copy can be moved, which marks its geometry as its own.
Switching it to another variant keeps the place it was moved to, but the
new head only has the swap override, so the next sync brought it back to
the place its position in the main gives it.

When the switch keeps a first corner that the head's position would not
give it inside its copy parent, the new head's geometry is marked as its
own. The model expects that place as authored.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  18.478 |  0.52 |
| edit-through-a-chain-of-dependents |   68.931 |  37.022 |  0.54 |
| library-update-into-copies         |   83.083 |  45.307 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |   2.118 |  0.44 |
| main-edit-into-10-copies           |     1.79 |   0.975 |  0.54 |
| main-edit-into-100-copies          |   15.415 |   9.505 |  0.62 |
| main-edit-into-1000-copies         |  153.086 |  96.857 |  0.63 |
| variant-switch-into-copies         |   32.052 |  19.846 |  0.62 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
b5804addae 🚑 Keep the gap of a space-around grid without tracks
A grid layout with space-around content alignment divides its free space
by its number of tracks to find the gap. A grid with no columns or no
rows divided by zero, which throws on the JVM and gives an infinite gap
in JS. Without tracks there is no space to distribute, so the gap stays
the configured one.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  18.284 |  0.52 |
| edit-through-a-chain-of-dependents |   68.931 |   36.15 |  0.52 |
| library-update-into-copies         |   83.083 |  45.659 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |   2.184 |  0.45 |
| main-edit-into-10-copies           |     1.79 |   0.925 |  0.52 |
| main-edit-into-100-copies          |   15.415 |   8.865 |  0.58 |
| main-edit-into-1000-copies         |  153.086 |  88.254 |  0.58 |
| variant-switch-into-copies         |   32.052 |  20.181 |  0.63 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
0436156e27 🐛 Keep the moved place of a copy child a pushed switch replaces
A copy in a main can move one of its nested children, which marks the
child's geometry as its own. When a copy of that main switches the child
to another variant and the switch is pushed into the main, the new
nested copy replaces the moved child at the same place, but nothing
marked that place as its own. The next sync brought it back to its
component's place and the main's nested copy no longer matched.

The pushed head now takes the placement groups the replaced child had
touched, so it keeps the place it inherits. The model expects them with
the head's geometry in the main.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  21.215 |  0.60 |
| edit-through-a-chain-of-dependents |   68.931 |  41.146 |  0.60 |
| library-update-into-copies         |   83.083 |  48.017 |  0.58 |
| main-edit-among-many-shapes        |    4.837 |   2.678 |  0.55 |
| main-edit-into-10-copies           |     1.79 |   1.023 |  0.57 |
| main-edit-into-100-copies          |   15.415 |   9.272 |  0.60 |
| main-edit-into-1000-copies         |  153.086 |  94.933 |  0.62 |
| variant-switch-into-copies         |   32.052 |  24.787 |  0.77 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
a3afd4cd76 🐛 Bring a swapped component's size to a copy child with its own constraint
A copy child whose copy sets a constraint that ties one of its
dimensions to its parent keeps the geometry it shows at sync, since
the constraint applies to later resizes. That rule also held when the
main swapped the child for another component, so the child kept the
old component's 100x100 while the other copies showed the new 120x140,
and update mains then pushed the old size into the main.

The child keeps its geometry only while it shows its main's component;
a swap reaching it brings the new component's size.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.406 |  0.58 |
| edit-through-a-chain-of-dependents |   68.931 |  38.828 |  0.56 |
| library-update-into-copies         |   83.083 |  50.763 |  0.61 |
| main-edit-among-many-shapes        |    4.837 |   2.508 |  0.52 |
| main-edit-into-10-copies           |     1.79 |   1.013 |  0.57 |
| main-edit-into-100-copies          |   15.415 |   9.418 |  0.61 |
| main-edit-into-1000-copies         |  153.086 |  91.613 |  0.60 |
| variant-switch-into-copies         |   32.052 |  21.561 |  0.67 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
5f4ef66314 🐛 Resize a copy's subtree through constraints when sync also turns it
When sync turns a copy parent, it turns and moves the parent's whole
subtree, geometry overrides included, by the parent's center. When the
same sync also resizes the parent, that center shift carries half the
resize, so a child with its own geometry moved as if its constraint were
center: a top-constrained child ended 10 px above its place after an
update main turned its parent back and shrank it by 20 px.

A parent that is turned and resized at once now resizes its subtree
through the children's constraints first, then turns and moves it as one
piece, as the main's subtree is placed into a copy.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  23.162 |  0.66 |
| edit-through-a-chain-of-dependents |   68.931 |  43.751 |  0.63 |
| library-update-into-copies         |   83.083 |  52.008 |  0.63 |
| main-edit-among-many-shapes        |    4.837 |   2.897 |  0.60 |
| main-edit-into-10-copies           |     1.79 |   1.103 |  0.62 |
| main-edit-into-100-copies          |   15.415 |  10.807 |  0.70 |
| main-edit-into-1000-copies         |  153.086 | 105.726 |  0.69 |
| variant-switch-into-copies         |   32.052 |  24.017 |  0.75 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
d7ade70b57 🐛 Store the turn a mirrored shape's transform decomposes into
When sync turns a subtree, it added the head's angle to the rotation of
every shape in it. A shape mirrored relative to the head stores its turn
the other way, so it kept the right transform and corners with a stored
rotation 90 degrees off: 225 for a transform that its vertical flip
decomposes as 315.

Each turned shape now stores its rotation plus the angle, or minus it
when only that one decomposes its transform with its flips. A copy
flipped through a turned nested head now stores 90, the turn its
transform decomposes into, where it stored 270; the test that recorded
270 checks that the oracle still accepts either sign.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  21.321 |  0.61 |
| edit-through-a-chain-of-dependents |   68.931 |  40.817 |  0.59 |
| library-update-into-copies         |   83.083 |  52.024 |  0.63 |
| main-edit-among-many-shapes        |    4.837 |   2.486 |  0.51 |
| main-edit-into-10-copies           |     1.79 |   0.972 |  0.54 |
| main-edit-into-100-copies          |   15.415 |   9.993 |  0.65 |
| main-edit-into-1000-copies         |  153.086 | 102.183 |  0.67 |
| variant-switch-into-copies         |   32.052 |  23.063 |  0.72 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
7fd46d516b 🐛 Keep a detached nested copy child where it is
Detaching a copy links each nested copy to the next main up. A nested
copy that keeps a size of its own then places its children against the
new main's size, so a child with its own center constraint stayed in
place at the detach but moved at the next sync of that component, with
no change to the main.

Detach now marks the geometry of each shape it links to a new main as
the copy's own when its next sync would place it elsewhere, so it stays
where it is. Swapped heads still take their new place. The model
predicts the same override.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.643 |  0.59 |
| edit-through-a-chain-of-dependents |   68.931 |  40.331 |  0.59 |
| library-update-into-copies         |   83.083 |  46.648 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.336 |  0.48 |
| main-edit-into-10-copies           |     1.79 |   0.995 |  0.56 |
| main-edit-into-100-copies          |   15.415 |    9.07 |  0.59 |
| main-edit-into-1000-copies         |  153.086 |  91.388 |  0.60 |
| variant-switch-into-copies         |   32.052 |  21.317 |  0.67 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
c73b30cb56 🚑 Lay out a single-line flex board aligned by space-between
A wrapped flex board whose content is aligned by space-between shares its
free space between its lines, dividing it by the number of lines minus
one. With a single line and integer sizes that is a division by zero,
which throws in Clojure. The gap after a single line goes unused, so it
now takes the layout's own gap.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |   20.49 |  0.58 |
| edit-through-a-chain-of-dependents |   68.931 |  41.045 |  0.60 |
| library-update-into-copies         |   83.083 |  51.057 |  0.61 |
| main-edit-among-many-shapes        |    4.837 |   2.253 |  0.47 |
| main-edit-into-10-copies           |     1.79 |   1.055 |  0.59 |
| main-edit-into-100-copies          |   15.415 |   9.948 |  0.65 |
| main-edit-into-1000-copies         |  153.086 | 108.962 |  0.71 |
| variant-switch-into-copies         |   32.052 |  21.743 |  0.68 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
3beb329bc7 🐛 Carry a copy child's flip over a variant switch
A switch carries the geometry overrides that both variants agree on,
but the flip flags were not among the attributes it may keep, and the
carried points were built with the new copy's transform. A copy child
flipped horizontally kept its flipped transform after a switch while
losing its flip flag and the flipped corner order. The flags now carry
like the rotation, and the carried points follow the transform the
switch carries.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  21.073 |  0.60 |
| edit-through-a-chain-of-dependents |   68.931 |   38.55 |  0.56 |
| library-update-into-copies         |   83.083 |  46.597 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.177 |  0.45 |
| main-edit-into-10-copies           |     1.79 |   0.924 |  0.52 |
| main-edit-into-100-copies          |   15.415 |  10.188 |  0.66 |
| main-edit-into-1000-copies         |  153.086 |  93.214 |  0.61 |
| variant-switch-into-copies         |   32.052 |  20.662 |  0.64 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
05ae99a666 🐛 Keep a copy child's geometry when the copy authors its constraint
A copy resized after its main keeps a child with top constraints at its
size. Setting that child's vertical constraint to scale in the copy
moves nothing, but the next sync resized the child through the new
constraint by the whole earlier resize: a 20 px child of a copy twice
its main's height became 40 px, at whatever later moment a sync came. A
constraint applies to the resizes after it, so a copy child whose copy
authors a constraint that ties one of its dimensions keeps the geometry
it shows, and its children follow it. The test oracle expects the same.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.631 |  0.59 |
| edit-through-a-chain-of-dependents |   68.931 |  39.243 |  0.57 |
| library-update-into-copies         |   83.083 |  46.415 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.091 |  0.43 |
| main-edit-into-10-copies           |     1.79 |   1.073 |  0.60 |
| main-edit-into-100-copies          |   15.415 |   9.951 |  0.65 |
| main-edit-into-1000-copies         |  153.086 | 100.057 |  0.65 |
| variant-switch-into-copies         |   32.052 |  20.292 |  0.63 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
0b30155159 🐛 Keep the parent's turn out of an update main of a resized top copy
A top copy turned with its parent board keeps that turn when the board
is detached. Resizing the copy gives it a geometry of its own, and
update main then pushed the board's turn into the main, while sync
composes the copy with its parent's turn again: the copy turned twice.
Update main now turns back the parent's turn for a top copy root with
its own geometry, as it does for nested roots; under an unturned parent
that is no turn.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  19.207 |  0.55 |
| edit-through-a-chain-of-dependents |   68.931 |  37.719 |  0.55 |
| library-update-into-copies         |   83.083 |  47.009 |  0.57 |
| main-edit-among-many-shapes        |    4.837 |    2.17 |  0.45 |
| main-edit-into-10-copies           |     1.79 |   1.039 |  0.58 |
| main-edit-into-100-copies          |   15.415 |  10.179 |  0.66 |
| main-edit-into-1000-copies         |  153.086 | 101.906 |  0.67 |
| variant-switch-into-copies         |   32.052 |  20.838 |  0.65 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
c13dcdd71f 🐛 Keep a copy text's own variant when both sides show its weight
A copy text that sets its own family and weight keeps the variant id its
family names for that weight. When the main later shows the same weight,
the weight is equal on both sides and sync does not place it, so the
family's variant ids were not given either: the copy's Roboto run took
the main's "bold", a variant of another family. The family's side now
gives its variants whenever the family is placed and the weight is not.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.095 |  0.57 |
| edit-through-a-chain-of-dependents |   68.931 |  39.445 |  0.57 |
| library-update-into-copies         |   83.083 |  45.617 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |   2.227 |  0.46 |
| main-edit-into-10-copies           |     1.79 |   0.961 |  0.54 |
| main-edit-into-100-copies          |   15.415 |   9.374 |  0.61 |
| main-edit-into-1000-copies         |  153.086 |  94.792 |  0.62 |
| variant-switch-into-copies         |   32.052 |  20.436 |  0.64 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
alonso.torres
1fb421277b 🐛 Order a copy grid with its own cells by the flow of those cells
A copy grid that keeps its own cells held its children in its main's
order, which can differ from the order its cells flow in. Updating the
main from such a copy gave the main that order with the copy's cells,
and a later reflow put the main back in its own flow while its copies
kept the old order.

A copy grid with its own cells now orders its children by the flow of
its cells: sync orders it after taking them, and the grid reorder of an
edit includes it, which a copy reorder has to allow. Update-main gives
the main the copy's order in one change, as moving each child to its
place could not be undone to the main's former order.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |   18.54 |  0.53 |
| edit-through-a-chain-of-dependents |   68.931 |  37.494 |  0.54 |
| library-update-into-copies         |   83.083 |   46.85 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.199 |  0.45 |
| main-edit-into-10-copies           |     1.79 |   0.943 |  0.53 |
| main-edit-into-100-copies          |   15.415 |   8.927 |  0.58 |
| main-edit-into-1000-copies         |  153.086 |  91.773 |  0.60 |
| variant-switch-into-copies         |   32.052 |  20.421 |  0.64 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
c9316735a8 🐛 Place a reset nested head as a resized copy around it places it
A copy taller than its main scales a nested head that is set to scale
vertically. Resetting that head gave it the size of its main and kept
its place, and the next sync scaled it again. Only a head with its own
geometry took the placement a sync of the enclosing copy gives; a head
under a copy with its own geometry, up to that enclosing copy, takes it
too.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  19.071 |  0.54 |
| edit-through-a-chain-of-dependents |   68.931 |  40.616 |  0.59 |
| library-update-into-copies         |   83.083 |  46.556 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.149 |  0.44 |
| main-edit-into-10-copies           |     1.79 |   1.003 |  0.56 |
| main-edit-into-100-copies          |   15.415 |   9.518 |  0.62 |
| main-edit-into-1000-copies         |  153.086 |  94.056 |  0.61 |
| variant-switch-into-copies         |   32.052 |  20.334 |  0.63 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
c318971107 🐛 Refuse an update of a main that loops through several held mains
Updating a main from its copy checked the copies the copy holds and the
mains of those, but no deeper. A chain of mains, each holding the next
through a copy that swapped its head away, could still end in the
component being updated, which then nested inside itself.

The check now follows the held components through every level.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |   18.93 |  0.54 |
| edit-through-a-chain-of-dependents |   68.931 |  38.249 |  0.55 |
| library-update-into-copies         |   83.083 |  44.715 |  0.54 |
| main-edit-among-many-shapes        |    4.837 |   2.166 |  0.45 |
| main-edit-into-10-copies           |     1.79 |   0.949 |  0.53 |
| main-edit-into-100-copies          |   15.415 |   9.513 |  0.62 |
| main-edit-into-1000-copies         |  153.086 | 102.177 |  0.67 |
| variant-switch-into-copies         |   32.052 |  20.994 |  0.65 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
6ebac310ba 🐛 Refuse a swap that loops through the main of a held component
Swapping or switching a head for a component checked only the copies in
that component's main against the head's parents. A copy there could
have swapped away a component that its own main still holds, so the
swap passed, and a sync or reset that brought the held component back
nested a component inside itself.

The check now follows each component the new main holds into its main,
through every level, as the nest check does.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  19.108 |  0.54 |
| edit-through-a-chain-of-dependents |   68.931 |  39.394 |  0.57 |
| library-update-into-copies         |   83.083 |  45.356 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |   2.251 |  0.47 |
| main-edit-into-10-copies           |     1.79 |   0.974 |  0.54 |
| main-edit-into-100-copies          |   15.415 |   9.266 |  0.60 |
| main-edit-into-1000-copies         |  153.086 |  94.168 |  0.62 |
| variant-switch-into-copies         |   32.052 |  20.366 |  0.64 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
a7ae3140c5 🐛 Keep the children of a copy sized on its own when its main fills
A nested copy made absolute in a copy keeps its own geometry. Its main
was then set to fill a grid and shrank. Sync places the main's children
like the copy: it resized the main to the copy's size, but the grid's
reflow refilled it to its cell, and the move that lines the two up
shifted the copy's children by the difference.

The main's subtree is now resized out of its parent's layout, since the
copy's size is its own and no layout of the main owns it.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |   18.99 |  0.54 |
| edit-through-a-chain-of-dependents |   68.931 |   37.28 |  0.54 |
| library-update-into-copies         |   83.083 |   49.96 |  0.60 |
| main-edit-among-many-shapes        |    4.837 |   2.233 |  0.46 |
| main-edit-into-10-copies           |     1.79 |   1.017 |  0.57 |
| main-edit-into-100-copies          |   15.415 |   9.558 |  0.62 |
| main-edit-into-1000-copies         |  153.086 |  91.362 |  0.60 |
| variant-switch-into-copies         |   32.052 |  20.725 |  0.65 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
6e3c8b1cb2 🐛 Refuse a nest that loops through the main of a held component
A copy whose nested head was switched to another variant was nested into
the main of the component that head's main still holds. The loop check
only compared the components in the moved subtree with the parent
chain, so it let the nest through; a reset then brought the held
component back, and the sync cascade grew the cycle until it gave up.

The check now follows each component the moved shapes hold into its
main, through every level, as sync and reset can bring any of them
back. Moving, pasting and dropping in the layers share it.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  19.778 |  0.56 |
| edit-through-a-chain-of-dependents |   68.931 |  39.309 |  0.57 |
| library-update-into-copies         |   83.083 |  49.107 |  0.59 |
| main-edit-among-many-shapes        |    4.837 |   2.271 |  0.47 |
| main-edit-into-10-copies           |     1.79 |   1.001 |  0.56 |
| main-edit-into-100-copies          |   15.415 |   10.29 |  0.67 |
| main-edit-into-1000-copies         |  153.086 | 101.796 |  0.66 |
| variant-switch-into-copies         |   32.052 |   20.72 |  0.65 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
fcd9128575 🐛 Leave no override when a shape moved out of a layout loses its margins
A copy in a flex main kept its margin type through a reset, since its
placement belongs to its position. Nesting it out of the layout cleared
its layout-item data, and the relocation marked a margin override,
although the copy now matched its main.

Clearing layout-item data when a shape leaves a layout is a consequence
of the move, not an edit of those attributes, so it marks no override.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 | 18.992 |  0.54 |
| edit-through-a-chain-of-dependents |   68.931 | 39.094 |  0.57 |
| library-update-into-copies         |   83.083 | 46.864 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |  2.236 |  0.46 |
| main-edit-into-10-copies           |     1.79 |  0.941 |  0.53 |
| main-edit-into-100-copies          |   15.415 |  9.524 |  0.62 |
| main-edit-into-1000-copies         |  153.086 | 95.507 |  0.62 |
| variant-switch-into-copies         |   32.052 | 22.002 |  0.69 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
a59fcb8b26 🐛 Keep a head switched in a turned main at its first corner
A head in a main turned 45 degrees switched to a wider variant. The new
head was placed at the old one's untransformed top-left and turned about
its own centre, so it landed off the old head's first corner, while its
copies follow the main at their first corner through sync.

The turned new head now moves so its first corner meets the old head's,
the place a turned or flipped swap takes in a copy. Switching and then
turning the main gives the same result as turning and then switching.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 | 20.289 |  0.58 |
| edit-through-a-chain-of-dependents |   68.931 | 39.832 |  0.58 |
| library-update-into-copies         |   83.083 | 45.839 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |  2.079 |  0.43 |
| main-edit-into-10-copies           |     1.79 |  0.933 |  0.52 |
| main-edit-into-100-copies          |   15.415 |  9.056 |  0.59 |
| main-edit-into-1000-copies         |  153.086 | 99.369 |  0.65 |
| variant-switch-into-copies         |   32.052 | 21.489 |  0.67 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
fa0ba43c48 🐛 Compare a switched head's orientation with its position in a copy
A nested head whose position in the enclosing main has a geometry
override, such as a resize, switched to a variant whose main is turned.
The switch keeps the old head's orientation, which agrees with its
position, the placement a sync gives a swapped head; but because the
reference chain had a geometry override, the switch compared the kept
orientation with the new main and marked a geometry override that no
later sync needs.

The kept orientation is compared with the new main only when an
orientation override carries: the reference chain has a geometry
override and the old and new variant mains share their orientation.
Otherwise, inside a copy, it is compared with the position.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 | 20.017 |  0.57 |
| edit-through-a-chain-of-dependents |   68.931 | 37.029 |  0.54 |
| library-update-into-copies         |   83.083 | 45.694 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |  2.094 |  0.43 |
| main-edit-into-10-copies           |     1.79 |   0.95 |  0.53 |
| main-edit-into-100-copies          |   15.415 |   9.21 |  0.60 |
| main-edit-into-1000-copies         |  153.086 | 93.672 |  0.61 |
| variant-switch-into-copies         |   32.052 | 20.466 |  0.64 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
79b909a0bd 🐛 Keep turned copies and swaps at their first corner
A sync lined up a copy with its main by their untransformed top-left.
Once the main is turned or flipped, a width change moves that point, so
every copy that follows the main drifted about 7 px off the corner the
resize keeps, and a child it overrides left its place. A swapped head of
another size than its position did the same when its board turned: it
was lined up by the untransformed boxes and turned about its own centre.

An untouched copy root turned or flipped like its main now lines up
with it at their first corner, and a swapped head turned like its
position takes its place at that corner, so both turn rigidly with
their board. The oracle resizes an expected turned head about its first
corner in the same way.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 | 18.808 |  0.53 |
| edit-through-a-chain-of-dependents |   68.931 | 38.155 |  0.55 |
| library-update-into-copies         |   83.083 | 46.798 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |  2.193 |  0.45 |
| main-edit-into-10-copies           |     1.79 |  0.962 |  0.54 |
| main-edit-into-100-copies          |   15.415 |  9.315 |  0.60 |
| main-edit-into-1000-copies         |  153.086 | 93.184 |  0.61 |
| variant-switch-into-copies         |   32.052 |  20.55 |  0.64 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
e10ce2dba9 🐛 Turn and skew layout children with their layout board
A turned board that fills its flex parent skews, and so does a grid
board it holds. In the layout pass a layout board handed its modifiers
only to its absolute children, so the layout moved the others without
the board's turn or skew: they stayed rigid, while the WASM layout and a
component sync skew them. The layout pass now hands a layout board's
modifiers to all its children, which keep their size along its axes,
and the layout places them from the transformed bounds.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.425 |  0.58 |
| edit-through-a-chain-of-dependents |   68.931 |  41.077 |  0.60 |
| library-update-into-copies         |   83.083 |  47.075 |  0.57 |
| main-edit-among-many-shapes        |    4.837 |   2.276 |  0.47 |
| main-edit-into-10-copies           |     1.79 |   0.998 |  0.56 |
| main-edit-into-100-copies          |   15.415 |  11.243 |  0.73 |
| main-edit-into-1000-copies         |  153.086 | 109.801 |  0.72 |
| variant-switch-into-copies         |   32.052 |  20.218 |  0.63 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
bb909e383f 🐛 Measure a reset head's turn after the mirror of its main's parent
A library turns and flips an outer component; a file that has not
accepted it resets a nested head of an unturned copy. The loaded main is
turned onto the copy's parent with the angle between the parents, but
under a mirror apply-transform negates the rotation before adding the
turn: the head and its child got rotation 90 with an identity transform.
The angle is now measured against the parent once transformed, as
orient-like does.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  18.135 |  0.51 |
| edit-through-a-chain-of-dependents |   68.931 |  39.807 |  0.58 |
| library-update-into-copies         |   83.083 |  44.721 |  0.54 |
| main-edit-among-many-shapes        |    4.837 |   1.972 |  0.41 |
| main-edit-into-10-copies           |     1.79 |   0.964 |  0.54 |
| main-edit-into-100-copies          |   15.415 |   9.318 |  0.60 |
| main-edit-into-1000-copies         |  153.086 |  90.874 |  0.59 |
| variant-switch-into-copies         |   32.052 |  20.887 |  0.65 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
026819056c 🐛 Push a swap into its main without the turn the copy inherits
A nested copy turned with the main that holds it swaps a child, and
update-main pushes that child into its own unturned main. Update-main turns
paired shapes back to the main's orientation, but add-shape-to-main cloned
the pushed child as it was in the copy, so the main took the copy's turn
and its copies turned twice.

A pushed shape and its placement reference now take the same inherited
turn before they are repositioned into the main. The model leaves the
inherited turn out of a pushed swap's geometry likewise.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  19.463 |  0.55 |
| edit-through-a-chain-of-dependents |   68.931 |    38.1 |  0.55 |
| library-update-into-copies         |   83.083 |    46.7 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.227 |  0.46 |
| main-edit-into-10-copies           |     1.79 |   1.064 |  0.59 |
| main-edit-into-100-copies          |   15.415 |  10.225 |  0.66 |
| main-edit-into-1000-copies         |  153.086 | 101.264 |  0.66 |
| variant-switch-into-copies         |   32.052 |  20.333 |  0.63 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
aa1797e29e 🐛 Drop a copy's grid cells when sync leaves it without a grid
Grid cell overrides carry over only between grids. When a main swapped a
nested grid head for a component without a grid, its copies kept the
cells they authored, now naming a child that was removed. Sync now drops
the cells and their override from a copy it leaves without a grid, and
the model expects the same once the copy has synced.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.76 |  0.59 |
| edit-through-a-chain-of-dependents |   68.931 |  37.86 |  0.55 |
| library-update-into-copies         |   83.083 | 46.402 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.19 |  0.45 |
| main-edit-into-10-copies           |     1.79 |  0.976 |  0.55 |
| main-edit-into-100-copies          |   15.415 |  9.456 |  0.61 |
| main-edit-into-1000-copies         |  153.086 | 95.647 |  0.62 |
| variant-switch-into-copies         |   32.052 | 20.652 |  0.64 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
9664a1ecc6 🐛 Give a reset head back its grid cell when it leaves absolute
A reset clears a copy head's own layout item values after its sync, so a
head made absolute in the copy came back into its parent grid's flow
after the cells had been assigned, and its cell stayed empty until a full
sync. The reset now assigns its grid parent's cells again at its end.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 |   18.5 |  0.53 |
| edit-through-a-chain-of-dependents |   68.931 |  36.37 |  0.53 |
| library-update-into-copies         |   83.083 | 44.588 |  0.54 |
| main-edit-among-many-shapes        |    4.837 |   2.03 |  0.42 |
| main-edit-into-10-copies           |     1.79 |  0.953 |  0.53 |
| main-edit-into-100-copies          |   15.415 |    9.2 |   0.6 |
| main-edit-into-1000-copies         |  153.086 | 91.647 |   0.6 |
| variant-switch-into-copies         |   32.052 | 20.181 |  0.63 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
b2757fdbb9 🐛 Carry a copy child's own position when sync moves its parent
A copy child with a geometry override keeps its place inside its parent.
When sync turned or flipped the parent, the child followed, but when sync
only moved it, for instance a nested copy that its main's layout shifted
to make room for a new child, the child stayed where it was and came loose
from its parent. A parent that sync moves without resizing now carries its
whole subtree as well.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 | 18.821 |  0.53 |
| edit-through-a-chain-of-dependents |   68.931 | 37.929 |  0.55 |
| library-update-into-copies         |   83.083 | 48.193 |  0.58 |
| main-edit-among-many-shapes        |    4.837 |   2.06 |  0.43 |
| main-edit-into-10-copies           |     1.79 |  0.959 |  0.54 |
| main-edit-into-100-copies          |   15.415 |   9.24 |   0.6 |
| main-edit-into-1000-copies         |  153.086 | 92.816 |  0.61 |
| variant-switch-into-copies         |   32.052 | 19.519 |  0.61 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
91bb316f9d 🐛 Give a copy head shown again by sync back its grid cell
A grid drops the cell of a child that is hidden. When a reset or a sync
showed a hidden copy head again, its parent grid, outside the copy, kept
no cell for it, and the next layout pass failed on the missing cell.
Syncing a head now assigns its parent grid's cells again when it takes
the head in or out of the grid's flow, as showing or hiding a child in
the editor does.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 | 17.937 |  0.51 |
| edit-through-a-chain-of-dependents |   68.931 | 37.042 |  0.54 |
| library-update-into-copies         |   83.083 | 43.279 |  0.52 |
| main-edit-among-many-shapes        |    4.837 |  2.071 |  0.43 |
| main-edit-into-10-copies           |     1.79 |    0.9 |   0.5 |
| main-edit-into-100-copies          |   15.415 |  9.059 |  0.59 |
| main-edit-into-1000-copies         |  153.086 | 89.032 |  0.58 |
| variant-switch-into-copies         |   32.052 | 19.941 |  0.62 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
c09fb3d26c 🐛 Keep a copy child made absolute where its layout placed it
A copy child taken out of its layout's flow stays where the layout put
it, which can differ from its main's place when the copy has its own
layout values. Making it absolute now marks its geometry as an override
too, so sync keeps that place instead of moving it to the main's.

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

| world                              | baseline |    now | ratio |
|------------------------------------+----------+--------+-------|
| deepest-edit-through-three-levels  |   35.215 | 18.081 |  0.51 |
| edit-through-a-chain-of-dependents |   68.931 |  35.42 |  0.51 |
| library-update-into-copies         |   83.083 | 45.335 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |    2.3 |  0.48 |
| main-edit-into-10-copies           |     1.79 |  0.905 |  0.51 |
| main-edit-into-100-copies          |   15.415 |  8.714 |  0.57 |
| main-edit-into-1000-copies         |  153.086 | 88.228 |  0.58 |
| variant-switch-into-copies         |   32.052 | 20.752 |  0.65 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
3e934593d1 🐛 Keep a copy text's own family's variant of the main's weight
When sync or a switch takes a text's family from one side and its weight
from the other, a run that shows the same weight and style takes the
variant id of the family's side, which names a variant of that family.
A copy that changed a bold text to Roboto kept the main's "bold" after a
sync instead of Roboto's "700", so a second sync was no longer a no-op.
Runs with another weight keep the weight's variant for the frontend to
fix.

The golden master is recorded again: its Roboto copy texts now hold
Roboto's "700", and update-main carries it to the main.

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

| world                              | baseline |   now | ratio |
|------------------------------------+----------+-------+-------|
| deepest-edit-through-three-levels  |   35.215 | 19.955 |  0.57 |
| edit-through-a-chain-of-dependents |   68.931 | 39.875 |  0.58 |
| library-update-into-copies         |   83.083 | 45.419 |  0.55 |
| main-edit-among-many-shapes        |    4.837 |  2.323 |  0.48 |
| main-edit-into-10-copies           |     1.79 |  1.037 |  0.58 |
| main-edit-into-100-copies          |   15.415 |  9.335 |  0.61 |
| main-edit-into-1000-copies         |  153.086 | 97.201 |  0.63 |
| variant-switch-into-copies         |   32.052 | 24.822 |  0.77 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
72fb4f8d41 🐛 Restore a reset nested copy's inherited layout item values
Layout item values (margins, sizing, alignment) sync from a layout parent to
its children, not as a shape's own attributes. A reset rooted at a nested
copy head therefore never restored the head's own values: one whose margin
type was overridden kept it while the reset cleared its touched groups.

After a reset, give the head its ref's layout child values when its parent
is the copy of the ref's layout parent, the case in which they are
inherited.

A seed 712 large gate (stale library, program 118) found this; it also
fails on earlier commits. The program regression fails before the fix and
passes after it, with undo and redo. Full common passes lint, JVM,
JavaScript and formatting: JVM 2082 tests / 33907 assertions; JavaScript
2018 / 32562. All six component properties pass 40 programs each at seed
712 in both runtimes.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.909     0.51
Main into 100 copies         15.415     8.804     0.57
Main into 1000 copies       153.086    88.560     0.58
Three nesting levels         35.215    18.272     0.52
Dependency chain             68.931    35.558     0.52
Library update               83.083    45.079     0.54
Many plain shapes             4.837     2.104     0.43
Variant switch               32.052    19.574     0.61

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
50dc444e71 🐛 Turn a shape without flipping it on a large rotation
A transform reads its flip flags from the shape's edges: when both edges
reverse, both flags flip. A rotation by more than 90 degrees reverses both
edges too, and its structure modifier then adds the angle to the rotation,
so the half turn was counted twice. A rect rotated 135 or 180 degrees showed
as flipped on both axes, and flip-y, rotate 180 degrees, flip-x left an
unrotated shape stored with rotation 180 and no flags.

Pass the turn a transform's structure modifiers add into the flip
adjustment. Without a reflection, both flags flip only for a half turn the
rotation does not count, as a resize by -1 on both axes.

A fourth re-run of the seed-20261101 library dependency property found this;
it also fails on earlier commits. The regression fails before the fix
(135 and 180 degrees set both flags; the sequence ends inconsistent) and
passes after it; a -1 resize on both axes still flips both. Full common
passes lint, JVM, JavaScript and formatting: JVM 2081 tests / 33910
assertions; JavaScript 2017 / 32557. All six component properties pass 40
programs each at seed 712 in both runtimes.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.985     0.55
Main into 100 copies         15.415    10.150     0.66
Main into 1000 copies       153.086   104.892     0.69
Three nesting levels         35.215    19.738     0.56
Dependency chain             68.931    48.772     0.71
Library update               83.083    49.020     0.59
Many plain shapes             4.837     2.576     0.53
Variant switch               32.052    20.357     0.64

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
c3356b5325 🐛 Keep a reflected copy's transform when settling its decomposition
After a reflection, copy descendants are settled through a sync proposal
from their mains so their flip flags take the decomposition sync gives.
The proposal reads the loaded main. A dependent library main nesting a copy
whose child the upstream library flipped, not yet accepted there, was
flipped; mirrored twice, the pending flip gave the child the same corners,
so the footprint check accepted it and the child lost its reflection.

Accept a proposal only where it keeps the shape's corners and transform, so
it can change only how rotation and flips decompose that transform.

A third re-run of the seed-20261101 library dependency property found this;
it also fails on earlier commits. The program regression fails before the
fix and passes after it. Full common passes lint, JVM, JavaScript and
formatting: JVM 2079 tests / 33875 assertions; JavaScript 2015 / 32526. All
six component properties pass 40 programs each at seed 712 in both runtimes.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     1.007     0.56
Main into 100 copies         15.415     8.691     0.56
Main into 1000 copies       153.086    87.750     0.57
Three nesting levels         35.215    19.121     0.54
Dependency chain             68.931    36.243     0.53
Library update               83.083    46.041     0.55
Many plain shapes             4.837     2.219     0.46
Variant switch               32.052    20.574     0.64

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
9056fc9128 🐛 Keep the size a board's constraints give a nested copy on sync
A copy inside a plain board, such as a main, follows the board's resizes
through its constraints. That resize is not an override: the user did not
set the size. The next sync of the copy's own component then gave it the
component's size, undoing the constraint: a copy scaled to 80 px inside an
80 px main went back to 100 px and overflowed it.

When syncing a copy head whose parent is a plain board, keep the dimensions
its constraints tie to that board (scale or left-right horizontally, scale
or top-bottom vertically); its other attributes still sync. The main is
placed at those dimensions first, so the copy's children follow through
their constraints.

A second re-run of the seed-20261101 library property found this; it also
fails on earlier commits. The regression fails before the fix (100 px after
a fill edit of the component) and passes after it: the copy stays 80 px
tall, takes the new fill, keeps the component's width and gets no geometry
override. Full common passes lint, JVM, JavaScript and formatting: JVM 2078
tests / 33886 assertions; JavaScript 2014 / 32497. All six component
properties pass 40 programs each at seed 712 in both runtimes.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.895     0.50
Main into 100 copies         15.415     9.268     0.60
Main into 1000 copies       153.086    91.733     0.60
Three nesting levels         35.215    18.542     0.53
Dependency chain             68.931    37.663     0.55
Library update               83.083    44.259     0.53
Many plain shapes             4.837     2.206     0.46
Variant switch               32.052    20.658     0.64

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
e94b3c19bf ✨ Carry grid cell overrides between identical variant grids
A switch carries a copy's overrides when the old and new mains agree on the
original value, but grid cells never carried: a copy that moved a child to
another cell lost the move on every switch, even between variants with the
same grid.

Carry a switched grid's touched cells when the old main and the new copy
have the same tracks and the same cells holding corresponding children
(compared by child path). Children and cells take their ids in the new
copy; the cells group stays touched. A different grid keeps the new
variant's cells. The switched board joins the boards whose layout updates.

The two regressions fail before the change and pass after it: a move to row
2, column 2 survives a switch to an identical grid, and a switch to a
three-column grid takes that variant's cells. Full common passes lint, JVM,
JavaScript and formatting: JVM 2076 tests / 33907 assertions; JavaScript
2012 / 32502. All six component properties pass 40 programs each at seed
712 in both runtimes.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     1.003     0.56
Main into 100 copies         15.415     9.979     0.65
Main into 1000 copies       153.086   102.913     0.67
Three nesting levels         35.215    21.423     0.61
Dependency chain             68.931    36.376     0.53
Library update               83.083    46.632     0.56
Many plain shapes             4.837     2.303     0.48
Variant switch               32.052    21.650     0.68

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
15f654aa1d 🐛 Add a grid track to a board built without track lists
The schema and the file builder accept a grid board without
`:layout-grid-rows` or `:layout-grid-columns`. Adding a child to such a
board assigns it a cell, which adds a first track to a nil list, and
`d/add-at-index` asserts on anything but a vector, so the edit crashed.

Start a missing track list from an empty one.

The regression asserts before the fix and passes after it: the child gets
row 1, column 1 and each list one default track. Full common passes lint,
JVM, JavaScript and formatting: JVM 2076 tests / 33907 assertions;
JavaScript 2012 / 32502.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     1.003     0.56
Main into 100 copies         15.415     9.979     0.65
Main into 1000 copies       153.086   102.913     0.67
Three nesting levels         35.215    21.423     0.61
Dependency chain             68.931    36.376     0.53
Library update               83.083    46.632     0.56
Many plain shapes             4.837     2.303     0.48
Variant switch               32.052    21.650     0.68

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
2a71cf0292 🐛 Place a reset nested copy where its main puts it
Reset syncs a copy head as the root of its own sync, and sync aligns the
main with that root, so the root keeps its position. That is right for a
top copy, whose position is its own. A nested head's placement inside its
parent belongs to the parent's main: resetting a moved nested head cleared
its geometry override and left it moved, untouched and different from its
main.

After the reset, place a nested head's subtree through a sync of the head
that owns its ref, taking only placement attributes. That sync reads the
loaded main, so it runs only when the reset clears a geometry override: a
head whose geometry was not overridden already holds the placement it
accepted, and placing it again gave a head whose only override was its
opacity a pending, unaccepted 45-degree turn of its library main.

Re-runs of the seed-20261101 library and library dependency properties
found both cases. The regressions fail before the fix and pass after it:
the head and its child return to their positions, undo restores the move,
and the pending turn stays out.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.996     0.56
Main into 100 copies         15.415     9.366     0.61
Main into 1000 copies       153.086    97.895     0.64
Three nesting levels         35.215    19.167     0.54
Dependency chain             68.931    38.467     0.56
Library update               83.083    46.702     0.56
Many plain shapes             4.837     3.332     0.69
Variant switch               32.052    22.433     0.70

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:45 +01:00
alonso.torres
a44321fc4d 🐛 Refuse an update main that would nest a component inside itself
Nesting, duplicating and swapping refuse to put a component inside itself;
updating a main from a copy did not. A swap inside a variant's main reaches,
through sync, a copy of the swap's new component whose slot was switched to
that variant, so the copy holds its own component two levels down. Pushing
that copy into its main made each main hold the other, and the sync cascade
never settled.

Add update-main-nesting-loop?: the copy holds a copy of its component, or of
a component whose main holds one. An update main it matches changes
nothing, and the generator skips such targets as it skips looping swaps.

A fresh JVM library run (seed 20261101) found this: sync did not settle
after 200 passes. The regression fails before the fix (sync does not
settle) and passes after it: the update leaves the files unchanged and the
program runs. The full common JVM suite passes at seed 712: 2068 tests /
33874 assertions.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.898     0.50
Main into 100 copies         15.415     8.836     0.57
Main into 1000 copies       153.086    88.060     0.58
Three nesting levels         35.215    18.841     0.54
Dependency chain             68.931    37.993     0.55
Library update               83.083    43.555     0.52
Many plain shapes             4.837     2.206     0.46
Variant switch               32.052    20.015     0.62

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
81fc3008b3 🐛 Flip one axis when a reflection turns both edges a right angle
A transform finds a reflection by comparing each edge with its image: a
reversed edge toggles that axis's flip and negates the rotation. A mirror
at 45 degrees to the edges turns both edges by a right angle, so neither
reverses. Flipping a shape rotated by an odd multiple of 45 degrees left
its flags and rotation unflipped while its transform was mirrored, or set
both flags, which describe a turn.

Tell a reflection by the reversed orientation of the edges. A reflection
flips exactly one axis; when neither edge reverses, flip the one that keeps
the final rotation along the new x edge. Without area, keep comparing
edges alone.

A fresh JVM swap run (seed 20261101) found this: a rotated, switched board
was flipped, and its copies later failed I4 on rotation. The regression
fails at 45, 135, 225 and 315 degrees on both axes before the fix and
passes after it. The full common JVM suite passes at seed 712: 2067 tests /
33827 assertions.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.910     0.51
Main into 100 copies         15.415     9.264     0.60
Main into 1000 copies       153.086    91.084     0.59
Three nesting levels         35.215    18.132     0.51
Dependency chain             68.931    35.513     0.52
Library update               83.083    43.320     0.52
Many plain shapes             4.837     2.291     0.47
Variant switch               32.052    20.011     0.62

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
7f1edd5659 🐛 Keep a stale nested copy's size when its main is reflected
Reflecting a shape re-decomposes the flip flags of the copy heads under it
by placing them through a sync proposal from their mains. Its docstring
promises to stay within existing geometry, but the proposal also carries a
pending size of the copy's library main. A dependent library main nesting
a copy of an upstream main whose width changed took that width when the
dependent main was flipped, before the update was accepted.

Settle reflected heads only on the shapes whose footprint the proposal
keeps. Untouched swapped heads after a parent turn still take the proposal
whole, since their content may differ in size from their position.

A fresh JVM library-dependency run (seed 20261101) found this: a 0.01 px
nested frame became 160 px wide (I4). The program regression fails before
the fix and passes after it. The source, oracle, expected-geometry, reset,
sync, swap-group and composable namespaces pass at seed 712: 330 tests /
3729 assertions.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.944     0.53
Main into 100 copies         15.415     9.742     0.63
Main into 1000 copies       153.086    91.886     0.60
Three nesting levels         35.215    18.344     0.52
Dependency chain             68.931    36.790     0.53
Library update               83.083    45.517     0.55
Many plain shapes             4.837     2.256     0.47
Variant switch               32.052    20.228     0.63

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
b14cec3c4f 🐛 Sync a swap back inside a copy of a deleted component
Swapping or switching a nested copy back to its slot's own component makes
it a plain copy of its position, and the swap syncs it through the copy head
that owns that position, so it takes the position's overrides. The head was
looked up among live components only. Inside a copy of a deleted component
no head was found, and the restored copy kept the new component's values
while its untouched position held others.

Look the head up with deleted components included, as the direct sync it
calls already does.

A fresh JVM library run (seed 20261031) found this: a switched-back board
lost an authored fill to the variant's white (I4). The direct regression
fails its fill assertion before the fix (#FFFFFF for #333333) and passes
after it.

Full common passes lint, JVM, JavaScript and formatting: JVM 2065 tests /
33858 assertions; JavaScript 2001 / 32461. All six component properties pass
40 programs each at seed 712 in both runtimes. Full rebuilt frontend passes
1799 / 16286. Backend passes 1838 / 9293; exporter passes 16 / 40. Consumer
lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.935     0.52
Main into 100 copies         15.415     9.267     0.60
Main into 1000 copies       153.086    85.839     0.56
Three nesting levels         35.215    17.833     0.51
Dependency chain             68.931    35.026     0.51
Library update               83.083    43.812     0.53
Many plain shapes             4.837     2.182     0.45
Variant switch               32.052    20.841     0.65

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
9dc405b65e 🐛 Cancel a nested copy's parent turn in update main
Update main turned a copy back into its main's frame only when the copy
root authored no geometry. A nested copy that inherited its parent's turn
and then authored a resize still pushed the turn into its main, and sync
composed it again: 45 degrees became 90.

Sync composes a nested copy root with its parent's turn, so cancel exactly
that turn, relative to the main's parent, whatever the root authors. A
top-level copy root keeps the existing rule: it owns its turn only when it
authors its geometry.

The shrunk library program fails I9 before the fix and passes unchanged
after it; the earlier inherited-turn regression still passes. Goldens are
unchanged.

Full suites ran on the tree with the fixture fix, this update-main fix and
the grid rollout. Common JVM passes 2061 tests / 33765 assertions; JavaScript
passes 1997 / 32400; common lint and formatting pass. All six component
properties pass 40 programs each at seed 712 in both runtimes. Full rebuilt
frontend passes 1798 / 16138. Backend passes 1838 / 9293; exporter passes
16 / 40; consumer lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.866     0.48
Main into 100 copies         15.415     8.393     0.54
Main into 1000 copies       153.086    85.279     0.56
Three nesting levels         35.215    17.172     0.49
Dependency chain             68.931    34.199     0.50
Library update               83.083    42.833     0.52
Many plain shapes             4.837     2.064     0.43
Variant switch               32.052    19.599     0.61

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
80b65c8dbb 🐛 Author a pushed swap's constraints against its own main
Update main of a swap pushed into a main makes the swap a plain nested copy
of its own component. It kept the constraints of its old position, such as
an authored fixed scroll, without marking them as overrides, so the next
sync from its own main would reset them.

Mark the constraints group when the old position's constraints differ from
the new main's, as orientation already is. The update-main model predicts
the same from the swapped head before the update.

A fresh-seed JVM library run found this. Its shrunk program fails I4
before the fix and passes unchanged after it. Goldens are unchanged.

Full suites ran once on the tree with this fix and the related fixes that
follow it. Common passes lint, JVM, JavaScript and formatting: JVM 2059
tests / 33770 assertions; JavaScript 1995 / 32377. All six component
properties pass 40 programs each at seed 712 in both runtimes. Full rebuilt
frontend passes 1798 / 15737. Backend passes 1838 / 9293; exporter passes
16 / 40; consumer lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.895     0.50
Main into 100 copies         15.415     8.623     0.56
Main into 1000 copies       153.086    86.717     0.57
Three nesting levels         35.215    17.928     0.51
Dependency chain             68.931    35.381     0.51
Library update               83.083    43.344     0.52
Many plain shapes             4.837     2.118     0.44
Variant switch               32.052    18.854     0.59

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
d3f073fe82 🐛 Keep an inherited turn out of update main
A nested copy inside a turned parent inherits that turn as placement. Update
main pushed it into the copy's main as if the copy had authored it, and the
copy then composed the turn twice: 45 degrees became 90.

When the copy root does not author its geometry, turn the copy subtree back
into the main's frame before pushing its values. A root rotation the user
authored is still pushed as before.

A fresh-seed JVM structure run found this. The shrunk program fails I9
before the fix and passes unchanged after it, with the main unturned and
the copy at its original 45 degrees. Goldens are unchanged.

Full suites ran once on the tree with this fix and the related fixes that
follow it. Common passes lint, JVM, JavaScript and formatting: JVM 2059
tests / 33770 assertions; JavaScript 1995 / 32377. All six component
properties pass 40 programs each at seed 712 in both runtimes. Full rebuilt
frontend passes 1798 / 15737. Backend passes 1838 / 9293; exporter passes
16 / 40; consumer lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.876     0.49
Main into 100 copies         15.415     8.403     0.55
Main into 1000 copies       153.086    85.661     0.56
Three nesting levels         35.215    17.327     0.49
Dependency chain             68.931    37.617     0.55
Library update               83.083    46.058     0.55
Many plain shapes             4.837     2.174     0.45
Variant switch               32.052    20.413     0.64

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
c1be7835ff 🐛 Keep float noise out of switch geometry overrides
A variant switch carried geometry from the old copy when it differed from
the new copy, using exact equality. A copy turned like its new main, equal
up to 1e-14 after placement, kept a phantom geometry override.

Compare the carried points, selrect, size and rotation with float tolerance
before writing them. Other attributes keep exact comparison, and the
position data reset still writes its nil.

A random common JavaScript library run found this; its shrunk switch
program fails I2 before the fix and passes unchanged after it. Switch,
sync and golden suites pass; goldens are unchanged.

Full suites ran once on the tree with this fix and the related fixes that
follow it. Common passes lint, JVM, JavaScript and formatting: JVM 2059
tests / 33770 assertions; JavaScript 1995 / 32377. All six component
properties pass 40 programs each at seed 712 in both runtimes. Full rebuilt
frontend passes 1798 / 15737. Backend passes 1838 / 9293; exporter passes
16 / 40; consumer lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.897     0.50
Main into 100 copies         15.415     8.750     0.57
Main into 1000 copies       153.086    83.056     0.54
Three nesting levels         35.215    17.460     0.50
Dependency chain             68.931    33.955     0.49
Library update               83.083    43.915     0.53
Many plain shapes             4.837     2.075     0.43
Variant switch               32.052    19.674     0.61

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
9eda12b819 🐛 Place copy children through the constraints they author
Resizing a copy placed its children through their own constraints, but sync
then placed them again through the constraints of the main children they
pair with. A child that authored a scale, right or left-right constraint
went back to the main's left placement on the next sync, while partial sync
kept the resized result.

When sync places the main subtree like a resized copy, resize the main
children with the constraints their copy children author. The swapped head
placement step takes the head's authored constraints the same way. The
generated oracle predicts copy child geometry with the same rule.

A random common JavaScript structure run found this. Its shrunk program
fails I4 against the old oracle and I6 against the old sync. The direct
regression fails three of 15 assertions before the fix: each authored
constraint places the child on resize, and sync moves it back. Both pass
unchanged after the fix. Goldens are unchanged.

Full common passes lint, JVM, JavaScript and formatting: JVM 2054 tests /
33757 assertions; JavaScript 1990 / 32348. All six component properties pass
40 programs each at seed 712 in both runtimes. Full rebuilt frontend passes
1798 / 15737. Backend passes 1838 / 9293 (a pool-statistics race failed once
and passed on rerun); exporter passes 16 / 40. Consumer lint and formatting
pass. The final nil filter on authored constraints ran in the focused sync,
geometry and golden suites after the full runs.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.885     0.49
Main into 100 copies         15.415     8.615     0.56
Main into 1000 copies       153.086    87.402     0.57
Three nesting levels         35.215    18.043     0.51
Dependency chain             68.931    35.277     0.51
Library update               83.083    43.810     0.53
Many plain shapes             4.837     2.070     0.43
Variant switch               32.052    19.557     0.61

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
05c08b9e9a 🐛 Read a missing grid direction as row everywhere
A grid without a direction assigned children column-first and grew rows,
while grid creation, the direction event, the WASM renderer and CSS export
read it as a row grid. The library file builder decodes the direction as
optional, so imported files can lack it. Picking "column" on such a grid
then swapped auto-placed children.

Add grid-direction, which defaults to row, and use it for cell order, track
growth, track fitting and the direction event. The generated oracle predicts
the same flow order.

The builder regressions fail three of six assertions before the fix; the
real-event component regression fails six of 293, with main and copies
grown to 3x2 instead of 2x3. Both pass unchanged after the fix, including
exact undo and redo. The fitting flow-order control's missing-direction case
now expects row order.

Full frontend passes 1798 tests / 15737 assertions; common JVM passes
2052 / 33613. Backend passes 1838 / 9293; exporter passes 16 / 40. Lint
and formatting pass for common, backend and exporter; frontend lint and
changed-file formatting pass. Common JavaScript fails only in two random-seed
component properties. Both shrunk programs fail the same way without this
change and are fixed separately.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.961     0.54
Main into 100 copies         15.415     8.816     0.57
Main into 1000 copies       153.086    94.309     0.62
Three nesting levels         35.215    19.435     0.55
Dependency chain             68.931    37.850     0.55
Library update               83.083    45.747     0.55
Many plain shapes             4.837     2.153     0.45
Variant switch               32.052    20.254     0.63

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
93df1d680a 🐛 Fit overridden grid cells when inherited tracks shrink
Removing a main grid track left overridden copy cells beyond their inherited
track lists. Follow the main's untouched track count, move or shorten
affected cells, and retain cell identity, alignment and other metadata.
Explicit copy track overrides keep their own lists.
Record the agreed ownership rule in the component sync contract.

Fit occupied cells before empty defaults, preserve placements that fit and
retain empty authored areas when space remains. Resolve collisions without
overlap. If no distinct slot remains, combine children in the retained cell
using its properties and a manual position so assignment keeps every child.
Reconcile before assignment, then fit overflow back into inherited tracks.
Keep the existing minimum track rule for participating children and leave
the normal non-shrinking path in place.

The portable regression fails eight of 60 assertions before the fix; the
real-event frontend regression fails one of 18. Both pass unchanged after
the fix, including exact undo and redo. Additional controls cover spans,
explicit track overrides, collisions, empty areas/grids, repeated sync and
existing row/column/absent-direction ordering. Goldens are unchanged.

Browser data checks pass 32 assertions across maps, records and actual
ShapeProxy values with WASM initialized. They preserve app state and check
data/proxy behavior, not pointer events or visual rendering.

Full frontend passes 1797 tests / 15707 assertions; common JVM passes
2050 / 33660. Backend passes 1838 / 9293; exporter passes 16 / 40. Consumer
lint and formatting pass. All targeted layout/sync checks pass, including
the final 99-test / 725-assertion flow-order run.

Full common JavaScript passes 1986 tests / 32311 assertions. Common lint
and formatting pass. All six component properties pass 40 programs each
at seed 712 in both runtimes. No fresh 5000-program gate ran.

Frontend lint and changed-file format pass. Full frontend format retains
two existing alignment errors in the unchanged plugin library test.

The isolated component benchmark passes all eight worlds with no regression
flags. Compare lower-quantile milliseconds with the saved baseline; keep
that baseline unchanged. The machine/JVM warning makes ratios rough.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.919     0.51
Main into 100 copies         15.415     9.640     0.63
Main into 1000 copies       153.086    97.121     0.63
Three nesting levels        35.215    19.225     0.55
Dependency chain            68.931    36.700     0.53
Library update              83.083    44.976     0.54
Many plain shapes            4.837     3.433     0.71
Variant switch              32.052    20.612     0.64

AI-assisted-by: gpt-6
2026-11-10 20:21:42 +01:00
alonso.torres
2638dd3d63 🐛 Preserve unflipped group flags during regrouping
Regrouping rewrote nil or absent flip flags as false. Component sync then
failed exact whole-file undo even when group geometry returned correctly.
Keep the original value and key presence when both the old and recalculated
axis are unflipped. Continue recalculating real flips.

The independent geometry regression fails eight of 30 assertions before the
fix. It and the retained-group-frame sync control now pass unchanged,
including exact whole-file undo and redo. Browser data checks pass 90
assertions across maps, records and ShapeProxy objects; the browser uses
SVG, so this does not claim an initialized WASM render check.

Refresh only case AM's three common and three frontend golden digests.
Reviewed state changes contain only false-to-nil group flip values; geometry
and touched values are unchanged. No comparison tolerance changes.

Validate the combined tree with the F256/F257 fixture corrections, committed
separately next. Full frontend passes 1793 tests / 15589 assertions; backend
passes 1838 / 9293 and exporter 16 / 40. Consumer lint/format and frontend
lint pass. Full frontend format still reports two existing alignment errors
in the unchanged plugin library test.

Full common JVM passes 2043 tests / 33558 assertions and JavaScript passes
1979 / 32265. Common lint and format pass. All six generated component
properties pass 40 programs each at seed 712 in both runtimes. No fresh
5000-program gate ran.

The isolated component benchmark passes without regression flags. Compare
lower-quantile milliseconds with the existing baseline; do not replace it.
The benchmark warns that the machine/JVM differs, so ratios are rough.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.996     0.56
Main into 100 copies         15.415    10.043     0.65
Main into 1000 copies       153.086    99.513     0.65
Three nesting levels        35.215    21.189     0.60
Dependency chain            68.931    36.537     0.53
Library update              83.083    46.847     0.56
Many plain shapes            4.837     2.479     0.51
Variant switch              32.052    19.992     0.62

AI-assisted-by: gpt-6
2026-11-10 20:21:42 +01:00