22585 Commits

Author SHA1 Message Date
Andrey Antukh
5628efdfad 🐛 Fix auto-link libraries: permission check, default selection, and tests
Backend:
- Add edit-permission check in auto-link-libraries before creating
  file_library_rel rows, matching the manual link RPC behavior
- Fix 3 broken tests by removing source library before import to
  simulate cross-environment scenario
- Add test for permission check (viewer vs owner auto-link)
- Add test for used-by filtering (only linked files get rels)

Frontend:
- Fix library resolution default selection: pre-select first candidate
  so confirming without interaction actually links libraries
- Remove unused file-ids prop from library-resolution* component
- Remove unused translation keys (library-link-error, library-placeholder)
2026-06-17 05:58:59 +00:00
Andrey Antukh
24fa844558 Auto-link libraries during import based on slugified name
When a Penpot file is exported without bundled libraries and then
imported into a different environment, external library links are
broken because library UUIDs differ across environments.

This feature adds a heuristic to auto-relink libraries by matching
slugified library names against shared files in the target team:

- Export: embed external library metadata (id, name, slug, used-by)
  in the manifest when libraries are not included in the export.
- Import: resolve external libraries by slugifying shared file names
  in the destination team and matching against manifest slugs.
- Single match: auto-link silently (creates file-library-rel row).
- Multiple matches: emit SSE event so the frontend shows a selection
  dialog for the user to pick the correct library.
- No match: import continues without linking (current behavior).

Backend changes:
- Extended manifest schema with optional :external-libraries field
- Added slugify-name, get-files-names, get-shared-files-for-team,
  find-shared-files-by-slug helpers in app.binfile.common
- Threaded team-id into import cfg from RPC layer
- Added resolve-external-libraries and auto-link-libraries in v3
- Emit :library-candidates SSE event for multi-match cases

Frontend changes:
- Worker captures library-candidates SSE events and forwards them
- Import dialog shows auto-link notification and multi-match
  selection UI with select dropdowns
- Added link-files-to-library! RPC helper for user selections
- Added en/es translations for new UI strings

