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
The variant programs now also make sets: transform a component into a
variant set (kind make-variant) and combine two components as variants
(kind combine), each paired with a switch. The pure runner runs both
actions through their common generators with what the frontend events
do after them: the reflow of the new board's layout, and a combined
board sized 30 px past its mains on each side. Each must leave the
components it names as members of one new set in the board, with the
same property names; a transform adds a member with a value of its own.
The library editor of the stale library programs edits its variant sets
too: property edits, added variants, transforms and combines, followed
by a library sync and a switch in the consuming file. Their requested
results are checked on the library, and an added member takes on the
model of the main it duplicates. The test of undoing a library variant
a consumer switched to belongs to the previous commit's fix.
The stale library programs must cover only the library steps and the
operations they are tested with, as the variant programs do; the
structure and swap programs cover the rest. A frontend step also waits
briefly for an undo transaction its events close on a later tick, as
combining variants does, and the golden master transcripts record the
components a variant action makes.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Undoing the creation of a component removed it from the file. A copy
another file had made of it in the meantime, as a consumer of a library
can after a variant is added there, then pointed at a component that
did not exist: the file failed validation, and the copy could not find
its main shapes or be restored. Undoing the creation now marks the
component deleted and keeps its main's shapes in it, as deleting it
does; redoing it adds it again.
The undo and redo checks of the component tests compare files without
their deleted components, since an undone creation leaves one where
there was none.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.745 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 37.914 | 0.55 |
| library-update-into-copies | 83.083 | 48.026 | 0.58 |
| main-edit-among-many-shapes | 4.837 | 1.944 | 0.40 |
| main-edit-into-10-copies | 1.790 | 1.047 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.179 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 91.854 | 0.60 |
| variant-switch-into-copies | 32.052 | 21.546 | 0.67 |
AI-assisted-by: claude-opus-5-5
Applying a typography to a copy text overrides all six styles it sets,
equal values too, so the typography stays the copy's own. A switch that
carried that text set its overrides from what differs from the new main
only: a family equal to the new main's lost its override while the text
kept the typography, a reference whose styles were split between the
copy and its main, which a later sync could not describe.
When the text a switch carries holds a typography that differs from
the new main's, it overrides all six styles, as applying it does. The
component model predicts the same, and also when the typography came
from a copy level the switched copy refers to.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.947 | 0.59 |
| edit-through-a-chain-of-dependents | 68.931 | 40.747 | 0.59 |
| library-update-into-copies | 83.083 | 47.063 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.363 | 0.49 |
| main-edit-into-10-copies | 1.790 | 0.964 | 0.54 |
| main-edit-into-100-copies | 15.415 | 9.223 | 0.60 |
| main-edit-into-1000-copies | 153.086 | 95.751 | 0.63 |
| variant-switch-into-copies | 32.052 | 21.325 | 0.67 |
AI-assisted-by: claude-opus-5-5
Adding a variant, or duplicating a variant main into its set, gives the
new member a "Value n" in its last property. The values came from the
last entry of the properties grouped by name, which is a hash map once
a set has nine properties, so the count could come from another
property: with eight empty properties before "Property 9", the new
member took "Value 2", its source's value, and duplicated it.
Both actions now take, through one function, the first "Value n" no
member has at the position the value goes to, n counting up from one
more than the values there. Duplicating a variant main into its set
could also repeat a value in use after a member was deleted, as adding
a variant did.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.529 | 0.58 |
| edit-through-a-chain-of-dependents | 68.931 | 40.136 | 0.58 |
| library-update-into-copies | 83.083 | 45.708 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 1.972 | 0.41 |
| main-edit-into-10-copies | 1.790 | 0.920 | 0.51 |
| main-edit-into-100-copies | 15.415 | 9.714 | 0.63 |
| main-edit-into-1000-copies | 153.086 | 96.513 | 0.63 |
| variant-switch-into-copies | 32.052 | 21.386 | 0.67 |
AI-assisted-by: claude-opus-5-5
When a switch carries a copy text's typography override, the model
dropped it unless every other typographic style carried with it, since
a typography reference cannot describe styles split between the copy
and its main. That holds for a typography the copy applied. A copy text
that lacks its main's typography and overrides only its size has no
reference to split: production keeps the typography override, the same
state a sync leaves, and the model now keeps it too.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Adding a variant names the new member's last value "Value n", n one
more than the number of values that property has. Once a member is
deleted, that count can repeat a value still in use: after adding
"Value 3" and "Value 4" and deleting "Value 3", the next member added
from "Value 4" got "Value 4" again, the same properties as its source.
The new member takes the first "Value n" from that number up that no
member has.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.352 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 39.364 | 0.57 |
| library-update-into-copies | 83.083 | 46.730 | 0.56 |
| main-edit-among-many-shapes | 4.837 | 1.943 | 0.40 |
| main-edit-into-10-copies | 1.790 | 1.051 | 0.59 |
| main-edit-into-100-copies | 15.415 | 9.726 | 0.63 |
| main-edit-into-1000-copies | 153.086 | 101.415 | 0.66 |
| variant-switch-into-copies | 32.052 | 20.744 | 0.65 |
AI-assisted-by: claude-opus-5-5
The Phase 4 bug hunt: random component programs, an independent model
of what they should leave, and the regression programs of what they
found. The production fixes they found are the commits before this one,
each with its regression programs; this commit holds the test harness,
the rest of the tests and the memories they grew with. A regression
program that needs the harness runs once this commit is in.
- Generation (composable gen): worlds of components, nested copies,
variants, libraries (stale and dependent), flex and grid layouts and
texts; operations for structure, geometry, styles, texts, layout items,
grid tracks and cells, swaps, variant switches, update main, reset,
detach, library edits and syncs, undo and redo; shrinking, coverage
accounting per operation kind, and PENPOT_GEN_SEED, PENPOT_GEN_NUM
and PENPOT_GEN_HISTORIES to choose the seed, the number of programs
and their length.
- The oracle: invariants on touched groups, overrides, refs, settled
versus full sync, design snapshots and the model values, with its
own model of authored intent (shadow, geometry, grid and variant
rules) instead of production's results.
- The frontend replays generated programs through the workspace events
and the completion contract, with undo and redo checks.
- The oracle unit tests, the test runners' registrations, the golden
masters recorded again where a fix changed them, and the memories of
the component sync contract and its tests.
Harness only; the benchmark is not run.
Also in this commit:
- Adapt develop's variant set and reload tests to this branch. Develop's tests
of transforming a component into a variant set call the event with the set's
id and expect the defining commit to hold only the main. Here the transform
builds the whole set, its second member included, in one commit:
transform-in-variant takes an optional variant id, and the tests expect both
members in that commit.
- Restore the requires and test wiring the rebase merges dropped.
- Generate variant property edits and added variants. The random programs
switched between the members of a variant set but never changed the set.
AI-assisted-by: claude-opus-5-5
A swap restores the swap-keep-attrs (layout item attributes and
interactions) of the old head on the new one, but dropped the touched
groups they belong to, so a variant switch left those overrides
unprotected and the next sync overwrote them (#12851). The new head now
takes the touched groups of the restored attributes the old head had.
Develop's layout item switch tests count the touched groups exactly;
making a copy child absolute also authors its geometry here, so they
leave :geometry-group out of the count.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.816 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 41.189 | 0.60 |
| library-update-into-copies | 83.083 | 48.819 | 0.59 |
| main-edit-among-many-shapes | 4.837 | 2.146 | 0.44 |
| main-edit-into-10-copies | 1.79 | 0.962 | 0.54 |
| main-edit-into-100-copies | 15.415 | 9.577 | 0.62 |
| main-edit-into-1000-copies | 153.086 | 104.859 | 0.68 |
| variant-switch-into-copies | 32.052 | 21.305 | 0.66 |
AI-assisted-by: claude-opus-5-5
A direction change in a grid copy makes its cells an override when the
reflow moves items, and the copy's main has a grid. For a copy that
keeps another component than its main's slot, the main was looked up by
its reference, the slot's board, which has no grid: the reflow moved its
items without making the cells an override, and the next sync of its
own component's main gave it the main's cells back.
The main of a swapped head is the root of its own component, the one its
content and its cells follow.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.155 | 0.54 |
| edit-through-a-chain-of-dependents | 68.931 | 43.042 | 0.62 |
| library-update-into-copies | 83.083 | 50.796 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.12 | 0.44 |
| main-edit-into-10-copies | 1.79 | 0.958 | 0.54 |
| main-edit-into-100-copies | 15.415 | 9.406 | 0.61 |
| main-edit-into-1000-copies | 153.086 | 93.765 | 0.61 |
| variant-switch-into-copies | 32.052 | 22.183 | 0.69 |
AI-assisted-by: claude-opus-5-5
A board below its minimum size keeps the scale of a resize in its
transform: a 0.01 px nested copy in a turned main resized from 140 to
120 high stored a transform scaled by 6/7. A full sync turned that
copy's children by the raw transform of the target, so they came out
scaled by 6/7, while the settled sync left them at their size.
Turning a subtree to match a target takes only the directions of the
target's axes; the lengths are left to constraints.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.727 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 38.407 | 0.56 |
| library-update-into-copies | 83.083 | 48.07 | 0.58 |
| main-edit-among-many-shapes | 4.837 | 2.187 | 0.45 |
| main-edit-into-10-copies | 1.79 | 1.058 | 0.59 |
| main-edit-into-100-copies | 15.415 | 10.201 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 96.625 | 0.63 |
| variant-switch-into-copies | 32.052 | 19.74 | 0.62 |
AI-assisted-by: claude-opus-5-5
A grid fills a child turned in it along the grid's axes, which skews the
child. In a column a fixed sibling left without width, the fill squeezed
the child down to a line: its axes became parallel and its transform
singular, and its stored rotation stopped describing it.
The fill no longer narrows a turned child below 1px of thickness in its
own axes; the child overflows its column instead. The grid passes each
child's own corners with its bounds in the grid's axes to know its size
and turn.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.605 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 41.613 | 0.60 |
| library-update-into-copies | 83.083 | 47.375 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.321 | 0.48 |
| main-edit-into-10-copies | 1.79 | 0.949 | 0.53 |
| main-edit-into-100-copies | 15.415 | 10.086 | 0.65 |
| main-edit-into-1000-copies | 153.086 | 92.412 | 0.60 |
| variant-switch-into-copies | 32.052 | 20.051 | 0.63 |
AI-assisted-by: claude-opus-5-5
Sync places the content main of a swapped head in the head's orientation
by turning the main's subtree with the head's transform against the
main's. A head shrunk to a fraction of a pixel stores a transform that
carries its rounding, not a pure turn: a child nested into its content
main came out of a full sync slightly scaled and skewed, unlike the
settled copy.
The turn uses only the directions of both transforms' axes.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.709 | 0.64 |
| edit-through-a-chain-of-dependents | 68.931 | 43.034 | 0.62 |
| library-update-into-copies | 83.083 | 53.487 | 0.64 |
| main-edit-among-many-shapes | 4.837 | 2.794 | 0.58 |
| main-edit-into-10-copies | 1.79 | 1.068 | 0.60 |
| main-edit-into-100-copies | 15.415 | 10.244 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 105.368 | 0.69 |
| variant-switch-into-copies | 32.052 | 23.65 | 0.74 |
AI-assisted-by: claude-opus-5-5
Changing the direction of a grid copy without cell overrides reflowed its
auto cells and left the layout to pin those after a gap in the new order,
without making them an override. Changing the direction back kept the
pins, so the copy differed from its main with no override, and the next
sync of its main silently changed it.
A direction change that moves no item of such a copy gives it the cells
its main gives it, laid out as sync lays them out in the new direction,
so changing the direction back restores its main's grid; one that moves
items makes the cells an override, as before. The frontend and the test
operation set the cells first and then the direction, the only override
the change makes otherwise.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.653 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 40.646 | 0.59 |
| library-update-into-copies | 83.083 | 49.282 | 0.59 |
| main-edit-among-many-shapes | 4.837 | 2.415 | 0.50 |
| main-edit-into-10-copies | 1.79 | 1.072 | 0.60 |
| main-edit-into-100-copies | 15.415 | 9.683 | 0.63 |
| main-edit-into-1000-copies | 153.086 | 103.559 | 0.68 |
| variant-switch-into-copies | 32.052 | 21.623 | 0.67 |
AI-assisted-by: claude-opus-5-5
Turning a subtree to match another orientation stores, for each shape,
its old rotation plus the turn, or minus it when only that one fits its
flips. A turn that also drops or adds a flip leaves neither fitting: a
switch from an unflipped variant to a flipped one kept the copy's
unflipped turn in the transform but stored the flipped main's rotation.
When neither fits, the shape stores the rotation its transform
decomposes into with its flips.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.641 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 38.794 | 0.56 |
| library-update-into-copies | 83.083 | 46.743 | 0.56 |
| main-edit-among-many-shapes | 4.837 | 2.355 | 0.49 |
| main-edit-into-10-copies | 1.79 | 0.997 | 0.56 |
| main-edit-into-100-copies | 15.415 | 9.669 | 0.63 |
| main-edit-into-1000-copies | 153.086 | 97.248 | 0.64 |
| variant-switch-into-copies | 32.052 | 21.73 | 0.68 |
AI-assisted-by: claude-opus-5-5
A switch deletes the old head without its swapped children, which it
moves into the new head. A swapped child whose place the new variant
lacks found no counterpart and was never moved: it went with the old
head's subtree without changes of its own, so undo left it out.
The switch keeps out of the deletion only the swapped children whose
place, by name and ancestor kinds in their main, the new variant has;
the others are deleted with the old head and restored by undo.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.011 | 0.60 |
| edit-through-a-chain-of-dependents | 68.931 | 40.794 | 0.59 |
| library-update-into-copies | 83.083 | 45.598 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 2.087 | 0.43 |
| main-edit-into-10-copies | 1.79 | 1.001 | 0.56 |
| main-edit-into-100-copies | 15.415 | 10.11 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 98.638 | 0.64 |
| variant-switch-into-copies | 32.052 | 19.844 | 0.62 |
AI-assisted-by: claude-opus-5-5
A switch that carries an authored orientation marks a geometry override
when the head's turn differs from its new main's placement. Inside a copy
the placement left out the turn of the head's parent: a head whose near
main's half turn cancelled its turned copy parent's showed the main's own
turn, looked unchanged and lost its override.
The placement includes the parent's turn and flips inside a copy too.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.589 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 39.264 | 0.57 |
| library-update-into-copies | 83.083 | 48.997 | 0.59 |
| main-edit-among-many-shapes | 4.837 | 2.377 | 0.49 |
| main-edit-into-10-copies | 1.79 | 1.031 | 0.58 |
| main-edit-into-100-copies | 15.415 | 9.145 | 0.59 |
| main-edit-into-1000-copies | 153.086 | 97.525 | 0.64 |
| variant-switch-into-copies | 32.052 | 21.316 | 0.67 |
AI-assisted-by: claude-opus-5-5
A switch carries the touched attributes of the old copy into the new
one, skipping those whose values are already equal. Geometry was compared
exactly: a turn the new copy already showed, up to float noise in its
transform, was carried and marked as a geometry override the old copy
did not author.
Geometry attributes compare within their precision, as the check that
both variants share a value already does.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 18.972 | 0.54 |
| edit-through-a-chain-of-dependents | 68.931 | 37.79 | 0.55 |
| library-update-into-copies | 83.083 | 46.453 | 0.56 |
| main-edit-among-many-shapes | 4.837 | 2.175 | 0.45 |
| main-edit-into-10-copies | 1.79 | 0.927 | 0.52 |
| main-edit-into-100-copies | 15.415 | 8.87 | 0.58 |
| main-edit-into-1000-copies | 153.086 | 89.777 | 0.59 |
| variant-switch-into-copies | 32.052 | 20.379 | 0.64 |
AI-assisted-by: claude-opus-5-5
A sync that turns and resizes a copy lays out the copy's main subtree at
the copy's size. That layout climbed to the main's parent: in a grid
whose duplicated child had no cell yet, laying out the grid crashed.
The subtree is laid out under the root, so only its own layouts run and
no layout of the main's parent owns the copy's size.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.675 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 43.856 | 0.64 |
| library-update-into-copies | 83.083 | 45.859 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 2.118 | 0.44 |
| main-edit-into-10-copies | 1.79 | 1.051 | 0.59 |
| main-edit-into-100-copies | 15.415 | 9.265 | 0.60 |
| main-edit-into-1000-copies | 153.086 | 92.142 | 0.60 |
| variant-switch-into-copies | 32.052 | 21.434 | 0.67 |
AI-assisted-by: claude-opus-5-5
The remote shape of a copy's child was looked up in the component of its
outermost copy, then in the component of its nearest head. A copy nested
in a swapped copy refers to the main of the swapped copy's component,
which is neither: a switch of that nested copy found no remote shape for
it, paired a touched child with the new root and crashed comparing their
geometry.
The fallback tries the component of each parent head, from the nearest
one up.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.863 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 39.725 | 0.58 |
| library-update-into-copies | 83.083 | 48.505 | 0.58 |
| main-edit-among-many-shapes | 4.837 | 2.747 | 0.57 |
| main-edit-into-10-copies | 1.79 | 1.019 | 0.57 |
| main-edit-into-100-copies | 15.415 | 9.565 | 0.62 |
| main-edit-into-1000-copies | 153.086 | 100.188 | 0.65 |
| variant-switch-into-copies | 32.052 | 21.229 | 0.66 |
AI-assisted-by: claude-opus-5-5
A fill child of a grid takes the size of its content, resized along its
own axes. Those axes were read from the stored shape, while the same
modifiers may be turning it: turning a grid copy whose child fills its
width resized the child along its unturned axes and skewed it, and a
full sync then placed it unskewed.
The content size, and the check for a child turned in its grid, use the
frame the modifiers being calculated leave the shape in.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.852 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 39.822 | 0.58 |
| library-update-into-copies | 83.083 | 47.443 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.162 | 0.45 |
| main-edit-into-10-copies | 1.79 | 1.028 | 0.57 |
| main-edit-into-100-copies | 15.415 | 10.453 | 0.68 |
| main-edit-into-1000-copies | 153.086 | 103.422 | 0.68 |
| variant-switch-into-copies | 32.052 | 20.087 | 0.63 |
AI-assisted-by: claude-opus-5-5
A swap gives the new head the orientation of the head it replaces and,
when that turns it, puts it at the old head's first corner. A head that
already had that orientation, like a flipped copy of a flipped variant,
kept the untransformed top-left of the old one instead, so a wider
flipped variant grew to the other side; sync and the expected placement
keep a turned or flipped head's first corner.
A turned or flipped head takes the place of the old one at its first
corner also when its orientation does not change.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.42 | 0.55 |
| edit-through-a-chain-of-dependents | 68.931 | 40.335 | 0.59 |
| library-update-into-copies | 83.083 | 50.62 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.306 | 0.48 |
| main-edit-into-10-copies | 1.79 | 0.963 | 0.54 |
| main-edit-into-100-copies | 15.415 | 10.159 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 93.147 | 0.61 |
| variant-switch-into-copies | 32.052 | 21.501 | 0.67 |
AI-assisted-by: claude-opus-5-5
A fill child of a grid takes the size of its content along its own axes,
and the grid's fill then scales its box to the cell along the grid's
axes. For a child turned in the grid the two disagree: each scale along
the grid's axes skews the turned child and leaves it narrower than its
content, and the next reflow widens it again. A grid board that fills
its cell and is turned 45 degrees grew and skewed on every reflow, and
its layout never settled.
A fill child turned in its grid no longer takes its content's size; the
grid's fill alone sizes it along the grid's axes.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.311 | 0.58 |
| edit-through-a-chain-of-dependents | 68.931 | 39.017 | 0.57 |
| library-update-into-copies | 83.083 | 47.52 | 0.57 |
| main-edit-among-many-shapes | 4.837 | 2.313 | 0.48 |
| main-edit-into-10-copies | 1.79 | 1.039 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.063 | 0.65 |
| main-edit-into-1000-copies | 153.086 | 94.681 | 0.62 |
| variant-switch-into-copies | 32.052 | 22.649 | 0.71 |
AI-assisted-by: claude-opus-5-5
A detach makes the nested copies of the copy it detaches refer one level
up. A swapped head turned 45 degrees by the position it filled becomes a
copy root of its own unturned component; its turn was not its own, so
the next sync turned it back to 0 and moved its children. The geometry of
such a copy was made its own only under a copy parent.
Under a plain parent, where a copy is placed freely, the copy now keeps
as its own an orientation or a size that differs from its main turned
like that parent. The orientation is compared by composing the axes of
the plain parent, of the main's parent and of the main, without placing
anything, so a main at the root of its page, whose parent is the page's
0x0 frame, compares right too; the size is compared with the main's. The
model expects the same.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.758 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 41.031 | 0.60 |
| library-update-into-copies | 83.083 | 51.567 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.314 | 0.48 |
| main-edit-into-10-copies | 1.79 | 0.933 | 0.52 |
| main-edit-into-100-copies | 15.415 | 9.007 | 0.58 |
| main-edit-into-1000-copies | 153.086 | 90.173 | 0.59 |
| variant-switch-into-copies | 32.052 | 21.637 | 0.68 |
AI-assisted-by: claude-opus-5-5
A copy child that authors a constraint tying one of its dimensions to its
copy parent keeps the size it shows when its main changes size; that size
is kept by sync, not set by the user. Update main pushed it into the main
with the constraint, so a main's nested copy lost the height it authors.
Update main pushes such a copy shape, and its untouched descendants, with
the main's geometry: the main keeps its own size and takes only what the
copy authors.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.743 | 0.59 |
| edit-through-a-chain-of-dependents | 68.931 | 41.304 | 0.60 |
| library-update-into-copies | 83.083 | 51.06 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.565 | 0.53 |
| main-edit-into-10-copies | 1.79 | 1.045 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.021 | 0.65 |
| main-edit-into-1000-copies | 153.086 | 107.311 | 0.70 |
| variant-switch-into-copies | 32.052 | 22.143 | 0.69 |
AI-assisted-by: claude-opus-5-5
A sync places a swapped copy head where the shape it replaces would be.
When both are turned alike, it lines up their first corners; otherwise
it lines up the corners of their unrotated rectangles. Two transforms
counted as turned alike only when their matrices were close, and the
transform of a head at the 0.01 px minimum size scales its axes by its
rounding (0.706 for 0.707). So a tiny head in a turned copy was placed
by the unrotated corner of a 100 px board, and its selrect ended 50 px
away from its own corners.
The placement compares the directions of the transforms' axes, without
their lengths, as the sync of a parent's descendants already does.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.375 | 0.58 |
| edit-through-a-chain-of-dependents | 68.931 | 39.744 | 0.58 |
| library-update-into-copies | 83.083 | 49.053 | 0.59 |
| main-edit-among-many-shapes | 4.837 | 2.269 | 0.47 |
| main-edit-into-10-copies | 1.79 | 1.082 | 0.60 |
| main-edit-into-100-copies | 15.415 | 9.911 | 0.64 |
| main-edit-into-1000-copies | 153.086 | 95.772 | 0.63 |
| variant-switch-into-copies | 32.052 | 21.539 | 0.67 |
AI-assisted-by: claude-opus-5-5
Reflecting a shape can leave a turned descendant's flip flags in another
decomposition of the same transform (rotation 270 with a vertical flip
for rotation 90 with a horizontal one), and a later sync of the copy
rewrites them. The transform settles the descendants of a reflected copy
head from its copy root so both agree. A plain copy shape with children,
such as the nested head a main detached, was left out.
Any reflected copy shape with children settles from its copy root.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.748 | 0.56 |
| edit-through-a-chain-of-dependents | 68.931 | 42.466 | 0.62 |
| library-update-into-copies | 83.083 | 51.313 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.445 | 0.51 |
| main-edit-into-10-copies | 1.79 | 0.988 | 0.55 |
| main-edit-into-100-copies | 15.415 | 9.629 | 0.62 |
| main-edit-into-1000-copies | 153.086 | 100.363 | 0.66 |
| variant-switch-into-copies | 32.052 | 21.275 | 0.66 |
AI-assisted-by: claude-opus-5-5
A copy child of a copy can be moved, which marks its geometry as its own.
Swapping it for another component 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. A variant switch already
marked that place as the new head's own geometry.
A swap marks it too, and 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 | 21.099 | 0.60 |
| edit-through-a-chain-of-dependents | 68.931 | 41.629 | 0.60 |
| library-update-into-copies | 83.083 | 52.415 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.644 | 0.55 |
| main-edit-into-10-copies | 1.79 | 1.104 | 0.62 |
| main-edit-into-100-copies | 15.415 | 10.707 | 0.69 |
| main-edit-into-1000-copies | 153.086 | 98.141 | 0.64 |
| variant-switch-into-copies | 32.052 | 22.688 | 0.71 |
AI-assisted-by: claude-opus-5-5
A sync that resizes a copy shape carries its subtree through the
constraints of its children. It placed that subtree from the objects as
they were before the sync, so it wrote back the attributes the sync had
just given the children. A reset of a resized copy root left its child's
overridden layout item margin type in place, while clearing its touched
flag.
The subtree is placed from the objects as the sync left them, under the
parent as it was before the sync.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 18.845 | 0.54 |
| edit-through-a-chain-of-dependents | 68.931 | 37.053 | 0.54 |
| library-update-into-copies | 83.083 | 46.11 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 2.087 | 0.43 |
| main-edit-into-10-copies | 1.79 | 0.921 | 0.51 |
| main-edit-into-100-copies | 15.415 | 8.99 | 0.58 |
| main-edit-into-1000-copies | 153.086 | 91.573 | 0.60 |
| variant-switch-into-copies | 32.052 | 18.962 | 0.59 |
AI-assisted-by: claude-opus-5-5
A swap gives the new head the layout item values of the head it
replaces, without touching it. A variant switch then carries the old
head's overrides, but skips any attribute that already has the old
value, so the kept layout item values lost the overrides that authored
them: a later sync of a copy could replace them, and reset no longer
saw them.
A switch also gives the new head the touched groups of the kept
attributes the old head had. The model expects the old head's layout
item overrides to survive a switch.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 18.466 | 0.52 |
| edit-through-a-chain-of-dependents | 68.931 | 38.447 | 0.56 |
| library-update-into-copies | 83.083 | 45.429 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 2.162 | 0.45 |
| main-edit-into-10-copies | 1.79 | 1.064 | 0.59 |
| main-edit-into-100-copies | 15.415 | 9.072 | 0.59 |
| main-edit-into-1000-copies | 153.086 | 89.75 | 0.59 |
| variant-switch-into-copies | 32.052 | 19.484 | 0.61 |
AI-assisted-by: claude-opus-5-5
A reset nested copy under a copy that keeps its own geometry takes the
placement that a sync of that copy gives its subtree. That sync places
the reset head's parent before the parent's layout does, so when a copy
layout placed the parent elsewhere than its main, as a reversed flex
direction does, the reset head moved by the parent's main offset and
was left apart from the parent it belongs to.
The placement follows the parent where it is: it moves by the offset
between the parent's proposed and actual places.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 18.762 | 0.53 |
| edit-through-a-chain-of-dependents | 68.931 | 39.749 | 0.58 |
| library-update-into-copies | 83.083 | 46.429 | 0.56 |
| main-edit-among-many-shapes | 4.837 | 2.079 | 0.43 |
| main-edit-into-10-copies | 1.79 | 0.943 | 0.53 |
| main-edit-into-100-copies | 15.415 | 8.922 | 0.58 |
| main-edit-into-1000-copies | 153.086 | 91.435 | 0.60 |
| variant-switch-into-copies | 32.052 | 20.56 | 0.64 |
AI-assisted-by: claude-opus-5-5
Updating shapes reassigns the cell positions of the grids among them.
That reassignment ignored the update's touched options, so a layout
reflow, which updates every layout without touching it, marked the cells
of a copy grid as its own whenever they moved, as when a copy child
switched to a hidden variant left its cell.
Each grid reassigns its cells with the touched options of its own
update. The model expects a copy grid's direction change to author its
cells only when the change itself moves auto items, not when the reflow
after it makes a cell manual.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.005 | 0.60 |
| edit-through-a-chain-of-dependents | 68.931 | 39.064 | 0.57 |
| library-update-into-copies | 83.083 | 48.602 | 0.58 |
| main-edit-among-many-shapes | 4.837 | 2.246 | 0.46 |
| main-edit-into-10-copies | 1.79 | 0.984 | 0.55 |
| main-edit-into-100-copies | 15.415 | 10.081 | 0.65 |
| main-edit-into-1000-copies | 153.086 | 100.708 | 0.66 |
| variant-switch-into-copies | 32.052 | 20.063 | 0.63 |
AI-assisted-by: claude-opus-5-5
A switch keeps an orientation that the copy, or a shape along its
reference chain, authored when both variants share it, and compares it
with the new copy's own orientation instead of the place its position
gives it. Any geometry override along the chain counted as authoring
it, so a copy child whose position main was only resized carried the
turn it inherits from its turned copy parent, and the switch marked that
inherited turn as a geometry override.
The orientation is carried only when it differs from its component's
orientation turned and flipped with its parent; an inherited one is
compared with the place its position gives it.
Benchmark (scripts/bench-components, ms, lower 2.5% quantile):
| world | baseline | now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 19.316 | 0.55 |
| edit-through-a-chain-of-dependents | 68.931 | 39.369 | 0.57 |
| library-update-into-copies | 83.083 | 45.503 | 0.55 |
| main-edit-among-many-shapes | 4.837 | 2.125 | 0.44 |
| main-edit-into-10-copies | 1.79 | 0.933 | 0.52 |
| main-edit-into-100-copies | 15.415 | 9.092 | 0.59 |
| main-edit-into-1000-copies | 153.086 | 92.629 | 0.61 |
| variant-switch-into-copies | 32.052 | 20.538 | 0.64 |
AI-assisted-by: claude-opus-5-5
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
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
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
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
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
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
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
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
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
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
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
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
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
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