25346 Commits

Author SHA1 Message Date
alonso.torres
1380d49da8 👷 Run the generative component tests apart from CI
The random component program properties of `composable-gen-test`
(`random-compositions`, `random-structure-compositions` and the other
nine `random-*` tests) ran in every common test run, on the JVM with
100 programs each and in JS with 15. They are now tagged `:generative`
and left out of the default runs, so CI runs only the unit tests.

- `tests.edn` skips `:generative`; `tests-generative.edn` runs only it:
  `pnpm run test:generative`.
- The JS runner leaves them out of the full run; `--generative` runs
  only them: `pnpm run test:generative:js`. A `--focus` still runs a
  focused one.

AI-assisted-by: claude-opus-5-5
2026-11-19 12:57:42 +01:00
alonso.torres
c5c60e466b 🐛 Measure a text in the element its renderer mounted
In the SVG renderer, a text inside a component kept drawing its old
font weight after a font weight token changed: the Design panel showed
the new weight, the canvas the old one, also after a reload.

A changed text is measured in a hidden HTML element, looked up in the
document by `#html-text-node-<id>`. While a layout reflows, the text
modifiers renderer mounts an element with the same id for the same
text, ahead of the changes renderer's one. The measurement found that
transient element; when a font variant had to load first, it was gone
by the time the measurement ran, so the position data came out empty
and was dropped, and nothing measured the text again. Texts in boards
with layout, as component mains usually are, take that path; others
did not.

`calc-position-data` now measures the element the renderer passes,
never one looked up by id.

Found by the components Qase run (PENPOT-2562).

Checked in the browser: cycling the font weight token of a main and its
copy through weights not loaded yet (300, 700, 200, 900, 600 italic,
300) redraws both with each new weight; before, the first use of each
weight kept the old one.

AI-assisted-by: claude-opus-5-5
2026-11-19 10:13:59 +01:00
alonso.torres
8ed11dcf26 🐛 Show a component's annotation in the Inspect styles view
The annotation of a main component or a copy only showed in the
Computed view of the Inspect tab; the Styles view, the default one in
the workspace and in View mode, never rendered it.

The Styles view now shows the annotation, above the exports, as the
Computed view does.

Found by the components Qase run (PENPOT-1428, PENPOT-1429,
PENPOT-1618).

Checked in the browser: selecting an annotated main component shows
its annotation in Inspect > Styles.

AI-assisted-by: claude-opus-5-5
2026-11-19 10:09:38 +01:00
alonso.torres
3837ee5ff5 🐛 Keep a theme's disabled sets out of it when importing tokens
Importing a tokens JSON whose `$themes` list a set as "disabled" in
`selectedTokenSets` made that set part of the theme, so activating the
theme turned it on: every key of `selectedTokenSets` was taken, whatever
its state.

A theme now takes only the sets that are not "disabled".

Found by the components Qase run (Library Tokens suite).

Test: `parse-theme-leaves-out-its-disabled-sets` (tokens-lib-test).

AI-assisted-by: claude-opus-5-5
2026-11-19 10:08:09 +01:00
alonso.torres
36f0f3089d 🐛 Wait for a mouse position before moving a dragged asset
Dragging a component from the Assets panel onto a freshly opened file
showed "Something wrong has happened". The drag starts a move as soon as
it enters the viewport, and the move took the mouse position at once,
which is nil until the pointer has been over the viewport; the vector
from the start point to it failed (`gpt/subtract` assertion). The copy
was still created.

The move now waits for the first mouse position.

Found by the components Qase run (PENPOT-2416).

Test: `a-move-started-without-a-mouse-position-follows-the-pointer`
(drag-on-save-failure-test).

AI-assisted-by: claude-opus-5-5
2026-11-19 10:06:46 +01:00
alonso.torres
476e53744e 🐛 Paste at the viewport center before the pointer reaches it
Ctrl+V in a freshly opened file, with nothing selected, pasted nothing
until the pointer had been over the viewport: the paste took the mouse
position, which is nil until then, and failed on it.

Pasting shapes and HTML text now falls back to the center of the
viewport when there is no mouse position, as pasting path nodes
already does.

Found by the components Qase run.

Test: `paste-before-the-pointer-reaches-the-viewport-uses-its-center`
(pasting-in-containers-test).

AI-assisted-by: claude-opus-5-5
2026-11-19 10:03:56 +01:00
alonso.torres
604998a716 🐛 Start the rename group dialog from the group's current name
Renaming an assets group opened the dialog with an empty name: the
initial form data set `:asset-name`, while the form field is `:name`.

Found by the components Qase run (PENPOT-1285).

Checked in the browser: Rename group shows the current name.

AI-assisted-by: claude-opus-5-5
2026-11-19 10:00:40 +01:00
alonso.torres
047f8ae4e1 💄 Say "These libraries" in the delete libraries dialog
The dialog for deleting or unpublishing several libraries said "This
libraries are activated here".

Found by the components Qase run (PENPOT-1473).