Closes #9263

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-06-17 07:52:57 +02:00
Andrey Antukh
0a54533240 Merge remote-tracking branch 'origin/staging' into develop 2026-06-17 00:11:23 +02:00
Andrey Antukh
cc4cdff729 🔥 Remove duplicated github workflow 2026-06-17 00:05:07 +02:00
Andrey Antukh
b645f51486 Backport .github directory from develop 2026-06-17 00:03:25 +02:00
Andrey Antukh
0338655cd0 📎 Add frontend pnpm-lock.yaml dedup 2026-06-17 00:02:07 +02:00
Andrey Antukh
c9f9bd5029 📎 Use same playwright version on all frontend subpackages 2026-06-16 23:22:19 +02:00
Eva Marco
2a098e5b16
🎉 Add background blur (#10034)
* 🎉 Add background blur

* 🎉 Add test

* 🎉 Add background blur info to plugins API

* 🎉 Suport in wasm for both layer and background blur

* 🐛 Fix failing test

* ♻️ Fix comments

---------

Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
2026-06-16 19:46:03 +02:00
Andrey Antukh
b391a4c8d3
♻️ Add mcp integration state management refactor (#10226)
* ♻️ Add mcp integration state management refactor

* 🐛 Fix access tokens do not appear

* ♻️ Refactor some names

* ♻️ Refactor token deletion

---------

Co-authored-by: Luis de Dios <luis.dedios@kaleidos.net>
2026-06-16 18:35:30 +02:00
Eva Marco
7863692c98
🐛 Fix fonts select position (#10192) 2026-06-16 15:28:27 +02:00
Eva Marco
6fed3e1212
🐛 Fix undo on numeric-input drag (#10193) 2026-06-16 15:28:11 +02:00
Andrey Antukh
d5e6ea7572
🐛 Fix mcp menu incorrect state when key has not expiration (#10211) 2026-06-16 15:05:49 +02:00
Juanfran
09db565bc2 🐛 Skip org membership lookup for anonymous invite recipients
When an organization invitation token is verified by a logged-out recipient
(e.g. an unregistered invitee opening the emailed link), profile-id is nil.
The team-invitation branch still evaluated get-org-membership eagerly, calling
nitrate with that nil profile-id. That request fails and surfaces as a generic
error, masking the clean :invalid-token response and dropping the user on the
login screen instead of the dedicated "Invite invalid" page.

Only query membership when a logged-in profile is present, so a canceled or
otherwise invalid org invite reaches the :invalid-token path as intended.
2026-06-16 15:01:47 +02:00
Andrey Antukh
c55d910e95 Merge remote-tracking branch 'origin/staging' into develop 2026-06-16 13:07:59 +02:00
Andrey Antukh
3dff9b8f28 Merge remote-tracking branch 'origin/main' into staging 2026-06-16 13:07:40 +02:00
Alejandro Alonso
392caa4ec1
Merge pull request #10150 from penpot/elenatorro-remove-to-blob
 Replace toBlob to capture snapshots without blocking the main thread
2026-06-16 10:00:46 +02:00
Alejandro Alonso
cd239d24f8
🐛 Fix transparent tile holes in viewer WASM render
Use direct backbuffer tile compositing for render_sync_shape (viewer/thumbnails)
instead of the tile texture atlas cache, which left 512×512 transparent holes.
2026-06-16 09:52:19 +02:00
Alejandro Alonso
92c9517322
Merge pull request #10184 from penpot/azazeln28-fix-frame-stroke
🐛 Board stroke disappears when a layer is placed inside
2026-06-16 09:32:14 +02:00
Belén Albeza
d1dd5d9016
🎉 Render guides in wasm (#10014)
*  Remove guides from svg overlay

* 🎉 Draw guides in wasm

* 🎉 Serialize guides to wasm

*  Store separate and sorted horizontal and vertical guides

* 🎉 Implement collision detection with guides

* 🎉 Right click on guides to change color or remove

*  Implement dragging guides

* 🎉 Edit wasm guides by double clicking them

* 🎉 Implement changing mouse cursor on hovering a guide

*  Show guide pill on hover

* 🎉 Implement removing guide on hovering + Del

* 🔧 Fix lint + fmt errors

* 🎉 Clip out outer board guide lines

* ♻️ Extract common code into guide-pill* component

* 🎉 Draw dotted lines on hovering board guides

* 🐛 Fix board rotation when it has guides

* 🎉 Make foreign guides not visible in focus mode
2026-06-16 09:19:58 +02:00
Alejandro Alonso
b06942c668
Merge pull request #10191 from penpot/superalex-fix-viewer-webgl-issues
🐛 Fix some viewer webgl issues
2026-06-15 18:54:32 +02:00
Andrey Antukh
8b1845366a
🐛 Allow pasting comma-separated emails in multi-input (#10186)
The multi-input component did not handle paste events for
comma-separated values. When users pasted emails like
'qa@example.com, test@example.com', the entire string was
inserted as-is, triggering validation errors.

The on-key-down handler already split text on commas/spaces
when typing, but paste events bypassed this logic.

Added an on-paste handler that:
- Detects if pasted text contains commas or whitespace
- Splits the text by commas and/or whitespace
- Validates each part individually
- Adds valid items to the items list
- Prevents default paste behavior
- Resets input state after processing

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-06-15 17:50:59 +02:00
Alejandro Alonso
3802cdf9dd 🐛 Fix overlay canvas misalignment with shadow margin in WASM viewer 2026-06-15 17:16:19 +02:00
Aitor Moreno
c54ab3bd34 🐛 Fix frame stroke 2026-06-15 16:09:23 +02:00
David Barragán Merino
b03537fa68 ⬆️ Upgrade devenv base imagen to ubuntu 26.04 2026-06-15 14:00:29 +02:00
David Barragán Merino
3f3a52a098 ⬆️ Upgrade imagemagick version and base image to ubuntu 26.04 2026-06-15 14:00:29 +02:00
David Barragán Merino
575bed5c6e 🐛 Add missed info to manage help message 2026-06-15 14:00:29 +02:00
Andrey Antukh
03341ed857
⬆️ Update npm deps and pnpm on all subpackages (#10183) 2026-06-15 13:57:29 +02:00
Andrey Antukh
d44c6250ea Merge remote-tracking branch 'origin/staging' into develop 2026-06-15 13:04:19 +02:00
Marina López
98e04bc5f0 Improve nitrate manual renew banner 2026-06-15 12:30:59 +02:00
Andrey Antukh
61c52a665d
⬆️ Update dependencies (#10166)
* ⬆️ Update exporter dependencies

* ⬆️ Update frontend dependencies

* ⬆️ Update nodejs version devenv and docker images
2026-06-15 12:03:59 +02:00
Andrey Antukh
79227c4de8
Batch multiple thumbnail deletions into a single RPC call (#9943)
*  Batch multiple thumbnail deletions into a single RPC call

Replace the old per-object immediate thumbnail deletion with a
debounced batched approach. The frontend queues object-ids in state
and waits 200ms before sending a single RPC request with up to 200
object-ids. The backend deletes all matching thumbnails in one SQL
statement with a single RETURNING clause, then touches the affected
media objects.

This reduces RPC overhead when rapidly clearing thumbnails (e.g.
navigating pages) and makes deletions more efficient.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>

* 📎 Fix missing issues

---------

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-06-15 12:01:32 +02:00
Alejandro Alonso
a01c4e1bad 🐛 Fix scale viewer WASM canvas by devicePixelRatio like workspace 2026-06-15 11:45:21 +02:00
Juan de la Cruz
ddeaf3ce2a
Add MCP status button to workspace toolbar with single-tab connection control (#9930)
*  Add MCP connection badge to the workspace toolbar

*  Add MCP status button with single-tab connection control

* ♻️ Extract component for MCP indicator in the toolbar

* ♻️ Some improvements

---------

Co-authored-by: Luis de Dios <luis.dedios@kaleidos.net>
2026-06-15 11:29:25 +02:00
Alonso Torres
92cf0cda7b
🐛 Fix openPage plugin problem (#10085)
* 🐛 Fix openPage plugin problem

* 🐛 Make history safer for tests
2026-06-15 11:27:35 +02:00
David Barragán Merino
6a1c3348f3 🐳 Clean apt package cache in all Dockerfiles 2026-06-15 11:13:12 +02:00
David Barragán Merino
fe86359dc8 🐳 Migrate storybook image to alpine 2026-06-15 11:13:12 +02:00
David Barragán Merino
572b094bab 🐳 Migrate frontend image to alpine 2026-06-15 11:13:12 +02:00
Alejandro Alonso
9d7a8eaeda 🐛 Fix rendering artifacts from previous frames 2026-06-15 11:00:56 +02:00
Luis de Dios
739a2d4958
💄 Update translations for company size options in in-app onboarding (#10164) 2026-06-15 10:57:08 +02:00
Eva Marco
c66ee1803f
🎉 Toggle color library visibility from the colorpicker shortcut button (#10129)
* ♻️ Transform a show button to a toggle button on colorpicker

* 🎉 Add test

* 🎉 Add aria-pressed to toggle palette button
2026-06-12 13:30:57 +02:00
María Valderrama
68d4238277 🐛 Fix license not loading in theme change 2026-06-12 12:13:50 +02:00
Andrey Antukh
a8d0c18c1b
🐛 Fix race condition between MCP initialization and plugin runtime (#10137)
* 🐛 Fix race condition between MCP init and plugin runtime

Add promise-based synchronization to ensure MCP initialization waits
for plugin runtime to be ready before calling global.ɵloadPlugin.

- Add runtime-ready-promise in app.plugins that resolves when
  init-plugins-runtime completes
- Add wait-for-runtime function for other modules to await readiness
- MCP init now waits for runtime via rx/from before starting plugin
- Add defensive guards in start-plugin!, load-plugin!, close-plugin!
  to check if plugin APIs exist before calling
- Rename init-plugins-runtime! to init-plugins-runtime

Fixes: global.ɵloadPlugin is not a function error when MCP plugin
starts before async plugin runtime initialization completes.

* 📎 Add 'create-pr' opencode skill
2026-06-12 11:40:02 +02:00
Andrey Antukh
f5874e159e
🔧 Replace UAParser.js with @penpot/ua-parser (#10007) 2026-06-12 10:46:09 +02:00
Alejandro Alonso
87eb91f805
♻️ Migrate viewer WASM viewport to modern syntax (#10106) 2026-06-12 10:29:58 +02:00
David Barragán Merino
7cb7f7adb2 🐳 Add command to upgrade packages during the creation 2026-06-12 09:34:26 +02:00
Alonso Torres
b2439694af
🐛 Fix float precision in typography line-height/letter-spacing string conversion (#9973) 2026-06-12 09:10:36 +02:00
Alonso Torres
d6c973e269
🐛 Improved error handling on a tool error (#10148) 2026-06-12 08:59:05 +02:00
Justin Lin
9c7af3aeb5
📚 Add WebSocket proxy configuration for MCP in Nginx example (#10152)
The current Nginx example doesn't include the required Websocket settings to correctly proxy /mcp/ws, and leads to WebSocket connection error when trying to connect in a design. Adding this lines fixed the issue.

Signed-off-by: Justin Lin <30039756+lancatlin@users.noreply.github.com>
2026-06-12 08:55:23 +02:00
Elena Torro
4a86431dfd Replace toBlob to capture snapshots without blocking the main thread 2026-06-11 17:56:46 +02:00
Andrey Antukh
2e1839f898 🐛 Fix NotReadableError in rasterizer during thumbnail generation
The rasterizer's create-image function was clearing image.src in its
Rx teardown cleanup. This caused the decoded pixel data to be discarded
before downstream operators (drawImage / createImageBitmap) could read
it, resulting in a browser NotReadableError.

Changes:
- Remove image.src = "" from cleanup; the image element will be
  garbage collected naturally. Event handler nulling is kept to break
  circular references.
- Add dimension validation in svg-get-adjusted-size to return nil for
  zero/NaN dimensions instead of producing invalid sizes.
- Add fallback in svg-set-intrinsic-size! to use [max max] when SVG
  dimensions can't be determined.

Error occurred in production (2.16.0-RC10) during thumbnail generation
in the workspace.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-06-11 17:04:24 +02:00