3559 Commits

Author SHA1 Message Date
alonso.torres
9056fc9128 🐛 Keep the size a board's constraints give a nested copy on sync
A copy inside a plain board, such as a main, follows the board's resizes
through its constraints. That resize is not an override: the user did not
set the size. The next sync of the copy's own component then gave it the
component's size, undoing the constraint: a copy scaled to 80 px inside an
80 px main went back to 100 px and overflowed it.

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

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

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

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

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

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

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

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

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

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

Start a missing track list from an empty one.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

AI-assisted-by: gpt-6
2026-11-10 20:21:42 +01:00
alonso.torres
31f9350d08 🐛 Keep grid cell overrides within newly inherited tracks
Create default cells in newly inherited grid tracks before assigning
added copy children. A cell override previously made sync append an extra
track; a later full sync shrank the tracks beneath the retained cells.
Keep existing authored cells and skip positions covered by existing spans.

Add common and real frontend row/column growth histories, including an
opposite copy direction, retained overrides, exact undo/redo and stable
full sync. The original common test failed 12 of 100 assertions and the
frontend test failed 4 of 100. Keep those assertions and add checks that
each child has exactly one cell.

Sync benchmark lower quantiles (ms), baseline -> now (ratio):
  deepest three levels:      35.215 -> 18.770 (0.53)
  chain of dependents:       68.931 -> 37.764 (0.55)
  library update:            83.083 -> 49.418 (0.59)
  main among many shapes:     4.837 ->  3.008 (0.62)
  main into 10 copies:        1.790 ->  0.968 (0.54)
  main into 100 copies:      15.415 ->  9.474 (0.61)
  main into 1000 copies:    153.086 -> 97.063 (0.63)
  variant switch:            32.052 -> 22.157 (0.69)
All worlds pass the recorded 10% regression limit. The baseline used
another machine/JVM, so ratios are rough comparisons.

Validation: common JVM 2,016 tests / 33,356 assertions; common JS
1,952 / 32,015; frontend 1,752 / 14,088; backend 1,793 / 9,007;
exporter 16 / 40. Six properties pass 40 programs at seed 712 in
both common runtimes. Lint and format checks pass for all four modules.
Golden-master data is unchanged.

AI-assisted-by: gpt-6
2026-11-10 20:21:42 +01:00
alonso.torres
a23b37fa47 🐛 Bound flex free-space distribution
Cross-axis fill sizing reaches distribution before the current line size
is initialized. Count eligible items from the minimum fallback, as the
update loop already does. Use zero increments when every item is at its
maximum, avoiding division by zero.

Add portable controls for minimum initialization, redistribution at a cap
and fully saturated items. All three raise arithmetic errors before the
fix and pass afterward. Generated vertical-fill histories cover the full
layout and component pipeline too.

Validate the final continuation on common JVM (2004 tests / 32919
assertions), common JS (1940 / 31522), frontend (1745 / 13569), backend
(1793 / 9007) and exporter (16 / 40). All four modules pass lint and format.
All six generated properties pass 40 programs at seed 712 in both runtimes.
Golden data is unchanged.

The final continuation benchmark passes with no regression flags. Lower
quantile ratios against Phase 1e: main 10/100/1000 0.51/0.58/0.57, three
levels 0.57, chain 0.53, library 0.57, many shapes 0.45, variant switch 0.66.
Machine/JVM differences make these rough comparisons; baseline unchanged.

AI-assisted-by: gpt-6
2026-11-10 20:21:42 +01:00
alonso.torres
8a370149be 🐛 Default absent layout padding to zero
Stored layout frames may omit padding. The padding helpers returned nil
sides, so padding totals and full flex/grid layout calculation crashed on
the JVM. Default absent padding to zero and share that reader between
horizontal and vertical totals.

Add portable regressions that prove the inputs pass the shape schema,
then compare their layout calculation with explicit zero padding. Both
regressions fail before the fix; existing simple/multiple checks stay green.

Validate common JVM (1997 tests) and JS (1933), frontend (1742), backend
(1793) and exporter (16), plus lint and formatting for all four modules.
All six generated properties pass 40 programs at seed 712 in both runtimes.
Golden data is unchanged.