AI-assisted-by: claude-opus-5-5
2026-11-19 09:59:16 +01:00
alonso.torres
934cdb8532 🐛 List each file once when deleting libraries it uses
Deleting or unpublishing several libraries at once listed a file that
uses more than one of them once per library, and React logged a
duplicate key error for the repeated rows. The references of each
library were joined without removing repeated files.

The dialog now lists each file once (`distinct-references`).

Found by the components Qase run (PENPOT-1473).

Test: `delete-shared-test`.

AI-assisted-by: claude-opus-5-5
2026-11-19 09:59:16 +01:00
alonso.torres
5808c873f6 🐛 Reject imported components v1 files that have graphics
A library in the components v1 format with graphics and no components
imported, but its graphics were lost: only the removed v1 to v2
migration turned them into components, and v2 has no graphics section,
so the file showed no assets at all.

`check-components-v2` now rejects a components v1 file with graphics
(`:media`) as it rejects one with components, with
`:file-in-components-v1`.

Found by the components Qase run (PENPOT-1598).

Test: `check-components-v2-looks-at-components-and-component-shapes`
(binfile-test).

AI-assisted-by: claude-opus-5-5
2026-11-19 09:57:53 +01:00
alonso.torres
61d3313fbb 🐛 Explain in the import dialog why a components v1 file is rejected
Importing a file in the old components v1 format failed with "Something
went wrong while processing this file". The job's entry carried the
specific message (`dashboard.import.components-v1-error`), but the error
list of the dialog only knew the check error and corrupt file texts and
showed the unknown error text for everything else.

The error list now shows the components v1 message as it is
(`import-error-detail`).

Found by the components Qase run (Migration suite).

Test: `dashboard-import-errors-test`.

AI-assisted-by: claude-opus-5-5
2026-11-19 09:55:58 +01:00
alonso.torres
81ff4c0c90 🐛 Keep a flow when the context menu of its starting board opens
In Prototype mode, right-clicking a board that starts a flow removed the
flow: the "Delete flow start" entry called `do-remove-flow` while
rendering instead of on click. React also logged "Cannot update a
component while rendering a different component".

The entry now removes the flow only when it is clicked.

Found by the components Qase run (PENPOT-1771).

Test: `context-menu-prototype-test`.

AI-assisted-by: claude-opus-5-5
2026-11-19 09:49:01 +01:00
alonso.torres
b7ee5d30ec 🐛 Switch a variant set's layout between flex and grid in place
A variant set board or a variant main that already had a layout kept it
when the user picked the other type (Shift+A / Ctrl+Shift+A or the
context menu). `create-layout` sends a shape with a layout to
`create-layout-from-selection`, which refused any selection holding a
variant container or a variant, before reaching its in-place branch.

The refusal now applies only when the selection would be wrapped in a
new board; a single shape with a layout switches it in place.

Found by the components Qase run (PENPOT-2422).

Test: `create-layout-switches-a-variant-container-layout`,
`create-layout-switches-a-variant-main-layout` (groups-test).

AI-assisted-by: claude-opus-5-5
2026-11-19 09:46:31 +01:00
alonso.torres
ccd43b4fc8 📎 Align the composable model with the gate round's findings
A fresh gate round (seed 20261117) found, besides F591 to F594, gaps in
the composable harness itself:

- A swapped nested head pasted out of its copy inherits nothing from the
  slot it replaced, and the model steps through a swapped reference to
  its component's main, as the clipboard now does.
- A copy grid that grows to hold its children pads the tracks it authors
  with default ones.
- The shapes a layout places in a deleted component's stored objects
  are left out of the I6 comparison: no layout lays them out until the
  component is restored, so a sync there gives a place the layout would
  change.
- I4 compares corners within a ten-thousandth of the shape's diagonal
  when that is more than a hundredth of a pixel.
- A pasted library main is a new copy of its component, with no
  overrides of its own; stale worlds make no library pastes, since the
  model does not hold apart the versions a consumer accepted.
- Intersections are made only of shapes that overlap, and transforms
  skip shapes without area: an empty bool has no geometry to compare.

Each comes with a pinned program. The five properties that failed in
the round pass 500 programs on the same seed after the fixes.

Harness only; the benchmark is not run.

AI-assisted-by: claude-opus-5-5
2026-11-18 00:24:20 +01:00
alonso.torres
a46fd7b898 🐛 Keep a copy grid's own empty cell where it was as it grows back
A copy grid with its own cells that lost the row its main removed, and
grew one back to hold its children, fitted its cells into the fewer
tracks first. Its authored empty cell (`align-self :end` at row 2,
column 2) was merged into an occupied one and lost (F594). User
decision: the cell keeps its place.

`assign-inherited-grid-cells` now grows the track lists its children
need before fitting the cells (`grow-for-children`), so a grid that
grows back the tracks it lost keeps its cells where they were. Only the
track lists grow; the cells it holds keep their places.

Found by a fresh gate round (seed 20261117, grid property).

Test: generated
`generated-a-copy-grid-keeps-an-authored-empty-cell-where-it-was-when-it-grows-back`
(JVM and frontend replay).

Benchmark (bench-components, alone):

