A nested head whose parent is a swapped layout head kept its authored
layout sizing after a reset: the reset pairs the parent with the ref's
parent through the parent's shape-ref, and a swapped head refers to its
position, not to the main of its own component. A later sync of that head
then gave the child its main's sizing. The reset now also pairs a parent
that is a copy of the component whose main root holds the ref.
Test: resetting-a-nested-copy-of-a-swapped-layout-head-restores-its-sizing
(the variant gate program of round 12, seed 371855618). Composable
generated, reset and swap group tests: 433 tests, 0 failures.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.1 | 20.737 | 0.57 |
| edit-through-a-chain-of-dependents | 68.931 | 40.911 | 41.855 | 0.59 |
| library-update-into-copies | 83.083 | 47.542 | 52.797 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.495 | 2.627 | 0.52 |
| main-edit-into-10-copies | 1.79 | 0.99 | 1.045 | 0.55 |
| main-edit-into-100-copies | 15.415 | 9.458 | 9.877 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 97.254 | 101.408 | 0.64 |
| variant-switch-into-copies | 32.052 | 20.235 | 21.101 | 0.63 |
AI-assisted-by: claude-opus-5-5
When a copy resizes or turns a main that fills or hugs in a layout, the
update main pushed the size, the layout gave the main its own size back,
and the copy followed and lost its size. When the copy shape authors its
geometry, the push now fixes each fill or auto axis it changes, on both
axes when it turns the shape in its parent, as a resize of a fill child
does in the editor. The main and the copy take the same sizing; a shape
that is not a layout drops it, which leaves it fixed like its copies. A
sizing the copy authors is pushed as it is. A shape the copy does not
resize, such as a fill child that a copy's grid padding resizes, keeps
its sizing: the main's layout gives it the same size.
Tests: updating-a-fill-main-from-a-resized-copy-fixes-the-main-size,
updating-a-turned-fill-main-from-its-copy-fixes-the-main-size (the
variant gate programs of round 11, seeds 252148030 and 333977410),
updating-a-main-with-a-turned-copy-keeps-the-fill-of-its-laid-out-children
and updating-a-main-whose-copy-padding-resized-a-fill-child-keeps-its-fill
(round 12, seed 333977410).
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.989 | 21.843 | 0.6 |
| edit-through-a-chain-of-dependents | 68.931 | 42.083 | 43.11 | 0.61 |
| library-update-into-copies | 83.083 | 54.201 | 55.537 | 0.65 |
| main-edit-among-many-shapes | 4.837 | 2.43 | 2.533 | 0.5 |
| main-edit-into-10-copies | 1.79 | 1.047 | 1.117 | 0.58 |
| main-edit-into-100-copies | 15.415 | 11.084 | 11.219 | 0.72 |
| main-edit-into-1000-copies | 153.086 | 101.1 | 110.921 | 0.66 |
| variant-switch-into-copies | 32.052 | 22.903 | 23.542 | 0.71 |
AI-assisted-by: claude-opus-5-5
When update-main pushes a swap into a nested copy in the main, and the
position there holds the same component, the pushed head becomes a plain
copy of that position, and its children already follow the position. The
head itself kept the size of the pushed copy with no geometry override, so
a later sync would resize it. It now takes the position's size about its
first corner, unless the child it replaces authored its geometry, as a
switch back to the position already does.
Test: updating-a-main-with-a-swap-to-its-position-component-gives-the-head-
the-positions-size, the variant gate program of round 11 (seed 371855618).
Common suite: 2419 tests, 0 failures.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.869 | 23.349 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 43.052 | 43.454 | 0.62 |
| library-update-into-copies | 83.083 | 50.967 | 52.007 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.149 | 2.267 | 0.44 |
| main-edit-into-10-copies | 1.79 | 1.067 | 1.097 | 0.6 |
| main-edit-into-100-copies | 15.415 | 10.265 | 10.455 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 102.631 | 107.51 | 0.67 |
| variant-switch-into-copies | 32.052 | 22.374 | 23.098 | 0.7 |
AI-assisted-by: claude-opus-5-5
When a swap or variant switch puts back the component of a nested copy's
position, the copy syncs from that position through the head that owns its
ref. That synced the whole head, so a library update the file had not
accepted yet reached the head and its other shapes. The sync now walks
from the head down to the restored copy without syncing the shapes above
it, and syncs that copy and its children only.
Test: swapping-back-leaves-the-pending-changes-of-the-enclosing-copy. The
stale-library gate program of round 11 (seed 333977410) now passes.
Common suite: 2418 tests, 0 failures.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.325 | 20.569 | 0.55 |
| edit-through-a-chain-of-dependents | 68.931 | 38.847 | 42.534 | 0.56 |
| library-update-into-copies | 83.083 | 49.953 | 52.408 | 0.6 |
| main-edit-among-many-shapes | 4.837 | 2.199 | 2.399 | 0.45 |
| main-edit-into-10-copies | 1.79 | 0.991 | 1.026 | 0.55 |
| main-edit-into-100-copies | 15.415 | 9.382 | 9.919 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 95.894 | 97.773 | 0.63 |
| variant-switch-into-copies | 32.052 | 20.747 | 21.216 | 0.65 |
AI-assisted-by: claude-opus-5-5
The same-name combine tests that develop added build their file with the
`tho` alias, which this branch's variant workspace tests name `ctho`, so
the frontend test run stopped with a ReferenceError there.
Harness only; the benchmark is not run.
Also in this commit:
- Re-record the combine golden master for unique variant values. Combining two
components whose names leave no value gives the second variant "Value 2" where
it had an empty value, since develop's fix for same-name combines (#12881).
Case au records that combine, so its two variants are recorded again on
purpose; no other case changes.
AI-assisted-by: claude-opus-5-5
Combining same-name components as variants gives each one the first
unused "Value N", in the order the mains enter the variant container.
`generate-combine-as-variants` moved all the remaining mains in one
relocation, which takes them in layer order, so the values followed the
layers and not the combine order. It now moves them one at a time, in
the order of the ids, as the frontend combine on develop does.
Test: `test-combine-as-variants-same-name-values-follow-combine-order`.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.749 | 21.213 | 0.59 |
| edit-through-a-chain-of-dependents | 68.931 | 40.771 | 41.457 | 0.59 |
| library-update-into-copies | 83.083 | 50.674 | 51.835 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 1.967 | 2.133 | 0.41 |
| main-edit-into-10-copies | 1.79 | 1.039 | 1.059 | 0.58 |
| main-edit-into-100-copies | 15.415 | 9.153 | 9.626 | 0.59 |
| main-edit-into-1000-copies | 153.086 | 93.347 | 99.626 | 0.61 |
| variant-switch-into-copies | 32.052 | 21.86 | 22.36 | 0.68 |
AI-assisted-by: claude-opus-5-5
The frontend's component swap, which a variant switch uses too, sends a
layout update for the parents the swap returns and for the new subtree.
The harness swap and switch nodes reflowed nothing, so a switch in a page
copy of a flex main left a sibling of the switched head in its old place,
and the next move of that sibling took the layout's correction as its own
geometry override.
The swap and switch nodes now reflow the layouts among those parents and the
new subtree. They do not mark the changes for the runner's pass over every
layout after sync, which the frontend does not do for a swap.
Generated regression: a four-step nest, switch, duplicate and move program
that failed I2 (seed 159775967, round 9) now passes.
Golden masters af and ak recorded again on purpose: they start with a swap
in a grid copy, whose two children now take their cells instead of the
stale place they had; the main a later update-main pushes them into
follows. Only geometry changes.
Harness only; the benchmark is not run.
Also in this commit:
- Draw 50 programs in each random composition coverage test. The seven random
composition tests check that every operation kind supplies its share of
meaningful changes. With 20 programs some seeds draw too few steps whose
precondition holds (a redo with an undone library change, a grid direction on
a grid, a resize that changes anything), so the suite failed now and then
although every program passed. The four seeds that failed pass with 50
programs.
AI-assisted-by: claude-opus-5-5
When update-main pushes a swap into a nested copy in the main, and the
position there holds the same component, the pushed head becomes a plain
copy of that position. Its content differences become overrides while its
placement follows the position, but its descendants kept the places of the
pushed copy with no geometry override, so a later sync would move them.
They now take the places the position gives them, except the subtrees that
author their own geometry.
Generated regression: an eleven-step add-variant, switch and update-main
program that failed I4 (seed 256567394, round 8) now passes, as does the
original program.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 23.622 | 27.685 | 0.67 |
| edit-through-a-chain-of-dependents | 68.931 | 48.952 | 50.286 | 0.71 |
| library-update-into-copies | 83.083 | 54.647 | 59.195 | 0.66 |
| main-edit-among-many-shapes | 4.837 | 3.23 | 3.376 | 0.67 |
| main-edit-into-10-copies | 1.79 | 1.152 | 1.196 | 0.64 |
| main-edit-into-100-copies | 15.415 | 11.605 | 11.945 | 0.75 |
| main-edit-into-1000-copies | 153.086 | 110.919 | 114.366 | 0.72 |
| variant-switch-into-copies | 32.052 | 24.905 | 26.59 | 0.78 |
AI-assisted-by: claude-opus-5-5
The model of an update main turns the pushed geometry of a copy shape
out of the orientation its copy root or parent inherits. A mirrored
shape can store the opposite of its transform's turn as its rotation,
and the model turned that stored value as if it were the turn: a Board
storing 315 with a vertical flip, inside a copy root turned 45, was
expected at 270 in the main, where its transform is unturned.
The pushed geometry is now reoriented with the turn sign of the copy
shape, as the model already does for a parent's orientation.
Harness only; the benchmark is not run.
Also in this commit:
- Leave shapes below an authored swap out of a switch's old copy map. The switch
model matches each old copy shape with its path in the old main by its ref
chain. A swapped Board whose component holds a copy of the switched copy's own
component reaches the old main's root through that nested copy, so the nested
copy took the root's path and its turn override replaced the root's. The
shapes below an authored swap belong to the swapped component and are left out
of the map.
AI-assisted-by: claude-opus-5-5
A copy text can hold a typography file without a typography id, which
the reference rule counts as a typography override. A switch carried it,
and merging the overrides then dropped the reference, since no unit the
typography sets was carried. The merged content showed the letters and
styles of the new copy and differed from it only by nil typography keys,
yet the switch wrote it and marked the content group touched with no
text group behind it.
A text content the switch would carry is now compared with the new
copy's by its letters and styles, and one that differs in none is not
carried.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.246 | 20.089 | 0.55 |
| edit-through-a-chain-of-dependents | 68.931 | 38.107 | 39.639 | 0.55 |
| library-update-into-copies | 83.083 | 46.922 | 48.603 | 0.56 |
| main-edit-among-many-shapes | 4.837 | 1.958 | 2.141 | 0.4 |
| main-edit-into-10-copies | 1.79 | 0.99 | 1.079 | 0.55 |
| main-edit-into-100-copies | 15.415 | 9.335 | 9.733 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 92.647 | 96.02 | 0.61 |
| variant-switch-into-copies | 32.052 | 20.358 | 20.802 | 0.64 |
AI-assisted-by: claude-opus-5-5
A variant switch carries a copy child's rotation, with the old copy's
transform, and each of its flips as separate attributes, each only where
both variants agree on it. When the variants agreed on a flip but not on
the turn, the flip flag carried while the transform and the corners stayed
the new copy's; when they agreed on the turn but not on a flip, the old
transform replaced the new variant's flip. Either way the stored rotation
and flips no longer described the transform.
When the switch carries a turn or a flip, it now gives the child the
transform and the corners that the resulting turn and flips compose, the
turn before or after the flips as is nearer the old copy's axes.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.732 | 23.882 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 46.7 | 49.116 | 0.68 |
| library-update-into-copies | 83.083 | 53.926 | 57.074 | 0.65 |
| main-edit-among-many-shapes | 4.837 | 3.051 | 3.358 | 0.63 |
| main-edit-into-10-copies | 1.79 | 1.147 | 1.188 | 0.64 |
| main-edit-into-100-copies | 15.415 | 11.482 | 12.261 | 0.74 |
| main-edit-into-1000-copies | 153.086 | 114.523 | 124.586 | 0.75 |
| variant-switch-into-copies | 32.052 | 24.252 | 25.701 | 0.76 |
AI-assisted-by: claude-opus-5-5
A sync places a resized copy's subtree under the synced parent with its
old placement. When the sync has just given that parent the grid of a
new main, as after a swap, its children are still the old ones and the
grid has no cells for them, so the layout of the placement failed on an
in-flow child without a cell.
The parent used for that placement now assigns cells to the children
the sync left.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.154 | 21.936 | 0.57 |
| edit-through-a-chain-of-dependents | 68.931 | 39.517 | 41.605 | 0.57 |
| library-update-into-copies | 83.083 | 49.772 | 51.257 | 0.6 |
| main-edit-among-many-shapes | 4.837 | 2.167 | 2.466 | 0.45 |
| main-edit-into-10-copies | 1.79 | 1.008 | 1.062 | 0.56 |
| main-edit-into-100-copies | 15.415 | 10.197 | 11.064 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 102.045 | 108.458 | 0.67 |
| variant-switch-into-copies | 32.052 | 21.435 | 22.715 | 0.67 |
AI-assisted-by: claude-opus-5-5
A switch carries a child's override only where the old and the new
variant agree on the attribute. It compared them after turning the old
main's shapes by the turn from the new main to the new copy. When the
variants' mains are turned or flipped differently, the old main's child
took that foreign turn: it could agree with the new copy child where the
variants differ, carrying a flip or turn without its transform and
marking an override, and could disagree where they share a value.
The old main's shapes now turn by the turn from the old main to the old
copy, the frame the new copy keeps.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.875 | 21.479 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 38.173 | 40.003 | 0.55 |
| library-update-into-copies | 83.083 | 48.724 | 51.431 | 0.59 |
| main-edit-among-many-shapes | 4.837 | 2.134 | 2.372 | 0.44 |
| main-edit-into-10-copies | 1.79 | 0.936 | 0.978 | 0.52 |
| main-edit-into-100-copies | 15.415 | 8.966 | 9.425 | 0.58 |
| main-edit-into-1000-copies | 153.086 | 91.951 | 97.661 | 0.6 |
| variant-switch-into-copies | 32.052 | 21.553 | 22.054 | 0.67 |
AI-assisted-by: claude-opus-5-5
Pushing a swap into a main adds main shapes for the swap's children.
The model kept a child's authored geometry in the frame of its copy, so
a flip the child shows only through a flipped copy stayed in the
expected main shape, which production places unflipped. The model now
turns and flips that geometry from the copy parent's frame to the new
main parent's, as it does for main shapes the push keeps.
Harness only; the benchmark is not run.
Also in this commit:
- Drop the main's typography a pushed text style mixes in the model. A copy text
that overrides some styles of a typography, but not the typography, has no
typography. Pushing it into a main text that applies a typography drops that
typography in production, as the main then takes those styles from both sides.
The model kept the main's typography; it now records the pushed content for
the typography group in that case.
AI-assisted-by: claude-opus-5-5
A grid copy took one of its children out of the flow (absolute
position) and changed its own width. Resetting it gave the child back
its main's position, which puts it in the flow, while the copy's cells
had no room for it, and placing the resized copy's subtree failed in
the grid layout. The layout child attributes a sync copies onto the
children did not assign the grid's cells again, and that placement read
the grid as it was before the sync, with its old cells.
The grid now assigns its cells again when a synced child enters or
leaves its flow, and the placement takes the synced parent with only
its old placement.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 18.907 | 19.891 | 0.54 |
| edit-through-a-chain-of-dependents | 68.931 | 42.713 | 43.599 | 0.62 |
| library-update-into-copies | 83.083 | 51.226 | 52.74 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.266 | 2.385 | 0.47 |
| main-edit-into-10-copies | 1.79 | 0.954 | 0.986 | 0.53 |
| main-edit-into-100-copies | 15.415 | 9.427 | 9.984 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 94.804 | 102.222 | 0.62 |
| variant-switch-into-copies | 32.052 | 22.513 | 22.828 | 0.7 |
AI-assisted-by: claude-opus-5-5
A copy of a hidden variant sits in a grid without a cell, as a hidden
child takes no part in the grid's flow. Switching it to a shown variant
put the parent's cells back as they were, so the shown head had no cell
and the next reflow of the grid failed.
The switch now assigns the parent grid's cells again when the new head
enters or leaves the flow, as a sync of the head does.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.977 | 21.701 | 0.57 |
| edit-through-a-chain-of-dependents | 68.931 | 39.77 | 41.277 | 0.58 |
| library-update-into-copies | 83.083 | 52.24 | 53.439 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.095 | 2.487 | 0.43 |
| main-edit-into-10-copies | 1.79 | 0.962 | 1.002 | 0.54 |
| main-edit-into-100-copies | 15.415 | 9.465 | 10.586 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 104.614 | 107.085 | 0.68 |
| variant-switch-into-copies | 32.052 | 22.023 | 22.427 | 0.69 |
AI-assisted-by: claude-opus-5-5
A copy swapped two adjacent children of its main, and update-main
deleted both main children and added their replacements. Undoing it
put the main's children back out of order. Each restore was recorded at
the shape's position in the original state, as the update-main builder
does not apply its changes locally; the undo restores in reverse order,
so the second deleted sibling came back at a position counted with the
first still in place.
Without the builder's local objects, a restore now takes the position
the shape had when the batch deleted it, as the earlier changes leave
its parent.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.018 | 22.34 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 42.507 | 43.3 | 0.62 |
| library-update-into-copies | 83.083 | 47.544 | 49.173 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.058 | 2.319 | 0.43 |
| main-edit-into-10-copies | 1.79 | 0.977 | 1.075 | 0.55 |
| main-edit-into-100-copies | 15.415 | 9.676 | 10.209 | 0.63 |
| main-edit-into-1000-copies | 153.086 | 104.546 | 108.771 | 0.68 |
| variant-switch-into-copies | 32.052 | 19.974 | 22.679 | 0.62 |
AI-assisted-by: claude-opus-5-5
A copy root turned with its parent held a swapped child that authored
its geometry, and update-main pushed the swap into the main. The child
showed no turn against its root, so the main's new shape took none.
The update-main model moved a pushed swap's geometry into the main's
frame only when its turn differed from the one the main would give it;
when the turns agreed it kept the copy's authored geometry, turned with
the copy root, and expected that turn in the main.
A pushed swap that authors its geometry now pushes it in the frame of
its main.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A nested grid copy with its own cells, switched to a variant with an
identical grid, carries those cells onto the new copy. Its children
kept the new main's order, so they no longer followed the flow of the
carried cells, as the children of a grid copy with its own cells do.
After carrying the cells, the switch reorders the new copy's children
by them, as the sync does for a copy with its own cells.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.163 | 20.973 | 0.57 |
| edit-through-a-chain-of-dependents | 68.931 | 39.635 | 41.769 | 0.57 |
| library-update-into-copies | 83.083 | 49.886 | 50.993 | 0.6 |
| main-edit-among-many-shapes | 4.837 | 2.05 | 2.334 | 0.42 |
| main-edit-into-10-copies | 1.79 | 0.95 | 1.003 | 0.53 |
| main-edit-into-100-copies | 15.415 | 9.468 | 10.043 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 98.029 | 103.338 | 0.64 |
| variant-switch-into-copies | 32.052 | 21.263 | 22.422 | 0.66 |
AI-assisted-by: claude-opus-5-5
A layout skews a turned child that fills along its parent's axes. A
swapped copy head keeps the lengths of its own component and turned them
to the skewed axes of the main shape it replaces, so the layout squashed
it into another shape than that main; each later sync started from the
squashed head and moved it again. A 100px square turned 45 degrees in a
100px high row gave a 141x100 rhombus for the main and an ordinary copy,
and 163x100, then 156x100, for the swapped copy.
A swapped head that its layout skews now takes the turn its rotation and
flips give, without the skew: its content main is oriented with that
turn, and its placement resets it from its own component and turns it
like the replaced shape's unskewed turn. The layout then skews it as it
skews the main.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.39 | 22.34 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 42.155 | 43.846 | 0.61 |
| library-update-into-copies | 83.083 | 47.467 | 51.34 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.026 | 2.265 | 0.42 |
| main-edit-into-10-copies | 1.79 | 1.025 | 1.065 | 0.57 |
| main-edit-into-100-copies | 15.415 | 9.538 | 10.051 | 0.62 |
| main-edit-into-1000-copies | 153.086 | 96.813 | 102.667 | 0.63 |
| variant-switch-into-copies | 32.052 | 21.011 | 22.247 | 0.66 |
AI-assisted-by: claude-opus-5-5
A switch keeps a copy's swapped child: it moves the swap into the new
copy in place of the new child at its path and deletes that child. In a
grid copy whose cells were its main's, nothing carries the cells, so the
deleted child's cell stayed empty and the swap had no cell; the next
layout of the grid failed on the uncelled child.
`keep-swapped-item` gives the swap the cell of the child it replaces.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.929 | 23.421 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 41.595 | 45.427 | 0.6 |
| library-update-into-copies | 83.083 | 47.657 | 49.963 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.118 | 2.33 | 0.44 |
| main-edit-into-10-copies | 1.79 | 1.126 | 1.158 | 0.63 |
| main-edit-into-100-copies | 15.415 | 10.291 | 11.027 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 101.89 | 104.528 | 0.67 |
| variant-switch-into-copies | 32.052 | 21.203 | 22.033 | 0.66 |
AI-assisted-by: claude-opus-5-5
A copy that turns a nested copy turns the children of that nested copy
with it. When a resize deeper in a child's chain marks it with the
geometry group, the variant switch compares the old child with its ref
to tell whether the copy authored its geometry. It turned the ref only
into the frame of the copy root, so the turn the child inherits from its
nested parent looked authored: the switch placed the child at its main's
unturned offset and marked it touched.
`generate-keep-touched` also turns the ref into the frame of the old
child's parent, so only a turn the child authors itself carries.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.988 | 21.212 | 0.6 |
| edit-through-a-chain-of-dependents | 68.931 | 41.108 | 42.793 | 0.6 |
| library-update-into-copies | 83.083 | 45.86 | 47.865 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 2.114 | 2.268 | 0.44 |
| main-edit-into-10-copies | 1.79 | 1.004 | 1.024 | 0.56 |
| main-edit-into-100-copies | 15.415 | 9.828 | 9.983 | 0.64 |
| main-edit-into-1000-copies | 153.086 | 98.452 | 99.954 | 0.64 |
| variant-switch-into-copies | 32.052 | 20.156 | 21.317 | 0.63 |
AI-assisted-by: claude-opus-5-5
A child of a turned parent first scales with the parent's resize, and
its constraints then scale it back. The scale back divided by the
child's scaled width with a 0.01 minimum, so a child that the resize
scaled below 0.01 came back too narrow: a 70px text with a left
constraint in a board turned 45 degrees and narrowed to 0.01 kept
40.83px. An axis-aligned parent skips this path, so the layout of an
unturned copy kept 70px while the sync of that copy, which resizes its
turned main, gave 40.83px.
The scale back now divides by the child's real edge lengths, and only a
collapsed child takes no scale.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.281 | 21.79 | 0.6 |
| edit-through-a-chain-of-dependents | 68.931 | 41.715 | 42.166 | 0.61 |
| library-update-into-copies | 83.083 | 50.352 | 52.632 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.29 | 2.413 | 0.47 |
| main-edit-into-10-copies | 1.79 | 0.932 | 0.983 | 0.52 |
| main-edit-into-100-copies | 15.415 | 8.968 | 9.361 | 0.58 |
| main-edit-into-1000-copies | 153.086 | 99.524 | 107.384 | 0.65 |
| variant-switch-into-copies | 32.052 | 21.503 | 21.923 | 0.67 |
AI-assisted-by: claude-opus-5-5
A copy's child authored a swap, and a later swap in the main gave the
child's near main the same component. Update-main clones the copy's
swapped parent into the main, and the clone of the child keeps its swap
against the same near main, as an authored swap stays when its near
main converges. The model dropped the swap from every pushed main shape
whose component equals its ref's; it now keeps it on a main shape that
refers to the same shape as the copy shape.
Harness only; the benchmark is not run.
Also in this commit:
- Turn an authored child by the sign of its own mirror decomposition. A mirrored
shape can store its turn either way: rotation 45 with the flip after the turn,
or 315 with the turn after the flip, for one transform. When a flipped copy
turned, the model turned a child's authored rotation with the sign of the
decomposition the shape stores, while the model may hold the other one, and
expected 270 where production gives 0.
AI-assisted-by: claude-opus-5-5
A switch between identical grids carries a copy's cell overrides, with
each child mapped to the new copy's child at its path. A kept swap takes
that place with its own id, so the cells named the child the switch
removes and the swap had no cell. The kept swap now keeps its own id in
the cells.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.301 | 21.507 | 0.6 |
| edit-through-a-chain-of-dependents | 68.931 | 38.218 | 42.273 | 0.55 |
| library-update-into-copies | 83.083 | 46.586 | 48.732 | 0.56 |
| main-edit-among-many-shapes | 4.837 | 1.842 | 2.032 | 0.38 |
| main-edit-into-10-copies | 1.79 | 0.924 | 0.968 | 0.52 |
| main-edit-into-100-copies | 15.415 | 9.135 | 9.733 | 0.59 |
| main-edit-into-1000-copies | 153.086 | 99.654 | 101.131 | 0.65 |
| variant-switch-into-copies | 32.052 | 20.939 | 22.049 | 0.65 |
Common suite: 2379 tests, 1 failure, the known insufficient-random-coverage
of random-stale-library-compositions (detach attempted once in 20
programs).
AI-assisted-by: claude-opus-5-5
The switch model carries an authored geometry value only where both
variants agree on it. It compared the new main's child turned into the
new copy parent's orientation with the old main's child unturned, so
under a turned copy the variants seemed to disagree on rotation and the
model dropped the turn the copy's child authors. Both are now turned into
their copy parent's orientation.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A switch kept a swap whose subtree holds a copy of a nested copy's
component of the new variant, the copy the swap goes into. The move of
the kept swap was refused and it stayed at the page root. A switch now
keeps a swap only when it holds no copy of a component of the shapes it
would be inside: the ancestors of its place in the new variant, and
those of the copy.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.637 | 20.776 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 40.27 | 42.936 | 0.58 |
| library-update-into-copies | 83.083 | 52.234 | 53.028 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.105 | 2.231 | 0.44 |
| main-edit-into-10-copies | 1.79 | 1.079 | 1.11 | 0.6 |
| main-edit-into-100-copies | 15.415 | 10.333 | 10.617 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 97.413 | 103.833 | 0.64 |
| variant-switch-into-copies | 32.052 | 22.451 | 23.0 | 0.7 |
Common suite: 2379 tests, 1 failure, the known insufficient-random-coverage
of random-stale-library-compositions (detach attempted once in 20
programs).
AI-assisted-by: claude-opus-5-5
A copy shape's authored geometry is checked where it sits in the parent
it was authored in, resized through its constraints as that parent
resizes. A constraint edit after a resize of that parent replayed the
resize through the new constraint, though the edit moves nothing and
applies only to later resizes. A constraint edit now anchors the
authored position where the shape sits.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A copy's child swapped for another component and set to fill takes the
size the layout gives it. When a sync of its main set it back to fix, the
swapped head only took its placement attributes and kept the filled size,
where a full sync gives it its own component's size. A head with
untouched geometry that stops filling in a direction is now synced with
its own component; the sync context carries the file and the libraries
for it.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.042 | 21.954 | 0.54 |
| edit-through-a-chain-of-dependents | 68.931 | 39.697 | 41.13 | 0.58 |
| library-update-into-copies | 83.083 | 49.796 | 50.704 | 0.6 |
| main-edit-among-many-shapes | 4.837 | 2.3 | 2.482 | 0.48 |
| main-edit-into-10-copies | 1.79 | 1.061 | 1.101 | 0.59 |
| main-edit-into-100-copies | 15.415 | 10.157 | 10.441 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 96.248 | 101.459 | 0.63 |
| variant-switch-into-copies | 32.052 | 21.72 | 22.289 | 0.68 |
Common suite: 2373 tests, 0 failures.
AI-assisted-by: claude-opus-5-5
A copy whose child was swapped to a variant, switched to that variant,
kept the swap. That put a copy of the new component inside a copy of
itself, so the move of the kept child was refused and the child stayed
at the page root, leaving an invalid file. A switch now keeps a swap only
when its subtree holds no copy of the new component, nor of a component
the copy is inside; the new variant's own child takes its place.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.0 | 20.802 | 0.54 |
| edit-through-a-chain-of-dependents | 68.931 | 36.673 | 38.166 | 0.53 |
| library-update-into-copies | 83.083 | 44.204 | 46.142 | 0.53 |
| main-edit-among-many-shapes | 4.837 | 2.106 | 2.224 | 0.44 |
| main-edit-into-10-copies | 1.79 | 0.917 | 0.981 | 0.51 |
| main-edit-into-100-copies | 15.415 | 8.858 | 9.458 | 0.57 |
| main-edit-into-1000-copies | 153.086 | 89.013 | 93.164 | 0.58 |
| variant-switch-into-copies | 32.052 | 19.844 | 20.613 | 0.62 |
Common suite: 2371 tests, 1 failure, the known insufficient-random-coverage
of random-stale-library-compositions (swap and library-add-variant
attempted too few times in 20 programs).
AI-assisted-by: claude-opus-5-5
A switch carried every text override both variants agree on, also those
whose value the new variant already shows. A copy text whose letters
equal the new variant's kept a content override, because the new
variant's paragraph names a typography the copy's does not; a copy sized
like the new variant's typography kept the size and so dropped that
typography. The switch now carries only the overrides both variants agree
on and where the copy differs from the new variant, and a carried
typography takes every unit it sets along.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.068 | 20.738 | 0.54 |
| edit-through-a-chain-of-dependents | 68.931 | 42.028 | 42.803 | 0.61 |
| library-update-into-copies | 83.083 | 46.312 | 49.715 | 0.56 |
| main-edit-among-many-shapes | 4.837 | 2.149 | 2.298 | 0.44 |
| main-edit-into-10-copies | 1.79 | 1.002 | 1.023 | 0.56 |
| main-edit-into-100-copies | 15.415 | 9.234 | 9.643 | 0.6 |
| main-edit-into-1000-copies | 153.086 | 92.417 | 97.463 | 0.6 |
| variant-switch-into-copies | 32.052 | 21.472 | 21.958 | 0.67 |
Common suite: 2367 tests, 0 failures.
AI-assisted-by: claude-opus-5-5
The generator built its variant containers at 0.01 by 0.01. Adding a
variant grows the container by a member's width, as the app does, and
a member constrained to scale grew with it by about twelve thousand
times, until its coordinates left the valid range. Both generated
worlds now size the container to 200 by 200, room for its members.
Harness only; the benchmark is not run.
Also in this commit:
- Keep the model of shapes an undo stores in a deleted component. Undoing an
operation that created a component deletes it, and the deleted component keeps
its shapes with their overrides. The model went back to its state before the
operation, which never knew those shapes, so restoring the component expected
none of their overrides. An undo now keeps the model of the shapes it leaves
only in a deleted component.
AI-assisted-by: claude-opus-5-5
A main that nests a variant copy can swap a child of it for another
component and override that component's fill. A copy of the main that
switched its nested copy took the touched groups of the child's whole ref
chain and compared them with the variant's slot, so it carried the fill
authored over the swapped component onto the new variant's board. A child
whose ref chain passes through a swap made by a main now has no
counterpart in the new variant, and nothing carries into it.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.723 | 20.106 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 36.982 | 39.628 | 0.54 |
| library-update-into-copies | 83.083 | 44.331 | 46.283 | 0.53 |
| main-edit-among-many-shapes | 4.837 | 1.969 | 2.159 | 0.41 |
| main-edit-into-10-copies | 1.79 | 1.05 | 1.078 | 0.59 |
| main-edit-into-100-copies | 15.415 | 10.02 | 10.27 | 0.65 |
| main-edit-into-1000-copies | 153.086 | 100.392 | 102.54 | 0.66 |
| variant-switch-into-copies | 32.052 | 19.796 | 20.354 | 0.62 |
AI-assisted-by: claude-opus-5-5
A copy text marked as owning its typography, though neither it nor its
main applies one, kept its size over a switch to a variant whose text
applies a typography. The size drops that typography, but the switch
asked whether the copy's styles drop it of the copy's whole touched set,
which holds the typography mark, and so marked the dropped reference as a
typography override. The switch now asks of the text overrides it
carries.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.698 | 20.154 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 37.739 | 39.432 | 0.55 |
| library-update-into-copies | 83.083 | 45.988 | 48.369 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 1.93 | 2.101 | 0.4 |
| main-edit-into-10-copies | 1.79 | 0.971 | 0.987 | 0.54 |
| main-edit-into-100-copies | 15.415 | 9.163 | 9.653 | 0.59 |
| main-edit-into-1000-copies | 153.086 | 91.955 | 96.317 | 0.6 |
| variant-switch-into-copies | 32.052 | 20.339 | 23.274 | 0.63 |
AI-assisted-by: claude-opus-5-5
A switch kept a swapped child of the copy wherever the new variant had a
shape of the same name and ancestor kinds, even a plain board a main had
detached. The kept swap then referred to a shape that is no copy head and
the file failed validation. The switch now keeps a swap only where the
new main holds a copy, and the other swaps go with the old head.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.978 | 21.326 | 0.6 |
| edit-through-a-chain-of-dependents | 68.931 | 40.47 | 41.523 | 0.59 |
| library-update-into-copies | 83.083 | 47.521 | 50.404 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.175 | 2.476 | 0.45 |
| main-edit-into-10-copies | 1.79 | 0.982 | 1.003 | 0.55 |
| main-edit-into-100-copies | 15.415 | 9.423 | 9.949 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 99.435 | 101.227 | 0.65 |
| variant-switch-into-copies | 32.052 | 21.14 | 21.923 | 0.66 |
AI-assisted-by: claude-opus-5-5
A switch carried a child's :x or :y when the old main's child and the new
copy's child shared the coordinate, though one lies in main space and the
other in copy space. A turned copy whose child inherits a resize could
then switch to a child whose :y disagreed with its selrect and points,
touched for a place it never authored. The switch now keeps the new
variant's position and carries only a size.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.545 | 20.219 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 37.535 | 39.465 | 0.54 |
| library-update-into-copies | 83.083 | 52.071 | 53.432 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.116 | 2.202 | 0.44 |
| main-edit-into-10-copies | 1.79 | 1.055 | 1.079 | 0.59 |
| main-edit-into-100-copies | 15.415 | 9.013 | 9.777 | 0.58 |
| main-edit-into-1000-copies | 153.086 | 94.616 | 97.597 | 0.62 |
| variant-switch-into-copies | 32.052 | 23.127 | 23.774 | 0.72 |
AI-assisted-by: claude-opus-5-5
A copy text that cleared a library typography in the generated histories
kept the run's typography file reference with no typography, which the
design panel never writes. The oracle then saw a reference the copy could
not own. Restyling the typography of a test text now replaces the file
reference too.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A turned copy holds a nested variant copy whose child is flipped. When
the nested copy switches to a variant whose child agrees with the old
one, the switch compared the old main's child with the new copy's child
as they stand, and the copy's turn made their transforms disagree while
their flips agreed. It carried the flip flag without the flipped
transform and points, so the child stored a flip it did not show.
Before carrying, the switch turns the old main's shapes as the copy
turns its new main, so both variants are compared in one frame.
Tests: test-switch-of-a-turned-copy-carries-the-flip-of-its-child and the
regression program
switching-a-turned-copy-keeps-the-flip-its-child-inherits.
Full common suite: 2353 tests, 0 failures.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.783 | 20.636 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 42.981 | 44.139 | 0.62 |
| library-update-into-copies | 83.083 | 49.497 | 51.013 | 0.6 |
| main-edit-among-many-shapes | 4.837 | 2.119 | 2.197 | 0.44 |
| main-edit-into-10-copies | 1.79 | 0.976 | 1.056 | 0.55 |
| main-edit-into-100-copies | 15.415 | 9.563 | 9.784 | 0.62 |
| main-edit-into-1000-copies | 153.086 | 95.722 | 103.356 | 0.63 |
| variant-switch-into-copies | 32.052 | 21.712 | 22.187 | 0.68 |
AI-assisted-by: claude-opus-5-5
A copy text that overrides its size, and switches to a variant whose
text applies a typography, keeps its size when both variants show the
same one; the typography, whose size is not the copy's, is dropped. The
switch then authored the missing reference as a typography override the
copy never made. txt/drops-typography? tells when a copy's text
overrides hold a unit a typography sets but not the typography; the
switch then leaves out the typography group, and the update-main push
uses the same helper.
Tests: copy-that-resizes-its-text-holds-no-typography-of-the-new-variant
and the regression program
switching-a-resized-copy-text-to-a-typography-variant-holds-no-typography.
Full common suite: 2351 tests, 0 failures.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.282 | 21.706 | 0.6 |
| edit-through-a-chain-of-dependents | 68.931 | 41.59 | 43.639 | 0.6 |
| library-update-into-copies | 83.083 | 46.407 | 49.512 | 0.56 |
| main-edit-among-many-shapes | 4.837 | 2.075 | 2.227 | 0.43 |
| main-edit-into-10-copies | 1.79 | 0.96 | 1.042 | 0.54 |
| main-edit-into-100-copies | 15.415 | 9.576 | 10.099 | 0.62 |
| main-edit-into-1000-copies | 153.086 | 94.283 | 98.829 | 0.62 |
| variant-switch-into-copies | 32.052 | 22.495 | 22.945 | 0.7 |
AI-assisted-by: claude-opus-5-5
The requested update-main check compared the absolute points of the copy
that pushes its overrides. When that copy sits in a variant and the push
changes the bounds of a sibling variant, the set's layout moves the
copy's variant, and the copy with it, though the copy keeps its place in
its parent. When the copy's parent keeps its size, the check now moves
the expected geometry by the parent's displacement.
Test: the regression program
updating-a-main-from-a-copy-in-a-variant-it-moves-keeps-the-copy-in-place.
Full common suite: the 20-program coverage flakes, and a swap property
failure in a text switch that the next commit fixes.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A copy text that overrides a typography unit, such as its font family,
drops a typography its main applies, without a typography override.
When update main pushes that text into the main, it keeps the same
reference, yet the push authored the missing reference as a typography
override. The pushed text now leaves out the typography group when its
own text overrides drop the reference; a typography that differs on its
own is still authored.
Tests: pushing-a-text-authors-no-typography-its-own-styles-drop and the
regression program
updating-a-main-from-a-switched-copy-keeps-the-text-overrides-it-pushes.
Full common suite: 2348 tests, 1 failure, the known 20-program coverage
flake (library-redo reached by one program; the property passes).
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 19.02 | 19.838 | 0.54 |
| edit-through-a-chain-of-dependents | 68.931 | 37.452 | 39.34 | 0.54 |
| library-update-into-copies | 83.083 | 45.852 | 48.286 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 1.893 | 2.076 | 0.39 |
| main-edit-into-10-copies | 1.79 | 1.068 | 1.092 | 0.6 |
| main-edit-into-100-copies | 15.415 | 10.287 | 10.57 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 97.173 | 105.333 | 0.63 |
| variant-switch-into-copies | 32.052 | 20.618 | 21.363 | 0.64 |
AI-assisted-by: claude-opus-5-5
A variant switch carries the copy's override of a group with the copy's
values, an attribute the copy leaves unset included, as constraints the
copy leaves to their default. The component model took the carried
values with select-keys, which leaves out the attributes a shape does
not store, so the new main's values showed through in the prediction.
The carried attributes now take the copy's value, unset or not.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Updating a main from a copy with a name override renamed the component
and its main to the copy's name. A variant takes its name from its
set, though, and every member carries it, so a renamed copy of a
variant left the file failing validation (a variant main and component
with a name other than their set's). Updating the main of a variant
copy now pushes everything but the name, and the copy keeps its name as
an override. The component model and its update-main check expect the
same.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.618 | 0.59 |
| edit-through-a-chain-of-dependents | 68.931 | 40.714 | 0.59 |
| library-update-into-copies | 83.083 | 49.993 | 0.60 |
| main-edit-among-many-shapes | 4.837 | 2.112 | 0.44 |
| main-edit-into-10-copies | 1.790 | 1.105 | 0.62 |
| main-edit-into-100-copies | 15.415 | 9.427 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 101.540 | 0.66 |
| variant-switch-into-copies | 32.052 | 21.918 | 0.68 |
AI-assisted-by: claude-opus-5-5
A switch keeps a child the copy swapped for another component, and when
the new variant holds that same component at the child's place the swap
ends: the child becomes a plain copy of its new position. It kept the
values it had, though, untouched, so it showed its old size or opacity
where its new main authored others, until some later sync. When a switch
ends a kept child's swap, the switched copy now syncs as an ordinary
copy, as it already did when it carries a size.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.516 | 0.58 |
| edit-through-a-chain-of-dependents | 68.931 | 40.411 | 0.59 |
| library-update-into-copies | 83.083 | 52.359 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.024 | 0.42 |
| main-edit-into-10-copies | 1.790 | 0.954 | 0.53 |
| main-edit-into-100-copies | 15.415 | 9.210 | 0.60 |
| main-edit-into-1000-copies | 153.086 | 91.498 | 0.60 |
| variant-switch-into-copies | 32.052 | 19.466 | 0.61 |
AI-assisted-by: claude-opus-5-5
A switch between variants with identical grids carried the copy's cells
and marked them as an override whenever its cells were touched along its
reference chain, also when they were the cells the new copy shows. When
both variant mains hold the same cell override, a copy that showed it
without one of its own ended with a redundant cell override after the
switch. The cells now carry only when they differ from the new copy's,
as every other attribute does; the component model predicts the same.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.449 | 0.55 |
| edit-through-a-chain-of-dependents | 68.931 | 40.962 | 0.59 |
| library-update-into-copies | 83.083 | 45.075 | 0.54 |
| main-edit-among-many-shapes | 4.837 | 1.959 | 0.41 |
| main-edit-into-10-copies | 1.790 | 0.933 | 0.52 |
| main-edit-into-100-copies | 15.415 | 9.038 | 0.59 |
| main-edit-into-1000-copies | 153.086 | 91.626 | 0.60 |
| variant-switch-into-copies | 32.052 | 21.183 | 0.66 |
AI-assisted-by: claude-opus-5-5
A variant switch keeps a copy's grid cell overrides when the old and the
new variant mains have identical grids: the same tracks and the same
cells holding corresponding children. The component model never
predicted it, since it compared the old main's cells, kept by id, with
the new main's list of cells, so a kept override showed as a phantom.
The model now carries the copy's cells whole in that case, with each
child replaced by the new child at its path.
Harness only; the benchmark is not run.
Also in this commit:
- Predict the end of a swap kept by a switch onto the same component. A variant
switch keeps a child the copy swapped for another component, and when the new
variant holds that same component at the child's place, the child becomes a
plain copy of it: the swap ends, as the swap-group tests of a switch to a
variant with the same component expect. The component model kept the swap
override there. It now drops it for a kept swapped child whose new position
has the same component.
- The harness changes that check the next commit, "Carry no grid cells a
switched copy already shows".
AI-assisted-by: claude-opus-5-5
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
The pure runner's delete and restore of a component left the layouts
around the main untouched, while the frontend lays out the parents of
the deleted main and the frames the restored shapes go into. In a
variant set, a flex board, a restored member then kept a place the
layout would not give it, and the next edit's layout pass moved it, so a
move of a shape inside it landed off the requested offset. Both
operations now reflow those layouts.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A switch carries the overrides of a copy's children into the new
variant where both variants agree on the attribute, but it never carried
their layout item attributes: margins, sizing, limits, absolute position,
z-index and alignment. The switch walked the attributes a sync updates,
which leave those out, and its list of attributes a switch may keep did
not have them either, so a copy child lost its own margin or its
absolute position, and the override with it. A switched child now
carries them under the same rule; the switched head keeps its own
placement as before.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.753 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 42.985 | 0.62 |
| library-update-into-copies | 83.083 | 51.623 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 1.988 | 0.41 |
| main-edit-into-10-copies | 1.790 | 0.971 | 0.54 |
| main-edit-into-100-copies | 15.415 | 9.418 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 102.474 | 0.67 |
| variant-switch-into-copies | 32.052 | 19.863 | 0.62 |
AI-assisted-by: claude-opus-5-5