The benchmark passes with no regression flags against the existing baseline.
Lower-quantile ratios: main 10/100/1000 copies 0.51/0.58/0.60, three levels
0.56, chain 0.52, library 0.53, many shapes 0.43, variant switch 0.64.
The tool warns that machine/JVM differences make these rough comparisons.
No performance baseline changed.

AI-assisted-by: gpt-6
2026-11-10 20:21:42 +01:00
alonso.torres
4719ababe8 📎 Restore merged imports and multipart test setup
Keep the string helper required by the variant rename predicate after
removing the old swap-slot helpers. Sort the merged test imports.

Send import-audit fixtures through the existing multipart RPC helper so
they exercise auditing through the required upload path. Start the edit
watcher in the isolated component test so it forwards recorded transitions.

AI-assisted-by: GPT-6
2026-11-10 20:21:42 +01:00
alonso.torres
80278698f7 🐛 Keep single-child flex spacing finite
Compute a space-between gap only when a line has at least two children.
A one-child line keeps its configured gap instead of dividing by zero.

Cover both row and column directions, including reversed layouts, finite
spacing fields and unchanged two-child distribution.

AI-assisted-by: GPT-6
2026-11-10 20:21:41 +01:00
alonso.torres
a4eea62bdc 🐛 Take nested swap constraints from their position source
Settle a nested swap's untouched constraint group from the replaced
position, including fixed-scroll. Carry compatible switch overrides first
so an inherited position cannot discard an authored constraint override.

Cover F224's reduced history in common and the async frontend, both
constraint axes, absent position fields, compatible carry and exact undo.
The complete original history and browser ShapeProxy replay also pass.

Validation: focused swap/variant/golden tests (123 tests, 1,764 assertions),
full common JVM/JS, frontend, backend and exporter suites; lint and format.
Golden data is unchanged.

Benchmark ratios against the unchanged baseline, with no regression flags:
mains 10/100/1,000: 0.53/0.58/0.63; three levels: 0.56; chain: 0.55;
library: 0.56; many shapes: 0.48; variant switch: 0.65.
The baseline uses another machine/JVM, so ratios are rough comparisons.

AI-assisted-by: GPT-6
2026-11-10 20:21:41 +01:00
alonso.torres
c7e8ff8d47 📎 Restore migration and test compatibility after rebase
Keep the container root helper used by the main-instance name migration.
Adapt imported-file ids and component swap tests to the current APIs, and
check copied swaps through their position refs and swap groups.

AI-assisted-by: gpt-6
2026-11-10 20:21:41 +01:00
alonso.torres
a88f53874d 🐛 Keep pending library edits out of transform settlement
Use the component sync result only as a geometry proposal when settling
reflections and swapped placement. Correct existing shapes without pulling
pending library content, styles or structure into a transformed copy.
Keep path geometry and the primary action's exact undo/redo group.

Generate source transforms, letters and all twelve text style units with
separate source histories and explicit consumer acceptance. Add dropped
source-edit controls and portable/frontend regressions for the accidental
pull. Register the new portable namespace in the JavaScript runner.
The complete original program and both reductions pass unchanged.

Common JVM passes 1,919 tests/31,313 assertions. Full JS passes
1,845/29,770; the newly registered source namespace adds 5/135 passing
checks. Frontend passes 1,566/11,119, backend 1,610/8,104 and exporter
14/32. Lint and formatting pass; browser ShapeProxy replay passes.
No golden data changes.

Benchmark ratios against the unchanged baseline: mains 10/100/1000
0.57/0.65/0.61, levels 0.52, chain 0.51, library 0.52, many shapes 0.47,
variant switch 0.60. No regression flag.

AI-assisted-by: gpt-6
2026-11-10 20:21:41 +01:00
alonso.torres
f54d1a288e 🐛 Skip numerically equal component sync writes
Compare integer and floating forms exactly for scalar values, points and
selection rectangles. A library update that only changes their numeric
representation must not create changes or an undo entry. Preserve every
nonzero difference, including real subpixel moves.