|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  21.906 |  23.299 |   0.62 |
| edit-through-a-chain-of-dependents |    68.931 |  46.008 |  46.834 |   0.67 |
|         library-update-into-copies |    83.083 |  53.933 |  55.436 |   0.65 |
|        main-edit-among-many-shapes |     4.837 |   2.497 |   2.639 |   0.52 |
|           main-edit-into-10-copies |      1.79 |   1.185 |   1.228 |   0.66 |
|          main-edit-into-100-copies |    15.415 |  11.262 |  11.561 |   0.73 |
|         main-edit-into-1000-copies |   153.086 | 108.966 | 112.568 |   0.71 |
|         variant-switch-into-copies |    32.052 |  23.931 |  24.195 |   0.75 |

AI-assisted-by: claude-opus-5-5
2026-11-18 00:23:34 +01:00
alonso.torres
0dfdeaa4fc 🐛 Treat a hundredth of a pixel as float noise when keeping copy places
After a turn and a fill resize, nested copies sit a few thousandths of a
pixel from where their mains place them. A detach that advanced them,
and a resize that scaled a swapped head by that much, made their
geometry an override for the noise alone: they stopped following their
mains' geometry (F593).

`turned-like-parent?`, the place check of
`generate-keep-advanced-placement` (`close-geometry?` now takes a
precision) and the resize check of `author-resized-swapped-heads`
compare sizes and corners to a hundredth of a pixel, as the rest of sync
compares them. The composable model's `sync-scaled-heads` does the same.

Found by a fresh gate round (seed 20261117, variant property).

Test: generated `generated-a-detach-authors-no-geometry-for-float-noise`.

Benchmark (bench-components, alone):

|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  21.107 |  21.817 |    0.6 |
| edit-through-a-chain-of-dependents |    68.931 |   46.08 |  47.003 |   0.67 |
|         library-update-into-copies |    83.083 |  56.955 |  57.969 |   0.69 |
|        main-edit-among-many-shapes |     4.837 |    2.37 |   2.545 |   0.49 |
|           main-edit-into-10-copies |      1.79 |   1.068 |    1.11 |    0.6 |
|          main-edit-into-100-copies |    15.415 |  10.438 |  10.941 |   0.68 |
|         main-edit-into-1000-copies |   153.086 | 103.384 | 109.082 |   0.68 |
|         variant-switch-into-copies |    32.052 |  24.999 |  25.423 |   0.78 |

AI-assisted-by: claude-opus-5-5
2026-11-18 00:20:01 +01:00
alonso.torres
5a68e6199f 🐛 Give a re-headed swapped copy its new main's placement
A swapped nested head pasted out of every copy level becomes a plain
copy of the component it shows. It kept as overrides the placement that
differs from its new main, but left the rest as it was: a nil constraint,
the default of its old board, kept meaning something else at the page
root while its main states `:left`, so it no longer matched its main
(F592). Users reach it by copying such a copy and pasting it.

`rehead-swapped` now gives the placement attributes it does not override
the new main's values.

Found by a fresh gate round (seed 20261117, library property).

Test (swap-group-test, fails before the fix):
`paste-gives-a-swapped-head-the-placement-of-its-new-main`.

Benchmark (bench-components, alone):

|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  20.608 |  21.876 |   0.59 |
| edit-through-a-chain-of-dependents |    68.931 |  42.175 |  44.133 |   0.61 |
|         library-update-into-copies |    83.083 |   50.77 |   52.63 |   0.61 |
|        main-edit-among-many-shapes |     4.837 |   2.352 |    2.51 |   0.49 |
|           main-edit-into-10-copies |      1.79 |   1.043 |   1.087 |   0.58 |
|          main-edit-into-100-copies |    15.415 |  10.185 |  10.428 |   0.66 |
|         main-edit-into-1000-copies |   153.086 | 101.226 | 105.622 |   0.66 |
|         variant-switch-into-copies |    32.052 |  22.621 |  23.491 |   0.71 |

AI-assisted-by: claude-opus-5-5
2026-11-18 00:16:25 +01:00
alonso.torres
2a484bc3c2 🐛 Advance a pasted copy to its component's main by its content refs
Pasting a copy held in a swapped head inside a copy inside a main left
an invalid file (`:ref-not-in-near-main`). The clipboard advanced each
shape by the number of copy levels it leaves, but the swap above makes
its references reach the component's main one step sooner, so its nested
copies overshot past that main. Users reach it by copying such a copy
and pasting it on the page (F591).

Every copy the clipboard advances now refers each shape to its
counterpart in the main of its component: the first of its content
references there, which a swapped head below follows by its slot. It
keeps the overrides of the references it skips. The level count stays
only as the fallback when a shape finds no counterpart. This generalizes
the case of a swapped reference among those it skips (F590).

Found by a fresh gate round (seed 20261117, variant property).

Test (swap-group-test, fails before the fix):
`paste-out-of-a-swapped-head-reaches-the-nested-copies-of-its-component`.

Benchmark (bench-components, alone):

