24832 Commits

Author SHA1 Message Date
Yamila Moreno
d403a66122
🔧 Require milestone to issues linked to a PR (#13133)
Signed-off-by: Yamila Moreno <yamila.moreno@kaleidos.net>
2026-11-18 09:07:22 +01:00
penpot-renovate[bot]
a9972d5b47
⬆️ Update dhi.io/nginx image to 5f75855 (#13136)
- dhi.io/nginx 1.31.8-debian13-dev@5f75855 (docker/images/Dockerfile.frontend)

Signed-off-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
2026-11-18 09:05:41 +01:00
Luke Lau
14abaf93f4
⚡ Cull tile shapes to the tile instead of its whole margin (#13112)
After background blur support was added to render-wasm in 5ba53f7296,
we needed to start rendering shapes in the 256px margins of the tile,
since they contribute to the blur result.

This means that a tile may end up drawing shapes from the tiles around
it, and in the worst case we end up drawing 4x the number of shapes.

We can limit this to only the tiles that have background blur, which
significantly reduces the number of shapes drawn.

Masked groups do something similar so this generalizes and reuses the
`group_reach` stack, which stores how far past the current tile is
painted.

Before we start drawing the shapes in `render_shape_tree_partial`, we
walk the shapes in the tile to check how far the background blur
"reaches" and extend `group_reach` by just that amount, rather than
a 256px radius. As part of the generalization we also need to update
`masked_group_filter_reach` so it works on non-masked groups.

On the mem_benchmark file a full render calls render_shape 77.1% less
often. On the admin dahsboard there's 62% less. This gain shows up
particularly in interactive transforms, e.g. dragging another board
across the heroicons board goes from about 21 to 48 fps.

AI-assisted-by: claude-opus-5-5
2026-11-18 07:07:53 +01:00
Yamila Moreno
f65242fb00
🔧 Manage renovate PRs (#13131)
Signed-off-by: Yamila Moreno <yamila.moreno@kaleidos.net>
2026-11-17 19:00:05 +01:00
Luke Lau
0bfcaa4109
⚡ Avoid redundant copy of tile atlas (#13104)
61cd9fe88683a4068817f538a2ae54d80aca095e stored a reference to the
last snapshot of the tile atlas, presumably to avoid the call to
image_snapshot when not needed.

But it turns out image_snapshot doesn't actually cost anything since
it just returns a reference to the surface texture. Storing the
reference actually causes a 4096x4096 texture copy because skia has
copy-on-write behaviour. Skia sees the reference stored in Surfaces,
so when the next render tries to draw on the surface it needs to
allocate + copy over the tile atlas texture.

By removing the reference skia can reuse the texture on the next
render which avoids a 64MiB copy on the GPU.

AI-assisted-by: claude-opus-5-5
2026-11-17 13:46:27 +01:00
Miguel de Benito Delgado
6043edb95a
♻️ Share WASM modifier bindings (#13016)
- Extract modifier encoding and FFI operations into common bindings
  for renderer benchmarks and application callers.
- Keep readiness checks and render scheduling in the frontend API.
- Release propagation output after decoding failures.
- Cover payload ownership, heap growth, snapping and interactive
  lifecycle behaviour with shared fixtures and integration tests.

AI-assisted-by: gpt-6.1-sol, deepseek-flash
2026-11-17 13:28:33 +01:00
Florian Schrödl
94b13d08fe
✨ Read and write token files with the tokenscript package (#12481)
Token import and export move to tokenscript.document.read and
tokenscript.document.write in the tokenscript-interpreter package
(penpot/tokenscript-interpreter#4).
tokens-lib keeps an adapter that maps its documents to a TokensLib and
back: penpot's token types, the keys of composite values and the
activation of themes and sets. About 600 lines of format detection,
legacy rewriting and tree walking go.

- Imports read DTCG 2025.10 files: {value, unit} dimensions, color
  objects in their color space (oklch(l, c, h)), the fontFamily and
  fontWeight type names, $root, $extends and $ref aliases. Legacy and
  DTCG nodes can be mixed in one file.
- What penpot does not store is dropped and listed in one warning
  toast: $extensions, $deprecated, group descriptions, values the
  reader cannot use (such as a Rec. 2020 color without hex), groups
  whose $extends fails and tokens of types penpot does not have.
- Sets a theme marks disabled are no longer part of the theme, and
  activating a theme deactivates the other themes of its group.
- Exports are unchanged by default. export-dtcg-json and
  export-dtcg-multi-file take {:profile :dtcg} for 2025.10 values and
  types. Such a file reads back with the DTCG types: spacing and
  sizing tokens come back as dimensions.
- The package moves from frontend/deps.edn to common/deps.edn, since
  the backend and the SDK read and write token files too.

Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com>
2026-11-17 13:04:45 +01:00
Juan de la Cruz
81c2408470
✨ Add scale options panel to the right sidebar (#12453)
* ✨ Extend combobox icons and input handling

Allow a combobox to show a fallback icon when no option provides one.
Clear delivered input values so unmounting does not emit them again.

AI-assisted-by: gpt-6-luna

* ✨ Add scale options panel to the right sidebar

Add scale controls for selection dimensions, presets, and anchor points.
Scale shape content around the selected anchor and preview canvas resizes.
Reset scale state when selection changes, and exit scale mode with Escape.
Cover scaling and resize previews with frontend tests.

AI-assisted-by: gpt-6-luna

---------

Co-authored-by: Luis de Dios <luis.dedios@kaleidos.net>
2026-11-17 12:33:51 +01:00
Florian Schrödl
8b8def3b6e
🐛 Fix clicking a set in the theme editor (#13067)
Clicking a set's row in the theme editor threw an assertion error and
left the set as it was: the row passed the set's name to the toggle,
which looks the set up by id. The row now uses the checkbox's handler,
so the two can't drift apart again.

The editor's set and group toggles move into pure functions next to
it, with tests. A new spec clicks a set's name to tick and untick it.

Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com>
2026-11-17 12:11:05 +01:00
Rayen Khammar
445d02e012
🐛 Reap zombie Chromium processes in the exporter container (#12969)
* 🐛 Reap zombie Chromium processes in the exporter container

The exporter runs node as PID 1 with no init process. Chromium helper
processes orphaned when Playwright closes a browser are re-parented to
node, which never reaps them, so every browser-based export left
defunct chrome-headless processes behind.

Enable init for the exporter service so Docker's built-in init runs as
PID 1, reaps the orphans and forwards signals to node.

Closes #10339

Signed-off-by: Rayen Khammar <khammarrayen4@gmail.com>

* 🐛 Move zombie reaping fix into the exporter image

Install tini and run it as the image entrypoint with -s, so orphaned
Chromium helpers are reaped in every deployment, including Kubernetes.
-s keeps tini working without a warning when it runs under docker-init
(init: true). Drop the compose init: true change to keep one mechanism.

Signed-off-by: Rayen Khammar <khammarrayen4@gmail.com>

---------

Signed-off-by: Rayen Khammar <khammarrayen4@gmail.com>
2026-11-17 11:41:43 +01:00
Andrey Antukh
78cfe7fa58 Merge remote-tracking branch 'origin/staging' into develop 2026-11-17 10:53:02 +01:00
Andrey Antukh
94155508e5 Merge branch 'staging-2.19.x' into staging 2026-11-17 10:16:51 +01:00
Andrey Antukh
1d60ba65b5 Merge remote-tracking branch 'origin/main' into staging-2.19.x 2026-11-17 10:02:29 +01:00
Pablo Alba
ea0ac02900 🐛 Fix duplicate-file crash on nil keys in deleted component objects (#13045)
* 🐛 Fix duplicate-file crash on nil keys in deleted component objects

* ♻️ Withdraw the legacy-36 migration in favor of 0036

legacy-36 and 0036-clear-nil-keys-in-objects perform the same
cleanup of nil keys in `:objects`. Migrations only clean up
invalid data here, so they carry no order dependency between
them and running both is wasteful.

Remove the legacy-36 defmethod and its id from
`available-migrations`, the same way 0021-fix-shape-svg-attrs
was withdrawn in favor of 0035. Files that recorded legacy-36
re-migrate through 0036; their persisted `:migrations` lists
keep the old id, and the playwright fixtures recording it stay
untouched.

Add a migrate-file test proving a file that recorded legacy-36
is re-armed for 0036 and passes schema validation after.
Document the withdrawal pattern in the migration subtleties
memory.

AI-assisted-by: inkling-2-small-free

---------

Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2.19.3-RC1
2026-11-17 09:45:48 +01:00
Roshan Ramani
32d488e162
🐛 Fix swapped Move left and Move right shortcuts (#13068)
The `move-unit-left` shortcut was bound to the Right arrow and moved the
selection right, and `move-unit-right` the reverse, in both the workspace
and the path editor. Arrow keys behaved correctly, but the shortcuts panel
and the shortcut settings showed "Move left" next to the Right arrow, and
customizing "Move left" rebound the rightward move.

AI-assisted-by: claude-opus-5-5

Signed-off-by: Roshan Ramani <roshanramani.dev@gmail.com>
2026-11-17 09:45:02 +01:00
Pablo Alba
aa35bc78c9
🐛 Fix duplicate-file crash on nil keys in deleted component objects (#13045)
* 🐛 Fix duplicate-file crash on nil keys in deleted component objects

* ♻️ Withdraw the legacy-36 migration in favor of 0036

legacy-36 and 0036-clear-nil-keys-in-objects perform the same
cleanup of nil keys in `:objects`. Migrations only clean up
invalid data here, so they carry no order dependency between
them and running both is wasteful.

Remove the legacy-36 defmethod and its id from
`available-migrations`, the same way 0021-fix-shape-svg-attrs
was withdrawn in favor of 0035. Files that recorded legacy-36
re-migrate through 0036; their persisted `:migrations` lists
keep the old id, and the playwright fixtures recording it stay
untouched.

Add a migrate-file test proving a file that recorded legacy-36
is re-armed for 0036 and passes schema validation after.
Document the withdrawal pattern in the migration subtleties
memory.

AI-assisted-by: inkling-2-small-free

---------

Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2026-11-17 09:36:40 +01:00
Florian Schrödl
0ae02daae9
♻️ Extract and test how tokens are applied to shapes (#13034)
toggle-token and apply-token-from-input each worked out inside the
event which attributes a token goes on, and repeated most of it. The
decision now lives in pure helpers both events share: `toggle-action`
(remove the token or apply it), `apply-action` (on which attributes)
and `target-shapes` (a selected group stands for its children).
`action->event` turns the result into the event to run. Nothing
changes in behavior; apply-spacing-token-separated loses its `attr`
option, which every caller left empty.

Unit tests cover the decision, with the cases the store tests
lacked: a color token comes off the stroke too, a shape without the
token completes the others, and a spacing token on chosen attributes.
Store tests cover what had none: applying from the fill and stroke
rows, the opacity, position and size fields, the min width of a flex
child and the selection colors, choosing the token a shape already
has, and toggling a token on a group.

Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com>
2026-11-17 09:31:47 +01:00
Andrey Antukh
114ce6ec03
✨ Make legacy-db file data read-only (#13102)
legacy-db is no longer a write backend: fdata/upsert! rejects it
(:legacy-backend-read-only), handle-persistence stops writing
file.data and file_change.data, and the update-params schema of
fdata no longer accepts it. Reading old payloads keeps working, and
the file-data-backend default stays db.

The configuration guide, the backend config (a startup warning reads
PENPOT_FILE_DATA_BACKEND=legacy-db as db instead of failing every
save) and the storage memories say so, with the upgrade note for
deployments that still set the variable.

AI-assisted-by: deepseek-v4.1-flash
AI-assisted-by: inkling-2-small-free
2026-11-17 09:24:23 +01:00
Elena Torró
1068421d0b
🐛 Keep the drop index when moving a child to the end of a flex layout (#13098)
Closes #12929

AI-assisted-by: claude-opus-5-5
2026-11-17 08:48:20 +01:00
Elena Torró
a050a21fae
🐛 Omit board fill on WASM export when Show in exports is off (#13073)
Send the flag to render-wasm and drop the root's fills while it renders.

Closes #12930

AI-assisted-by: claude-opus-5.5
2026-11-17 07:58:10 +01:00
penpot-renovate[bot]
23468f9e4f
⬆️ Update dhi.io/nginx image to ad079e1 (#13096)
- dhi.io/nginx 1.31.8-alpine3.24@ad079e1 (docker/images/Dockerfile.storybook)

Signed-off-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
2026-11-16 18:39:36 +01:00
Andrey Antukh
57b9b8463b
🐛 Keep app booting when SES bootstrap fails (#13085)
* 🐛 Keep app booting when SES bootstrap fails

Wrap repairIntrinsics in a guarded bootstrap so a SES Temporal check failure
no longer aborts bundle evaluation and blanks the whole app. When it fails,
plugins and MCP stay unavailable for that session, a telemetry event reports
the error, and trying to open a plugin shows an environment warning.

Add vitest coverage for both bootstrap paths and a CLJS regression test for
the runtime-unavailable toast.

Closes #12924

AI-assisted-by: hy4-flash-free

* 🐛 Fix CI format check and plugin test entry point

Wrap the long Prettier line in bootstrap.spec.ts so `pnpm run format:check`
passes again in the plugins module, and document that the duplicated SES
options are an intentional contract snapshot.

Switch the runtime-unavailable CLJS test to the public open-plugin! entry
point instead of the private load-plugin! function. The M2 test for
signal-runtime-ready was dropped: loading app.plugins in the Node test
runner needs packaging and DOM shim changes outside this fix.

Closes #12924

AI-assisted-by: hy4-flash-free
2026-11-16 17:52:55 +01:00
Andrey Antukh
d97972c81d
🐛 Build the SSO redirect target on the server (#12952)
* 🐛 Build the SSO redirect target on the server

The organization SSO flow took the destination URL from the client and
redirected to it after the identity provider round-trip, so any
authenticated profile could point that redirect at another domain: the
server never checked where the URL came from.

The RPC now takes the route token of the client (?screen=...&params)
and the server builds the destination out of it: the public URI plus
the query string, parsed and rendered back. The destination can no
longer leave the public URI, and the callback checks it again before
redirecting, which covers the state tokens minted before the change.

The state token also carries the profile that started the flow, so
only that session is granted the organization SSO entry: a state
prepared by someone else cannot mark the session of the one that
completes it. Whenever the RPC receives an organization id (it always
comes from the client), it also checks that the profile is a member of
the organization or its owner, instead of letting any profile start a
flow for an organization it does not belong to.

Tests cover the destination builder, a callback that ignores a
destination outside the public URI, a state that does not grant the SSO
entry to another session, and the organization access check.

AI-assisted-by: minimax-m3.1-flash

* 🐛 Check the SSO redirect target against the public URI

The callback compared the destination with a string prefix, so the two
bypasses the advisory documents (a userinfo prefix and a look-alike
host) were closed only by the trailing slash of the public URI. The
check now compares the parsed origin (scheme, host case-insensitive,
port with the default made explicit) and requires the path to be under
the base path of the public URI, so neither bypass passes.

The client sent `location.search`, the history token, whose leading `?`
is URL syntax and no part of a query string. It sends the query string
proper now (`screen=…&params`) through `rt/get-current-query-string`,
and `rt/token->query-string` is the single bridge between the two
shapes: every other consumer concatenates the token over the base path.
The server puts the separator back when it joins the destination, and
trims one that still arrives, so a browser holding the previous bundle
keeps its destination while the new one rolls out.

Building the destination can no longer break the flow: it catches its
own errors and lands on the public URI, which matters in the
deployments where the browser origin differs from the configured one.
A value that is not a route is ignored with a warning, decided by the
keys it parses into (a URL becomes a single key holding the whole URL),
and a route with no `screen`, like the root params of the application
(`template=…`), stays a usable destination.

The organization membership lookup is now shared by the check that
gates the SSO flow and the one that raises, so the two cannot drift
apart, and the docstring of the RPC lists `:no-organization-access`
next to `:no-team-access`.

`rt/nav-raw` returns its `:href`/`:uri` through `@event`, as its
sibling `rt/navigate` already did. Nothing in the app listens to
`::rt/nav-raw`, so the callers behave the same; the SSO test now reads
the destination from the event instead of intercepting the helper.

Tests cover the two bypasses and the base-path rule, the RPC with an
unusable destination, the value that is not a route, the request that
carries both ids, an organization that does not exist, the query string
the frontend sends, and the two router helpers.

AI-assisted-by: minimax-m3.1-flash

* ♻️ Deduplicate SSO destination URL building

The backend had an unreachable blank check and a one-line wrapper around
the URI helper in build-dest-url. On the client, the SSO retry and error
flows each assembled the destination from public-uri and the route params.

Flatten build-dest-url with a cond and call u/query-string->map directly.
Add rt/token->url as the single client helper for absolute route URLs, with
tests for both token shapes and for a blank token. Update the routing memory
with the new helper contract.

AI-assisted-by: hy4-flash-free
2026-11-16 17:34:49 +01:00
Florian Schrödl
699f79c693
♻️ Extract the token group's pill click and open sections (#12795)
Move what the token group works out into pure functions with tests:
whether a type's section is open, whether a text is being edited, and
what clicking a token pill does. Nothing changes in behavior.

Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com>
2026-11-16 16:14:57 +01:00
Eva Marco
82421f9729
🐛 Show resolved value when opening an alias token edit form (#13038)
* 🐛 Show resolved color in alias token edit form swatch

The color token form opened every alias token with an empty swatch.
The resolved value only reached :color-result once the value field
was touched, so the swatch had nothing to show on open.

Keep the resolved color for the swatch when the field is untouched,
without showing the "resolved value" hint. Add an e2e test that loads
a fixture with a color token and an alias to it.

Closes #12672

AI-assisted-by: claude-opus-5-5

* 🐛 Show resolved value when opening an alias token edit form

The token edit form only showed "Resolved value" after typing in the
value field: the single-value inputs dropped the first resolution while
the field was untouched, and the typography/shadow reference field read
its first value from [:value :reference], which an alias token does not
have (its value is the reference string).

Show the hint on open when the resolved value differs from the written
one, so a plain `16` gets no `Resolved value: 16`. Start the reference
field stream with the alias string. Extend the e2e fixture with font
size and typography aliases and add a test for them.

Closes #12788

AI-assisted-by: claude-opus-5-5
2026-11-16 16:00:18 +01:00
Andrey Antukh
d2dfc09495
🐛 Carry the team id in every team scoped navigation (#12963)
* 🐛 Carry the team id in every team scoped navigation

The eleven `go-to-*` helpers of `app.main.data.common` resolved the
team with a plain `or` against `:current-team-id`, or read that key
alone, so an event emitted while no team was initialized built a
dashboard or workspace route without a `team-id`. `team-container*`
raises `:not-found :invalid-team-id` for such a route and
`exception-section*` does not report `:not-found`, so the user landed
on the not-found page and PostHog never saw it.

Add `resolve-team-id`, which falls back to the team of the route
already on screen and then to the profile `:default-team-id`. The
route goes first on purpose: an emitter that runs from a team screen
knows which team the user is looking at, and the personal team would
open their file under another team. The `:default` sentinel keeps its
meaning. With none of the four the helper still navigates with a nil
id, which is the documented last resort.

Harden the team-container test at the same time: it now renders the
same component with the store team the caller wants, captures markup
and errors per render, unmounts the root from a `finally`, and covers
the guard that compares the route id with the store team. React
reports a hook-order violation through `console.error` and recovers,
and only when a render adds hooks, so the harness captures that too
and the "id leaves" direction stays a guard test.

Closes #12962

AI-assisted-by: deepseek-v4.1-flash

* ♻️ Measure the navigation tests by termination

The `emitted` helper of `common_test` waited for the first event, with a
budget of 50 macrotasks, so a helper that emitted anything before its
navigation could be disposed early, and a helper that stopped closing
its stream passed on the first event. Wait for termination instead:
`async/observe` over a subject, and make `go-to-dashboard-search`
complete by pushing the `::rt/navigated` it listens for, which is the
event it waits for in the app to focus the search box. Every helper of
the family is measured the same way now, `-search` included.

`nav-params` returns nil when no navigation matched instead of calling
`deref` on nil, as its docstring promised. Add the mirror test for the
`:default` sentinel of `go-to-dashboard-deleted`, the second copy of
the branch that `-recent` already had covered.

Correct two memories: the resolver decides for every team scoped
helper, not for every `go-to-*` and not alone, since two direct
`rt/nav` emitters are the residual; and `(rx/empty)` is for a stream
that must not emit, not for one that must stay open.

Relates to #12962

AI-assisted-by: deepseek-v4.1-flash
2026-11-16 15:42:43 +01:00
Andrey Antukh
6e4e69c339
🐛 Read the media and thumbnails of a package one at a time (#13024)
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
2026-11-16 15:42:15 +01:00
Andrey Antukh
0fda857426
🐛 Invalidate all sessions on password recovery (#12967)
* 🐛 Invalidate all sessions on password recovery

recover-profile validated the recovery token and updated the
password, but never deleted the existing server-side sessions in
http_session_v2. A previously captured auth-token kept working
after the victim "recovered" the account (GHSA-3j2p-qr45-q365,
CWE-613).

The command now calls session/invalidate-all for the recovered
profile. The command already runs with ::db/transaction true, so
the delete joins the same transaction as the password UPDATE: both
commit or roll back together. There is no current session to
preserve — the RPC is unauthenticated — which is the same contract
the profile deletion path uses.

Tests in rpc_auth_test.clj pin the behavior: the victim's sessions
die, other profiles' sessions survive, and a failed recovery is a
no-op. Both invalidation tests failed before the fix.

AI-assisted-by: inkling-2-small-free

* 🐛 Pin recovery-transaction atomicity after review

Review of 92a65f544b found the tests pinned the end state but not
the rollback guarantee the fix relies on: the session DELETE joins
the password UPDATE in one transaction.

Add recover-profile-rollback-keeps-password-and-sessions: send-template
throws after the update, so the command must fail with password and
sessions both untouched. recover-profile-failure-keeps-sessions now
also asserts the password, matching its docstring. The invalidate-all
docstring mentions the recovery caller.

Addresses review findings M1, M2 and M3.

AI-assisted-by: inkling-2-small-free

* 🔥 Drop recovery test that never reached the fix

The failure test used a token with the :authentication issuer, so
tokens/verify rejected it before any write. It passed with or without
the invalidation fix and exercised no new code. The rollback test
already covers that a failed recovery leaves no partial effects.

AI-assisted-by: hy4-flash-free
2026-11-16 15:40:36 +01:00
penpot-renovate[bot]
99db795966
⬆️ update GitHub Actions (#13071)
- node 26.13.1 (.github/workflows/plugins-deploy-styles-doc.yml)
- node 26.13.1 (.github/workflows/plugins-deploy-api-doc.yml)
- pnpm/setup v3.2.0 (.github/workflows/plugins-deploy-styles-doc.yml)
- pnpm/setup v3.2.0 (.github/workflows/plugins-deploy-api-doc.yml)

Signed-off-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
2026-11-16 15:38:28 +01:00
María Valderrama
c0f746ee34
🐛 Apply the invite policy to pending invitations (#13080)
* 🐛 Apply the invite policy to pending invitations

* 📎 Code review
2026-11-16 15:38:07 +01:00
Marina López
ba0eab57ab
🐛 Hide team plan from every member when owner has Enterprise (#13079) 2026-11-16 14:55:54 +01:00
Luke Lau
5d88cb3bb7
🐛 Don't copy margins past tile in draw_current_tile_into_backbuffer (#13066)
When dragging a shape each tile that needs repainted is repainted via
draw_current_tile_into_backbuffer in fast mode. So if you drag over a tile it
ends up dropping drop shadows etc.

IIUC, each tile is 512x512px but drawn on a 1024px surface with 256px margins
so that the background blur has something to read. In a regular render we
render the 1024px surface but only copy the center 512px of the tile into the
backbuffer. But in draw_current_tile_into_backbuffer we were copying the whole
1024px surface. This draws over the other tiles with a fast mode render, even
though those other tiles don't need repainted.

This fixes it by reusing draw_surface_src_rect_to_dst which clips the canvas
properly so we only draw the 512x512px of the tile.

AI-assisted-by: claude-fable-5-2
2026-11-16 14:47:27 +01:00
Luke Lau
a224608a0e
⚡ Memoize boards with grids in frame-grid* (#13075)
On a test file `mem_benchmark` with 30k boards on one page, around 11ms is
spent each time the view is panned/zoomed iterating over each board and
checking has-grid?, which after https://github.com/penpot/penpot/pull/12790 is
now slightly slower because it involves an array scan.

We don't need to compute the list of boards with grids on every step of the pan
and can memoize it, which saves 30k calls to has-grid? on each frame.

AI-assisted-by: claude-opus-5-5
2026-11-16 14:32:10 +01:00
Álvaro Tejero-Cantero
bd4af28d78
📚 Name a worker count when running the Playwright suite (#12799)
* 📚 Name a worker count in the frontend testing memory

The memory gave the command and left the count to the config, whose
default of one worker makes the whole suite slow, and CI's two per
shard reads as the number to copy.

Records the count to reach for and what it costs: about 8 GB of
browser memory at four workers, so a 64 GB host takes four beside a
watching devenv, and a 32 GB host takes two, or four on a slim devenv.

AI-assisted-by: deepseek-v4.1-flash

* 📚 Gate the Playwright worker count on cores and memory

Four workers keep about nine hardware threads busy, measured as the
container's CPU seconds over wall time, and hold about 8 GB of browser
processes. States the cost per worker, so a reader on a smaller machine
does not oversubscribe it.

AI-assisted-by: deepseek-v4.1-flash
2026-11-16 13:55:05 +01:00
Luke Lau
bbaebfb146
🐛 Send the team's custom fonts to the worker (#13044)
The worker draws local exports and looks custom fonts up in its own store
to find their files. Only the main thread fetches the team's fonts, so the
worker's store had none, and exports drew text set in a custom font with
the fallback font.

The main thread now sends the worker the team's fonts each time they
change, and the worker keeps them in its store.

AI-assisted-by: claude-opus-5-5
2026-11-16 13:53:43 +01:00
Luke Lau
1ccb9e9cb9
⚡ Move WASM component thumbnail rendering to the worker (#13046)
This PR moves component thumbnail rendering off the main thread
and onto the worker, which avoids the freezes.

The main thread will send the worker over a request containing the component's
shape data, and the worker will render it in batches. Once finished it will
both persist the thumbnails to the server if requested and send back the PNG
data to the main thread.

AI-assisted-by: claude-opus-5-5
2026-11-16 13:48:04 +01:00
Belén Albeza
b0dbbe8285
🐛 Fix blurry file thumbnails rendered with render-wasm (#13026)
The wasm path drew file thumbnails on a 252px wide canvas, wrapped the
PNG in an SVG and sent it to the rasterizer, which scaled it up to its
default 300px width. The result was blurry on the dashboard on high-DPI
screens and in the link preview card.

Render the wasm thumbnail at 600px wide, twice the old size, and upload
the canvas PNG as is, without the rasterizer round trip. The SVG render
path keeps its current size.

Closes #13025

AI-assisted-by: claude-opus-5-5
2026-11-16 13:32:38 +01:00
penpot-renovate[bot]
99497d3b7c
⬆️ Update dependency pnpm to v12.21.0 (#13063)
- pnpm 12.21.0 (docker/images/Dockerfile.media-processor)
- pnpm 12.21.0 (docker/images/Dockerfile.mcp)
- pnpm 12.21.0 (docker/images/Dockerfile.exporter)
- pnpm 12.21.0 (docker/devenv/Dockerfile)
- pnpm 12.21.0 (render-wasm/package.json)
- pnpm 12.21.0 (plugins/package.json)
- pnpm 12.21.0 (plugins/libs/plugins-styles/package.json)
- pnpm 12.21.0 (plugins/libs/plugins-runtime/package.json)
- pnpm 12.21.0 (plugins/libs/plugin-types/package.json)
- pnpm 12.21.0 (plugins/apps/table-plugin/package.json)
- pnpm 12.21.0 (plugins/apps/rename-layers-plugin/package.json)
- pnpm 12.21.0 (plugins/apps/poc-tokens-plugin/package.json)
- pnpm 12.21.0 (plugins/apps/poc-state-plugin/package.json)
- pnpm 12.21.0 (plugins/apps/plugin-api-test-suite/package.json)
- pnpm 12.21.0 (plugins/apps/lorem-ipsum-plugin/package.json)
- pnpm 12.21.0 (plugins/apps/icons-plugin/package.json)
- pnpm 12.21.0 (plugins/apps/example-styles/package.json)
- pnpm 12.21.0 (plugins/apps/e2e/package.json)
- pnpm 12.21.0 (plugins/apps/create-palette-plugin/package.json)
- pnpm 12.21.0 (plugins/apps/contrast-plugin/package.json)
- pnpm 12.21.0 (plugins/apps/composable-test-suite/package.json)
- pnpm 12.21.0 (plugins/apps/colors-to-tokens-plugin/package.json)
- pnpm 12.21.0 (package.json)
- pnpm 12.21.0 (media-processor/package.json)
- pnpm 12.21.0 (mcp/packages/server/package.json)
- pnpm 12.21.0 (mcp/packages/plugin/package.json)
- pnpm 12.21.0 (mcp/packages/common/package.json)
- pnpm 12.21.0 (mcp/packages/browser-extension/package.json)
- pnpm 12.21.0 (mcp/package.json)
- pnpm 12.21.0 (library/package.json)
- pnpm 12.21.0 (frontend/text-editor/package.json)
- pnpm 12.21.0 (frontend/packages/ui/package.json)
- pnpm 12.21.0 (frontend/packages/mousetrap/package.json)
- pnpm 12.21.0 (frontend/packages/draft-js/package.json)
- pnpm 12.21.0 (frontend/package.json)
- pnpm 12.21.0 (exporter/package.json)
- pnpm 12.21.0 (docs/package.json)
- pnpm 12.21.0 (common/package.json)
- pnpm 12.21.0 (backend/package.json)

Signed-off-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
2026-11-16 13:15:48 +01:00
penpot-renovate[bot]
4d91d8f098
⬆️ Update DHI base images (#13062)
- dhi.io/debian-base trixie-debian13-dev@f90fd43 (docker/images/Dockerfile.backend)
- dhi.io/debian-base trixie-debian13-dev@f90fd43 (docker/images/Dockerfile.backend)
- dhi.io/debian-base trixie-debian13@e3e8512 (docker/imagemagick/Dockerfile)
- dhi.io/debian-base trixie-debian13-dev@f90fd43 (docker/imagemagick/Dockerfile)
- dhi.io/debian-base trixie-debian13-dev@f90fd43 (docker/devenv/Dockerfile)
- dhi.io/nginx 1.31.8-debian13-dev@2168f2f (docker/images/Dockerfile.frontend)
- dhi.io/node 24.22.3-debian13-dev@dee4bb1 (docker/images/Dockerfile.media-processor)
- dhi.io/node 24.22.3-debian13-dev@dee4bb1 (docker/images/Dockerfile.mcp)
- dhi.io/node 24.22.3-debian13-dev@dee4bb1 (docker/images/Dockerfile.exporter)

Signed-off-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
2026-11-16 13:15:17 +01:00
Belén Albeza
27784f70ac
🐛 Fix custom CJK fonts losing glyphs when converted to TTF (#13074)
FontForge opens a CID-keyed OpenType font as several sub-fonts, and
Generate() writes only the active one. Most CJK fonts use this layout,
so the TTF used by the render-wasm renderer kept only a few hundred
glyphs (the Latin sub-font) and lost its family name. Merge the
sub-fonts with CIDFlatten() before generating, both in the backend and
in the media-processor. The call is guarded because it fails on fonts
that are not CID-keyed.

Add a small synthetic CID-keyed font with two sub-fonts as a fixture
and check that the converted TTF keeps all its glyphs.

Closes #10976

AI-assisted-by: claude-opus-5-5
2026-11-16 13:14:40 +01:00
Andrey Antukh
909a29cf50 🔥 Remove unused file 2.19.2 2026-11-16 12:41:05 +01:00
Andrey Antukh
e95007a93b 🐛 Retry the publish of the websocket delivery assertions
The subscription to the bus reaches redis through an asynchronous agent
action, so a message published right after the connection opens can be
lost before redis knows the subscription. The delivery assertions of the
websocket tests published once and bet on winning that race, which fails
on a loaded CI runner.

`poll-published!` publishes, drains a window and publishes again only
when the window saw nothing, up to three attempts. The assertion still
proves that the client receives a message it published, and the negative
assertions keep the single drained window they need. A test pins the
retry so it does not go back to a single publish.

AI-assisted-by: deepseek-v4.1-flash
2026-11-16 11:59:00 +01:00
Andrey Antukh
239291539b 📚 Add the 2.21.0 changelog section
Add the 2.21.0 changelog section, generated from the milestone
issues and the advisory source of truth.

The 🔒 entry references GHSA-m53j-2766-6jqw with the fixing PR
#12189. The advisory now declares patched version 2.21.0 only: the
fix reached develop after 2.20.0-RC1, so the 🔒 section of
2.20.0, which claimed that release fixes the vulnerability, is
removed as well.

Entries cover the closed milestone issues after the dev-only and
exclusion filters; #9263 stays in 2.21.0 by maintainer decision and
is flagged in the anomaly report as milestone-mismatched with PR
#9958.

AI-assisted-by: inkling-2-small-free
2026-11-16 10:58:05 +00:00
Andrey Antukh
18a827d65a Merge remote-tracking branch 'origin/staging' into develop 2026-11-16 11:38:09 +01:00
Andrey Antukh
65b882d044 Merge remote-tracking branch 'origin/staging-2.19.x' into staging 2026-11-16 11:37:52 +01:00
Andrey Antukh
b39276c148 📚 Update changelog for 2.19.2
Add the 2.19.2 section with the six bug fixes of the milestone, in
merge order, following the old 2.19.x layout: 🐛 Bugs fixed only,
no 💥 (no breaking changes, consistent with patch releases), no
🚀 (patches carry none), no 🔒 (no advisory declares
2.19.2). #12622 carries community attribution. The section stays
marked (Unreleased) until the release commit.

AI-assisted-by: inkling-2-small-free
2026-11-16 11:25:16 +01:00
Andrey Antukh
b8136da06a 🐛 Fix dev-only-bugs counting released same-minor versions as this milestone
`only_unreleased_envs` compared versions as major.minor, so for the
2.19.2 milestone the released 2.19.0 counted as "this milestone" and
bugs naming it as an affected version were listed as dev-only
candidates (e.g. #13019, "only seen on 2.19.0 and later").

Compare full semver instead, with a missing patch read as 0: only the
milestone version itself counts as an unreleased signal, and any other
version is a production hint that keeps the bug in the changelog, as
the documented contract already said.

AI-assisted-by: inkling-2-small-free
2026-11-16 10:14:55 +00:00
Andrey Antukh
86eb0bf805 Merge remote-tracking branch 'origin/staging' into develop 2026-11-16 11:07:05 +01:00
Andrey Antukh
4a9f553c19 📚 Update the 2.20.0 changelog
Regenerate the 2.20.0 section for the new layout: `💥` and
`🔒` are generated from the breaking change notes and the
advisory (patched_versions includes 2.20.0); features and
enhancements move to their own `🎉` and `✨` sections
instead of one mixed section; `🚀` lists the two milestone
issues labelled `release highlight` (#11759 and #11761, no closing
PR in the milestone).

Add the issues closed since the section was written: #10436,
#12052, #12135, #12615, #12728, #12738, #12740, #12948 and #13028
as bugs, and #10465, #12265, #12796, #12902, #13029 and #13030 as
enhancements. Bugs that never reached production stay out per
`dev-only-bugs` (#12860, #12138) and manual review (#12901).

#12977 leaves the section: its fix (PR #12978, merged 2026-11-13
in develop) carries milestone 2.21.0, so the issue moves there and
will be picked up by the 2.21.0 changelog.

AI-assisted-by: inkling-2-small-free
2026-11-16 10:03:54 +00:00
Andrey Antukh
328e41e037 ♻️ Stop excluding release blocker from the changelog flow
The `release blocker` label marks work that blocks the release; it is
not a signal about whether users will notice a change. Drop it from
the changelog exclusions and keep only `no changelog`.

Closed bugs carrying `release blocker` are analyzed by `dev-only-bugs`
like any other bug: a bug found while testing an unreleased feature
never reached production, so the tool is the right filter for them.
Closed non-bug issues with the label are surfaced by a manual review
step in the flow: `gh.py issues --label "release blocker"` lists them
and the user decides between `no changelog` and keeping the entry.

Update the memories, the update-changelog skill and the tests to match.

AI-assisted-by: inkling-2-small-free
2026-11-16 09:17:27 +00:00