Add the reduced resize/library-sync regression and a subpixel control,
plus async frontend undo/redo replay. Review and update eight golden
states in case N: only equal integer/float representations changed.
The recreated seed-712 audit leaves all 61 syncs and undo depths unchanged.

Common JVM 1,914 tests/31,146 assertions and JS 1,845/29,810 pass.
Frontend 1,563/10,880, its added replay, backend 1,610/8,104 and exporter
14/32 pass. Lint and formatting pass. Exporter needs its test-only secret.

Benchmark ratios against the unchanged baseline: mains 10/100/1000
0.54/0.61/0.61, levels 0.53, chain 0.55, library 0.55, many shapes 0.62,
variant switch 0.65. No regression flag.

AI-assisted-by: gpt-6
2026-11-10 20:21:41 +01:00
alonso.torres
48a627e042 🚧 Save component stabilization follow-up
Expand generated component coverage with independent library histories,
meaningful mutation counts, varied geometry and variants, all text style
units, oracle corruption controls and pending-sync frontend replays.

Fix reflected descendants, partial size carry, WASM shape defaults,
deferred swap and sidebar text undo, grid visibility, explicit typography
ownership, metadata filtering and swapped placement through sync/detach.

Recorded validation after F219:
- Common JVM: 1,909 tests / 31,088 assertions; JS: 1,840 / 29,688.
- Frontend: 1,560 tests / 10,821 assertions.
- Backend: 1,610 tests / 8,104 assertions; exporter: 14 / 32.
- Applicable lint and formatting pass; golden data stays unchanged.

Benchmark ratios against the unchanged Phase 1e baseline:
- Main edits into 10/100/1,000 copies: 0.52/0.57/0.58.
- Three levels: 0.51; dependency chain: 0.52; library update: 0.58.
- Many shapes: 0.42; variant switch: 0.62. No regression flags.

This is a checkpoint. The fresh legacy-library gate at seed 712 fails
at program 351 (F221); its cause remains unclassified. The other four
large gates did not run. F220, F187, F214 and wider coverage remain open.

AI-assisted-by: gpt-6
2026-11-10 20:21:33 +01:00
alonso.torres
2b50fda318 ✨ Generate component programs across library files
Build a shared library world and route edits, updates and settlement across
working and library files. Check the independent override model, geometry,
propagation and exact undo for both files. Replay shrunk library failures
through the async frontend with the same target choices and barriers.

Keep common generation/shrinking and CLJS replay as the main regression
suite. Use the plugin for public API, WASM and measured-text smoke checks;
retain its existing fixed cases until equivalent coverage replaces them.

All four properties pass 5000 programs each with seed712, each in a full
run. Fresh swaps: 5009 assertions; library: 5008. Isolated Stage3: 55/379.
Live WASM, fonts, undo/redo and later propagation checks pass.
Full frontend: 1539 tests, 9312 assertions, including 39 generated replays.
Common JVM: 1851 tests, 30684 assertions; JS: 1782 tests, 29308 assertions.
Backend: 1610 tests, 8104 assertions; exporter: 14 tests, 32 assertions.
Plugin: 68 cases. Lint, formatting and unchanged goldens pass.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
85e829844e 🐛 Settle swapped placement when updating a turned main
Updating a rotated copy also turns its main. A swapped descendant whose
content and position sizes differ needs its placement settled in that new
frame. Append the main-file placement changes to the inverse sync, keeping
source-copy changes local and restoring both files in one undo group.

Portable local/library regressions at 45 and 90 degrees fail eight
assertions before the fix and pass all 20 after it. The original seed712
case4855 and its exact shrink pass, as does the 4855..5000 tail diagnostic.
The diagnostic does not replace the full 5000-program swap gate.

Common JVM1851/30684 and JS1782/29308, frontend1539/9312,
backend1610/8104, exporter14/32 and all 68 plugin cases pass.
Focused suites and unchanged goldens pass; lint and formatting pass.
Live WASM at 45/90 degrees keeps placement stable through undo/redo and a
later main edit. Maximum anchor error is below 0.00001px.