|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  21.742 |  22.873 |   0.62 |
| edit-through-a-chain-of-dependents |    68.931 |  46.657 |  47.664 |   0.68 |
|         library-update-into-copies |    83.083 |  52.163 |  53.121 |   0.63 |
|        main-edit-among-many-shapes |     4.837 |    2.34 |   2.519 |   0.48 |
|           main-edit-into-10-copies |      1.79 |   1.103 |   1.136 |   0.62 |
|          main-edit-into-100-copies |    15.415 |  10.677 |  11.348 |   0.69 |
|         main-edit-into-1000-copies |   153.086 | 108.821 | 113.548 |   0.71 |
|         variant-switch-into-copies |    32.052 |   21.95 |  22.607 |   0.68 |

AI-assisted-by: claude-opus-5-5
2026-11-18 00:12:59 +01:00
alonso.torres
82d95346b3 ✨ Generate interactions and pastes out of copies, pages and files
The structure programs now cover what their worlds lacked:

- `:interact` gives a shape on a main, a copy head or a copy child its
  prototype interactions (open-URL actions, so no board ties them to
  deletions), through the prototype panel's add, edit and remove events
  in the frontend replay. Interactions are no sync attribute: the target
  must end with what was set, no other operation may change those of a
  shape that stays, and a swap or a switch keeps a head's.
- `:paste` also takes a nested copy head a copy holds, which the
  clipboard advances to its component's main. The model gives the pasted
  shapes the overrides of the references they skip, and drops the swap
  of a swapped head, now a plain copy of its component.
- Worlds with `:pages` hold a second page that a paste can land on, and
  `:library-paste` pastes library mains and copies into the consumer,
  where both become copies of the library's components. Off the current
  page or file, the node and the frontend put the pasted corner at the
  same free point; the frontend pastes with nothing selected and the
  pointer there.
- A transform no longer targets a shape without area, as a union of
  hidden shapes, which no transform can size.

Samples of 150 structure, swap and scale programs found F588, F589 and
F590 (fixed) and are then clean.

Harness only; the benchmark is not run.

AI-assisted-by: claude-opus-5-5
2026-11-17 11:47:22 +01:00
alonso.torres
8d32a09ca4 🐛 Make an update main into a nested copy author the sizing it fixes
An update main that pushes a transformed fill child into the nested copy
its main holds fixes that copy's layout sizing, as a resize does, so the
layout keeps the pushed size. It did not mark the sizing as the nested
copy's own override: the copy differed from its reference without an
override, and the next sync would give it the fill back and undo the
pushed size (F588, reachable since moves are generated).

A main that is itself a copy now touches the sizing groups the push
fixes. The composable model expects it to author them.

Test: generated
`generated-an-update-main-into-a-nested-copy-authors-the-sizing-it-fixes`
(JVM and frontend replay).

Benchmark (bench-components, alone):

|                             :world | :baseline |   :now |   :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 | 21.333 |   22.41 |   0.61 |
| edit-through-a-chain-of-dependents |    68.931 | 42.992 |  44.734 |   0.62 |
|         library-update-into-copies |    83.083 | 55.577 |  58.064 |   0.67 |
|        main-edit-among-many-shapes |     4.837 |  2.625 |   3.164 |   0.54 |
|           main-edit-into-10-copies |      1.79 |  1.131 |   1.216 |   0.63 |
|          main-edit-into-100-copies |    15.415 | 11.226 |  12.849 |   0.73 |
|         main-edit-into-1000-copies |   153.086 | 103.22 | 108.455 |   0.67 |
|         variant-switch-into-copies |    32.052 |  23.27 |  24.267 |   0.73 |

AI-assisted-by: claude-opus-5-5
2026-11-17 11:47:05 +01:00
alonso.torres
e21a73ed91 🐛 Paste a copy out of its copy as the component its main swapped in
A nested copy pasted out of its copy, where the main the copy refers to
had swapped that head, advanced its refs by level through the replaced
slot of the old component and passed on the swap, which left an invalid
file (`:ref-shape-not-found`, `:misplaced-swap-group`). Users reach it
by copying such a copy and pasting it on the page (F590).

When the references a pasted head skips include a swapped head, each of
its shapes now refers to its counterpart in the main of the component it
shows, the first of its content references there, and keeps the
overrides of those it skips, without the swap.

Found by the generated programs once they paste nested copies (a
variant program with a swap in a main).

Test (swap-group-test, fails before the fix):
`paste-out-of-a-copy-follows-a-swap-in-its-main`.

Benchmark (bench-components, alone):

|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  21.672 |  24.681 |   0.62 |
| edit-through-a-chain-of-dependents |    68.931 |  43.664 |  46.149 |   0.63 |
|         library-update-into-copies |    83.083 |  51.625 |  55.322 |   0.62 |
|        main-edit-among-many-shapes |     4.837 |   2.582 |   3.817 |   0.53 |
|           main-edit-into-10-copies |      1.79 |   1.063 |   1.179 |   0.59 |
|          main-edit-into-100-copies |    15.415 |  10.715 |  11.354 |    0.7 |
|         main-edit-into-1000-copies |   153.086 | 104.404 | 110.116 |   0.68 |
|         variant-switch-into-copies |    32.052 |  21.823 |  24.319 |   0.68 |

