Commit Graph

12480 Commits

Author SHA1 Message Date
Pablo Alba
04a3e236fe Add a callback-url parameter to login (#8655) 2026-03-18 10:15:31 +01:00
Andrey Antukh
5482ee211e 🐛 Fix unexpected corner case between SES hardening and transit (#8663)
* Revert "🐛 Fix plugin sandbox freezing CLJS Proxy constructor breaking Transit encoding"

This reverts commit 27a934dcfd.

* 🐛 Fix unexpected corner case between SES hardening and transit

The cause of the issue is a race condition between plugin loading
and the first time js/Date objects are encoded using transit. Transit
encoder populates the prototype of the Date object the first time a
Date instance is encoded, but if SES freezes the Date prototype before
transit, an strange exception will be raised on encoding any object
that contains Date instances.

Example of the exception:

Cannot define property transit$guid$4a57baf3-8824-4930-915a-fa905479a036,
object is not extensible
2026-03-18 09:53:22 +01:00
Andrey Antukh
4da332a5e2 Merge remote-tracking branch 'origin/staging' into develop 2026-03-17 18:29:08 +01:00
Andrey Antukh
de03f3883b Merge remote-tracking branch 'origin/main' into staging 2026-03-17 18:28:39 +01:00
Belén Albeza
c8b3407acd 🔧 Show label if wasm text editor is enabled 2026-03-17 16:47:05 +01:00
Andrey Antukh
6079ef4e22 Make mcp plugin always ready to be in multiuser 2026-03-17 15:18:22 +01:00
girafic
d6cc469027 🐛 Fix permission message and update ruler guide proxy name on plugins api (#8632)
- Updated the error message for missing content write permission in the removeRulerGuide function.
- Renamed the ruler guide proxy from "RuleGuideProxy" to "RulerGuideProxy" for consistency.
- Adjusted variable naming in the addRulerGuide function for clarity.

Signed-off-by: Stas Haas <stas@girafic.de>
2026-03-17 15:05:26 +01:00
Andrey Antukh
ab4e195cca Add protection for stale cache of js assets loading issues (#8638)
*  Use update-when for update dashboard state

This make updates more consistent and reduces possible eventual
consistency issues in out of order events execution.

* 🐛 Detect stale JS modules at boot and force reload

When the browser serves cached JS files from a previous deployment
alongside a fresh index.html, code-split modules reference keyword
constants that do not exist in the stale shared.js, causing TypeError
crashes.

This adds a compile-time version tag (via goog-define / closure-defines)
that is baked into the JS bundle. At boot, it is compared against the
runtime version tag from index.html (which is always fresh due to
no-cache headers). If they differ, the app forces a hard page reload
before initializing, ensuring all JS modules come from the same build.

* 📎 Ensure consistent version across builds on github e2e test workflow

---------

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-17 15:04:06 +01:00
Andrey Antukh
e018253c6b Make mcp plugin always ready to be in multiuser 2026-03-17 14:45:18 +01:00
Andrey Antukh
0535ef0e39 Remove duplicated code for browser detection 2026-03-17 10:58:43 +01:00
Andrey Antukh
2d5392327e 🐛 Add minor improvements on wasm-render error handling 2026-03-17 10:58:43 +01:00
Andrey Antukh
0d236110e9 🐛 Fix ts/asap helper on frontend utils 2026-03-17 10:58:43 +01:00
Andrey Antukh
997f0c0e40 Build render-wasm on runing pnpm run test on frontend 2026-03-17 10:58:43 +01:00
Luis de Dios
a5f09e18a8 🎉 Make the mcp plugin switching between tabs work correctly (#8597)
*  Make the MCP plugin switching between tabs work correctly

* 🎉 Show notification when the plugin is loaded in another tab

* 📎 PR changes

*  Add events
2026-03-17 10:17:02 +01:00
Andrey Antukh
e730e9ee64 🐛 Fix subscribe to undefined stream error in use-stream hook (#8633)
Add a nil guard before subscribing to the stream in the use-stream
hook. When a nil/undefined stream is passed (e.g., from a conditional
expression or timing edge case during React rendering), the subscribe
call on undefined causes a TypeError. The guard ensures we only
subscribe when the stream is defined.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-17 10:06:16 +01:00
Andrey Antukh
27a934dcfd 🐛 Fix plugin sandbox freezing CLJS Proxy constructor breaking Transit encoding
When the plugin sandbox calls harden() (SES lockdown) on any proxy object
returned from the penpot.* API, SES traverses the prototype chain up to
Proxy.prototype and freezes the CLJS Proxy constructor function. Transit's
typeTag helper later fails with "object is not extensible" when trying to
set its cache property on that frozen constructor.

Fix by deleting the constructor data property from Proxy.prototype so that
harden never traverses to the CLJS Proxy constructor function.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-17 10:01:45 +01:00
Andrey Antukh
0779c9ca61 🐛 Fix TypeError in get-points when content is not PathData (#8634)
The with-cache macro in impl.cljc assumed the target was always a
PathData instance (which has a cache field). When content was a plain
vector, (.-cache content) returned undefined in JS, causing:

  TypeError: Cannot read properties of undefined (reading 'get')

Fix:
- path/get-points (app.common.types.path) is now the canonical safe
  entry point: converts non-PathData content via impl/path-data and
  handles nil safely before delegating to segment/get-points
- segment/get-points remains a low-level function that expects a
  PathData instance (no defensive logic at that level)
- streams.cljs: replace direct call to path.segm/get-points with
  path/get-points so the safe conversion path is always used
- with-cache macro: guards against nil/undefined cache, falling back
  to direct evaluation for non-PathData targets

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-17 09:31:10 +01:00
Andrey Antukh
46f50aab16 Merge remote-tracking branch 'origin/staging' into develop 2026-03-16 16:13:16 +01:00
Andrey Antukh
3bf145a749 Disable wasm-render on frontend tests (temporarily) 2026-03-16 16:12:53 +01:00
Marina López
1b8871df8e Update image nitrate modal 2026-03-16 14:23:23 +01:00
Dream
ce04780b6c 🐛 Make collapsible sidebar titles clickable to toggle (#8547)
Fixes #5168
2026-03-16 11:03:49 +01:00
Pablo Alba
8f35e451e6 Add notification for nitrate when creating a team inside an organization (#8639) 2026-03-16 10:36:32 +01:00
Andrey Antukh
4c9775e182 Merge remote-tracking branch 'origin/staging-render' into develop 2026-03-16 09:35:12 +01:00
Andrey Antukh
328b7739e0 📎 Prepare changes and flags for next release (#8624) 2026-03-13 13:07:24 +01:00
Elena Torró
a68e06ffe9 Merge pull request #8587 from penpot/azazeln28-feat-word-boundary-cursor-navigation
🎉 Feat word boundary cursor navigation
2026-03-13 12:49:09 +01:00
alonso.torres
1ab1d4f6ca 🐛 Fix problem with snap pixel transforms 2026-03-13 12:47:34 +01:00
Belén Albeza
fc64dfe9d6 Revert " Add regression test for token highlight bug (13302) (#8573)"
This reverts commit d8249cc3db.
2026-03-13 12:12:15 +01:00
Andrey Antukh
6d30989a2d Merge remote-tracking branch 'origin/staging-render' into develop 2026-03-13 11:54:04 +01:00
Andrey Antukh
50ce8c4739 Merge remote-tracking branch 'origin/staging' into staging-render 2026-03-13 11:53:20 +01:00
Andrey Antukh
cf94b56154 Merge remote-tracking branch 'origin/staging' into develop 2026-03-13 11:41:56 +01:00
Andrey Antukh
33c5f82c43 🐛 Fix penpot.openPage() to navigate in same tab by default
- Change the default for the newWindow param from true to false, so
  openPage() navigates in the same tab instead of opening a new one
- Accept a UUID string as the page argument in addition to a Page object,
  avoiding the need to call penpot.getPage(uuid) first
- Add validation error when an invalid page argument is passed

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-13 09:19:50 +01:00
Pablo Alba
08845ad2d4 Add organization selection for nitrate (#8619) 2026-03-13 09:16:12 +01:00
Alejandro Alonso
ebd17974a6 Merge pull request #8580 from penpot/niwinz-staging-fix-paste-issue
🐛 Fix crash when pasting non-map transit clipboard data
2026-03-13 08:33:19 +01:00
Andrey Antukh
eecb51ecc1 🐛 Fix clipboard getType error when no allowed types found (#8609)
When clipboard items have types that don't match the allowed types
list, the filtering results in an empty array. Calling getType with
undefined throws a NotFoundError. This change adds a check for null/undefined
types and filters them from the result.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-13 08:24:36 +01:00
Andrey Antukh
e7e6303184 🐛 Make ct/format-inst nil safe (#8612)
Prevent JS TypeError when date is nil in date formatting.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 19:55:51 +01:00
Andrey Antukh
dbe8304f0c Include plugins on the frontend bundle 2026-03-12 19:07:44 +01:00
Andrey Antukh
4ccbc612cb Add the ability to accept plugin permission pressing enter 2026-03-12 19:07:44 +01:00
Andrey Antukh
b56885b8be 💄 Add cosmetic changes to workspace plugins dialog components 2026-03-12 19:07:44 +01:00
Andrey Antukh
a6e0113b25 Install plugin by pressing enter on plugins dialog 2026-03-12 19:07:44 +01:00
Andrey Antukh
24fc84054d Append manifest.json to plugin uri if it comes without it 2026-03-12 19:07:44 +01:00
Andrey Antukh
e841dc60b7 Make penpot depend on local plugins runtime
This removes the need to publish versions to pnpn
2026-03-12 19:07:44 +01:00
Andrey Antukh
85ffadf8d7 Add better approach for handling plugin iframe url
Ensure params are passed correctly to plugins declared to be version
2 and are prepared to run in a subpath.
2026-03-12 19:07:44 +01:00
alonso.torres
99151fe530 🐛 Fix problem with update live sidebar values 2026-03-12 17:30:57 +01:00
Andrey Antukh
ec4f685aac 🐛 Fix penpot.openPage() to navigate in same tab by default
- Change the default for the newWindow param from true to false, so
  openPage() navigates in the same tab instead of opening a new one
- Accept a UUID string as the page argument in addition to a Page object,
  avoiding the need to call penpot.getPage(uuid) first
- Add validation error when an invalid page argument is passed

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 15:53:32 +01:00
Andrey Antukh
8d5450391e 🐛 Fix crash when pasting non-map transit clipboard data
Guard against transit-decoded clipboard content that is not a map
before calling assoc, which caused a runtime crash ('No protocol
method IAssociative.-assoc defined for type number').

Also route :copied-props paste data to paste-transit-props instead
of incorrectly sending it to paste-transit-shapes.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 15:05:22 +01:00
Aitor Moreno
c76985abee Merge pull request #8585 from penpot/superalex-fix-first-width-change-ignored-on-auto-width-text-in-wasm-render
🐛 Fix auto width text issues
2026-03-12 14:01:11 +01:00
Alejandro Alonso
be9b1158ed Merge pull request #8588 from penpot/niwinz-staging-abort-signal-fix
🐛 Fix unhandled AbortError in HTTP fetch requests
2026-03-12 13:53:18 +01:00
Eva Marco
8f5c38d476 🐛 Fix scroll on colorpicker (#8595) 2026-03-12 13:36:38 +01:00
Andrey Antukh
80d165ed5b 🐛 Fix unhandled AbortError in HTTP fetch requests
Identify and silence "signal is aborted without reason" errors by:
- Providing an explicit reason to AbortController when subscriptions are disposed.
- Updating the global error handler to ignore AbortError exceptions.
- Ensuring unhandled rejections use the ignorable exception filter.

The root cause was RxJS disposal calling .abort() without a reason, combined
with the on-unhandled-rejection handler missing the ignorable error filter.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 13:31:58 +01:00
Alejandro Alonso
f5cabac5f3 Merge pull request #8583 from penpot/niwinz-staging-ignore-extensions-exceptions
🐛 Ignore browser extension errors in unhandled exception handler
2026-03-12 13:20:11 +01:00