Benchmark ratios against the recorded baseline:
main 10/100/1000: 0.49/0.56/0.54; three levels: 0.49;
chain: 0.49; library: 0.50; many shapes: 0.45; switch: 0.58.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
f755452820 🐛 Place reset replacement children in the main frame
Reset clears the parent's geometry override, but replacing a swapped
child cloned its new children through the parent's old rotation. Drop
that override from the whole sync context so existing and new children
use the main's orientation in the same undo group.

F185: portable checks at 45 and 90 degrees fail six assertions before the
fix and pass all fourteen after it. Original and shrunk programs pass.
The focused suite passes 139 tests / 2590 assertions with unchanged goldens.
Live WASM checks reset placement, exact undo/redo, later sync and no
phantom overrides at both angles. Frontend passes 1538 tests / 9253
assertions; plugin 68 cases, lint/format and isolated Stage 3 checks pass.
Common JVM/JS, backend and exporter suites pass.

Phase 1e benchmark ratios: mains 10/100/1000 .50/.55/.57, levels .50,
chain .50, library .52, many shapes .42, variant switch .60.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
0af0d087bf 🐛 Sync restored components after variant name changes
Restoring a variant whose container has gone converts its variant value
into its main name. Report the restored component id to the normal sync
cascade: its main is absent from the old page objects, so ordinary shape
change detection misses it. Copies receive the new name in the restore's
undo group, while authored name overrides remain intact.

F183: the portable regression fails one assertion before the fix and
passes all six after it. Original and shrunk programs pass. The focused
suite passes 138 tests / 2576 assertions with unchanged goldens. Live
WASM checks direct, nested and indirect copies, custom names and undo/redo.
Frontend passes 1536 tests / 9179 assertions; plugin 68 cases, lint and
formatting pass. The isolated Stage 3 check passes 53 tests / 373 assertions.
Common JVM/JS, backend and exporter suites pass.

Phase 1e benchmark ratios: mains 10/100/1000 .50/.56/.57, levels .51,
chain .51, library .52, many shapes .50, variant switch .62.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
fe2c82f358 🐛 Settle swapped placement when a parent turns
A swapped head can inherit a position frame with a different size from
its content. Turning its parent then leaves the head and child away from
the placement that full sync computes. Settle that derived placement in
the primary transform builder for SVG, WASM and shared test operations.
Preserve authored geometry and keep the correction in the same undo group.

F182: portable regression fails four assertions before the fix and passes
all twelve after it. The original and shrunk library programs pass. The
focused suite passes 137 tests / 2570 assertions with unchanged goldens.
Frontend passes 1535 tests / 9141 assertions; lint and formatting pass.
Live WASM checks at 45 and 90 degrees pass undo, redo and later sync.
Common JVM/JS, backend, exporter and all 68 plugin cases pass.

Phase 1e benchmark ratios: mains 10/100/1000 .49/.57/.61, levels .52,
chain .55, library .58, many shapes .59, variant switch .67.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
13cf62bf7b 🐛 Refuse duplicates that expand component nesting loops
A finite repeated component tree can cut recursion with a swapped child.
Duplicating another child in its main opens an unblocked branch that sync
keeps expanding. Check component nesting against the actual destination
before generating duplicate changes, and keep safe shapes in mixed batches.
ALT duplication at the page root remains allowed.

Use the same eligibility in workspace duplication, pure nodes and generated
candidates. The portable regression fails three assertions before the fix
and passes all five afterward. The original library seed 712 case 1601
and its reduced switch/nest/duplicate program pass. Focused regression and
golden checks pass 123 tests, 2492 assertions; goldens are unchanged.
Live WASM verifies refusal, ALT duplication, undo/redo and later stable sync.

Component benchmark ratios: mains 0.47/0.55/0.55; levels 0.51;
chain 0.53; library 0.58; many shapes 0.52; variant switch 0.74.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
c36c2cd391 🐛 Carry variant overrides through deleted near mains
Copies still use stored main data after its component is deleted. Follow
that data both when collecting inherited groups and when matching variant
children, so a switch keeps inherited size, orientation and child fills.

Portable live/deleted controls fail four assertions before the fix and
pass all 16 afterward, including repeat sync and exact undo. Library
seed 712 case 1462 and its 12-step shrink both pass. Focused regression
and golden checks pass 148 tests, 2593 assertions; goldens are unchanged.
Live WASM verifies height 80, rotation 45, child fill, groups, undo/redo
and later main opacity propagation.