AI-assisted-by: claude-opus-5-5
2026-11-17 11:43:15 +01:00
alonso.torres
f86b03245b 🐛 Give a pasted nested copy only the overrides of the refs it skips
A nested copy pasted out of its copy advances its refs to the component
it copies and takes the touched groups of the references it skips, so it
keeps the values they gave it. The clipboard also took those of its new
reference: a pasted rect then overrode a fill its new reference itself
overrides, and stopped following that reference's later edits. A shape
with no touched group was also left an empty touched set, which an undo
then removed, so undo did not restore the state exactly (F589).

`advance-copied-objects` takes only the touched groups of the references
between the shape and its new one, and leaves no touched set when there
are none. The golden master's case AZ, which pastes such a copy, records
its states again: its pasted head no longer has an empty touched set.

Test (copying-and-duplicating-test, fails before the fix):
`a-pasted-nested-copy-takes-only-the-overrides-of-the-references-it-skips`.

Benchmark (bench-components, alone):

|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |    22.2 |  22.701 |   0.63 |
| edit-through-a-chain-of-dependents |    68.931 |  43.557 |  45.725 |   0.63 |
|         library-update-into-copies |    83.083 |  52.452 |  54.294 |   0.63 |
|        main-edit-among-many-shapes |     4.837 |   2.766 |   2.895 |   0.57 |
|           main-edit-into-10-copies |      1.79 |   1.142 |   1.178 |   0.64 |
|          main-edit-into-100-copies |    15.415 |  11.615 |  12.834 |   0.75 |
|         main-edit-into-1000-copies |   153.086 | 106.297 | 109.039 |   0.69 |
|         variant-switch-into-copies |    32.052 |   23.09 |  23.778 |   0.72 |

AI-assisted-by: claude-opus-5-5
2026-11-17 11:39:21 +01:00
alonso.torres
180e50831c 📎 Label the plugin's random programs fill and opacity smoke coverage
The plugin suite's random case said every settled step retains authored
values, but its programs check only fills and opacity against their own
model: resizes and turns carry no geometry assertions, and no step
undoes, swaps, switches variants, edits text or checks touched groups.
The case is now `RandomFillOpacitySmoke` and says so, pointing to the
generated programs of common and their frontend and WASM replays for the
rest.

Harness only; the benchmark is not run.

AI-assisted-by: claude-opus-5-5
2026-11-17 05:35:11 +01:00
alonso.torres
51b0607122 🐛 Keep a mirrored shape's rotation composing its transform on a turn
Under one flip a shape can store either of two turns for the same
transform: the one before its flip, which flips and turns produce, or
the opposite one after it, which sync may store when it orients a copy
child under a flipped parent. A transform adds its turn to the stored
rotation, and a flip negates it, as for the turn before the flip, so a
shape storing the other one was left with a rotation its transform does
not have: a child turned 45 degrees after its flip and turned again by
45 stored 90 over a plain flip.

`apply-transform-generic` now first takes, for a mirrored shape with an
unskewed transform, the turn before its flip that the transform gives.

Found by checking the shapes of the pinned generated programs for
rotations and flips that do not compose their transform (program 332:
rotate, flip the parent, rotate it, update main); none is left there but
the skew a layout or a scale constraint gives a turned child.

Test (geom-shapes-test, fails before the fix):
`a-rotation-turns-a-mirror-that-stores-the-turn-after-its-flip`.

Benchmark (bench-components, alone):

|                             :world | :baseline |   :now |   :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 | 21.448 |  23.648 |   0.61 |
| edit-through-a-chain-of-dependents |    68.931 | 41.076 |  43.132 |    0.6 |
|         library-update-into-copies |    83.083 | 54.822 |   56.18 |   0.66 |
|        main-edit-among-many-shapes |     4.837 |  2.275 |   2.358 |   0.47 |
|           main-edit-into-10-copies |      1.79 |   1.08 |   1.103 |    0.6 |
|          main-edit-into-100-copies |    15.415 | 10.411 |   11.35 |   0.68 |
|         main-edit-into-1000-copies |   153.086 | 110.32 | 118.294 |   0.72 |
|         variant-switch-into-copies |    32.052 | 21.161 |   23.07 |   0.66 |

AI-assisted-by: claude-opus-5-5
2026-11-17 05:32:11 +01:00
alonso.torres
5320fd264a 📎 Read the WASM replay's query parameters as the page loads
A replayed step that navigates replaces the page's query string, so the
replay read its `debug` and `watch` parameters as unset from then on and
logged no shapes at the end of such a program. It reads them once, as
the page loads.

Harness only; the benchmark is not run.

AI-assisted-by: claude-opus-5-5
2026-11-17 03:27:50 +01:00
alonso.torres
06b781eb77 🐛 Measure a turned bool along its own axes in WASM layouts
With the WASM engine, a bool whose children turn measured its path with
an axis-aligned box: a 50 px union turned 45 degrees came out 70.7 px
wide. In a grid, that widened its track and moved its siblings, so a
turned grid copy laid out its children elsewhere than a reflow of the
same grid did, and elsewhere than the persisted changes put them.

