With WASM on, a pure move skips the engine unless a moved shape is in a
layout's flow. A shape moved inside a group or bool that a layout places
took that shortcut: the group grew to it and stayed where the move left
it, where the CLJS engine's layout puts the group back in its place.
The check now walks up through the groups and bools around a moved
shape, and a move whose group a layout places goes through the engine.
Found by the WASM replay of the pinned generated programs (program 169,
`{:world [1 0 {:layout :flex :layout-children true}] :ops [[:structure
0 0 19] [:transform 10 0 0 12]]}`), which passes now; the WASM path does
not run in the node tests.
ClojureScript only; the benchmark covers JVM code and is not run.
AI-assisted-by: claude-opus-5-5
A bool whose only child was a group kept, after ungrouping that group,
the content it had made of the group: the outlines of its shapes one
after the other, not the boolean result of them. The next refit of the
bool, such as the undo of a later edit of one of its shapes, recomputed
it, so that undo did not give back the state before the edit.
An ungroup now refits the group or bool around the ungrouped shape, with
the undo values of the refit.
Tests: `groups-test/ungrouping-a-group-in-a-bool-combines-its-shapes-again`
(fails before the fix), generated
`an-ungroup-in-a-bool-combines-its-shapes-again`.
The ungroup is outside the paths the component benchmark measures; it is
not run.
AI-assisted-by: claude-opus-5-5
The composable model carried a switched copy's geometry onto the new
head as a plain value, while the other carried shapes keep the parent
whose later resizes size them. Resizing the copy that holds the head then
scaled it through its constraint in production, and the model expected
its old size.
The head now carries its geometry with its parent too, its size only:
its place is its position's.
Test: generated `a-switched-head-in-a-copy-scales-with-its-parent`.
Harness only; the benchmark is not run.
Also in this commit:
- Draw 100 programs per random property on the JVM. The coverage check of a
random composition test asks each kind for 0.5% of the run's changes. At 50
programs a seed could draw a kind too few times: the stale library property
drew its child removal 4 times, all changing state, and failed its check while
its property passed. At 100 programs that seed passes, and the shares vary
less.
AI-assisted-by: claude-opus-5-5
Update main of a copy that swapped a nested copy, pushed inside a copy of
the main, puts the swapped shapes in the position's place and points them
at the position's subtree. Their differing content became overrides, but
their constraints did not: a pushed icon kept the copy's fixed scroll
while its new reference scrolls fixed, untouched and different from its
main.
A shape pushed below the head now marks its constraints group when its
constraints differ from those of its new reference, keeping what the copy
showed, as the head already does. The composable model expects that
override.
Test: generated
`an-update-main-of-a-swap-keeps-the-constraints-its-children-showed`.
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.399 | 22.081 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 41.679 | 43.499 | 0.6 |
| library-update-into-copies | 83.083 | 50.272 | 54.817 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.258 | 2.591 | 0.47 |
| main-edit-into-10-copies | 1.79 | 1.034 | 1.071 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.439 | 11.139 | 0.68 |
| main-edit-into-1000-copies | 153.086 | 101.545 | 105.155 | 0.66 |
| variant-switch-into-copies | 32.052 | 23.541 | 24.772 | 0.73 |
AI-assisted-by: claude-opus-5-5
A radius token names a corner as its shape shows it, but a copy mirrored
unlike its main inherited the main's corners as they were. A token value
edit then rounded the corner the main keeps square: the copy's tokens
named its other corners.
A flip now moves a shape's radius tokens with the corners they apply
to, and a transform writes them without making them an override. Sync,
reset, update main and a switch carry tokens into the orientation the
destination ends with (`ctsr/tokens-in-orientation`,
`cll/oriented-by`). The composable oracle compares a copy's radius
group with its main's in the copy's orientation.
Tests: `token-apply-test/a-flip-moves-a-radius-token-with-its-corner`,
generated `a-token-edit-keeps-the-square-corner-of-a-mirrored-copy`.
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.352 | 23.145 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 44.184 | 45.036 | 0.64 |
| library-update-into-copies | 83.083 | 52.481 | 54.229 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.354 | 2.498 | 0.49 |
| main-edit-into-10-copies | 1.79 | 1.031 | 1.1 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.729 | 10.946 | 0.7 |
| main-edit-into-1000-copies | 153.086 | 103.496 | 105.968 | 0.68 |
| variant-switch-into-copies | 32.052 | 23.207 | 23.7 | 0.72 |
AI-assisted-by: claude-opus-5-5
Pushing a grid copy's column direction to its main left the main's
children in their row order, and pushing a copy's grid cells left the
main's children where they were before, outside the cells they took. A
sync reflows the layouts of the copies it changes, but `update-component`
reflowed none, so the main never laid out again.
It now emits a layout update for the frames its changes touch in the
current file, the main's among them when its component is local, in the
undo group of the update.
Test: frontend generated
`generated-an-update-main-of-a-grid-direction-orders-the-main-by-it`.
The frontend golden master of `case-ak-update-main-pushes-grid-cells` is
recorded again: its main and copy children now sit at their cells, where
they were left stacked outside their boards.
ClojureScript only; the benchmark covers JVM code and is not run.
AI-assisted-by: claude-opus-5-5
Ungrouping a board in a grid main whose copies are ungrouped alike took
two Ctrl+Z to undo: the first only moved the copies' children back. The
layout update after the ungroup stacks onto its history entry with an
undo group of its own, which the entry records among the groups stacked
into it. The component sync that update causes commits later under that
group without stacking, and `append-undo` gave it a new entry when the
matching entry was the latest. Undo walks entries by their own undo
group, so the new entry was undone alone.
Such a commit now joins the entry that holds its group among the stacked
ones. Commits of one group in a row still keep their entries, which undo
walks together.
Tests: `workspace-undo-test/a-delayed-commit-joins-the-entry-its-group-
was-stacked-into` (fails before the fix), `adjacent-commits-of-one-group-
keep-their-entries`, and the frontend generated `generated-an-ungroup-in-
a-grid-main-undoes-in-one-step`.
ClojureScript only; the benchmark covers JVM code and is not run.
AI-assisted-by: claude-opus-5-5
The frontend interpreter recorded three library steps unlike the pure
runner, so three replayed programs differed from the model with no
difference in production:
- A detach leaves a nested copy's child plain when the loaded library no
longer has its main; the interpreter now records those children, as the
detach node does, and the oracle reads each as its main's child.
- A duplicate takes the reference inputs of the shapes it copies, so a
duplicate of a copy back on an older library holds that version.
- A library sync remembers its copies against the synced library as
loaded and the other libraries as accepted.
The detach node and the interpreter share `n/record-unlinked-children`.
Frontend generated tests replay the three programs.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Two dashboard templates, Avataaars and Tutorial for beginners, hold the
filter attribute of some shapes as a map an old reader split out of its
text, as `{:url(#filter_2) nil}` for `url(#filter_2)`. The svg attribute
schema takes only scalars outside `:style`, so their import failed the
file validation after migrating.
Migration 0039 turns such a map back into the reference to one of the
shape's defs it names, matched to the defs id as stored though 0035 may
have kebab-cased the map, and drops any other map value. Both templates
then import valid, with their filters.
The benchmark is not run: the change is a file migration.
AI-assisted-by: claude-opus-5-5
The model kept the geometry a shape authored relative to the parent it
authored it in. A move keeps where and how the shape shows, so moved into
a turned board it was expected turned with it, where production keeps
its turn on the page. The model records the authored geometry again in
the shape's new parent after a move.
Harness only; the benchmark is not run.
Also in this commit:
- Draw fewer random programs in JS and check coverage on the JVM. The random
composition properties drew 50 programs in JS as on the JVM, which made the JS
run of the common tests take about two and a half hours. JS runs the same
model and production code, so it now draws 15 programs per property as a
parity check, and the coverage shares, which need the JVM's 50 programs to
tell, are asserted on the JVM only.
AI-assisted-by: claude-opus-5-5
An update main that adds a copy's new shape to the main makes the
differences between the pushed shape and its new reference authored. A
pasted shape holds empty fill and stroke lists where its main holds none,
so pushing it marked its fills and strokes overridden though nothing
shows differently. No fills or strokes and an empty list of them are the
same there.
Benchmark (bench-components, run alone):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 24.875 | 25.599 | 0.71 |
| edit-through-a-chain-of-dependents | 68.931 | 47.991 | 52.684 | 0.7 |
| library-update-into-copies | 83.083 | 60.901 | 62.895 | 0.73 |
| main-edit-among-many-shapes | 4.837 | 3.193 | 3.451 | 0.66 |
| main-edit-into-10-copies | 1.79 | 1.199 | 1.252 | 0.67 |
| main-edit-into-100-copies | 15.415 | 10.375 | 11.472 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 113.348 | 121.731 | 0.74 |
| variant-switch-into-copies | 32.052 | 23.113 | 24.522 | 0.72 |
AI-assisted-by: claude-opus-5-5
With `PENPOT_REPLAY_PROGRAMS` naming an EDN file of programs, a frontend
generated test replays each of them and logs its own results, which
compares the frontend with the model on many programs without a browser.
Without it the test does nothing.
Harness only; the benchmark is not run.
Also in this commit:
- Give the generated text component a measurable size. The generated worlds'
text component had a board and a text of a hundredth of a pixel, where turning
or moving them left the transform to float noise and the checks reported
differences no design shows. The board is 100 by 100 and the text 100 by 20;
`add-frame-with-text` sets up its text with the size its child params give.
AI-assisted-by: claude-opus-5-5
Saving a token from its form committed the edit, then propagated the new
value to the shapes in an undo transaction of its own, opened only once
the tokens resolved. One undo reverted the shapes and left the token with
its new value.
The propagation opens its transaction before the tokens resolve, and the
form commits the edit and the propagation in one transaction, which the
propagation's nests in. The frontend replay commits a token edit as the
form does.
The benchmark covers JVM code; this change is ClojureScript only, so it
is not run.
AI-assisted-by: claude-opus-5-5
A bool takes the bounds of its result, smaller than those of the shapes
it combines for an intersection, but creating it did not update the
layout it is in, so in a grid board it kept a place the layout does not
give it. It now updates the layout of its parent, as grouping does.
The benchmark covers JVM code; this change is ClojureScript only, so it
is not run.
AI-assisted-by: claude-opus-5-5
Unmasking a group gives it the bounds of all its children instead of its
mask's, but the event did not update the layout the group is in, so in a
flex or grid board it kept the place of its old bounds and overlapped its
neighbours. It now updates the layouts of the groups' parents, as group,
mask and ungroup do.
The benchmark covers JVM code; this change is ClojureScript only, so it
is not run.
AI-assisted-by: claude-opus-5-5
`oracle/inequivalence` compared a shape's values on their own, so the
geometry tolerance of `equivalent?` did not apply and float noise was
named as the first difference. Each key is compared within the shape it
belongs to.
Harness only; the benchmark is not run.
Also in this commit:
- Replay layout, structure and grid track edits as the UI does. The frontend
interpreter set a layout's gap, padding and item alignment and a layout
child's margin with a plain shape update, where the sidebar goes through the
layout events that reflow the layout; a copy then kept its children where the
old gap put them. It dispatches those events now.
- Watch the targets of a replayed program in the browser. With `watch`, the
browser replay logs the events the store handles and each move of the shapes
the program's operations target.
AI-assisted-by: claude-opus-5-5
A fill child of a grid takes the size of its content, which the grid's
fill then fits to its cell. An absolute child is not filled by the grid,
and the content of a grid whose flex columns span its width is that width
and its padding, so an absolute fill board of a grid grew by its padding
at every layout pass and never settled.
An absolute child keeps its size.
Benchmark (bench-components, run alone):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 23.593 | 26.323 | 0.67 |
| edit-through-a-chain-of-dependents | 68.931 | 50.077 | 55.477 | 0.73 |
| library-update-into-copies | 83.083 | 50.157 | 52.815 | 0.6 |
| main-edit-among-many-shapes | 4.837 | 2.511 | 3.077 | 0.52 |
| main-edit-into-10-copies | 1.79 | 1.172 | 1.215 | 0.65 |
| main-edit-into-100-copies | 15.415 | 9.878 | 12.423 | 0.64 |
| main-edit-into-1000-copies | 153.086 | 123.768 | 175.446 | 0.81 |
| variant-switch-into-copies | 32.052 | 21.933 | 22.474 | 0.68 |
AI-assisted-by: claude-opus-5-5
A text style edit that applies the generated typography in a world whose
file holds none named a typography that resolves to nothing, so the model
wrote a dangling reference the copies then had to match. Without the
typography, that edit clears the text's typography instead.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Ungrouping a board in a grid main ungroups its copies alike. A copy with
its own cells placed the shapes the ungroup brought in by its own flow,
which adds tracks along its direction: a copy flowing in columns grew a
row its main did not have, so tracks it never overrode stopped following
its main's.
A copy with its own cells now first takes the tracks the ungroup left in
the grid it refers to, on the axes it does not override, then gives its
free cells to the new shapes in its main's layer order.
Benchmark (bench-components, run alone):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.032 | 22.764 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 43.547 | 51.026 | 0.63 |
| library-update-into-copies | 83.083 | 52.297 | 57.441 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.474 | 4.362 | 0.51 |
| main-edit-into-10-copies | 1.79 | 1.091 | 1.162 | 0.61 |
| main-edit-into-100-copies | 15.415 | 11.465 | 12.265 | 0.74 |
| main-edit-into-1000-copies | 153.086 | 111.337 | 115.898 | 0.73 |
| variant-switch-into-copies | 32.052 | 22.186 | 27.148 | 0.69 |
AI-assisted-by: claude-opus-5-5
When a board shrinks below the margins of a child constrained left-right
or top-bottom, the child's sides cross. The CLJS engine sizes the child by
the length between them; the WASM engine divided their signed distance
and mirrored the child.
The WASM engine takes the length between the sides too.
The benchmark covers JVM code; this change is in the WASM engine only, so
it is not run.
AI-assisted-by: claude-opus-5-5
A board's children keep their distances to its sides through a transform
by the side projections of `Bounds`, which change sign for a mirrored box.
They took the signs of the box matrix's diagonal for its flips; a box
turned a quarter has that diagonal at float noise, so after flipping a
turned board the signs came out at random and its constrained children
were thrown off, twice as far for each nested board.
A box is mirrored when its matrix's determinant is negative.
The benchmark covers JVM code; this change is in the WASM engine only, so
it is not run.
AI-assisted-by: claude-opus-5-5
With `debug`, the browser replay logs each target and the shapes every
program ends with whether the WASM engine is on or off, so a WASM failure
can be compared with the same program on the plain engine.
Harness only; the benchmark is not run.
Also in this commit:
- Apply the generated typography only where the file holds it. A text style edit
picks the generated typography for one of its values, but only worlds with
text styles add that typography to the file. In the others the model applied
the edit's styles while the frontend applied a missing typography, which sets
no style, so the two diverged. The edit names the typography only when the
file holds it.
- Replay programs in the browser as the frontend tests do. The browser replay
mocks the backend and the timers as the frontend generated tests do, turns the
WASM engine off for the plain engine even when the page's configuration turns
it on, and in debug logs the content a text edit commits and each text's
characters and font weights.
- Name the boards a deleted component's main was held by. The canonical design
data names shapes and components by their place in the tree, so the model and
the frontend compare although each allocates its own ids. A deleted component
keeps the ids of the board that held its main, as a variant's component keeps
its container's once the variant is undone; with that board gone the ids
stayed raw and differed between the two runs. They are named after the
component when no live shape is.
- Report where the model and the frontend first differ. A backend mismatch in
the frontend replay printed the whole diff of the two canonical designs, which
lists float noise the comparison accepts next to the difference it rejects.
`oracle/inequivalence` walks the two designs as `equivalent?` compares them
and returns the path of the first rejected value with both sides; the mismatch
message leads with it.
- Keep text sizes and take inline programs in the browser replay. With the WASM
engine on, the replay keeps each text's stored size in place of the engine's
text resizes: the model keeps stored sizes, and the generated texts are too
narrow to measure, so a new copy's measured text differed from its main's
unmeasured one. The page also takes the programs inline in an `edn` query
parameter, which a shrink loop drives.
AI-assisted-by: claude-opus-5-5
The component watcher drops a translation commit that moves only shapes
outside mains or whole mains. It found the main of each moved shape with
`get-component-shape`, which stops at the nearest copy head, so a copy
placed in a main, or a shape inside one, looked like a shape outside any
main: moving it with the WASM engine on, whose drags commit as
translations, left the main's copies where they were.
The watcher now walks up through nested copies to the main instance the
shape lies in.
The benchmark covers JVM code; this change is ClojureScript only, so it
is not run.
AI-assisted-by: claude-opus-5-5
The replay page takes a `start` index to resume a long run, an `engine`
of `plain` to replay the same programs with the WASM engine off, and a
`debug` flag that logs each target, each WASM layout with its result and
the shapes of a failing program.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A `:simple` padding or margin type repeats the top and right values on
the bottom and left, as `ctl/paddings` and `ctl/child-margins` read them,
but the WASM engine received the four stored values. A board whose type
was switched to simple after editing its sides laid out its children with
the stale bottom and left values in the WASM engine only, so moving one
child shifted all of them and marked copies as touched.
Both the shape payload and the per-attribute calls now send the values
the layout functions return.
The benchmark covers JVM code; this change is ClojureScript only, so it
is not run.
AI-assisted-by: claude-opus-5-5
With WASM on, a pure move took a shortcut: the translation was applied
to the moved shapes and their subtrees without asking the engine to lay
them out. A shape in a layout's flow then stayed where it was moved,
where the CLJS engine's layout put it back, and a copy shape kept the
move as a geometry override. A move of a shape that a layout places now
goes through the engine like any other transform.
Found by replaying generated programs in the browser with WASM on. The
JVM benchmark does not run the WASM path; it is not run.
AI-assisted-by: claude-opus-5-5
The frontend replay of generated component programs runs in node, where
the WASM render engine is not available. A `test-wasm` build runs the same
replay in a browser page: it loads the engine on a canvas, turns on
render-wasm/v1 and loads the shapes of the replayed page into the engine
whenever they change, so every layout goes through it. Text edits commit
through the SVG editor, as the WASM editor needs its own editing session.
The page reads the programs the common tests pin, which a script writes
out, and reports each one to the console.
Build with `pnpm run build:test-wasm`, then open
`/test-wasm.html?programs=programs.js`.
Test tooling only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A bool shows its segments. Its transform and the order of its corners
say nothing its flags and segments do not: sync orients its children
from its turn and flips, and fitting it resets its transform. A turned
bool in a flipped board could store a transform that does not mirror,
or its corners in another order, depending on which step last fitted
it. Design snapshots now leave its transform out and take its corners
in any order.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A bool keeps its turn and flips when fitting it resets its transform, so
sync orients its children from them, choosing between the turn before
the flips and the flips before the turn by which is nearer the bool's
axes. A fitted bool's axes are the identity, which tells neither apart,
and the choice fell to the flips first: a flipped, turned copy bool gave
its child a half-turned orientation, which a sync of the settled state
did not. The turn now goes first on a tie, as a flip of a turned shape
stores it.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.783 | 25.354 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 51.070 | 52.568 | 0.74 |
| library-update-into-copies | 83.083 | 54.684 | 63.220 | 0.66 |
| main-edit-among-many-shapes | 4.837 | 2.978 | 3.782 | 0.62 |
| main-edit-into-10-copies | 1.79 | 1.212 | 1.281 | 0.68 |
| main-edit-into-100-copies | 15.415 | 12.907 | 13.628 | 0.84 |
| main-edit-into-1000-copies | 153.086 | 107.916 | 123.169 | 0.70 |
| variant-switch-into-copies | 32.052 | 25.136 | 29.877 | 0.78 |
AI-assisted-by: claude-opus-5-5
Run on the dashboard templates, the scan reported thousands of copies
that a sync would rewrite with the same geometry within a hundredth of a
pixel, the same path segments, or a text whose letters and styles show
the same in another spelling. It now compares geometry and path content
within a hundredth and text content by its override groups, so what it
reports is a difference a user can see.
The scan is a debugging tool outside sync; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Resizing a copy board scales a swapped head in it through its
constraints. The next sync of the head, as the root of its own component,
gave it its component's size back. As a sync that resizes a board already
does, a transform that resizes one now marks the geometry of each
untouched swapped head it gives another size, unless a layout sizes it,
so later syncs keep that size. The harness model authors the same size.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 23.800 | 28.893 | 0.68 |
| edit-through-a-chain-of-dependents | 68.931 | 48.458 | 60.725 | 0.70 |
| library-update-into-copies | 83.083 | 61.325 | 63.038 | 0.74 |
| main-edit-among-many-shapes | 4.837 | 2.523 | 2.669 | 0.52 |
| main-edit-into-10-copies | 1.79 | 1.180 | 1.214 | 0.66 |
| main-edit-into-100-copies | 15.415 | 11.228 | 11.628 | 0.73 |
| main-edit-into-1000-copies | 153.086 | 110.756 | 120.456 | 0.72 |
| variant-switch-into-copies | 32.052 | 24.565 | 28.627 | 0.77 |
AI-assisted-by: claude-opus-5-5
A pasted shape gets empty fill and stroke lists, as the clipboard gives
them, while its main and a later sync of it have none. Both show nothing,
but the oracle and the model told them apart. Values and design
snapshots now take a missing list as an empty one.
Harness only; the benchmark is not run.
Also in this commit:
- The harness changes that check the next commit, "Author the size a resize
gives an untouched swapped head".
AI-assisted-by: claude-opus-5-5
The letters of a text keep, for a paragraph with no letters, the index of
its run among the runs. It was counted after the run was added to the
transient list, so it pointed one past the run: at the next paragraph's
run, or past the end when the empty paragraph came last. Comparing the
styles of such a copy with its main failed, and importing the Penpot
Design System template stopped in the migration that recomputes old
text overrides.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.783 | 24.854 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 47.467 | 53.332 | 0.69 |
| library-update-into-copies | 83.083 | 70.859 | 102.070 | 0.85 |
| main-edit-among-many-shapes | 4.837 | 3.322 | 3.654 | 0.69 |
| main-edit-into-10-copies | 1.79 | 1.200 | 1.572 | 0.67 |
| main-edit-into-100-copies | 15.415 | 11.457 | 18.418 | 0.74 |
| main-edit-into-1000-copies | 153.086 | 109.634 | 125.910 | 0.72 |
| variant-switch-into-copies | 32.052 | 30.110 | 35.890 | 0.94 |
AI-assisted-by: claude-opus-5-5
The clipboard's paste maps over the fills and strokes of every shape it
adds, so a shape without them, such as a group, gets empty lists. The
harness paste left them out, and the frontend replay of a generated
paste differed from the JVM run by them.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Renaming a component from the assets panel renames the component, then
its main root, in two commits. Undo took them back one at a time, so a
single undo left the component and its main with different names. They
are now one undo transaction.
Found by the frontend replay of generated programs with the new rename
kind. The JVM benchmark does not run frontend events; it is not run.
AI-assisted-by: claude-opus-5-5
A grid that hugs its content along an axis took its percent tracks
there as percentages of its current size, which the hug then changed,
so the grid settled only over several reflows, in both engines. Along an
axis the grid hugs, percent tracks are now sized by their content, as
CSS does for a container without a definite size, and the grid settles
in one reflow.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.420 | 23.267 | 0.64 |
| edit-through-a-chain-of-dependents | 68.931 | 42.715 | 52.079 | 0.62 |
| library-update-into-copies | 83.083 | 59.152 | 66.682 | 0.71 |
| main-edit-among-many-shapes | 4.837 | 3.469 | 3.887 | 0.72 |
| main-edit-into-10-copies | 1.79 | 1.119 | 1.416 | 0.63 |
| main-edit-into-100-copies | 15.415 | 10.790 | 12.449 | 0.70 |
| main-edit-into-1000-copies | 153.086 | 108.911 | 129.565 | 0.71 |
| variant-switch-into-copies | 32.052 | 23.968 | 26.842 | 0.75 |
AI-assisted-by: claude-opus-5-5
Ungrouping in a grid main brings the group's shapes into each copy as
well. A copy with its own cells gave them its free cells in the order
the main's grid flows them, while sync gives such a copy's new children
its free cells in the main's layer order, so the result depended on the
path. The ungroup now uses the main's layer order too.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.979 | 26.978 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 43.948 | 50.432 | 0.64 |
| library-update-into-copies | 83.083 | 51.875 | 58.852 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.911 | 3.140 | 0.60 |
| main-edit-into-10-copies | 1.79 | 1.160 | 1.245 | 0.65 |
| main-edit-into-100-copies | 15.415 | 11.340 | 11.833 | 0.74 |
| main-edit-into-1000-copies | 153.086 | 110.971 | 121.066 | 0.72 |
| variant-switch-into-copies | 32.052 | 24.935 | 29.875 | 0.78 |
AI-assisted-by: claude-opus-5-5
A copy duplicated in place under a stale library differs from its
updated main, and the check that keeps a pasted copy's look marked its
geometry although its source had none marked. The check now applies only
to a copy that lands under a parent other than its source's. The harness
model authors a pasted copy's geometry where it lands when its source
authored it, and when another parent gave it its orientation or size.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.980 | 22.894 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 43.830 | 44.755 | 0.64 |
| library-update-into-copies | 83.083 | 53.028 | 54.143 | 0.64 |
| main-edit-among-many-shapes | 4.837 | 2.352 | 2.487 | 0.49 |
| main-edit-into-10-copies | 1.79 | 1.103 | 1.125 | 0.62 |
| main-edit-into-100-copies | 15.415 | 10.851 | 11.191 | 0.70 |
| main-edit-into-1000-copies | 153.086 | 108.036 | 112.301 | 0.71 |
| variant-switch-into-copies | 32.052 | 22.906 | 23.847 | 0.71 |
AI-assisted-by: claude-opus-5-5
A copy shape that authored its place in a plain board, then taken into a
grid board by an ungroup of its main, is placed by that grid. The model
still compared the place it had authored. A shape a layout places is no
longer held to an authored place.
Harness only; the benchmark is not run.
Also in this commit:
- The harness changes that check the next commit, "Mark a pasted copy's geometry
only when it changes parent".
AI-assisted-by: claude-opus-5-5
Switching a swapped head back to the variant its main holds syncs it from
the copy's root, which misses a move the copy's layout gave its parent:
a grid copy with its own gap moves its child boards, and the restored
head landed where the board would be without that gap. The restored head
now takes the place its main shape has in its actual parent, unless it
authors its geometry or a layout places it.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 23.030 | 27.413 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 42.850 | 57.976 | 0.62 |
| library-update-into-copies | 83.083 | 60.905 | 63.778 | 0.73 |
| main-edit-among-many-shapes | 4.837 | 3.209 | 4.225 | 0.66 |
| main-edit-into-10-copies | 1.79 | 1.162 | 1.511 | 0.65 |
| main-edit-into-100-copies | 15.415 | 11.296 | 12.963 | 0.73 |
| main-edit-into-1000-copies | 153.086 | 103.929 | 116.557 | 0.68 |
| variant-switch-into-copies | 32.052 | 22.613 | 25.676 | 0.71 |
AI-assisted-by: claude-opus-5-5
A nested copy inside a flipped or turned main shows the orientation its
parent gives it. Copied and pasted elsewhere, it kept that orientation
without marking its geometry, so the next sync turned it back to its
main's with no edit. Each new top copy of a paste or duplicate now goes
through the check a detached copy does: when it is not oriented and
sized as its main turned like its new parent, its geometry is marked as
its own. The harness model authors the same geometry.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.546 | 22.997 | 0.64 |
| edit-through-a-chain-of-dependents | 68.931 | 42.115 | 43.255 | 0.61 |
| library-update-into-copies | 83.083 | 52.064 | 54.230 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.409 | 2.585 | 0.50 |
| main-edit-into-10-copies | 1.79 | 1.072 | 1.139 | 0.60 |
| main-edit-into-100-copies | 15.415 | 10.340 | 10.963 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 105.617 | 109.281 | 0.69 |
| variant-switch-into-copies | 32.052 | 22.217 | 22.754 | 0.69 |
AI-assisted-by: claude-opus-5-5
The CLJS grid centered a child horizontally with half its margins, as
CSS and the flex layout do, but vertically it shifted the child by the
whole top and bottom margins. Both axes now center the margin box.
Found by laying out random grid boards in a WASM workspace and reflowing
the same objects with the CLJS engine.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.021 | 21.658 | 0.60 |
| edit-through-a-chain-of-dependents | 68.931 | 41.085 | 42.996 | 0.60 |
| library-update-into-copies | 83.083 | 51.898 | 52.585 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.255 | 2.395 | 0.47 |
| main-edit-into-10-copies | 1.79 | 1.031 | 1.069 | 0.58 |
| main-edit-into-100-copies | 15.415 | 9.877 | 10.192 | 0.64 |
| main-edit-into-1000-copies | 153.086 | 100.151 | 105.021 | 0.65 |
| variant-switch-into-copies | 32.052 | 22.340 | 23.371 | 0.70 |
AI-assisted-by: claude-opus-5-5
The WASM grid engine laid out children differently from the CLJS engine
and from CSS. It centered a child in its cell without its margins, put a
child aligned to the end past the cell by its end margin, and sized auto
and flex tracks by a child's bounds without its margins, so a grid that
hugs its children came out narrower. A child now sits in its cell as
CSS places its margin box: after its start margin, centered with its
margins, or before its end margin. A track takes the size of its
children's margin boxes.
Found by laying out random grid boards in a WASM workspace and reflowing
the same objects with the CLJS engine.
The JVM benchmark does not run the WASM engine; it is not run.
AI-assisted-by: claude-opus-5-5
A paste kind joins the structure programs: the clipboard's copy of a top
copy, or of a shape a main holds, pasted at the page root. Nothing in
them leaves a copy level, so no ref is advanced. The model carries the
overrides of the copied subtree to the pasted one, as for a duplicate.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Sync adds the copies of a main's new children before it removes those of
the children the main lost. Grouping two children of a full grid main
gave each grid copy one flow child more than its cells for a moment, so
it grew a column; the removals left that column empty and the next sync
dropped it. A copy that does not override its cells now takes its main's
tracks on each axis it does not override (all of them on a reset) before
it takes its main's cells.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.772 | 21.537 | 0.59 |
| edit-through-a-chain-of-dependents | 68.931 | 41.197 | 42.556 | 0.60 |
| library-update-into-copies | 83.083 | 49.581 | 51.122 | 0.60 |
| main-edit-among-many-shapes | 4.837 | 2.181 | 2.405 | 0.45 |
| main-edit-into-10-copies | 1.79 | 1.108 | 1.158 | 0.62 |
| main-edit-into-100-copies | 15.415 | 10.273 | 10.948 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 100.399 | 109.973 | 0.66 |
| variant-switch-into-copies | 32.052 | 21.866 | 22.788 | 0.68 |
AI-assisted-by: claude-opus-5-5
Three kinds join the structure programs, and the programs built on them:
- move: a shape a main holds, or a nested copy head, moves to the page,
into a board or group of its own main or of another. The model gives
an override of its constraints the defaults of its new parent, as the
move resets them.
- rename: the assets panel's rename, with names that carry a path. The
component must take the normalized path and name, and its main root
the whole name.
- annotate: a component's annotation is set or removed. Only that edit,
or its undo or redo, may change an annotation.
The frontend interpreter realises the rename and the annotation through
their workspace events.
Harness only; the benchmark is not run.
Also in this commit:
- Ignore the layout-given size of a hidden layout child in the oracle. A hidden
shape leaves its layout's flow, so it keeps the size the layout last gave it
along its fill or auto axes, while a sync from its main can give it the
main's. The layout gives it its size again once it is shown. The oracle
expected the main's size, and the design snapshots of a settled and a fully
synced world differed by it. Those sizes are now nobody's to keep, as the
place of a hidden layout child already is.
AI-assisted-by: claude-opus-5-5
Moving a shape of a copy group that a layout places changes the group's
bounds, and the layout moves the group back: the moved shape ends where
it was and its siblings move the other way. Nothing was marked, so the
next sync put the siblings back and the user's move was lost.
When a transform moves some copy shapes of the outermost group or bool a
layout places and leaves others, every copy shape in that group now
authors its geometry. A transform of the whole group or of its board
marks nothing more. The harness model authors the same shapes, and
transforms of copy shapes in groups inside layouts are generated again.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 23.506 | 23.987 | 0.67 |
| edit-through-a-chain-of-dependents | 68.931 | 40.749 | 42.565 | 0.59 |
| library-update-into-copies | 83.083 | 49.609 | 50.752 | 0.60 |
| main-edit-among-many-shapes | 4.837 | 2.344 | 2.551 | 0.48 |
| main-edit-into-10-copies | 1.79 | 1.103 | 1.179 | 0.62 |
| main-edit-into-100-copies | 15.415 | 10.109 | 10.492 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 103.527 | 107.994 | 0.68 |
| variant-switch-into-copies | 32.052 | 21.691 | 22.453 | 0.68 |
AI-assisted-by: claude-opus-5-5
An update main pushes a copy's grid direction into its main. When that
main is itself a grid copy with its own cells, sync orders its children
as they flow in those cells, but the update ordered them as the pushing
copy lists them. The next sync of that copy then reordered them with no
edit. The update now gives such a main the order of the copy's cell
flow.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.632 | 22.076 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 42.236 | 44.386 | 0.61 |
| library-update-into-copies | 83.083 | 48.557 | 51.934 | 0.58 |
| main-edit-among-many-shapes | 4.837 | 2.443 | 2.556 | 0.51 |
| main-edit-into-10-copies | 1.79 | 1.129 | 1.149 | 0.63 |
| main-edit-into-100-copies | 15.415 | 10.085 | 10.387 | 0.65 |
| main-edit-into-1000-copies | 153.086 | 101.224 | 103.687 | 0.66 |
| variant-switch-into-copies | 32.052 | 20.846 | 21.588 | 0.65 |
AI-assisted-by: claude-opus-5-5
A copy bool set to fill in a grid cell is sized by the grid, and its
shapes scale with it. The oracle expected them at their main's size and
place. The shapes of a group or bool whose size a layout owns are now
sized and placed by that layout too.
Test: the-shapes-of-a-copy-bool-a-grid-fills-are-sized-with-it; shape
structure programs pass (seed 9008, 300).
Harness only; the benchmark is not run.
Also in this commit:
- Compare the corners of a masked group in any order on undo. A masked group
takes the corners of its mask. When the mask is a bool, a sync that refits it
computes them again from its children in any order, and the undo of that sync
refits it the same way. The undo check already compares the corners of a bool
in any order; a masked group now follows its mask.
- Read the size of a copy path from its bounds in the harness model. A path
stores no width or height, so the model saw no change when a copy path that a
layout places was resized: its place is the layout's and its size values stay
nil. The model now reads a size change of a shape with no width from its
bounds, and expects the resize to mark it.
AI-assisted-by: claude-opus-5-5
A group keeps its transform when it fits its children but clears its
flip flags; a bool keeps its flags while fitting it resets its
transform. Sync read the orientation of both from their transform, so a
bool in a copy whose main was flipped, resized afterwards, looked
unflipped, and a full sync unflipped its shapes, apart from the settled
file.
A bool's orientation now comes from its turn and flips, a group's from
its transform. The harness generates resizes of copy bools again.
Test: a-copy-bool-and-its-shapes-are-compared-by-their-corners, now
reached; group, sync, switch, golden master and generated group and bool
tests pass (376).
Benchmark (alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.34 | 27.387 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 46.931 | 67.865 | 0.68 |
| library-update-into-copies | 83.083 | 63.966 | 74.531 | 0.77 |
| main-edit-among-many-shapes | 4.837 | 2.42 | 2.623 | 0.5 |
| main-edit-into-10-copies | 1.79 | 1.122 | 1.169 | 0.63 |
| main-edit-into-100-copies | 15.415 | 10.589 | 11.406 | 0.69 |
| main-edit-into-1000-copies | 153.086 | 101.69 | 106.961 | 0.66 |
| variant-switch-into-copies | 32.052 | 21.962 | 26.736 | 0.69 |
AI-assisted-by: claude-opus-5-5