* 🐛 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
* ⚡ Stop resending deleted component objects on every touch
`pcb/update-component` attached the whole `:objects` map of a deleted
component to every `mod-component` change, so a single component swap
re-sent thousands of shapes that the same batch already carried as
shape changes. In one measured swap the 49 maps with objects were 94%
of the request (6.3 MB), and only 27% of the 4.275 shapes they carried
differed from what the server had.
Now `mod-component` carries component metadata only, and shapes inside
a component travel as `:mod-obj` changes scoped with `:component-id`,
which is what the component sync already emits. An absent `:objects`
key means "leave the stored shapes alone", only an explicit `nil`
drops them, so metadata-only changes cannot wipe a deleted component.
The two repairs that fix shapes inside a component (shape-ref cycle
and duplicated swap slot) now emit one `:mod-obj` per shape; the two
that move or clear the `:objects` key keep the whole-map write behind
the new `:objects? true` option.
Same swap on the measured file: 6.328.307 to 382.571 bytes.
AI-assisted-by: space-bunny
* 🔧 Cover the mod-component objects contract with tests
`pcb/update-component` sends the `:objects` map only when the caller
passes `:objects? true`, and `ctkl/mod-component` reads an absent key as
"leave the stored shapes alone". Two repairs depend on that option, and
dropping it broke nothing visible: the change carried no `:objects`, the
applier kept the invalid component as is, and the suite stayed green.
Add one repair test per error code, including the deleted-component
branch that must keep the map empty, and a round-trip test for the
shape-ref cycle repair. That repair now emits one `:mod-obj` per shape
and had no coverage; the test pins the scoped `:component-id` and that no
shape is lost.
Reword the `update-component` docstring as well: it describes what the
option does to the change instead of listing its current callers, which
goes stale as soon as another caller uses it.
AI-assisted-by: deepseek-v4.1-flash
* 🔧 Harden the mod-component repair tests
Address the review of the previous commit.
The cycle test only rejected a shape-ref pointing to itself, so it would
have passed if the repair repointed the link instead of removing it, or
if it left the component links on the main root untouched. It now
compares the resulting objects map with the expected one.
The four tests only inspected the first change, so a duplicated change
went unnoticed. They now compare the full list of changes: an exact
vector for the two repairs that rewrite the map, and id frequencies for
the cycle repair, which emits one change per shape in no fixed order.
The deleted-component fixture now removes the main instance through
`tho/delete-shape`, the same change generator the editor uses, instead
of a hand-written `:del-obj`. The message that promised a restorable map
now says what the repair does: normalize the value to an empty map.
AI-assisted-by: deepseek-v4.1-flash
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
* ⚡ Avoid iterating over every object in frame-titles*
Similarly to #13075, frame-titles* used to iterate over every object to work
out the frames at the root that need titles.
For files with lots of objects this can be slow, but we can just get the root
frames by looking at the root object's children.
We need to remove non-main-component instances to copy the behaviour of
`get-frame-ids :skip-copies? true`. This also now causes the title to be drawn
on a child frame whenever it's focused.
AI-assisted-by: claude-opus-5-5
* 🐛 Don't show frame title on focused frames
Restores the existing behaviour when focused
* 🐛 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
#13068 fixed the move left and right shortcuts, which moved and showed
the opposite direction. Its test only checks the key binding. These
tests run each move shortcut, in the workspace and the path editor,
and check that it moves in its own direction, fast or by one unit, and
that its tooltip shows the matching arrow.
Without the fix of #13068, 8 assertions fail.
AI-assisted-by: claude-opus-5-5
When a peer restored an autosaved version, the notice said "restored an
earlier version" instead of naming it by its date and time.
The modal wrapper passes the props map to the component without
camelCasing its keys, so the `created-at` prop reached the component as
"created-at" while it read `createdAt`, and the date was always nil.
Named versions were fine because `label` is one word. The prop is now
`date`, and a test renders the registered modal the way the wrapper
does.
Closes#13037
AI-assisted-by: claude-opus-5-5
* ⬆️ Bump the JDK to 27.0.1.1 on devenv and the backend image
The devenv image compiled the backend bundle with JDK 27 while the
production image ran JDK 26. The runtime starts with --enable-preview,
so a runtime line behind the compiler line is a silent trap rather than
a working setup.
Both pins now use Zulu 27.0.1.1 (zulu27.30.201-ca), the current GA of
the line, with the same sums on both architectures. The jlink module
list in the backend image still resolves on 27, so it does not change.
Sums checked by downloading both tarballs; the jlink JRE built from
them starts and reports 27.0.1.1.
AI-assisted-by: deepseek-v4.1-flash
* 🔥 Remove the unused gitpod setup
No workflow built docker/gitpod and its AdoptOpenJDK 16 install no
longer matches the devenv. The README badge linked to a setup that no
longer exists, so it goes with it.
The historical changelog entry stays: CHANGES.md is generated from the
milestones.
AI-assisted-by: deepseek-v4.1-flash
* ⬆️ Bring the docker/ updates from develop
Move the devenv and the production images to what develop already
carries:
- Base images to the current dhi.io digests.
- Node 24.22.3 and pnpm 12.21.0 in the devenv image and in every
production Dockerfile that ships pnpm.
- Rust 1.99.0 and Serena 2.1.0, with SERENA_UPDATE_VERSION raised to
match and a note that it must never be lower than the image pin.
- tini as the exporter ENTRYPOINT.
Devenv additions: PENPOT_DEVENV=true so the frontend compiles with the
admin console disabled by default, xauth and libvulkan1 plus the GPU
compose overlay, the MCP OAuth metadata route in nginx, and clipboard
support in tmux.
The JDK stays at 27.0.1.1 on both pins.
AI-assisted-by: deepseek-v4.1-flash
* ⬆️ Finish the Node 24.22.3 bump outside docker/
The docker/ import brought Node 24.22.3 into the devenv and the image
tags while .nvmrc and the two plugins-deploy workflows stayed on
24.22.2.
Node stays on the 24.x line on every site: the plugins-deploy runtime
pins follow .nvmrc, even though develop moved them to node@26.13.1 in
99db795966.
AI-assisted-by: deepseek-v4.1-flash
* 🐛 Validate the shapes of a page added by an update-file change
The backend validates every shape an `:add-obj` or a `:mod-obj` change
writes, but an `:add-page` change carries a whole page and its shapes
reached the file unchecked. Duplicate page and the undo of a page
deletion send that page as the client holds it, so a tab that loaded a
file before a migration ran could write the old format back into it.
A tab opened before #12006 deployed holds camelCase svg attr keys such
as `:fillRule`, and the closed `:svg-attrs` schema rejects them. The
file saves, and the next read that migrates it fails the file data
check, so the whole file stops opening (#13107).
`:add-page` now validates each shape of the page on the backend, as
`:add-obj` does for one.
AI-assisted-by: claude-opus-5-5
* 🐛 Rerun the svg attr normalization on files that recorded 0035
Files that recorded migration 0035 never run it again, so camelCase
svg attr keys written after it ran stay in the file. A tab that loaded
a file before 0035 ran could save such keys through an `:add-page`
change, and the closed `:svg-attrs` schema then rejects the whole file
on its next migrating read (#13107).
The svg attr normalization now runs under the id
`0037-fix-shape-svg-attrs-and-defs`, and the 0035 id leaves
`available-migrations`, as 0021 did when 0035 replaced it. Every file
that recorded 0035 migrates again. Kebab input passes through
unchanged, so the rerun touches only the keys written after 0035.
AI-assisted-by: claude-opus-5-5
* ♻️ Move the 0037 migration tests to their own namespace
The svg-attr migration was renamed to 0037, but its tests stayed in
the 0035 test namespace under migration-0035-* names. Move the whole
section to files_migrations_0037_test.cljc, register the new namespace
in the test runner, and rename its tests to match the migration id.
Replace the doseq over the two withdrawn ids with two self-contained
deftests, one for 0021 and one for 0035. No production code changes.
AI-assisted-by: hy4-flash-free
* 🐛 Keep the log watch installed until the rejection record arrives
The logger swaps the record on an executor thread, after the call that
logged it returns. The test removed the watch in the `finally` around
`update-file` and only then polled for the record, so under load the
record landed on nobody and the test read a nil `:attempts`.
AI-assisted-by: deepseek-v4.1-flash
* 🐛 Count only update-file calls in the save-test transport log
The mocked transport is installed with `set!` and outlives the fixture: a
timer another module left pending can still reach it mid-test, as a
`:delete-file-object-thumbnails` call did in CI. Filter to the only
command persistence sends, `update-file`, so a stray call neither fails
the emptiness assertion nor releases a `wait-for` on a save.
AI-assisted-by: deepseek-v4.1-flash
---------
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
* ✨ Delay building schemas in check-fn
check-fn eagerly builds its schemas which contributes to the startup time. But
we can delay this to when the check function is actually called, which seems to
be when an edit is made. On the Travel A2B - Locofy Sample project file this
reduced the time to the first viewport render by ~15%.
* ✨ Make schema resolution lazy only on production builds
Add a lazy-delay macro that defers the expression only on builds that
set the app.common.data.macros/lazy-delay? closure define, and use it
in check-fn to resolve the schema.
The previous change made the schema resolution unconditionally lazy,
which hid wrong schema definitions until the first check call. With
this change development builds, tests and storybook resolve the schema
when the namespace loads, so a bad definition fails early, and
production builds keep the deferred resolution and the startup win.
The define is enabled in the release builds of frontend (main and
worker), exporter and library. On the JVM the expression is always
evaluated immediately.
AI-assisted-by: deepseek-v4.1-flash
---------
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
worker_processes auto starts one worker per host CPU, ignoring the
container CPU limit, and since worker_connections went from 2048 to
65535 each worker reserves about 30 MB at startup. A frontend limited
to a few CPUs on a 64-core node needs close to 2 GB before serving a
request and gets OOM killed.
Default the worker count to the CPUs the container can use, its cpuset
and its cgroup CPU quota rounded up, when they are fewer than the CPUs
of the host, and keep auto otherwise. Make both settings configurable
through PENPOT_HTTP_SERVER_WORKER_PROCESSES and
PENPOT_HTTP_SERVER_WORKER_CONNECTIONS, and refuse to start on values
that are not valid.
Refs #13103
Signed-off-by: David Barragán Merino <david.barragan@kaleidos.net>
Files written by old Penpot versions hold maps where an svg
attribute value should be, such as a `:filter` that once read
`url(#filter_2)`. Since #12006 the `:svg-attrs` schema is closed and
admits scalars only, and migration 0035 kept those maps, so the file
data check at the end of every migration rejected the file. Such a
file can be neither imported nor opened. Two built-in templates,
Avataaars and Tutorial for beginners, are among them.
`attrs->kebab-props` now drops a value that is not a string, a number,
or a boolean, at the top level and inside `:style`. Migration 0035 and
every birth path go through it, so stored attrs match the schema.
Of the 143 files in penpot/penpot-files, 4 fail to import at
`:svg-attrs :filter` before this change, and all 4 import after it.
AI-assisted-by: claude-opus-5-5
check_signed_off_by was never registered in the validator list, so it never
ran, and no test exercised it. The DCO sign-off applies to external
contributors through CONTRIBUTING.md, not to every commit, so the local
checker has nothing to enforce there.
Drop the function and the DCO mention in the script docstring.
AI-assisted-by: deepseek-v4.1-flash
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
code-review-criteria and review-code carried weight that changed no
decision: a 16-row rationalizations table, red flags that repeated the axes,
and three sections written for the author of a change rather than for the
reviewer. 338 lines become 251.
Drop that layer, dedupe DRY/KISS/YAGNI between the core principles and the
axes, merge the two instruction lists of the flow, and compress the GitHub
comment format.
The reviewer no longer re-runs the suite or a build: the author's run and CI
already provide that evidence, and repeating it only made reviews longer. It
runs at most the single test file that settles a specific doubt, and states
which evidence it relied on.
AI-assisted-by: deepseek-v4.1-flash
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
* ♻️ Give the Team management link in the team hero a real href
"Team management" in the "Team up!" notice of a team's Projects page was
an <a> without href. It now links to the team Members page; a plain click
still runs the in-app navigation (prevent default), and Ctrl/Cmd-click
opens the link in a new tab.
New visual test "Shows the Team management link": 0 px of difference at
rest and on hover.
AI-assisted-by: claude-opus-5-5
* ♻️ Give the Go to login link of the recovery page a real href
"Go to login" on the password recovery page was an <a> without href. It
now links to the login page; a plain click still runs the in-app
navigation (prevent default), and Ctrl/Cmd-click opens the link in a new
tab.
New visual test "Shows the Go to login link": 0 px of difference at rest
and on hover.
AI-assisted-by: claude-opus-5-5
Members, Invitations, Webhooks and Settings in the team page header
were <a> elements without href: the keyboard could not reach them and
they could not open in a new tab. Each one now links to its section; a
plain click still runs the in-app navigation (prevent default), and
Ctrl/Cmd-click opens the link in a new tab. The current section gets
aria-current="page".
They keep their look: the "Team header menu" visual test gives 0 px of
difference at rest and on hover.
AI-assisted-by: claude-opus-5-5
The checker rejected any Co-authored-by trailer, which also blocked a real
person. The trailer is meant to credit a human co-author, and git and
GitHub use it for that; only AI providers, agents and bots are unwanted.
Match the trailer value against a blocklist of providers and agents plus
bot identities, and point to the dedicated AI-assisted-by trailer for AI
participation. Co-authored-by joins the trailer exemption of the
80-character body rule.
Update the tests, CONTRIBUTING.md, the create-commit skill and the commit
memory to the new rule.
AI-assisted-by: deepseek-v4.1-flash
Signed-off-by: Andrey Antukh <niwi@niwi.nz>