`calculate_bool_bounds` now takes the path's extent along the axes of
the bool's bounds, as groups measure theirs; a bool without usable axes
keeps the axis-aligned box.

Found by the WASM replay of the pinned generated programs (program 156,
a turned grid copy holding a union), which passes with it.

Test: render-wasm `test_turned_bool_bounds_keep_its_orientation` (fails
before the fix).

WASM only; the benchmark covers JVM code and is not run.

AI-assisted-by: claude-opus-5-5
2026-11-17 03:27:50 +01:00
alonso.torres
e178ef241d 🐛 Turn before the flips when neither order is nearer the old axes
A variant switch that carries a turn onto a flipped child gives it the
turn before or after its flips, whichever lies nearer the axes the child
had (`unskewed`). For an unflipped 45-degree turn given a horizontal flip
both lie equally far, and the tie went to the order the engines'
rounding favoured: with the WASM engine the switched child stored
`flipX·R45`, the same shape turned the other way, while its rotation and
flips say `R45·flipX`.

A tie within 1e-9 now takes the turn before the flips, as the function
already intends for axes that tell neither apart.

Found by the WASM replay of the pinned generated programs (program 87, a
switch onto a flipped variant), which passes with it.

Test (comp-expected-geometry-test, fails before the fix with the WASM
engine's axes): `an-unskewed-turn-that-tells-no-flip-apart-turns-before-it`.

Benchmark (bench-components, alone):

|                             :world | :baseline |    :now |   :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  22.123 |  22.948 |   0.63 |
| edit-through-a-chain-of-dependents |    68.931 |  41.395 |  43.459 |    0.6 |
|         library-update-into-copies |    83.083 |  51.144 |  55.732 |   0.62 |
|        main-edit-among-many-shapes |     4.837 |   2.373 |   2.539 |   0.49 |
|           main-edit-into-10-copies |      1.79 |   1.047 |   1.091 |   0.58 |
|          main-edit-into-100-copies |    15.415 |  10.442 |   10.86 |   0.68 |
|         main-edit-into-1000-copies |   153.086 | 105.735 | 109.461 |   0.69 |
|         variant-switch-into-copies |    32.052 |  21.661 |  23.984 |   0.68 |

AI-assisted-by: claude-opus-5-5
2026-11-17 03:27:50 +01:00
alonso.torres
6da6217221 🐛 Fill a grid copy's free cells in its references' layer order
An ungroup in a grid main ungroups its copies too. A copy with its own
cells gave the shapes the ungroup brings into it its free cells in the
reverse of its own layer order. That matches sync only when the copy
keeps the reverse of its references' order, as under a main, whose grid
the layout update reorders by its cells. A copy of a copy refers to a
copy, which keeps the order the ungroup gives, so its shapes took each
other's cells (F581).

The copy now ranks them by where their references sit in the grid it
refers to; a main's grid is ranked as `ctl/reorder-grid-children` leaves
it. Shapes whose reference is not there follow, in the reverse of the
copy's own order.

Test (composable-gen-test, fails before the fix; the earlier ungroup
tests pass):
`an-ungroup-fills-a-grid-copy-of-a-copy-in-its-references-layer-order`.

Benchmark (bench-components, alone):

|                             :world | :baseline |   :now |   :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 | 22.348 |  22.994 |   0.63 |
| edit-through-a-chain-of-dependents |    68.931 |  44.01 |  45.457 |   0.64 |
|         library-update-into-copies |    83.083 | 51.822 |  52.723 |   0.62 |
|        main-edit-among-many-shapes |     4.837 |  2.384 |   2.681 |   0.49 |
|           main-edit-into-10-copies |      1.79 |  1.107 |   1.139 |   0.62 |
|          main-edit-into-100-copies |    15.415 | 10.509 |  10.797 |   0.68 |
|         main-edit-into-1000-copies |   153.086 | 99.974 | 103.416 |   0.65 |
|         variant-switch-into-copies |    32.052 | 21.852 |  22.437 |   0.68 |

AI-assisted-by: claude-opus-5-5
2026-11-17 03:24:15 +01:00
alonso.torres
b408283e19 📎 Log shape counts and only text content in the replay debug
The WASM replay's debug log read every shape's content as text, which a
path's content is not; it reads only texts now and logs how many shapes
the page ends with.

Harness only; the benchmark is not run.

AI-assisted-by: claude-opus-5-5
2026-11-17 01:04:52 +01:00
alonso.torres
0713d60fb3 🐛 Keep the places a layout update gives copy shapes
A layout update applied its modifiers and then settled the placement of
the copy shapes they moved, as a transform does. For a swapped head
turned with its main and filling a row, the settle gave back the
unskewed turn of its main and undid the skew the layout gives it, which
its main keeps (F441: a swapped head turned to fill takes the skew of
its main).

A layout update no longer settles placement (`apply-modifiers` and
`apply-wasm-modifiers` take `:settle-component-placement? false`); a
transform still does. The composable model's reflow, which settled
placement since `bac1443729` to match the old update, no longer does:
with it, layout and settle undid each other and never settled.

Test: frontend generated
`generated-a-turned-fill-swap-keeps-the-skew-its-row-gives`.

ClojureScript only; the benchmark covers JVM code and is not run.

AI-assisted-by: claude-opus-5-5
2026-11-17 01:04:52 +01:00
alonso.torres
18dff8b7ab 🐛 Size a WASM grid track by a fill grid child's content
With the WASM engine, a grid track sized a fill child by its minimum
width alone, so a fill child that is itself a grid shrank to its cell
and its content overflowed it. The CLJS engine sizes the track by the
larger of that minimum and the size the child's content needs, as CSS
gives a grid item its min-content size (user decision: match CLJS).

`min_size` now takes, for a fill grid child, its content size: its
tracks at the sizes its children need, its gaps and its paddings, as a
grid that hugs sizes itself.

Found by the WASM replay of the pinned generated programs (program 290,
a fill grid turned 45 degrees in a grid), which passes with it.

Test: render-wasm `test_a_fill_grid_child_takes_the_size_its_content_needs`.

WASM only; the benchmark covers JVM code and is not run.

AI-assisted-by: claude-opus-5-5
2026-11-17 01:04:52 +01:00
alonso.torres
2541984def 🐛 Measure a layout's content with the paddings it uses
The content bounds of a grid or flex layout, which size a fill child
that is itself a layout and a layout that hugs, read the four stored
paddings. A simple padding type repeats the top and right values on the
bottom and left, so a layout whose sides were edited one by one before
its type was set to simple measured its content with the stale left and
bottom values: a fill grid with paddings 3, 6, 9 and 12 came out 6 px
wider than its content.

Both use `ctl/paddings`, as the layouts themselves do.

Test: `geom-grid-layout-test/grid-content-bounds-take-simple-paddings`
(fails before the fix).

Benchmark (bench-components, alone):

|                             :world | :baseline |   :now |   :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 | 22.925 |  23.239 |   0.65 |
| edit-through-a-chain-of-dependents |    68.931 | 45.225 |  46.994 |   0.66 |
|         library-update-into-copies |    83.083 | 54.842 |  57.554 |   0.66 |
|        main-edit-among-many-shapes |     4.837 |  2.528 |   2.705 |   0.52 |
|           main-edit-into-10-copies |      1.79 |  1.136 |   1.163 |   0.63 |
|          main-edit-into-100-copies |    15.415 | 10.746 |  11.596 |    0.7 |
|         main-edit-into-1000-copies |   153.086 | 109.63 | 113.323 |   0.72 |
|         variant-switch-into-copies |    32.052 | 23.103 |  24.367 |   0.72 |

AI-assisted-by: claude-opus-5-5
2026-11-17 01:04:52 +01:00
alonso.torres
bae3b80331 📎 Model the sidebar's sizing fixes and the reflow's placement settle
Two turned-shape programs of the frontend replay differed from the
composable model:

- Setting a turned variant to fill in its hugging variant board: the
  sidebar fixes the board's width first, the model's property edit did
  not, and a layout pass of a fill child in a hugging row collapses a
  turned child before growing it, which left it a singular transform.
  The model's edit of a layout child now applies the same sizing fixes
  (`cls/fix-child-sizing`, `cls/fix-parent-sizing`).
- A swapped head turned with its main, filling a row: the frontend's
  layout update settles the placement of the copy shapes it moves, which
  gives the head its main's unskewed turn; the model's reflow did not,
  and kept the layout's skew. The model's reflow settles them too
  (`cll/generate-sync-transformed-placement`).

Both programs now pass in the frontend replay with WASM off (frontend
generated tests).

Harness only; the benchmark is not run.

Also in this commit:

- Log each shape's parent id in the WASM replay's debug output. The debug log
  named each shape's parent, which copies and their mains share; it now gives
  the parent's id too, so a subtree can be told apart from its copies'.

AI-assisted-by: claude-opus-5-5
2026-11-16 22:23:27 +01:00
alonso.torres
9d5df3c50f ♻️ Move the sidebar's layout sizing fixes to common logic
`fix-child-sizing` and `fix-parent-sizing` give a layout's children and
parent the sizing a hugging layout allows when the sidebar edits a
layout child. They move from the frontend's shape layout events to
`app.common.logic.shapes`, unchanged, so the composable model can apply
them as the sidebar does.

No behavior change; the benchmark covers sync and is not run.

AI-assisted-by: claude-opus-5-5
2026-11-16 20:32:19 +01:00
alonso.torres
b075e713ab 🐛 Fit a synced masked group to its mask again
A masked group takes all its geometry from its mask. When a copy turned
the mask of a masked group, a sync gave the copy's group the geometry of
its main's group, square to the page, and fitted only the group's
parents, so the group no longer matched its turned mask; a reflow then
fitted it again, and settling and a full sync gave different files.

After a sync writes a masked group's attributes, the group fits its mask
again along with its parents.

Test: generated `a-synced-masked-group-fits-the-mask-its-copy-turned`
(fails before the fix).

Benchmark (bench-components, alone):

|                             :world | :baseline |    :now |  :mean | :ratio |
|------------------------------------+-----------+---------+--------+--------|
|  deepest-edit-through-three-levels |    35.215 |  22.245 | 23.118 |   0.63 |
| edit-through-a-chain-of-dependents |    68.931 |  43.743 | 44.839 |   0.63 |
|         library-update-into-copies |    83.083 |  54.447 | 57.814 |   0.66 |
|        main-edit-among-many-shapes |     4.837 |   2.742 |  2.876 |   0.57 |
|           main-edit-into-10-copies |      1.79 |   1.077 |  1.135 |    0.6 |
|          main-edit-into-100-copies |    15.415 |  10.488 | 11.093 |   0.68 |
|         main-edit-into-1000-copies |   153.086 | 106.222 |  112.37 |   0.69 |
|         variant-switch-into-copies |    32.052 |  23.155 | 23.929 |   0.72 |

AI-assisted-by: claude-opus-5-5
2026-11-16 17:07:31 +01:00
alonso.torres
8635310038 📎 Move a copy's authored radius tokens with its flips
Since F570 a flip moves a shape's radius tokens with the corners they
apply to. The composable model kept the tokens of a copy's authored
radius on the corners they named before the flip, so a flipped copy
that had set one corner by hand failed I9.

After each step and each settle, the model's authored radius takes the
tokens in the orientation the shape ends with
(`shadow/radius-orientation`). The token property passes at 300
programs.

Test: generated `a-flip-moves-the-radius-tokens-a-copy-authored`.

Harness only; the benchmark is not run.

Also in this commit:

- Block a shape the model moves into a blocked board. A move relocates a shape
  as a nest does, and a shape relocated into a blocked parent is blocked, an
  override on a copy. The composable model applied that to nests only, so moving
  a copy into a board blocked by hand failed I2.
- Predict a mask's move through the group it moves. The composable model
  predicts where a transformed shape lands. The mask of a masked group passes
  its change to the group, so the prediction applied the change to the mask
  alone and skipped the modifier tree. A flex that places the group puts it back
  after the move, so moving the mask of such a group left it where it was, and
  the prediction failed I9.
- Compare a pasted copy with the main its file accepted. The composable model
  expects a copy pasted on the page to author the geometry it shows when that
  differs from its main's. It read the main as loaded, so in a stale library
  world, after the library resized a main the file had not accepted, a pasted
  copy showing the accepted size was expected to author it, and the property
  failed I3.

AI-assisted-by: claude-opus-5-5
2026-11-16 14:57:31 +01:00
alonso.torres
fcb703fdef 🐛 Close the outline of a rect converted to a path
Converting a rect to a path gave an outline that went back to its start
with a line and stayed open, so a stroke missed its join at the first
corner. With the WASM engine on, the engine converts the rect and closes
the outline, so the two engines gave different paths for one shape.

The rect's outline now ends with `close-path`, as the WASM engine's does
(user decision). The path editor closes subpaths its own way on entry,
which its lifecycle test now expects.

Found by the WASM replay of the pinned generated programs (program 329),
which passes with the change.

Tests: `path-data-test/shape-to-path-rect-closes-its-outline`.

The conversion is outside the paths the component benchmark measures;
it is not run.

AI-assisted-by: claude-opus-5-5
2026-11-16 09:07:04 +01:00
alonso.torres
bb8b5584a1 🐛 Let the WASM engine lay out a move inside a group a layout places
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
2026-11-16 02:47:51 +01:00
alonso.torres
c6b0379767 🐛 Combine a bool's shapes again after ungrouping inside it
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
2026-11-16 00:51:23 +01:00
alonso.torres
bed737ce1d 📎 Let a switched head's carried size follow its parent
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
2026-11-15 23:21:06 +01:00
alonso.torres
73a6a3566d 🐛 Mark the constraints a swap pushed into a main keeps
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
2026-11-15 21:19:35 +01:00
alonso.torres
82465d448f 🐛 Keep radius tokens on the corners a mirrored copy shows
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
2026-11-15 20:42:16 +01:00
alonso.torres
c3f20ea554 🐛 Reflow the layouts an update main changes
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
2026-11-15 18:38:48 +01:00
alonso.torres
05d87d8496 🐛 Undo a sync with the change its group was stacked into
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
2026-11-15 18:01:19 +01:00
alonso.torres
5f3c5f60e3 📎 Keep the frontend replay's library bookkeeping as the model's
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
2026-11-15 18:01:12 +01:00
alonso.torres
4615b83770 🐛 Repair svg attributes an old reader split into maps
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 0043 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 0037 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
2026-11-15 13:42:08 +01:00
alonso.torres
3d23977b7e 📎 Keep a moved shape's authored geometry where it shows
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
2026-11-15 13:38:15 +01:00
alonso.torres
c98fab3481 🐛 Author no empty fills when an update main pushes a shape
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
2026-11-15 12:37:13 +01:00
alonso.torres
b71369157f 📎 Replay the programs of a file through the frontend in node
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
2026-11-15 10:37:42 +01:00
alonso.torres
d0b9af53a6 🐛 Undo a token edit and its propagation in one step
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
2026-11-15 00:23:27 +01:00