The MCP controller restarts its runtime when the profile id changes, and
it compared ids by object identity. Leaving the workspace clears the
transit uuid cache, and on the first visit it also saves the
workspace-visited prop, which reloads the profile. The reloaded id came
back as a new uuid instance, so MCP init ran again: it closed the plugin,
dropped the WebSocket and left the new plugin disconnected.
Compare profile ids by value, and add a regression test that sends the
same id as two distinct uuid instances.
Closes#13128
AI-assisted-by: claude-opus-5-5
The new backend flag `file-change-retention`, off by default, makes
file-gc skip its media clean-up (deleted components, unused media
objects, and thumbnails). That clean-up roots only in the head and the
snapshots, so it would remove media that a kept revision row still
names. The file and fragment clean-up still run: revision rows name
neither.
penpot#13187 keeps revision rows under the same flag. Set the flag only
where both are deployed. An instance that rolls back to this release
with the flag still set keeps the media its retained history needs.
AI-assisted-by: claude-opus-5-5
* 🐛 Scope share-link component reads to the allowed pages
A page-scoped share link exposed the primary file's components
map in get-view-only-bundle and authorized the file's components
fragment in get-file-fragment, leaking the stored shapes of
deleted components from pages the link excludes.
The share-link bundle now trims the primary file's components to
those referenced transitively from the allowed pages and emits them
inline; the membership path keeps the full map. The fragment scope
check no longer grants the components pointer to share links;
allowed page pointers remain readable.
AI-assisted-by: inkling-2-small-free
* 🐛 Tighten share-link bundle component retention
The share-link view-only bundle now carries only live components
referenced transitively from the allowed pages; deleted components
never travel (their stored shapes are the main vehicle of leaked
excluded-page content). This drops the reachability walk at deleted
references and removes the duplicated subtree helper in favor of the
canonical get-component-shapes.
Also adds membership retention and cycle regression tests, and drops
the private advisory identifiers from the new test comments.
AI-assisted-by: inkling-2-small-free
* ♻️ Apply the second review's fixes to the share-link fix
Ordering the namespace require so the format gate passes, renaming
the working bindings to what they hold, documenting the eager-realize
limitation at the realization site, sharing the same-file reference
predicate, and switching the fragment scope check to an allowlist of
the pages scope.
Test markers are anonymized; the walk-through-deleted contract and
the full-scope link get dedicated tests; pointer-mapped files assert
an inline referenced component and the empty-components form.
AI-assisted-by: inkling-2-small-free
* ♻️ Apply the third review's minor fixes to the share-link fix
Correct the comment about realization reuse, align the new test bindings,
and drop the tautological fixture assertions. Cover the fragment scope
for excluded pages, membership on pointer-mapped files, and the legacy
same-file reference form; make both permission memories state the
actual invariants.
AI-assisted-by: inkling-2-small-free
* 🐛 Scope the share-link library trim to the emitted bundle
The library trim walked the primary file's full components map, deleted
components included. A deleted component keeps its main-instance subtree
in :objects, so a library component instanced only inside those stored
shapes was retained in the linked libraries of the view-only bundle and
reached anonymous share-link viewers, metadata and stored shapes
included.
Walk the data the bundle emits instead: pages scoped to the link plus the
trimmed components map. Pages still come from the realized file, because
pointer-mapped pages only load in their own loader.
Covered by a regression test that instances two library components inside
a deleted primary component: only the library component the link's page
references survives the trim.
AI-assisted-by: deepseek-v4.1-flash
When pasting, read each child to advance from the objects being built,
not from the page, so a later change to the parent cannot make it read a
stale shape.
Fix the docs of ignore-children-fn in get-children-ids and delete-shapes:
it receives a shape id, not a shape.
Add a unit test for ctf/get-swap-level, a paste test where the swap sits
at the last level the copied head drops, and a detach test where the
swapped copy sits under two non-swapped nested copies.
AI-assisted-by: claude-opus-5-5
When a variant nested in a copy of a deleted component was switched, the
overrides made in that component's main were dropped: the lookup of the
matching shape in the original variant main stopped at the deleted
component, so the touched attributes were never copied.
Follow deleted components in find-shape-ref-child-of, like the ref chain
walk that collects the touched flags already does.
Closes#13177
AI-assisted-by: claude-opus-5-5
Detaching a copy moved the shape-ref of every shape under its first-level
nested copies up one level. Below a nested copy swapped in the detached
copy itself, the swap already points it into the swapped-in main, so its
children ended up one level too far and the detach failed to save with
:missing-slot.
Skip those swapped nested heads, and their descendants, when advancing
the nesting level.
Closes#13176
AI-assisted-by: claude-opus-5-5
Copying a copy nested inside another copy moved the shape-ref of every
shape under it up by the same number of levels. Below a nested copy that
was swapped in one of the dropped levels that count is too high: the swap
already points it into the swapped-in main, so its children ended up one
level too far and the paste failed to save with :missing-slot.
Count the levels per nested head instead, stopping at the level where it
was swapped (new ctf/get-swap-level), for the copied head too. The ref
chain used to collect touched flags now also follows deleted components,
like advance-shape-ref already did, so inherited slots are kept.
Closes#13076
AI-assisted-by: claude-opus-5-5
* 🐛 Fix compile warnings in the frontend test tree
The frontend test build printed 25 analyzer warnings, all of them in test
namespaces: 7 :fn-arity and 18 :infer-warning.
The arity ones were latent bugs. Both builds use the :esm target, where a
call that crosses a namespace boundary becomes a plain JS call, so CLJS
arity dispatch never runs and the missing argument arrives as undefined
instead of throwing: the warning was the only signal. One `wait-for` call
had no message, and five `interaction-proxy` calls still passed five
arguments after the six-argument signature landed in #11621.
The rest were JS property reads whose target type could not be inferred
(proxies, atoms, awaited promises). A `^js` hint on the target fixes them,
the convention already used under src/. Inside `set!` a form-level hint
does not reach the target, so the two per-side stroke widths bind the
stroke first.
Test behavior is unchanged: the same 27 tests in shape-bugfixes-test keep
their 63 assertions, and the full frontend suite passes (1901 tests, 7686
assertions). The memories record why `:fn-arity` cannot be ignored in this
build and how to force a clean recompile before checking for warnings.
AI-assisted-by: deepseek-v4.1-flash
* ♻️ Split the tokens plugin tests into one test per case
`tokens_test.cljs` drove five tests from `doseq` tables, one of them a
nested loop over three catalogs and seventeen mutations. A failure only
named the case through its `t/testing` label, and the nested one shared a
single store across all fifty-one combinations.
Each row is now a test of its own: twelve stroke property edits, four
`tokensSource` rejections, seventeen catalog mutations (each asserting the
local, source and other connected catalog), five activation changes and
three token application paths, taking the namespace from 67 to 104 tests.
Fixtures (`stroke-tokens-fixture`, `external-tokens-fixture`, ...) keep the
arrangement in one place, and every test builds a fresh store.
Two helpers return JS objects with `^js` on their names, so the test bodies
stay free of interop hints. Assertions drop from 430 to 345 because the
cross product no longer repeats `isEditableTokens` and `tokens-unchanged?`
once per catalog and mutation; every write is still asserted against the
three catalogs.
`mem:testing` now says tables are for short identical bodies only;
`frontend/testing` records the `defn ^js` return-tag trick.
Verified: namespace 104 tests / 345 assertions, full frontend suite 1938
tests / 7601 assertions, 0 failures; test build 0 warnings; cljfmt and
clj-kondo clean.
AI-assisted-by: deepseek-v4.1-flash
* 📎 Apply suggestion from @elenatorro
Co-authored-by: Elena Torró <elenatorro@gmail.com>
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
---------
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Co-authored-by: Elena Torró <elenatorro@gmail.com>
* ♻️ Rework audit-log consumers and jobs substrate
Fold the implementation, follow-up fixes, migrations and tests into one
code commit.
AI-assisted-by: gpt-6-luna
* 📚 Consolidate 2.20.0 upgrade runbooks
Keep the operational upgrade procedure and its supporting runbooks in a
separate documentation commit.
AI-assisted-by: gpt-6-luna
* ♻️ Remove the audit-log flag and derive persistence at boot
Persistence now follows the consumer flags instead of a separate switch.
app.config computes cf/audit-persist? once at boot from :nexus and
:admin-console, and every write site reads that value, so request paths
no longer check flags per event. With no consumer enabled no full rows
are written; telemetry shadows and webhook deliveries keep their own
flags. The frontend wire signal stays :audit-log as a derived value.
Update the 2.20 runbooks, memories and the devenv flags to match, and
migrate the tests that used to toggle :audit-log directly.
AI-assisted-by: hy4-flash-free
* 🐛 Accept error-reporting batches and precompute sink flags
push-audit-events now accepts crash batches with :error-reporting alone, so
the frontend signal from get-environment-data matches a real destination.
The reporters receive unhandled-exception events without storing any row.
All per-event sink checks read booleans computed once at boot: webhooks,
telemetry and error reporting join audit-persist? in app.config. The test
fixture and with-audit-config rebind all four values together, and the
tests that toggled those flags directly were migrated.
Address F2 of the review of the previous commit. F1 stays deferred to a
separate plan.
AI-assisted-by: hy4-flash-free
* 💄 Match the layout cljfmt expects in the flags set
The first comment of the varia set sat on its own line after the opening
delimiter, and cljfmt joins such a comment to the delimiter line, so the
Common Tests lint step failed on common/src/app/common/flags.cljc. Keep
the comment on the opening line, the same shape the login and email sets
already use.
Note in mem:scripts/ci that the backend lint lints ../common/src but does
not format-check it, so common has to be passed to scripts/ci as well.
AI-assisted-by: deepseek-v4-flash
* ⬆️ Update dependencies
* 🐛 Fix CI failures after the dependency update
Both the plugins bundle build and the frontend lint job failed after the
dependency bump. `@penpot/plugin-styles` now resolves to the workspace source,
which lacked the public `styles.css` entry point; add a shim that imports
`src/lib/styles.css` so the linked and published layouts expose the same path.
Stylelint 18 enables three rules that flag existing legacy styles. Disable
them with a TODO until those declarations are cleaned up, keeping this
dependency update free of visual changes.
AI-assisted-by: hy4-flash-free
After a font size change on a main text, the main resizes itself in a
commit that stacks onto the edit's undo entry. That commit still took
the group its undo transaction was opened with, and the component sync
it starts inherited that group. So the sync became a separate undo
entry: the first Ctrl+Z undid only that sync, the copies were measured
again right away, and nothing visible changed. The user had to press
Ctrl+Z twice to undo the edit.
A stack-undo? commit that records undo (save-undo? and undo changes,
the same test the history watcher uses) and has no undo group of its
own now takes the group of the entry at the current undo index. The
commits it starts, such as the component sync, inherit it, so one
Ctrl+Z reverts the edit, the resize and the sync.
A stacked commit that records no undo joins no entry, so it keeps a
group of its own: the automatic text heals must not take the rollback
unit of the user's last action. A stacked commit that joins an open
transaction that already holds changes keeps the transaction's group,
as append-undo adds it to the transaction.
The rule for commit groups in
mem:frontend/workspace-state-persistence-subtleties now includes the
stacked-entry step.
Tests: frontend-tests.data.workspace-undo-test covers a stacked commit
with no transaction, in an empty transaction and in a transaction that
already holds changes; a stacked commit that records no undo; and one
undo over an edit, its stacked commit and a follow-up commit of the
same group. frontend-tests.data.workspace-heal-undo-test drives the
real resize-text and component watcher on a main text with a copy:
one undo reverts the edit, the resize and the syncs on both.
Closes#13207
Relates to #12721
Relates to #13065
AI-assisted-by: claude-opus-5-5
On the WebGL renderer, a face that failed to load counts as ready,
because WASM lays the text out with a fallback font. The page-open
check skipped only texts waiting for a font, so it measured texts with
a failed face using the fallback and saved that size with no undo
step, on every page open. A team font that was deleted or returns 404
changed the size of every auto-grow text using it.
The check after fonts load had the same problem: a face that was
pending at page load and then failed was measured with the fallback
and resized, also without undo.
Both checks now skip texts that use a failed face, as the SVG :check
phase already does. The font relayout still runs for them, so they
show in the fallback font, but their stored size stays as it was.
app.render-wasm.api.fonts/font-failed? reports a failed face, and
shape-ids-for-failed-fonts finds the texts that use one.
Tests: frontend-tests.render-wasm.stale-text-selrects-test covers a
page load and a font load where one stale text uses a failed face;
only the other text is resized. The tests now mock font-failed?, so
they do not read failed faces left by other tests.
Relates to #12721
AI-assisted-by: claude-opus-5-5
On the WebGL renderer, a sync re-measure of copies shared a 40 ms
batch with user resizes of the main text. The batch skipped the
component sync when any request asked for that. So a resize of the
main (grow type, font size, paste, search and replace) often never
reached copies on other pages or in other files, and the viewer and
exports showed the old size.
A batch now skips the sync only when every request asks for it, the
same rule as :save-undo?. Such an edit costs one extra short sync
round. That round holds only skip requests, so it stops after one
pass.
A copy that the sync switched from fixed to auto-grow was never
re-measured, because the check read the grow type before the sync.
The check now reads the grow type that the change sets. A copy that
the sync makes fixed is not re-measured.
A sync started without an undo group (library update dialog, color
and typography sync) committed with a fresh group, and its re-measure
and layout pass took other ones. Ctrl+Z first undid only the
re-measure and left the copies in the old box. The sync now picks its
group when it runs: inside an undo transaction (color, typography and
asset deletes) it takes the transaction's, otherwise a fresh one. The
re-measure and layout pass share it, so one undo reverts the edit, the
sync and its follow-ups, and a failed save rolls them back together.
On the SVG renderer, opening a page resized a copy with no position
data even when its size had not drifted. Measured sizes round up, so
17.4 became 18. The measurement from that resize then landed on the
user's last undo entry. The heal now reports whether it resized, and
the check phase resizes only when the size drifted.
The SVG page-open check covered only texts with overridden content.
A copy loses its touched flags, so a label overridden inside a main
(a Button label in a Card main) was never checked in the main's
copies, and its heal skips the component sync. The check now covers
every auto-grow text inside a copy, as the WebGL check does. The
heal's reflow now skips the component sync too: without undo it
touched the main component on every page open.
A page-open check measured with a font that failed to load wrote the
fallback font size. It now writes no size then; a copy without
position data still gets it. The WebGL and SVG renderers can measure
a text differently; a gap over 1 px makes each page open by a user of
the other renderer write the size back. Two browsers on the SVG
renderer can do the same: a long auto-width line can differ by more
than 1 px, and an auto-height text can wrap a line differently. This is
a known limit, noted in the text-heal docstring.
The drift check moves to text-size-drifted? in
app.common.geom.shapes.text, and takes a tolerance. Both renderers use
it: 1 px for the SVG check and the WebGL page-open check, 0.1 px for
the WebGL font-load check. The WebGL check did not skip axes that fill
their layout parent, so those texts looked stale on every page open
and were resized for nothing. It now reads the stored width and height
and skips fill axes.
The sync docstring and a test message gave the wrong reason for
:skip-component-sync?. :ignore-touched stops the resize from marking
:geometry-group. :skip-component-sync? stops the re-measure commit from
starting another sync. "Remasure" is now "re-measure" in
identifiers, test names and comments. The sync docstring now states
that an auto-grow copy takes the main's size on each geometry sync,
also with overridden content, until the re-measure or the page-open
check corrects it. The sync's undo comment no longer says the layout
pass gets the sync's undo group: the layout buffer drops it, and the
pass joins the same undo entry through :stack-undo?.
Tests: heal undo tests cover mixed user and sync batches in both
orders, and undo for both renderers. A heal leaves the undo stack
unchanged, and undo reverts the user edit. A heal reflow skips the
component sync. Sync tests cover a copy that becomes auto-grow
(re-measured) and one that becomes fixed (not), and a sync with no
undo group that shares one with its re-measure, also inside an undo
transaction, with and without a group of the edit. Viewport tests cover
no resize without drift, a drifted copy that resizes and settles, the
check of every auto-grow text in a copy, and no size write from a
failed font. Component tests mount the SVG renderer: a drifted copy is
measured once to check and once to settle, with no undo step, and a
matching copy is measured once. Stale-selrect tests cover skipped fill
axes. The drift tests move to common-tests.geom-shapes-text-test, with
tolerance and grow-type cases.
Relates to #12721
AI-assisted-by: claude-opus-5-5
On the WebGL renderer, a sync from a main component re-measures every
auto-grow text it changes on the page. The sync runs on every edit to
a main component, so an edit that cannot change a text size, such as
opacity, shadow or text color, still re-measures and re-lays out every
synced text.
The sync now re-measures a text only when the change sets an attribute
that can change its size: :grow-type, :width, :height,
:layout-item-h-sizing, :layout-item-v-sizing, or :content that differs
in more than its fills. A text color change reaches copies as a
:content change, so fills are removed from both contents before
comparing. Sync emits operations only for attributes that changed, so
the operation attributes are enough. Moves (x and y only) do not
re-measure.
Tests: frontend-tests.data.workspace-sync-text-wasm-test adds cases for
a fill change and an opacity change on the main text (no re-measure),
and for a font size change and a width change on an auto-height text
(re-measure).
Relates to #12721
AI-assisted-by: claude-opus-5-5
On the SVG renderer, opening a page measures auto-grow text copies
with overridden content and writes back their size and position data
when they drifted. The write went through the normal text commits,
which stack onto the user's last undo entry. So the first Ctrl+Z after
opening a page also reverted the heal.
A component sync also set the position data of a copy to nil, even
for a fill change on the main. Such a copy skipped the check and went
through the normal path, with undo.
Heal requests now take :save-undo? false. resize-text and
update-position-data accept optional opts, and a request with
:save-undo? false marks its text as a heal for the current batch. A
later user request for the same text in the batch removes that mark.
The batch commit splits in two. User texts commit as before. Heal
texts commit with :save-undo? false and :skip-component-sync? true,
so each copy heals on its own page open instead of syncing.
The heal resize asks for the parents' reflow with :save-undo? false.
The layout buffer lays out heal updates apart from user ones and
passes the flag to apply-modifiers, so the reflow records no undo
step either.
The :check phase also heals a copy without position data, with no
undo. When the size drifted, the text moves to a new :settle phase.
The measurement that the heal resize causes also commits without undo.
Known limit: when the heal's reflow moves the text (for example,
re-centering it in a flex parent), the renderer measures the text
again with no phase. That position-data commit still stacks onto the
last undo entry. Left for a follow-up.
Tests: frontend-tests.data.workspace-heal-undo-test (SVG store) covers
a heal resize with no undo, no component sync and a reflow without
undo; a heal and a user change in one batch; a user request after a
heal of the same text; and the layout buffer keeping a heal's reflow
apart. frontend-tests.ui.viewport-texts-html-test covers the options
each phase sends: drifted copy, matching copy, copy without position
data, unmeasurable text, settle, and no phase.
Relates to #12721
Relates to #13065
AI-assisted-by: claude-opus-5-5
On the WebGL renderer, the workspace resizes auto-grow texts whose
stored size no longer matches their WASM layout. This runs when a page
opens and when fonts finish loading. These resizes are not user
actions, but each one recorded an undo step. So the first Ctrl+Z after
opening a page undid the resize instead of the user's last edit, and
the copy went back to the wrong size.
The listener for the stale-text event now asks for the resize with
:save-undo? false. The flag passes through the resize debounce to the
commit, which hands it to apply-wasm-modifiers, so the shape update
records no undo step.
Resizes are batched in a debounce window. A batch skips the undo step
only when every request in it asked for that. A user resize that lands
in the same window keeps its undo entry. Batch options are now merged
for every request, including those without options, so this check
works.
Tests: frontend-tests.data.workspace-heal-undo-test covers a heal
resize that commits without an undo step, a resize without the flag
that still records one, a mixed batch that keeps the undo step in
either order, and a batch of heals that skips it.
Relates to #12721
Relates to #13065
AI-assisted-by: claude-opus-5-5
On the SVG renderer, a text is measured only when its text
properties change or when it has no position-data. A component copy
with overridden text content keeps its own position-data. If its
main changes while the page is closed, the copy takes the main's
size, and nothing measures it when the page opens. It keeps the
main's height, so its flex siblings overlap the extra lines.
When a page opens, each auto-width or auto-height text with
overridden content on a copy starts in a :check phase and gets one
hidden HTML measurement. In :check, the result is written (size and
position-data) only if the size differs by more than 1px on the axis
the text grows on. Otherwise nothing is written, though the text
modifier is still cleaned. The phase is then dropped, so later
measurements work as before. A copy with no position-data skips the
check and is measured and committed as usual.
The new dwt/text-size-drifted? holds the 1px rule. It ignores an axis
that fills its layout parent, because the layout sets that size and
the check would otherwise find drift on every open. The 1px tolerance
matches the WebGL page-load check. SVG stores whole pixels, rounded
up, so smaller gaps are only rounding. A finer tolerance would
rewrite the same texts each time a page opened.
Each content-overridden auto-grow copy costs one extra measurement
per page open.
Tests: frontend-tests.data.workspace-texts-test covers
text-size-drifted? for sub-pixel and exact 1px gaps, the growing axis
only, and fill axes. frontend-tests.ui.viewport-texts-html-test covers
which copies start in :check, the drifted, matching and unmeasurable
cases, and the 1px commit when no phase is set.
Known limit: the heal commits like any SVG measurement, so it adds to
the user's last undo entry.
Relates to #12721
Relates to #13065
With the WebGL renderer, a component copy synced while its page was
closed takes the main's size for its auto-width or auto-height text.
Nothing measured it again when the page opened. The only check of stored
text sizes against the WASM layout ran after font loads, and only for
texts that waited for a font. Once fonts were loaded, which is true for
every page after the first in a session, the stale copy kept the main's
size. Its flex siblings then overlapped the extra lines.
Page loads now check every auto-grow text they bring into WASM. This
covers the sync path for small pages and the chunked async path for
pages with 100 or more shapes. A stale text goes through the existing
stale-text event, so the workspace resizes it. Texts still waiting for a
font skip the check, since the font check handles them when the font
arrives. So no text is resized twice.
The page check uses a 1px tolerance, and the font check keeps 0.1px. The
classic renderer stores whole pixels and WASM stores fractions, so a
finer tolerance would rewrite the same texts each time a page opened.
Shape updates made while editing do not run the check, so typing does
not resize texts.
Tests: new frontend-tests.render-wasm.stale-text-selrects-test covers
small and large page loads, sub-pixel gaps, fixed texts, texts waiting
for a font, and shape updates while editing.
Note: set-objects also serves thumbnails, the viewer and the export
worker, where nothing listens to the event. There the check costs one
cached size read per auto-grow text, the same cost the font check already
had for texts that waited for a font.
Relates to #12721
Relates to #13065
Create an issue and assign its Issue Type in one command instead of the
manual create-then-mutate flow. The type name is case-insensitive and the
command prints the issue number, URL, title and type as JSON.
Add unit tests for the full flow, labels, invalid types, gh failures and
the CLI output, and update the gh, creating-issues and create-issue skill
documentation.
AI-assisted-by: hy4-flash-free
Hosts need a vendor-agnostic way to react to named audit events in the
browser (for example SaaS config.js). Penpot exposes
penpotAddEventCallback / penpotEventCallbacks, loads an early stub before
config.js, and invokes matching callbacks after make-event, without
coupling to any analytics SDK.
Closes#13091
AI-assisted-by: Composer
The analysis of a package reads the metadata of every media and
thumbnail of its container to attribute the shared objects to each
file. It read them all at once, one promise per entry, and the
container of a big file holds thousands of them: every read opens its
own decompression stream, and Chromium fails the whole analysis under
that load while Firefox keeps up. The failure is masked by zip.js with
a generic "Cannot close a ERRORED writable stream".
The references now go through an observable, one entry at a time, and a
reference that cannot be read leaves its file without a size instead of
failing the package: a number that misses one of the objects of the
file is worse than no number.
Closes#13022
AI-assisted-by: deepseek-v4.1-flash
Add the disable-admin-console flag to the backend devenv PENPOT_FLAGS.
The nginx entrypoint checks this flag to decide whether to proxy the
/admin-console path; without it, devenv configured a proxy to an
admin-console service that does not run there. This aligns backend
routing with the frontend, where the admin console is off by default
in devenv.
AI-assisted-by: hy4-flash-free
* 🐛 Keep fill copies laid out after a component sync in the WebGL render
Lay out other pages in CLJS and reflow nested layouts that keep their size.
Closes#13015
AI-assisted-by: claude-opus-5-5
* ⚡ Skip the nested layout pass during WebGL drag previews
Gap, padding and margin drags keep the cost they had before the fix.
Relates to #13015
AI-assisted-by: claude-opus-5-5
Plugins and the MCP could not learn which Penpot instance they run on,
so agents guessed the domain when they wrote links to files.
Add penpot.location with the instance base URL (baseUrl), the URL of
the current screen (href) and its query params (params). It works in
the dashboard and the workspace and requires content:read. Params that
carry secrets (share-id, the MCP authorize params, and any key ending
in token, secret or password) are left out, and href is rebuilt from
the remaining params so it never carries one.
The MCP instructions tell agents to use href instead of building links.
The plugin API test suite checks location against the open file, and
its API surface is regenerated from the current types.
Closes#13013
AI-assisted-by: claude-opus-5-5
* 🔧 Test unique layer names in the file builder
The builder read used names from :unames while track-used-name wrote
them to ::unames, so two boards without a name both ended up as
"Board". #12794 fixed the key. These tests cover it: two unnamed boards
get "Board" and "Board-1", and two names that clean to the same path
get "-1" on the second one. Both fail with the old key.
AI-assisted-by: claude-opus-5-5
* 🔧 Test that component root names count as used names
#12794 also made add-component register the renamed main instance name.
A shape added later with the same name must get "-1". The test fails
without that track-used-name call.
AI-assisted-by: claude-opus-5-5
* 🔧 Test per-page unique names and anonymous components
The builder tracks used names per page, so the same name on two pages
stays unchanged. A component without a name is called "anonymous".
Each test fails without the code it covers.
AI-assisted-by: claude-opus-5-5
Promote Clojure design rules to a required core memory and simplify
the discovery guide. Correct test output redirection and RPC routes.
AI-assisted-by: gpt-6.1-terra
Protect staged changes when rewriting commit messages and close plans
after verified commits. Clarify checks and remove the unused Taiga skill.
AI-assisted-by: gpt-6.1-terra
Make review criteria proportional to risk and project conventions.
Keep code reviews read-only, use existing test evidence and stable IDs.
AI-assisted-by: gpt-6.1-terra
Apply clear review improvements to the plan and resolve consequential
decisions through the walkthrough before updating the plan metadata.
AI-assisted-by: gpt-6.1-terra
Include remedies, tests and decisions in review findings. Preserve review
context in plans and offer to resume the reviewer after implementation.
Keep follow-up verification optional and report deferred findings clearly.
AI-assisted-by: gpt-6.1-terra
Agent skills are invoked directly with @-mentions, so the slash-command
wrappers that exposed them as /commands are no longer needed. Update
.agents/README.md and every skill that references another skill to use the
@ syntax, and delete the six .opencode/commands/ dispatcher files.
AI-assisted-by: hy4-flash-free
Measure the coverage of the backend, common, frontend and render-wasm
test suites in CI, and show it on the workflow run pages and in one
"Coverage Report" comment on each pull request.
- Backend and common run kaocha with the cloverage plugin through a new
`:coverage` alias, which writes lcov, HTML and an EMMA report. The PR
report shows lines and Clojure forms (as statements); cloverage
measures no functions or branches. Plain local runs are unchanged.
- Frontend runs the compiled test bundle with V8 coverage
(`pnpm run test:coverage`, `frontend/scripts/coverage.js`) and maps it
back to the ClojureScript sources through the source maps of the test
build. UI namespaces (`app/main/ui`) are left out.
- Render-wasm runs its native Rust tests under cargo-llvm-cov when
`RENDER_WASM_COVERAGE` is set. The devenv image lacks the tool, so the
workflow downloads a pinned release and checks its sha256.
- `scripts/coverage-summary.mjs` renders an lcov file as a markdown table
by source area for `$GITHUB_STEP_SUMMARY`; each workflow also uploads
the HTML report as an artifact.
- `scripts/coverage-comment.mjs` keeps a single PR comment, laid out like
the Vitest Coverage Report Action, with a section per project and the
coverage of the changed files. Each job updates its own section; the
data of every project lives in a hidden block of the comment, and a
job writes again when a concurrent one dropped its data.
- Lines have targets that only colour the report: 70% backend and
common, 50% frontend, 40% render-wasm.
- The comment step only runs for PRs from branches of this repo: fork
PRs get a read-only token and keep the summary on the run page.
AI-assisted-by: claude-opus-5-5
Resolve the UI CSS source and destination from the package directory so
Vite works when launched outside that directory. Add a regression test and
quiet the bundle's rsync output.
AI-assisted-by: gpt-6-luna
* 🐛 Fix shared files 500 on shapes with invalid child ids
Old files can list in :shapes ids that are not uuids or that point to
no shape. Migration 0033 walked them and hit the uuid assert in
get-shape, which throws an AssertionError. The shared files list only
caught Exception, so that Error broke the whole list with a 500.
Make migration 0033 skip those ids, and catch Throwable when loading
each shared file, so a broken file is skipped and logged.
Closes#12343
AI-assisted-by: claude-opus-5-5
* 🐛 Repair invalid child ids in migration 0033 v2
Skipping invalid child ids in migration 0033 was not enough: the ids
stayed in :shapes, so the file still failed schema validation and
could not load. Files that already applied the migration would also
never run a changed version of it.
The migration now repairs each container before the naming walk:
string ids are parsed with uuid/coerce, nil and ids that point to no
shape are dropped, the duplicate that 0032 adds when a child is
listed as a string is removed, and a :shapes list becomes a vector.
Only the shapes that change are re-assoc'ed, so a healthy ObjectsMap
is not marked as modified and its page is not rewritten.
It ships as 0033-normalize-main-instance-names-v2 at the same
position in available-migrations, so files that recorded the old id
run it again. That position also makes it parse strings before
0035-fix-dangling-children drops the ids it cannot find.
The shared files listing restores the interrupt flag when the cause
of a skipped file is an InterruptedException.
Tests cover children outside the root walk, legacy components, the
objects-map wrapper of the unrealized save path, a list turned into a
vector, a shape without a :shapes key, a file that applied the old
id, and the end-to-end load of a broken shared file.
Relates to #12343
AI-assisted-by: claude-opus-5-5
AI-assisted-by: inkling-2-small-free