Component benchmark ratios: mains 0.51/0.58/0.56; levels 0.50;
chain 0.51; library 0.59; many shapes 0.48; variant switch 0.71.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
82003be1fc 🐛 Carry child geometry through parent rotations received by sync
When sync turns a parent, turn its subtree as derived placement before
walking the children. Geometry overrides keep their size and relative
angle, including swapped children. Read current builder objects throughout
the walk so later syncs do not transform stale records again.

Normalize matrix axis directions for this turn: constraints already handle
resize, and minimum-size matrix scale must not resize children twice.

Portable regression fails for ordinary and swapped geometry overrides.
Expanded controls cover parent turns of 45/135 degrees and authored child
angles of 0/10 degrees, points, flags, retained size, repeat sync and undo.
Broad focused/golden checks: 204 tests, 2314 assertions. Latest controls
and shrunk program: 2 tests, 89 assertions. Goldens remain unchanged.
Initialize the container when direct sync receives an empty builder.
Register the geometry namespace in the JavaScript runner and read record
fields with get in the older flip control. Geometry: 9 tests, 149
assertions on both runtimes. Full common JS: 1768 tests, 29215 assertions.
Full frontend: 1532 tests, 9039 assertions. Lint and formatting pass.
Live WASM verifies both roles, retained placement and later style sync.

Component benchmark ratios: mains 0.51/0.56/0.64; levels 0.62;
chain 0.55; library 0.53; many shapes 0.45; variant switch 0.60.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
1ca23bcbda 🐛 Restore existing component nesting when undoing a move
Sync and swapped children can leave finite repeated component nesting.
Moving a copy out succeeds, but undo rejects its old position under the
normal component-loop guard. Record restore-component-nesting only on
inverses whose original position already repeats a component.

Normal forward moves retain that guard. The applier still rejects physical
object-tree cycles and changes to copy structure. The new optional change
field defaults to the current behavior and changes no stored shape data.

Portable regression: exact undo fails before the fix. Five assertions now
pass, including redo, normal loop refusal and object-cycle refusal using
the generated inverse. Focused JVM and golden checks: 195 tests, 2189
assertions. Both original shrunk programs pass. Live WASM undo/redo restores
complete snapshots. Common/frontend lint and formatting pass.

Component benchmark ratios: mains 0.57/0.62/0.67; levels 0.80;
chain 0.82; library 0.56; many shapes 0.55; variant switch 0.91.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
d0191c2a31 🐛 Sync content from the restored position after a swap back
A swap back relinks to its near position and clears the swap marker.
Sync through the enclosing copy that owns those refs so its content
overrides reach the restored head and children. Keep carried overrides
and unrelated sibling overrides intact.

Portable regression: three failures before the fix, then all assertions
pass, including exact undo. Focused JVM and golden checks: 183 tests,
2143 assertions. The original and newly shrunk library programs pass.
Live WASM verifies plain and variant swaps, later propagation, carried
opacity and an unrelated sibling override. Common/frontend lint and fmt pass.

Component benchmark ratios: mains 0.61/0.80/0.85; levels 0.71;
chain 0.73; library 0.52; many shapes 0.53; variant switch 0.62.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
964433cfc6 🐛 Keep orientation inherited from the old variant on switch
A switch keeps the old root orientation even when its main supplied it.
Record that retained choice as geometry when it differs from the new
expected placement. Continue inheriting placement from enclosing copies
when the switch carries no root geometry override.

Portable regression: three failures before the fix; now passes through
full sync. Focused JVM checks: 182 tests, 2137 assertions. Existing goldens
match. Full frontend: 1528 tests, 8877 assertions. Live WASM passes.

Component benchmark ratios: mains 0.58/0.57/0.60; levels 0.49;
chain 0.50; library 0.60; many shapes 0.46; variant switch 0.65.
All worlds pass with task stress JVMs paused. An earlier run during
concurrent JVM startup exceeded the timing gate; the baseline is unchanged.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
d7945bf7bd 🐛 Author pushed content against its new nested reference
When a pushed swap takes a position with the same component, preserve
content differences as overrides on the promoted head and descendants.
The source copy clears its overrides and follows the promoted subtree.

