24790 Commits

Author SHA1 Message Date
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
Andrey Antukh
7ef8c1cf36 Merge remote-tracking branch 'origin/staging-2.19.x' into staging 2026-11-16 10:05:00 +01:00
Andrey Antukh
635f7fc914
✨ Disable the admin-console by default in the devenv frontend (#13061)
* ✨ Disable the admin-console by default in the devenv frontend

The devenv does not run the admin-console service, but the frontend
showed its UI by default. The devenv containers now build the
frontend with PENPOT_DEVENV=true, which prepends disable-admin-console
ahead of the developer's config.js flags. Flags parse in order, so
enable-admin-console in config.js re-enables it; builds outside
devenv are unchanged.

Closes #13060

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

* 📚 Require English in all code-facing text

Add a hard rule to AGENTS.md: everything in code must be in
English — identifiers, comments, docstrings, test descriptions,
log hints — with tests not excepted. The only allowed place for
another language is product copy rendered through the i18n
system. Also restated in mem:clojure/design-rules and mem:testing.

AI-assisted-by: inkling-2-small-free
2026-11-16 09:54:23 +01:00
Pablo Alba
77c87d16f1
🐛 Keep variant property order past eight properties (#13014) 2026-11-16 09:30:29 +01:00
Eva Marco
fa6af23d75
🐛 Disconnect a library that fails to load instead of breaking the file (#13048)
Opening a file connected to a broken shared library showed the
"Internal Error" page: every connected library was loaded in a single
stream, so one failing get-file broke the whole workspace.

Catch the error per library. When the backend fails to load it (a
server error, never a transport or transient error), a directly
connected library is disconnected and a toast tells the user; an
indirect one is only dropped from the state.

Closes #12429

AI-assisted-by: claude-opus-5-5
2026-11-16 09:02:31 +01:00
Filip Sajdak
557774e4f4 🐛 Call the team hook on every render of the team container (#12920)
team-container* called mf/deref only after returning early for a team id
that is not a uuid. When the same component rendered once without a team
id and then with one, the number of hooks changed between the two renders
and React threw "Rendered more hooks than during the previous render"
(error #310), which sent the user to the internal error page. The reverse
order throws "Rendered fewer hooks than expected".

Call the hook on every render and keep the uuid check in the condition
that builds the providers.

Two tests mount the component in jsdom and render it with a team id that
arrives and with one that leaves; both fail without this change.

Closes #12728

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

Signed-off-by: Filip Sajdak <filip.sajdak@siili.com>
2026-11-16 08:41:22 +01:00
Usama Sadiq
861bb5bb37 🐛 Fix database pool min-size falling back to max-size (#13052)
* 🐛 Fix database pool min-size falling back to max-size

Since 2.16 the pool minimum defaults to the maximum (60), so an idle
backend opens and holds 60 connections at startup. Restore the pre-2.16
default of 0 so the pool grows with load and idle connections expire.

Closes #12622

Signed-off-by: Usama Sadiq <usama7274@gmail.com>

* 📚 Document database connection pool settings

Describe PENPOT_DATABASE_MIN_POOL_SIZE and PENPOT_DATABASE_MAX_POOL_SIZE,
their defaults, and sizing on a PostgreSQL shared with other apps.

Signed-off-by: Usama Sadiq <usama7274@gmail.com>

---------

Signed-off-by: Usama Sadiq <usama7274@gmail.com>
2026-11-16 08:37:49 +01:00
Andrey Antukh
e23ca02aa2
✨ Reference the file data storage object with a foreign key (#12769)
* ✨ Reference the file data storage object with a foreign key

The file data pointer lived in `file_data.metadata.storage-ref-id`, a JSON
key. The storage GC parsed it to find live references, and nothing stopped it
from physically deleting an object a live row still pointed at: a failure in
that scan lost the blob.

Migration 0159 moves the pointer to a nullable `storage_object_id` column on
`file_data`, backfills it from the metadata key, removes the key from the
rows it backfills, indexes the column and rebuilds the foreign key to
`storage_object(id)` as `NO ACTION DEFERRABLE INITIALLY IMMEDIATE`.
`INITIALLY IMMEDIATE` is deliberate: the GC catches the violation inside the
chunk transaction, while a deferred check would fire at commit, outside it,
and the sweep would never move past the blocked chunk.

The column is the only source of truth. The `storage-ref-id` entry is gone
from the file metadata schema, and the single point that serializes the
metadata drops it, so no write can resurrect it. `upsert!` does not query
the row: the pointer of the row being replaced travels in its params, and
the object is touched before the row is written. Fragments and snapshots
pass nil because a modified pointer always gets a new id; the offload passes
its own row; `insert-file!` drops it, since an INSERT never replaces a
persisted object.

`update-file!` takes the file map read from the database plus the fields to
change and merges them, so the pointer comes from the read map and no caller
can lose it by building a partial map. A map without `:data` raises
`:missing-file-data`: it is not `assert`, which is compiled out in the
deployed binary. The params cannot override the pointer or retarget the
write with `:id`/`:file-id`.

`bfc/file->response` strips the pointer from every response (`get-file`,
`create-file`, `duplicate-file`, the view-only bundle, the team access
request, the comments read, the library summary, the snapshot read and the
debug download). A `file-data` object is authentication-only, so a leaked id
would let any logged-in profile fetch the blob from `/assets/by-id`.
`get-file-fragment` resolves through the file data backend, so a fragment on
cold storage no longer hands nil to `blob/decode`, and answers only the keys
of its result schema.

The storage GC reference scan, the restore union and `objects-gc` read the
column. The offload reads `SELECT fd.*`, so its rows go through a
`decode-row` that decodes jsonb metadata and drops a JSON null, which the row
schema rejected; a row without a readable object raises
`:missing-storage-object` with the file and row ids. A chunk blocked by the
foreign key (SQLState 23503) is a real anomaly, since the reference scan
should have frozen the object: it stays an error with its own hint and the
chunk is retried on the next run until the reference is fixed.

The release is a coordinated restart, not a rolling deploy, and not
rollback-safe for the rows it writes: the previous code writes and scans the
metadata pointer, so a key it writes misses the backfill and removing it
loses the reference. `operations/2.20.0-file-data-storage-object-id.md`
builds the column, the index and the foreign key online and runs the
backfill with every instance stopped, then marks the step as applied; a
fresh or small instance does the whole job in the migration. The runbook
keeps the validation scan out of the stopped window and adds a lock timeout
and retry to the online statements.

Tests cover the foreign key shape, the backfill and its corrupt and orphan
guards, the rebuild of a missing index and of a wrong, non-deferrable or
deferred constraint, the deletion refused by a live reference, the metadata
cleanup, the offload row normalizations, the touched objects of the unshare
and the restore, the response stripping on every call site and the chunk
blocked by the foreign key. The backend memories and the developer guide
document the pointer, the GC behavior and the two migration paths.

Closes #12768

AI-assisted-by: deepseek-v4.1-flash
AI-assisted-by: inkling-2-small-free

* 🐛 Hold the file row lock across the migration write

`get-file` applies the pending migrations in memory and, when it finds
any, persists the result. That write read the row without a lock and
`update-file!` is an unconditional UPDATE, so a save that committed in
between was overwritten: the saved content, `revn` and `modified-at`
went back, the next save from that client failed with `:revn-conflict`
and the object the save left became an orphan the storage GC cannot
revisit once it is frozen.

The read now runs in a transaction of its own (`get-file` calls
`get-file*` inside `db/tx-run!` and accepts a cfg map only), so the
`file` row lock covers the re-check and the write. `get-file*` reads
the row once (`sql:get-file` plus `resolve-applied-migrations`) and
completes it with `attach-file-data`; only when a migration is pending
it reads the file again under `FOR UPDATE`, re-checks `need-migration?`
on that fresh map and persists it (`migrate-file`). The common case
stays at one row read and one migrations resolution, the migration case
keeps a single decoded copy in the heap, and a row that changed in
between is not overwritten. A migration found on the unlocked read is
applied in memory only, for the next read to persist.

`migrate-file` returns the reattached map when it persists, with the
`:storage-object-id` of the row the write left, and the realized map
when it does not; `:realize?` is what returns the read fully plain.
`fdata/upsert!` answers `{:written ... :storage-object-id ...}` instead
of a boolean, `update-file!` propagates it and the migrating read puts
it back in the map it returns, so a caller that persists again touches
the current object instead of the replaced one. `insert-file!` keeps
nil: an INSERT never replaces a persisted object.

The write also compares the stored pointer with the caller's value
(`IS NOT DISTINCT FROM`) and raises `:stale-file-data-pointer` when it
affects no row. Every writer holds the `file` row lock, so a pointer
that no longer matches is a protocol violation, not a race to retry.
The expected pointer is a separate argument because the storage branch
replaces `:storage-object-id` before the upsert, and the check lives in
`upsert-in-database`: the `legacy-db` branches do not use that SQL and
their count can legitimately be zero.

The save, snapshot and restore-backup reads take `FOR UPDATE` instead
of `FOR SHARE`: they inherit the lock, and the migration branch asks
for the exclusive one in the same transaction, so a shared lock that
upgrades deadlocks two concurrent readers. A data read rejects
`:lock-for-share?` for the same reason; only row-only reads accept it.
`sql:get-file-without-data` is a plain select now, not a CTE, which
makes locking legal without loading the data. Realization has a single
owner: `attach-file-data` only resolves and decodes, and `get-file*`
realizes once per path. The applied migrations no longer travel in the
`get-file-with-summary` response, cache hit and cache miss alike.

`embed-assets` reads each library without `:realize?`, so its
`:components` is an unloaded pointer map; `absorb-assets` walks it with
`vals`, `PointerMap.seq` calls `load!` and that raised with no loader
bound, so every export with `:merge-libraries` of a library with
components failed. The absorb runs under the library's own loader now.

The in-place binfile import (`import-file-and-overwrite*`,
`::overwrite`, `::bfc/file-id`) had no product caller and cannot carry
the previous `storage_object_id`, so overwriting a storage-backed row
would leave its object unreclaimed. `import-files!` rejects a cfg with
`::bfc/file-id` (`:not-supported`) and the helpers only that path used
go with it (`invalidate-thumbnails`, `*reference-file*`, the
`::overwrite` id branch of `index-object` and of `save-file!`, the
`on-conflict-do-nothing?` flag of the media insert).

Tests: a new `file-migration-read-test` pins the single read, the
locked re-read, the concurrent save interleaving, the double migration
and the read-only path; the upsert tests cover the return shape and the
stale pointer; the SQL recorder they share lives in
`backend-tests.helpers`, and the save, snapshot, restore and summary
sequences follow the new reads. The backend memories document the read
contract and the pointer.

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

* 🐛 Harden the get-file guard and skip its read-only transaction

The cfg guard of `get-file` was an `assert`, which `app.config` elides
when `:backend-asserts` is off, so a deployed binary accepted a bare
pool or connection while the docstring promised it raises. It throws
`IllegalArgumentException` now, the class the option guards of the same
namespace already use, and the existing test expects it instead of
`AssertionError`.

A read with `:read-only?` applies the pending migrations in memory and
writes nothing, so the transaction the migration write needs only costs
two round trips there. `get-file` runs it with `db/run!` instead: with
a cfg that carries a connection it still joins the caller's
transaction, and only the reads that would have opened their own skip
it. A lock option needs a read-write transaction from the caller,
because PostgreSQL rejects row locks in a read-only one; the docstring
states that.

Tests: the guard test expects the new class; a cfg marked
`::db/read-only` reads a pending migration without persisting it (the
config flag that fills that key is legacy, but the key is set by hand);
and a read-only read is pinned as not opening a transaction while the
same call without the option does. The backend memory documents the
split and the guard.

AI-assisted-by: deepseek-v4.1-flash
2026-11-14 19:27:18 +01:00
Belén Albeza
d9a9d0c2bc
📚 Update contributing guide with rules about auto-rejecting PRs (#13012) 2026-11-14 18:16:55 +01:00
Usama Sadiq
dc340f74af
🐛 Fix database pool min-size falling back to max-size (#13052)
* 🐛 Fix database pool min-size falling back to max-size

Since 2.16 the pool minimum defaults to the maximum (60), so an idle
backend opens and holds 60 connections at startup. Restore the pre-2.16
default of 0 so the pool grows with load and idle connections expire.

Closes #12622

Signed-off-by: Usama Sadiq <usama7274@gmail.com>

* 📚 Document database connection pool settings

Describe PENPOT_DATABASE_MIN_POOL_SIZE and PENPOT_DATABASE_MAX_POOL_SIZE,
their defaults, and sizing on a PostgreSQL shared with other apps.

Signed-off-by: Usama Sadiq <usama7274@gmail.com>

---------

Signed-off-by: Usama Sadiq <usama7274@gmail.com>
2026-11-14 18:12:22 +01:00
penpot-renovate[bot]
a19fbbc826
⬆️ Update DHI base images (#13050)
- dhi.io/debian-base trixie-debian13-dev@9e9caa9 (docker/images/Dockerfile.backend)
- dhi.io/debian-base trixie-debian13-dev@9e9caa9 (docker/images/Dockerfile.backend)
- dhi.io/debian-base trixie-debian13@9cef390 (docker/imagemagick/Dockerfile)
- dhi.io/debian-base trixie-debian13-dev@9e9caa9 (docker/imagemagick/Dockerfile)
- dhi.io/debian-base trixie-debian13-dev@9e9caa9 (docker/devenv/Dockerfile)

Signed-off-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
Co-authored-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
2026-11-14 18:10:55 +01:00
AJ Schmidt
3ba5a0cb15
📚 Fix typo in export presets docs
This PR fixes a typo:

`pressets` => `presets`

Signed-off-by: AJ Schmidt <ajschmidt8@users.noreply.github.com>
2026-11-14 18:10:24 +01:00
Andrey Antukh
9c5260314a
🐛 Revoke websocket subscriptions when access is revoked (#12189)
* 🐛 Revoke websocket subscriptions when access is revoked

GHSA-m53j-2766-6jqw. A websocket subscription was authorized once,
when it opened, and that decision was trusted for the rest of the
connection's life, so a member whose access was revoked kept receiving
live file content as long as the tab stayed open.

The revocation travels over the message bus instead of closing the
socket from the mutation: the connection registry is local to one
backend instance, while the RPC that revokes access runs on whichever
instance received the request. Every instance re-verifies the
subscriptions it owns with the same `has-read-permissions?` predicates
that `:subscribe-file` and `:subscribe-team` authorize with, so a
downgrade to viewer keeps its subscription and a non-member
organization owner keeps read-only access.

Two mechanisms cover each other:

- Access-changing mutations announce after the write. delete-team-
  member, leave-team, update-team-member-role, delete-file,
  delete-project, move-files, move-project and delete-team announce.
  delete-share-link is deliberately excluded: a share-link visitor
  never passes the subscribe permission check, so there is no
  subscription to revoke. Team-wide changes publish one event per
  team; the watcher resolves the members itself, and both publishers
  defer through `db/after-commit` so the watcher never decides from
  pre-commit state.
- Every relay re-checks access every 5 minutes by default
  (`subscription-revalidation-interval`), driven from the relay loop
  with `alts!` over the subscription channel and a one-shot tick
  channel, so a steady stream of edits cannot push the check away
  forever.

Supporting changes:

- The registry holds `:connections` and `:by-profile` in one atom,
  kept consistent by register/unregister in a single swap!; a profile
  lookup is one map access, and a profile whose last connection
  leaves is dropped from the index.
- `close-file-subscription` and `close-team-subscription` announce
  the :leave-* message, close the relay channel and purge the bus
  subscription, and are idempotent. Closing the channel ends the
  relay loop and its re-check task.
- The permission query the re-check uses filters soft-deleted files,
  projects and teams, matching its sibling queries.
- A transient database error fails open: it logs and keeps the
  subscription; the next tick retries.
- The revocation watcher's params schema declared the nitrate client
  as a bare keyword inside [:map ...], which malli resolved as a
  registry lookup and which took the whole system build down under
  enable-backend-asserts. It is now an explicit pair, optional
  because init-key yields nil with the admin-console flag off.

The tests reproduce the leak against the real message bus, including
the negative control for the interval re-check. The written records
live in mem:backend/websocket-subscriptions.

Closes #12155

AI-assisted-by: space-bunny-free
AI-assisted-by: muse-spark-1.3-contributor

* 🐛 Mirror the subscribe gates in the revocation re-checks

Addresses the second review round on PR #12189 (pabloalba).

The re-checks only asked whether the profile could read. The membership
legs of sql:file-permissions filter soft-deleted rows since the F2 fix,
but the organization-owner fallback grants read-only access over HTTP
without looking at deleted_at, so a soft-deleted file or team kept an
expelled org owner subscribed indefinitely. The re-checks now gate on
existence as well: file-readable? and team-readable? require a live row
(db/get*, non-throwing, soft-deleted rows excluded) plus the read
permission, mirroring the :subscribe-file gates and extending them to
teams. Both relays and revalidate-profile-subscriptions use them; the
subscribe handlers keep their exact behavior.

Also from the same review:

- watcher-consumes-revocation-events-from-the-bus no longer races the
  command's after-commit announcement: it takes access away with a
  direct row delete and drives the watcher with a synthetic bus event,
  instead of deleting through the command and publishing a second
  notify-* that would mask a broken command announcement.
- moving-a-project-closes-source-team-subscriptions pins the
  move-project e2e: the file subscription drops, the source-team
  subscription survives (membership unchanged).
- soft-deleted-file/team-closes-org-owner-subscription cover the new
  gate with red-before/green-after tests.

mem:backend/websocket-subscriptions updated.

Closes #12155

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

* 🐛 Refuse dead teams in resolve-team-id (PR #12189 review)

Second review round on PR #12189 (pabloalba).

The file re-check added in 87ca7aca53 stops at the file row, but the
organization-owner fallback grants read-only access to non-member org
owners via Nitrate over HTTP, which knows nothing about Penpot
soft-deletion. resolve-team-id resolved the team from unfiltered SQL,
so an expelled org owner kept the file subscription open for an
indefinitely soft-deleted file, project or team. Now both SQL lookups
filter deleted_at, and resolve-team-id checks the team row itself
(db/get*, which filters soft-deleted rows) for every caller — teams,
projects and files alike.

Also from the same review:

- file-readable? now uses the same sql:get-minimal-file as the
  subscribe gate (non-throwing via throw-if-not-exists false), and
  team-readable? projects id and deleted-at, so db/get* can filter.
- The test suite extracts the thrice-duplicated raw delete into
  delete-team-membership!; a sibling of the fail-open pin now redefs
  the existence probe to throw; memory and docstring aligned with the
  code.
- docs/technical-guide/developer/architecture/backend.md attributed
  the websocket to notifications.clj; it now names app.http.websocket
  as the owner and notifications.clj as the revocation publisher.
- mem:backend/auth-permissions-product-domains documents the fallback
  mechanism and the resolve-team-id contract.

Closes #12155

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

* 🐛 Test resolve-team-id refusal and tidy review findings

Third pass over PR #12189 after review-code on 225eb98de2.

resolve-team-id now has a direct test: all three branches resolve
while rows are live, and file, project and team soft-deletes each
refuse their branch — the two new SQL predicates and the final team-row
check are all pinned by it.

From the same review:

- failing-existence-check-keeps-the-subscription and the sibling
  a-failing-check-keeps-the-subscription are deleted: they could not
  distinguish a live relay from a dead one. The fail-open policy
  remains documented in the docstring and the memory; the memory no
  longer claims the pins exist.
- team-readable? projects ::sql/columns like the rest of the backend;
  the fully-qualified keyword went away with the new alias.
- The dead when-not guard in get-organization-owner-viewer-team is
  removed (resolve-team-id guarantees the row live); the let binding
  in resolve-team-id no longer shadows the destructured team-id.
- docs/technical-guide names rpc/notifications.clj as the publisher
  and the tree lists the real top-level modules.

Closes #12155

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

* 🐛 Make the revocation tests deterministic

Third review round on PR #12189 (pabloalba).

Both tests took access away through a command that announces, so the
live watcher could close the subscriptions before the test looked:

- revocation-closes-subscriptions-that-are-no-longer-authorized
  asserted an exact count of 2 closes after delete-team-member, and
  that count reads 0 whenever the watcher got there first. It now
  removes the member with delete-team-membership!, the raw row delete
  that publishes nothing, and asserts both subscriptions are still
  open before calling revalidate-profile-subscriptions.
- team-event-closes-every-member-subscription ran delete-team and then
  published a second notify-team-permissions-changed, so a missing
  announcement in delete-team still passed. It now soft-deletes the
  team row (sql:team-members joins team_profile_rel and profile only,
  so the watcher still resolves every member), asserts nothing closed,
  and drives one synthetic team event.

The command paths stay covered by the announce and end-to-end tests
for delete-team-member and delete-team. The file split the reviewer
suggested stays the optional follow-up, tracked outside this PR and
waiting for the merge.

Closes #12155

AI-assisted-by: deepseek-v4.1-flash
2026-11-13 18:27:30 +01:00
Andrey Antukh
f3c1230b79
🐛 Allow OIDC registration with password login disabled (#12974)
* 🐛 Allow OIDC registration with password login disabled

The register-profile command rejected every registration without the
login-with-password flag, including SSO ones, while the OIDC callback
already allowed :oidc-registration as an alternative, so new OIDC
users were stuck at the register screen with a 400
registration-disabled error.

The gate now branches on the verified token backend: password tokens
keep the previous checks, SSO tokens only require :registration or
:oidc-registration through a predicate shared with the callback, so
the two gates cannot drift apart again. Flags and invitation checks
are split into single-responsibility helpers, and tokens without a
backend claim are rejected loudly by schema instead of defaulting
silently. Covered by regression tests for the SSO matrix, canceled
invitations, the missing-backend case and the no-password-fallback,
plus a configuration doc note.

Closes #12964

AI-assisted-by: Muse Spark 1.3 Contributor

* 🐛 Gate SSO registration by provider type, accept invitations

Follow up the review on #12974. The SSO registration gate now treats a
team invitation token as a substitute for :registration /
:oidc-registration, in both the OIDC callback and register-profile,
mirroring the password flow: the callback redirects to the register
screen when an invitation is present, and register-profile revalidates
the invitation row under a row lock before creating the profile when
no SSO flag is set, raising :invalid-token instead of creating an
account that cannot join a team.

The SSO branch is restricted to OIDC-typed backends
(oidc-provider-types); a prepared-register token carrying any other
backend is rejected with :invalid-token instead of silently taking
the SSO rules. The flags and invitation checks are shared by one
check-registration helper in register-profile; the prepare command
runs flags, then the email-mismatch restriction, then the
invitation row lookup, so the password login flag fails closed first.
The schema defs are private, the create-profile default uses
penpot-backend, the OIDC callback test decodes the redirect token to
assert the :prepared-register claims, and the docs and the auth
memory state the invitation path for SSO registration.

Regression tests cover invitation-only registration, canceled
invitations with and without SSO flags, unknown backends, and the
double-fault precedence in prepare-register.

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

* 🐛 Require invitation email match for SSO registration

Close the hole left by treating any invitation token as a substitute
for the SSO registration flags. register-profile now requires the
invitation member-email to match the prepared-register email, raising
:email-does-not-match-invitation otherwise, mirroring the password
flow. The OIDC callback verifies the team-invitation JWT and the
email before redirecting to register instead of trusting raw
presence. Covered by the requested mismatch regression test plus
callback tests for mismatch and garbage tokens.

AI-assisted-by: Muse Spark 1.3 Contributor

* ♻️ Share registration gate between prepare and register-profile

After the email-match fix, check-registration runs flags, email
and invitation row in the same order as validate-register-attempt!.
The prepare command now calls the shared helper instead of inlining
the trio, and the stale docstring rationale is gone, so future
invitation rule changes land in one place.

AI-assisted-by: Muse Spark 1.3 Contributor
2026-11-13 17:33:42 +01:00
Marina López
bde53b4696
🐛 Hide team plan for standalone enterprise owners (#13047) 2026-11-13 14:16:30 +01:00
Eva Marco
b2c4b58b27
🐛 Keep the pages panel scroll when switching pages (#13004)
Switching pages swaps the workspace content for a loader until the new
page is ready, so the whole left sidebar mounts again. The pages list
started at the top and the selected page scrolled into view at the
bottom of the panel, even when it was already visible.

The sidebar scroll store now lives in workspace-inner*, which stays
mounted across page switches. The pages panel saves its scroll there and
restores it before the selected page scrolls into view. The layers,
assets and tokens panels keep their positions across page switches too.

Closes #13002

AI-assisted-by: claude-opus-5-5
2026-11-13 14:11:30 +01:00
Andrés Moya
0e4be21320
🐛 Ensure component name always matches root instance name (#12794)
* 🐛 Remove svg extension when creating a component from a svg file

* 🐛 Normalize root names to always match the component name

* ✨ Remove any extension ignoring case, not only .svg

* 🔧 Add some fixes and checks

* 🔧 Improve rename detection
2026-11-13 13:53:28 +01:00
Marina López
bb4556b705
🐛 Persist promotional banner collapse (#13040) 2026-11-13 13:07:05 +01:00
andrés gonzález
097ff41e03
✨ Send telemetry for WebGL renderer failures (#12987)
* ✨ Send telemetry for WebGL renderer failures

WebGL renderer failures left no trace in the audit log, so we could not
tell why people switch WebGL off.

- Send webgl-unavailable when the "WebGL is not available" modal shows,
  with the init error.
- Send webgl-context-lost, webgl-context-restored and webgl-reload-failed
  from the WASM renderer.
- Add the active renderer (wasm or svg) to handled-exception,
  unhandled-exception, exception-page and open-workspace-file.
- Add environment details to the WebGL events and to
  enable/disable-webgl-rendering: normalized GPU family and backend, max
  texture size, device memory, CPU cores and whether the app runs inside
  Electron. The full GPU renderer string is not sent, as it can help
  fingerprint a device.

Closes #12984

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

* ⚡ Avoid throwaway WebGL contexts in renderer telemetry

WebGL events no longer create a context to read GPU details; the
settings, menu and unavailable modal create one at most once.

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

* 🐛 Refresh remembered GPU details on each renderer init

A restored context can run on another GPU, so read it on every init
instead of only the first one.

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

* ⚡ Never create a WebGL context for renderer telemetry

WebGL events send GPU details only when the renderer has already read
them on init, instead of probing a throwaway context.

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

---------

Co-authored-by: Elena Torro <elenatorro@gmail.com>
2026-11-13 11:59:12 +01:00
Andrey Antukh
8715450f53 Merge remote-tracking branch 'origin/staging' into develop 2026-11-13 09:49:27 +01:00
alonso.torres
976f016481 Merge remote-tracking branch 'origin/staging-2.19.x' into staging 2026-11-13 09:42:15 +01:00
Belén Albeza
a7b6ef0d41
🐛 Restore the WASM stack pointer after a failed call (#12978)
A failed render-wasm call traps without popping its shadow-stack frames.
Each failure leaked stack until it overwrote static data, and from then on
every call trapped as wasm-critical. h/call now saves the stack pointer
before the call and restores it on failure.

Closes #12977
Related to #12906

AI-assisted-by: claude-opus-5-5
2026-11-13 09:39:43 +01:00
Andrey Antukh
69c33c4877
♻️ Wait on signals instead of event-loop turns on frontend tests (#12986)
* ♻️ Wait on signals instead of event-loop turns

`wait-for` counted its budget in event-loop turns (50 x `setTimeout 0`,
about 54 ms idle), so a delivery that travelled through the RxJS async
scheduler could arrive after the wait gave up. It now accepts a
`:signal`: the predicate is re-checked on every emission and the wait
resolves on the event that changes the state. The ceiling (5000 ms)
only bounds failure when a signal is given, and stays a poll budget for
the waits that have nothing to listen to.

`wait-for-store` wraps the store's input stream, which notifies its
subscribers after applying the update. The five explicit `:max-ticks`
sites move to `:timeout-ms` in the same change, so the old option never
lives in a state where destructuring silently ignores it.

New `frontend-tests.helpers.async-test` pins the contract: a late
delivery resolves, a store signal resolves on the event without a poll,
an already-true predicate does not yield, a never-true predicate records
one failure within the ceiling, and a resolved wait stops listening.

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

* ♻️ Wait for the persistence requests on their own stream

The persistence tests waited for `(= N (count @requests))` by polling the
atom at every event-loop turn. The mocked transport now pushes each
request into a `requests$` subject, and those 59 waits pass it as
`:signal`, so they resolve on the request that makes the count true. The
two predicates that mix the request count with the store state merge
both signals.

The wait that flaked (`the other file's edit is sent next`, in the
rollback test) is one of these: it no longer depends on a turn budget,
and it cannot lose the delivery.

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

* ♻️ Wait for the store event in the store backed tests

153 waits whose predicate reads the store now go through
`wait-for-store`, so they resolve on the store event that changes the
state instead of polling at every event-loop turn. The count is 153, not
the 162 the plan estimated: nine of them read the store through a
helper (`fill-color`, `shape-name`, `copy-children`) rather than
`@store`. The five sites that carried an explicit ceiling drop it, since
with an event the ceiling only bounds failure.

Resolving on the event exposes the places where the poll was really a
pause for a side effect to advance:

- `tokens-source-test` emitted `unlink-file-from-library`, a watch that
  chains a second `rp/cmd!` after an async hop. The store signal fires
  before the chain runs (the event itself dissocs the library), so the
  mock scope closed in flight and the second call reached the real HTTP
  layer. The test now waits for that second call, through the mock.
- `persistence-rollback-test` drives the persistence pipeline step by
  step; two of its waits are the pause before the next emit, not an
  effect, so they keep the poll.

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

* 📚 Document the wait contract and what still polls

`mem:frontend/testing` described `wait-for` as an immediate check plus a
bounded poll. It now waits on a signal, and the ceiling only bounds
failure; `wait-for-store` and the persistence `requests$` subject are
how a wait resolves on the event that changes the state. The waits with
nothing to listen to keep the poll, and the memory names them.

The two traps that cost a red suite are recorded too: a wait that means
"the side effect advanced" has no event and keeps the poll, and a
store-state wait can close the mock scope before the flow it observes
ends, so the chain's last RPC call has to be awaited through the mock.

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

* ♻️ Give the wait wrapper a single signal

`wait-for-store` built its options with `assoc`, so it replaced the
`:signal` a caller passed. The two waits whose predicate reads both the
store and the request counter relied on a merged signal that was being
discarded; they now pass it to `wait-for` themselves, and the wrapper
takes no options. That merge was the safety net for a request counted
after the store event, and it was inert.

The helper also reports why a wait failed (ceiling, ended signal, or an
error with its cause) instead of calling all three a timeout, counts
the predicate evaluations in the late-delivery case to prove the signal
path does not poll, reads the clock through `app.common.time` in the
helper and the test, and the test's turn probe cancels its timer. The
copyright header of `helpers/async.cljs` stays as the previous commit
left it, matching the majority spelling.

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

* ♻️ Give the cycle counter a signal too

Two waits in the retry tests read the store and the `cycles` atom, which
the `slow-cycle-timer` double fills inside the persistence watch. They
passed only the store signal, so a counter change could not wake them:
the same latent race the previous commit removed from the request count.
The double now also emits each new cycle into a `cycles$` subject, and
both waits pass the merged signal to `wait-for`.

The public `wait-for` docstring names the three failure reasons, and the
message for a failed signal bounds the cause text: the exception message
when there is one, otherwise the printed value inside a try, cut at 500
characters.

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

* ♻️ Stop the error handlers flooding the test log

Four tests in `main-errors-test` run a real error handler end to end.
Those handlers print the cause with `ex/print-throwable` before
notifying, which is what a developer wants in the app; in a test it only
writes console noise. One of them replays 10,000 offline errors, so a run
carried 10,006 dumps: 190,010 of its 192,682 lines, 13.8 MB, well past
the ~4 MB where GitHub truncates a step log and takes the summary and any
failing assertion with it.

The tests stub `ex/print-throwable` with a no-op for the duration of
their mock scope. The handlers still run, the assertions do not change,
and the 10,000-error loop still proves the governor emits once. A full
run now logs 2,583 lines and 384 KB. The single block that remains comes
from the re-entrancy guard, which prints its own notice on purpose.

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

* ♻️ Silence the deliberate WASM panic in its test

`get-svg-markup` logs a WASM panic with `console.error` before returning
empty, and `get-svg-markup-swallows-wasm-errors` sends two panics through
it on purpose. That was two 35-line dumps in which the exception printed
its own `data`, `arr` and protocol masks, and it reads like a failure that
the suite is hiding.

The test replaces `(.-error js/console)` for its body and restores it in a
`finally`. The assertions and the helper stay as they are: the same
panic answered with a different stack would still show up, because only
this test silences the console.

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

* 🐛 Use real timer for wait-poll ceiling

wait-poll read the app clock (ct/now), so tests freezing that clock
never reached the deadline and hung instead of failing. Track expiry
with a real setTimeout flag, pass timeout-ms through wait-signal and
wait-for, and cover the frozen-clock case with a regression test.

AI-assisted-by: muse-spark-1.3-contributor
2026-11-13 09:18:43 +01:00
Andrey Antukh
679e70e48c 🐛 Keep file_change kind nullable so rollback keeps writing
Migration 0158 created file_change with kind NOT NULL, which blocks
any emergency rollback to the previous version: the old code inserts
without kind and every save would fail. kind is still a reserve
(reads use label IS NOT NULL), so it stays nullable until the
rollback window closes; the NOT NULL comes in a later migration.
The runbook keeps parity, the schema and migration tests cover the
nullable column and the rollback insert, and the storage memory
records the decision.
AI-assisted-by: muse-spark-1.3-contributor
2026-11-13 08:05:15 +00:00
Alonso Torres
3e48ab96e4
🐛 Limit token propagation to the new instance on swap and instance (#13021)
* 🐛 Limit token propagation to the new instance on swap and instantiate

Switching a variant and adding a component instance re-applied every
active token to every shape of every page. In files with thousands of
token-styled shapes this took over 10 seconds, while only the new
instance needed the file's token values.

propagate-workspace-tokens takes an optional scope (page id and root
ids) that limits the propagation to those shapes and their descendants.
component-swap and instantiate-component pass the new instance's root.
Calls without a scope still cover the whole file.

Closes #13019

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

* ✨ Add token tests for instantiate, swap and multi-page propagation

Cover instantiate-component and component-swap with components whose
stored values differ from the resolved tokens, checking that the new
instance gets the file's token values and other shapes are untouched.
Add a second page to the propagation tests to check that unscoped
propagation reaches other pages and scoped propagation does not.

AI-assisted-by: claude-opus-5-5
2026-11-13 09:02:44 +01:00
Andrey Antukh
335c6782a0 Merge remote-tracking branch 'origin/staging' into develop 2026-11-13 08:33:31 +01:00
Andrey Antukh
7dcc0fde7a Merge remote-tracking branch 'origin/staging-2.19.x' into staging 2026-11-13 08:33:01 +01:00
Andrey Antukh
a39dee6d79 Merge remote-tracking branch 'origin/main' into staging-2.19.x 2026-11-13 08:32:45 +01:00
Roshan Ramani
7516f1d163 📚 Fix the telemetry flag name in the configuration guide (#13032)
The guide told self-hosters to add enable-telemetries to PENPOT_FLAGS.
flags/parse turns that into :telemetries, which nothing reads; the
telemetry task checks :telemetry, so the documented flag never enables it.

AI-assisted-by: claude-opus-5-5
2026-11-13 08:32:29 +01:00
Roshan Ramani
e202612469
📚 Fix the telemetry flag name in the configuration guide (#13032)
The guide told self-hosters to add enable-telemetries to PENPOT_FLAGS.
flags/parse turns that into :telemetries, which nothing reads; the
telemetry task checks :telemetry, so the documented flag never enables it.

AI-assisted-by: claude-opus-5-5
2026-11-13 08:31:37 +01:00
penpot-renovate[bot]
c19f7a6e5d
⬆️ Update dhi.io/node image to v24.22.3 (#13031)
- dhi.io/node 24.22.3@ (docker/devenv/Dockerfile)
- dhi.io/node 24.22.3@ (.nvmrc)
- dhi.io/node 24.22.3-debian13-dev@aee95f1 (docker/images/Dockerfile.media-processor)
- dhi.io/node 24.22.3-debian13@84adaf3 (docker/images/Dockerfile.mcp)
- dhi.io/node 24.22.3-debian13-dev@aee95f1 (docker/images/Dockerfile.mcp)
- dhi.io/node 24.22.3-debian13-dev@aee95f1 (docker/images/Dockerfile.exporter)

Signed-off-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
Co-authored-by: penpot-renovate[bot] <338182062+penpot-renovate[bot]@users.noreply.github.com>
2026-11-13 08:30:10 +01:00
Andrey Antukh
5c45c8ddaf Merge remote-tracking branch 'origin/staging' into develop 2026-11-13 08:18:50 +01:00
Andrey Antukh
ad710ed143 📚 Document the squash-merge default and the no-squash opt-out
Squash merge appeared twice in the guide, as a review-process bullet and
in branch naming, with no reason and no way out. Add a Merging
subsection: one PR lands as one atomic commit, so the history stays
readable and git bisect never stops on an intermediate commit that fails
the tests or the linter. A contributor who keeps every commit
self-contained may ask for a regular merge in the first line of the PR
description.

Record the same contract in mem:workflow/creating-prs (merge strategy,
and the Merge line above the AI Note line) and in
mem:workflow/creating-commits (what a self-contained commit means when a
regular merge is requested).

AI-assisted-by: deepseek-v4.1-flash
2026-11-13 07:10:24 +00:00
Andrey Antukh
9bac1d290b 📚 Clarify when to run the file_change partition procedure
The procedure straddles the upgrade to 2.20.0 and the document said
nothing about the order. The preparation (phases 0 and 1) goes before
the version update, the bulk and the delta passes after it, and only
the cutover needs a scheduled maintenance window. The subtitle claimed
the whole thing was online, which is not true.

The copy marks no longer travel as a session GUC with a date typed by
hand. The delta mark is seeded at the bulk with `now()`, and a CHECK
keeps it from ending up empty; the instant of the cutover is recorded
in the same table after the commit, so the checks of phase 5 read it
instead of comparing against a date the operator retypes in every
session.

The procedure was run end to end on a scratch database, with the 23
SQL blocks extracted from the document and the application writes
simulated between the phases.

AI-assisted-by: deepseek-v4.1-flash
2026-11-13 06:58:46 +00:00
deni-ing
d774e197d0
🐛 Make GitHub logo follow the theme on the login page (#12943)
The GitHub icon had a hardcoded white fill, so it was almost
invisible on the light theme. Use currentColor so it follows
the button text color.

Fixes #12938

Signed-off-by: deni-ing <242363192+deni-ing@users.noreply.github.com>
2026-11-12 18:26:57 +01:00
Luis de Dios
24a5fd2043
♻️ Refactor the share link dialog to the design system (#12965)
* ♻️ Split the share link dialog into smaller components

Move the dialog state into a content component and extract the
permissions section, the page selection, the select rows, the
collapsible panel and the destroy confirmation.

The confirmation now keeps the link to destroy instead of matching it by
flags, so deleting a link no longer depends on the options snapshot.

AI-assisted-by: deepseek-v4.1-flash
(cherry picked from commit 3ce7f9d09765e4f6afc033db544aabca379c0ca4)

* ♻️ Use the design system controls in the share link dialog

Replace the deprecated select, the raw text input and the hand-written
page checkboxes with the design system select, input field and checkbox
components, and drop the deprecated icons and the unused uuid parsing.

AI-assisted-by: deepseek-v4.1-flash
(cherry picked from commit 3ce7f9d09765e4f6afc033db544aabca379c0ca4)

* ✨ Add dialog semantics to the share link dialog

Give the dialog and the destroy confirmation proper dialog and
alertdialog roles and labels, cancel the confirmation with Escape, and
connect the disclosure button with its panel through aria-controls.

AI-assisted-by: deepseek-v4.1-flash
(cherry picked from commit 3ce7f9d09765e4f6afc033db544aabca379c0ca4)

* ✨ Toggle the share dialog from the viewer header

Let the share button close the dialog when it is already open, report
the dialog state with aria-expanded and aria-pressed, and mark the
button with data-allow-click-modal so the closing click does not count
as an outside click.

Drop the click-outside guard on close; it is not needed once the button
can reopen the dialog.

AI-assisted-by: deepseek-v4.1-flash
(cherry picked from commit 3ce7f9d09765e4f6afc033db544aabca379c0ca4)

* 🐛 Move focus into the share dialog and restore it on close

Move focus into the dialog when it opens and into the Cancel button when
the delete confirmation opens, so Escape reaches the confirmation handler
instead of closing the whole dialog.

Restore focus to Destroy link when the confirmation closes and to the
Share button when the dialog closes.

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

* ♻️ Apply review follow-ups to the share link dialog

Use aria-haspopup instead of aria-pressed on the Share toggle, drop the
raw z-index, and express the small spacing values with px2rem. Restore
the collapsible pointer cursor and merge its two classes.

Memoize the permission options, expose aria-controls only while the
panel is open, and label the read-only URL field.

AI-assisted-by: deepseek-v4.1-flash
2026-11-12 17:53:39 +01:00
Danny Shirely
192e76781a
✨ Add export previews to Design and Inspect (#12059)
* ✨ Add export previews to Design and Inspect

Preview a selected shape's export presets in Design and Inspect, with
output dimensions and a shared persisted expansion preference.

Bound native previews to 240px and debounce subtree updates while keeping
the current image until its replacement is ready. Release replaced URLs
and cancel pending rendering when the preview closes.

Keep this change focused on previews and track native export fill
handling separately.

Closes #7561

AI-assisted-by: gpt-6
Signed-off-by: Danial Shirali <danialshirali16@gmail.com>

* 🌐 Add Spanish translations for the export preview

The export preview added four new keys only to en.po, so Spanish users
saw them in English.

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

* 🌐 Improve the Spanish export preview labels

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

---------

Signed-off-by: Danial Shirali <danialshirali16@gmail.com>
Co-authored-by: Eva Marco <evamarcod@gmail.com>
2026-11-12 17:23:46 +01:00
Andrey Antukh
ec1e2c9e1a Merge remote-tracking branch 'origin/staging-2.19.x' into staging 2026-11-12 15:36:44 +01:00
Andrey Antukh
92c478b0e2 Merge remote-tracking branch 'origin/merge-staging' into staging 2026-11-12 15:32:33 +01:00
Andrey Antukh
dc38eaa843
🐛 Fix font upload crash and preserve font metadata (#11951)
* 🐛 Fix font upload crash and preserve variant metadata

opentype.js 2.0.0 returns no fontSubfamily name for fonts whose
Macintosh name table only holds custom records. That made
parse-font-weight/parse-font-style call re-seq on nil and crash the
upload.

A nil or blank variant is now treated as no match in
app.common.media, defaulting to weight 400 and style normal. The
variant parsing also accepts oblique as italic, and the new
parse-font-family helper derives the family from a filename by
stripping the known weight/style tokens, separating a style token
glued to a weight token ("Roboto-BoldItalic" -> "Roboto").
first-nonblank-string returns the first nonblank candidate, so a
blank preferredFamily/preferredSubfamily no longer shadows a valid
fontFamily/fontSubfamily.

app.main.data.fonts gains resolve-font-metadata and
prepare-font-entry. opentype.js values win per field; any missing
value falls back to the filename-derived family, weight and style.
The parsed and woff2 branches share the same helper, so metadata is
preserved instead of collapsing every face to weight 400, and
fonts with missing vertical-metric tables upload with no height
warning instead of failing.

process-upload reports per-file failures (unknown signature,
unparseable file, preparation error) with a single bad-font
notification instead of silently dropping them, and never errors
for per-file failures.

The upload now sends :variant-name to create-font-variant, which
accepts it as an optional param (ships in 2.20), so the foundry
name survives the upload.

Closes #10436

AI-assisted-by: deepseek-v4.1-flash
AI-assisted-by: muse-spark-1.3-contributor
Signed-off-by: CHOI JUNSOO <junsoo1172@gmail.com>

* 🐛 Parse glued font style tokens in the font parsers

EvaMarco's review on #11951: parse-font-family and
parse-font-weight handled glued tokens like "BoldItalic", but
parse-font-style did not. For names such as
"opensans-bolditalic-webfont.woff2" the three parsers disagreed:
the italic face resolved to style normal and collided with the
bold-only file on the (family, weight, style) join key. One
binary silently overwrote the other during upload, losing one
font face without any warning.

A new private normalize-font-name helper is applied by all three
parsers. It splits a style token glued to a weight token, now
with a lookahead boundary so "LightItalic_v2" splits too, and
strips a trailing technical suffix (-VF or _v<number>).
parse-font-family, parse-font-weight and parse-font-style now
interpret the name consistently.

Tests cover the three cases from the review, the bold-only
control case, and an end-to-end process-upload check that a bold
and a bold-italic WOFF2 survive as two variants.

Relates to #10436 and PR #11951.

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

* Remove duplicate frontend test registration

---------

Signed-off-by: CHOI JUNSOO <junsoo1172@gmail.com>
2026-11-12 15:29:30 +01:00
Marina López
5803f2594c
🐛 Show the organization in the new team form (#13023) 2026-11-12 15:11:43 +01:00
Marina López
029283b1f9
🐛 Hide standalone Enterprise plans for team owners (#13017) 2026-11-12 14:54:56 +01:00
Luis de Dios
185fef889b
🐛 Fix collapsing token set groups after reordering (#12671)
* 🐛 Fix collapsing token set groups after reordering

The handler captured the first render path, and the tree is keyed by
index, so after a reorder it toggled the path of another group.

Closes #12625

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

* 🐛 Refresh double click handler of token set groups

Add the start edition callback to the hook deps so the handler does
not keep the initial closure.

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

* ✨ Add regression test for folding reordered token set groups

Reorder a group in the sets tree, fold it, and assert that only that
group collapses. The tree is keyed by index, so the test also proves
the collapse handler does not keep a stale path after a reorder.

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

* 🐛 Refresh double click handler of token set nodes

Add the start edition callback to the hook deps so the handler does not
keep the initial closure.

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

* ♻️ Key token set tree nodes by identity instead of index

React reuses a node by its key. Keyed by the tree index, a reordered
group moved the instance to another node and its handlers kept the
previous paths. Groups are now keyed by path and sets by id, so each
node keeps its own handlers.

The set being created has no persisted id yet, so the tree walk
generates a new one on every render. Keep one uuid for its whole
creation instead.

AI-assisted-by: deepseek-v4.1-flash
2026-11-12 13:49:43 +01:00