From 129faa51c6d539a2a91b724b94b2f3d0fb8b8f37 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 15 Oct 2026 00:25:20 +0200 Subject: [PATCH] :books: Update the memories for the second simplify pass - common/core: the variant logic namespaces now build transform into a variant, combine as variants and the layers-panel rename of a member, and the sync walk is two plain functions whose change pairs go through pcb/add-changes. - frontend/composable-component-tests: renaming a member in the layers panel, removing empty properties and setting a member's error are variant property edits both runners run; case AW joins the JVM set. AI-assisted-by: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 (1M context) --- .serena/memories/common/core.md | 2 +- .../memories/frontend/composable-component-tests.md | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.serena/memories/common/core.md b/.serena/memories/common/core.md index 13f79e41db..fab75d5232 100644 --- a/.serena/memories/common/core.md +++ b/.serena/memories/common/core.md @@ -7,7 +7,7 @@ - `app.common.data` and `app.common.data.macros`: generic data helpers and performance macros that do not depend on Penpot domain entities. - `app.common.types.*`: shared shape/file/page/component/token data types, schemas, predicates, and entity-local operations. `app.common.types.organization` contains organization schemas, `apply-organization`, and fail-closed organization/team permission rules (`allowed?`, `can-send-invitations?`). - `app.common.files.*`: file-level operations, shape tree helpers, change application, migrations, validation, and undo/redo-related logic. -- `app.common.logic.*`: higher-level workflows/algorithms over files, shapes, components, variants, libraries, tokens, etc. Component logic: `libraries` (`cll`, sync, reset, update main, attribute and placement sync), `instances` (`cli`, create, instantiate, restore, detach), `swap` (`clsw`, swap and the switch's override carry), `duplicate` (`cld`), `library-assets` (`clla`, color and typography sync); `variants` (`clv`) drives the switch. Each may require `libraries`, never the reverse. +- `app.common.logic.*`: higher-level workflows/algorithms over files, shapes, components, variants, libraries, tokens, etc. Component logic: `libraries` (`cll`, sync, reset, update main, attribute and placement sync), `instances` (`cli`, create, instantiate, restore, detach), `swap` (`clsw`, swap and the switch's override carry), `duplicate` (`cld`), `library-assets` (`clla`, color and typography sync); `variants` (`clv`) drives the switch and builds transform into a variant and combine as variants; `variant-properties` (`clvp`) the property edits and the layers-panel rename of a member. Each may require `libraries`, never the reverse. The sync walk is two plain functions in `libraries` (`sync-copy-recursive`, `update-main-recursive`); sync change pairs go through `pcb/add-changes`. - `app.common.geom.*`: geometry helpers and transformations. - `app.common.schema` / `app.common.schema.*`: Malli abstraction layer. - `app.common.math`, `app.common.time`, `app.common.uuid`, `app.common.json`, etc.: cross-runtime utilities. diff --git a/.serena/memories/frontend/composable-component-tests.md b/.serena/memories/frontend/composable-component-tests.md index d9628d7aaa..04e00cf085 100644 --- a/.serena/memories/frontend/composable-component-tests.md +++ b/.serena/memories/frontend/composable-component-tests.md @@ -77,7 +77,7 @@ Layout: `frontend_tests/runner.cljs`). - JVM/JS: `common-tests.logic.composable-sync-test` runs the shared cases through the pure runner; all except those that need frontend code: N, Z, AI and the rotation case (placement - step), X (pending sync), AJ (reflow), AT..AX (variant action events). + step), X (pending sync), AJ (reflow), AT, AU, AV, AX (variant action events). Judging (both runners): each variant is judged before the next one runs (`r/run-each`, and the interpreter's `check`), while the label map still names its shapes; a variant whose inline @@ -184,9 +184,14 @@ Two pure runners (no store, JVM + CLJS): `n/add-variant set member` duplicates a member (`clv/generate-add-new-variant`; `dwv/add-new-variant`, whose delayed DOM focus `check` neutralises by stubbing `dom/get-element`); ask the node for the new component (`n/added-variant-component-id`). + `n/rename-variant-in-layers` (the layers panel's rename to a properties formula, which also + removes the empty properties; `clvp/generate-rename-member`, `dw/rename-shape-or-variant`), + `n/remove-empty-properties` and `n/set-variant-error` are edits of `EditVariantProperty` too. Frontend-only variant actions are one node, `n/VariantAction` (`n/transform-in-variant`, - `combine-as-variants`, `rename-variant`, `rename-variant-in-layers`, `remove-empty-properties`, - `set-variant-error`, `variant-shortcut`); the interpreter's `variant-action-events` sends them. + `combine-as-variants`, `rename-variant`, `variant-shortcut`); the interpreter's + `variant-action-events` sends them. Transform and combine have common generators + (`clv/generate-transform-in-variant`, `generate-combine-as-variants`), but the pure runner does + not reflow layouts or apply the modifiers that size a combined board, so they stay frontend only. A set they build has no `variant-set` record: read it with `n/component-of` and `n/variant-component-ids`; `switch-variant` takes the value as a fn for it. - Tokens: `n/add-tokens` (assembly: an active set of border radius tokens), `n/apply-token`,