Portable regression: three failures before the fix; now passes, including
full sync and exact undo. Focused JVM suites: 121 tests, 638 assertions.

Component benchmark ratios: mains 0.61/0.78/0.69; levels 0.53;
chain 0.50; library 0.56; many shapes 0.75; variant switch 0.61.
All worlds pass the baseline performance gate.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
b5cef9697f 🐛 Compare pushed swaps against the updated parent frame
Use the parent's pushed geometry when deciding whether a promoted swap
needs an orientation override. Its original container still has the old
rotation, which can create a phantom geometry group during update-main
of a rotated parent (F172).

The portable regression fails its touched assertion before the fix. All
54 swap tests pass 214 assertions, the library-308 shrink passes, and the
pure golden master matches 1149 assertions without recording. Common and
frontend lint and format pass.

Benchmark ratios against Phase 1e: main 10/100/1000 copies 0.49/0.58/0.59,
three levels 0.54, chain 0.52, library 0.56, many shapes 0.48, variant
switch 0.63. No regression flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
1a47d7b9fc 🐛 Compose child flip flags through parent placement
Keep the source and parent-frame flip composition when placing component
content through a rotated parent. A fresh large matrix turn can otherwise
set both child flip flags even though the user only rotated (F170).
Preserve nil/false representation when the parent does not flip an axis.

The portable regression fails two flag assertions before the fix. Eight
geometry tests pass 61 assertions, the original library shrink passes, and
the pure golden master matches all 1149 assertions without recording.
Common and frontend lint and format pass.

Benchmark ratios against Phase 1e: main 10/100/1000 copies 0.58/0.74/0.57,
three levels 0.49, chain 0.49, library 0.52, many shapes 0.47, variant
switch 0.61. No regression flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
099af03d7d 🐛 Handle empty flex layouts when calculating line positions
Skip per-line stretch division and baseline placement when a flex layout
has no lines. Removing a component's final child then resizing a copy
could divide by zero on the JVM (F169).

The public layout regression fails four assertions before the fix. It
covers row and column layouts with six content alignments. Fresh flex,
swap and variant suites pass 125 tests and 596 assertions, and the shrunk
structure program passes. Pure goldens match all 1149 assertions.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
75190e560c 🐛 Keep inherited orientation when pushing a swapped child
When update-main turns a swap into a plain nested copy, retain its
orientation as a geometry override if it differs from its own component's
expected parent placement. Otherwise a later full sync discards the
rotation inherited from the replaced position (F168).

The portable regression fails three assertions before the fix. Both
0-degree and 45-degree cases now pass, including exact undo. Fresh swap,
variant and flex suites pass 125 tests and 596 assertions. The pure golden
master matches all 1149 assertions without recording.

Benchmark ratios against Phase 1e: main 10/100/1000 copies 0.52/0.62/0.56,
three levels 0.48, chain 0.56, library 0.51, many shapes 0.43, variant
switch 0.60. No regression flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
5df8ab7ff9 🐛 Stop inherited content overrides at swapped references
Walk content refs through intermediate swapped heads when collecting
inherited touched groups. Following the replaced position instead crosses
into another component and gives copies phantom geometry overrides (F165).
Position advancement keeps its separate position-ref walk.

A portable three-level regression fails both chain and touched assertions
before the fix. Swap-group, file and variant suites pass 124 tests and
588 assertions; the shrunk library seed-712 program passes as well.
Common lint and format pass.

Benchmark lower-quantile ratios against Phase 1e: main 10/100/1000 copies
0.48/0.55/0.57, three levels 0.48, chain 0.47, library 0.49, many shapes
0.46, variant switch 0.57. No regression flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
334676e9f6 🐛 Place children after carrying variant geometry overrides
A switch can retain the copy root's resized geometry while leaving its
untouched children in the old frame. After geometry carry, sync the new
subtree from the updated builder objects so constraints place its children
without adding overrides. Reuse the direct component sync entry point.

The portable rotated-root regression fails before the fix with a 30px
child offset. Swap and variant suites pass 108 tests / 539 assertions;
the pure golden master matches 1149 assertions unchanged. Full frontend:
1517 tests / 8436 assertions. Live ws1 WASM retains the resized root and
child placement, with no exception or pending reflow.

Benchmark ratios: main 10/100/1000 copies 0.48/0.56/0.57;
three levels 0.49; chain 0.48; library 0.50; many shapes 0.45;
variant switch 0.61. No slowdown flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
b36adfd980 🐛 Preserve resize overrides across rotated variant switches
A clean target can acquire tiny size drift while taking the old copy's
rotation. Exact main-size comparisons then discard a valid resize.
Compare geometry with its float tolerance, including fixed layout sizes
and composite bounds; keep nongeometry values exact.

The portable rotation/resize regression fails both height and selrect
checks before the fix. Cover ordinary and fixed layout sizing, and
check child placement from the original library shrink separately.
The full variant suite passes on JVM and JS: 56 tests / 337 assertions.

Benchmark lower-quantile ratios against the Phase 1e baseline:
main 10/100/1000 copies 0.52/0.60/0.60; three levels 0.51;
chain 0.52; library 0.54; many shapes 0.46; variant switch 0.65.
No slowdown flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
ff6c735f96 🐛 Restore sibling order when undoing component child removals
Bulk removal inverses move siblings back in original order. Component
sync records each removal's current index; inverse sync falls back to
the original main container when the builder lacks it (F158).

A six-permutation deletion test and a main-swap sync test fail before the
fix. Focused suites pass 70 tests and 242 assertions; two inverse-sync
regressions also pass. Common lint and format pass. The controlled
benchmark has no flags: mains 0.51/0.59/0.58; levels 0.54; chain 0.58;
library 0.55; many shapes 0.51; switch 0.63. The first measurement under
concurrent stress load flagged main-100 at 1.17 and was rerun in isolation.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
6548380043 🐛 Restore parent sync state when undoing child structure edits
Add, remove and move inverses restore the copy parent's remote-synced
flag with its touched groups. Swapping a child clears that flag during
delete; undo must restore the original parent state (F157).

Swap and add/remove regressions fail before the change. The focused swap
suite passes 49 tests and 191 assertions; common lint and format pass.
Benchmark ratios: mains 0.49/0.57/0.62; levels 0.53; chain 0.57; library
0.69; many shapes 0.62; switch 0.62, no regression flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
d2e4f9e44d 🐛 Remove the empty override field after clearing a swap
When removing the last swap group, drop touched instead of retaining an
empty set. A main clone then uses the same representation as set-touched;
a later move and undo can restore its exact prior state (F156).

The unit and move regressions fail before the change. The swap suite and
original shrunk program pass 48 tests and 184 assertions. Common lint and
format pass. Benchmark ratios: mains 0.49/0.56/0.79; levels 0.66; chain
0.82; library 0.78; many shapes 0.92; switch 1.02, no regression flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
bce5a2c5b8 🐛 Keep inherited placement untouched during a plain swap
Compare retained orientation with the position source in copy-parent
coordinates, including cached deleted mains. A rotation inherited from
that source does not author a geometry override (F154).

The focused regression fails before the change. Swap and variant suites
pass 100 tests and 510 assertions; common lint and format pass. Benchmark
ratios: mains 0.47/0.53/0.55; levels 0.51; chain 0.64; library 0.64;
many shapes 0.96; switch 0.68, with no regression flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
d65f8ded0f 🐛 Remove invalid swaps when a main detaches a nested head
A swapped copy must follow structural changes when its position ceases
to be a component head. Walk that shape normally during sync, remove
its component metadata and swap group, and replace its former component
children with the detached main shape's children.

The regression fails three assertions before the fix. The swap suite
passes 44 tests and 177 assertions, including exact undo. The shrunk
generated detach scenario also passes with its structural model update.

Benchmark vs Phase 1e: main 10/100/1000 0.50/0.57/0.64; levels 0.52;
chain 0.52; library 0.60; many shapes 0.55; switch 0.65. No flags.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00