The page reveal waits for the fonts its texts still load, lays the texts
out again and renders them, so CJK texts no longer show missing glyph
boxes on first paint. The wait ends after 3 seconds, and a page change
drops the reveal of the previous page.
AI-assisted-by: claude-opus-5-5
- Horizontal emphasis marks under the text attach to the em box, not
to the tight rect, which CJK faces stretch past it. They were drawn
about a line low and seemed to mark other words.
- In vertical text, Chinese commas and stops of a font with no vertical
forms stay upright: centred for Taiwan and Hong Kong, in the top
right corner for Mainland. Colon and semicolon are centred.
AI-assisted-by: claude-opus-5-5
- The Layout group of the Language view shows the writing mode,
orientation and Distribute row, as the Text section does.
- The reading item of the text selection menu reads Furigana for
Japanese, Pinyin or Zhuyin for Chinese, with a glyph that matches
(あ, 拼, ㄅ) instead of the hiragana for every language.
AI-assisted-by: claude-opus-5-5
- Exports lay out the active CJK content, as the workspace does, so
attributes the text language does not use are not rendered.
- Vertical text paints only its silhouette, widened by center and outer
strokes, in the drop shadows of its container, and renders its inner
shadows. The SVG renderer paints it opaque in container shadows.
- Horizontal text keeps its top-left corner when its size changes;
vertical text keeps the edge its vertical alignment sets, also when
the draft-js editor commits its size.
AI-assisted-by: claude-opus-5-5
Text shapes and text ranges read and write the CJK attributes, among them
the language (`lang`), writing mode, orientation, readings and emphasis
marks. Update the plugin types, the changelog and the API test suite.
AI-assisted-by: claude-opus-5-5
- The Text section shows writing mode, orientation and Distribute when
the text has a CJK profile.
- A Language section picks the profile of the selected texts. Its
options open in a view of their own, grouped in Selected text, Layout
and Ruby.
- A compact menu at the selected text opens readings, emphasis marks and
other options of the selection.
- File and Preferences menus and the account settings set the file and
the default profiles. New texts take the last profile used, else the
file one.
The board size presets share the new grouped dropdown. Add English,
Spanish and Japanese translations.
AI-assisted-by: claude-opus-5-5
The WASM text editor works in vertical text: the caret, selection and
arrow keys follow columns, the cursor and the resize handles match the
writing mode, and auto-width and auto-height texts grow toward the block
end. The IME input surface sits on the caret so candidate windows open
beside the column on each platform, and compositions update the text as
they change. Undo history and selection styles keep readings and other
CJK attributes.
The `ime` debug option shows composition bounds and both carets.
AI-assisted-by: claude-opus-5-5
Serialize the CJK attributes of paragraphs and spans for the WASM
renderer, load CJK fallback fonts by script, and relayout text when they
arrive. The SVG and HTML text renderers, the exporter, the CSS code
generation and the clipboard keep the language, writing mode, readings
and emphasis marks.
AI-assisted-by: claude-opus-5-5
Add vertical writing (`vertical-rl`) to the renderer: characters set in
cells along columns, upright or sideways orientation, vertical glyph
alternates and metrics, tate-chu-yoko, kinsoku and JLREQ squeezing across
columns, and readings and emphasis marks beside the column.
AI-assisted-by: claude-opus-5-5
Add the CJK layout engine and use it for horizontal text:
- Line breaking with kinsoku rules that depend on the language: Japanese
JLREQ, Chinese per region (Mainland, Hong Kong, Taiwan) and Korean
word or syllable wrapping. Indivisible units stay together in narrow
boxes.
- Justification and squeezing that follow JLREQ, and distributed
alignment that keeps lines inside the box.
- Readings over the text (ruby, pinyin and zhuyin), emphasis marks,
warichu and CJK underlines, attached to the ideographic em box and
included in the export bounds.
- Shared glyph shaping, font tables and CJK fallback fonts.
`docs/cjk-layout.md` describes the design. Test fonts cover the locl,
vertical metrics and pinyin cases.
AI-assisted-by: claude-opus-5-5
Texts get the attributes of CJK layout: the language of each paragraph (a
BCP 47 tag), the writing mode and orientation, readings (ruby, pinyin and
zhuyin), emphasis marks, warichu, tate-chu-yoko, line breaking rules and
distributed alignment. `cjk-layout` holds their values and defaults and
tells which language family a tag belongs to.
Files keep a language profile in their options: the language new text
layers take when the user has not picked one. Profiles keep their own
default, and new files start with it. A new change type sets the file
profile, and the `cjk-support` feature gates the whole work.
Range styling joins spans left with the same style, since tate-chu-yoko
and readings work per span.
AI-assisted-by: claude-opus-5-5
Some IMEs (Fcitx Pinyin) end the composition before Escape is released,
so the key-up no longer looks like part of it and Escape left the text
edition. Remember when a key-down belongs to a composition and ignore
the Escape release that follows. Escape still leaves the edition or
closes the menu otherwise.
AI-assisted-by: claude-opus-5-5
Starting an IME composition over a selection deletes it, and cancelling
the composition left it deleted. When the IME ends with an empty text,
restore the content and the UTF-16 selection from before the
composition, keeping styles, the selection direction and redo. The
cancellation is not recorded as an edit.
AI-assisted-by: claude-opus-5-5
While a text was being edited, undo and redo did not reach the editor.
Keep a bounded content and selection history for each editing session.
Group committed compositions and styled insertions, leave IME previews
out, and start over when another change replaces the content.
Route keyboard shortcuts, native history input and the Edit menu to the
editor. The menu takes the focus, so focus the editor before restoring.
Restore UTF-16 selections through a new WASM binding.
AI-assisted-by: claude-opus-5-5
Font fetches are shared per URL, so a text that asks for a face already
being fetched gets no fetch callback. process-pending only relaid out
text after its own callbacks, so such a text kept its fallback-font
layout. Auto-grow text recovered through the reflow resize, but fixed
text stayed wrong until another change.
Wait for the text's pending faces to be stored or to fail before the
relayout, whoever started their fetch.
AI-assisted-by: claude-opus-5-5
The repair of :variant-not-main removed a variant main that had only
lost :main-instance, with its children. Its component still pointed to
the removed shape and validation reported nothing after it. When the
live component still names the shape as its main, the repair now sets
:main-instance back; it removes only shapes no component claims.
The :ref-shape-not-found repair of the same pass now leaves a main
alone, so it does not give the restored main a :shape-ref.
The repair of :nested-main-not-allowed moved the shape to the page root
every time. It now moves it only when a main surrounds it; a main in a
plain board keeps its place and gets :component-root.
Closes#13257
AI-assisted-by: claude-opus-5-5
* 🐛 Validate copies of unlinked libraries like the backend does
Copies of components from a library that is no longer linked failed
plugin validation with component-not-found and ref-shape-not-found,
while the backend accepted every save on them. The validator skips
copies whose library is not in the map it gets, but the plugin passed
the whole :files state, which also holds dashboard entries without
data. A library in the same project then looked present but empty.
The plugin validate, and the debug validate and repair, now pass only
the file and its linked libraries, the same set the backend uses. The
debug repair would otherwise detach those copies.
resetOverrides in the plugin API now refuses, with a message, when the
main component of the copy cannot be found or is deleted. Before, it
emitted a reset that changed nothing. The workspace menu already hides
the option in that case.
Closes#13323
AI-assisted-by: claude-opus-5-5
* ✨ Fix MR findings
* 🐛 Hide the path edition options when the edited path is gone
The design panel showed the path edition options whenever a path edit
state existed for the edited shape. The shape can leave the page while
that state stays, for example when another user deletes it or an undo
removes it. The panel then rendered the measures of a missing shape,
with a nil type, and crashed with "No matching clause".
The panel now shows the path edition options only while the edited
path is on the page.
AI-assisted-by: claude-opus-5-5
* ♻️ Name the edited path check apart from its result
The helper and the local that holds its result were both called
path-editing?, so the name meant a function in the namespace and a
boolean inside design-menu*. The helper is now editing-existing-path?.
AI-assisted-by: claude-opus-5-5
* ✨ Accept explicit shared keys from files
Backend, exporter and media processor now read a service shared key from a
`*_FILE` variable when the direct environment value is absent. Blank or
missing files fail closed instead of disabling the credential. Backend also
persists an autogenerated master secret in `server_prop` so tokens survive
restarts without operator configuration.
The derivation from `PENPOT_SECRET_KEY` stays as a fallback; the shipped
Compose defaults are unchanged. Each service can now receive its own key,
while backend resolves all four.
AI-assisted-by: hy4-flash-free
♻️ Require an explicit secret key and tighten key files
Backend no longer persists or autogenerates the master secret: startup now
requires PENPOT_SECRET_KEY or PENPOT_SECRET_KEY_FILE. A blank service key is
disabled, while key files are trimmed, unwrapped, size-capped and fail closed
with named errors. Exporter, media processor and admin console follow the same
contract, and the admin console file reader moves to shared-utils.
AI-assisted-by: hy4-flash-free
* 🐛 Align service secret key configuration
Reject blank exporter keys without falling back to another source.
Allow the exporter and media processor to derive their service keys from
a master key file, and document the upgrade and security requirements.
AI-assisted-by: gpt-6.1-terra
* 🐛 Normalize key files consistently across services
Reject empty master key file paths when selected and apply the same
Unicode whitespace rules to backend, exporter and media processor.
Document the compatibility impact on existing secrets and tokens.
AI-assisted-by: gpt-6.1-terra
Adding an SVG with several variants selected, or dropping it on an empty
area of a variant board, put a plain group straight into the board. The
backend rejected the save with :main-instance-not-a-variant and the
workspace undid the change. The SVG upload now picks its parent with
get-first-valid-parent, as drawing and add-shape do, so it never lands
in a variant board or a component copy.
Validation reported any non-variant child of a variant board as a main
that should be a variant. Its repair set :variant-id on plain shapes,
which made a fake variant that a later repair deleted with its children.
Such a child now reports :variant-container-child-not-main, and its
repair moves it out, right after the board. A main that lost its flags
but is still claimed by its component keeps the old code.
Closes#13338
AI-assisted-by: claude-opus-5-5
* 🐛 Keep fill children of hug boards from collapsing to 0.01 px
A flex or grid board that hugs an axis has no free space for fill
children on that axis: along a flex direction any fill child, across it
only when every child is fill, and in a grid any fill child. The layout
shrank them to the 0.01 px minimum and the commit saved it. In component
copies, the new render engine then wrapped their text one character per
line.
The rule lives in common as fix-child-sizing, with tests, and now covers
grid boards. Every action that reaches this state applies it:
- Resize board to fit content fixes, in the temporary objects only, the
fill children that the hug would collapse.
- The hug toggle changes the direct children only. It fixed fill sizing
on all descendants, which froze collapsed grandchildren as overrides.
Setting a child to fill inside a hug grid turns the grid to fix.
- A fill shape that arrives in a hug board by paste, move, canvas drag
or create variant turns fix at its size, and the board keeps hugging.
A move used to turn the board fix instead, which still collapsed the
shape when the board fitted its children.
- When delete, hide, show or make absolute leaves only fill children,
the board turns fix at its size, as moving a child out already did.
This covers all the hide and show paths and deletes on other pages.
- The plugin API sizing, hidden and visible setters go through the same
events as the design panel, so plugins and MCP get the same guards.
Files saved with collapsed sizes are not repaired by this change.
Closes#13353
AI-assisted-by: claude-opus-5-5
AI-assisted-by: claude-sonnet-5-5
* 🐛 Repair collapsed layout children
Add migration 0040 to restore collapsed layout children from exact sizes and
reflow the repaired boards. Guard singleton space-between layouts and require
all collapsed descendants to be repaired before a board can hug.
Closes#13353
AI-assisted-by: gpt-6-luna
* ✨ Fix MR findings
Add the release notes slides for 2.20: an intro and four slides on the
MCP server, WebGL rendering by default, design tokens, and safer saves.
Point the "0.0" release notes to 2.20.
Signed-off-by: elhombretecla <delacruzgarciajuan@gmail.com>
* 🐛 Keep the bool type of a moved copy when its main becomes a group
:type is synced with the geometry group and :bool-type with the content
group. When the main bool became a group and the copy had its geometry
touched, the copy kept :type :bool but lost :bool-type, and the backend
rejected it as an invalid shape.
Sync :bool-type with the geometry group, next to :type and the path
content it defines.
AI-assisted-by: claude-opus-5-5
* 🐛 Sync the bool type of a copy with the type it ends with
From the review: moving :bool-type to the geometry group stopped a new
bool operation of the main from reaching any moved copy, and dropped the
operation overrides stored as content-group touched.
Keep :bool-type in the content group. In update-attrs, work out the
type the copy ends with (its own when the geometry group is touched):
a bool never loses its :bool-type, and any other type gets none. Tests
cover a moved copy when the main becomes a group, a new operation
reaching a moved copy, a moved group copy when the main becomes a bool,
and an operation override on a copy.
AI-assisted-by: claude-opus-5-5
Any signed-in profile can push events with any allowlisted name through
the browser endpoint and point them at any organization or member. The
admin console consumer forwarded those rows like real ones, so a user
could add forged entries to another organization's audit log.
The consumer now forwards an allowlisted row only when its source is
"backend". Browser rows count as skipped, so the cursor still passes
them. Every allowlisted name has a backend producer; the six names the
Admin Console browser used to send are recorded by its server now
(penpot/penpot-nitrate#901).
AI-assisted-by: claude-opus-5-5
* 🐛 Shape drop shadows by the alpha of image fills
* 🐛 Shape exported drop shadows by the alpha of image fills
* 🐛 Cast child silhouettes for image-fill frame drop shadows
Image-only fills can leave transparent holes, so the direct container
drop-shadow path must not skip descendant silhouettes. Exclude those
frames from the fast path and from the covering check, and cover the
gate with unit tests.
AI-assisted-by: composer
* ♻️ Drop unreachable image branches from frame shadow fast path
AI-assisted-by: claude-opus-5-5
* ⚡ Size raster export image shadow masks to the output resolution
AI-assisted-by: claude-opus-5-5
---------
Co-authored-by: Alejandro Alonso <alejandroalonsofernandez@gmail.com>
With auto width or height, the fr unit is the largest size / value of
the flex tracks. A 0fr track divided by zero, so the fr was infinite,
the track size became NaN and so did the position of every child. The
backend rejected the shape and the save. Skip tracks with no fr value
when computing that minimum, in common (SVG renderer) and in
render-wasm (WebGL renderer). A 0fr track keeps the size of its
content, as in CSS.
Closes#13255
AI-assisted-by: claude-opus-5-5
* 🐛 Keep typed values within the limits of editable selects
A number editable select passed no :min or :max to its input, so only
the arrow keys kept the value in range. A typed guide size of 0 or less,
or a typography font size out of range, reached the backend, which
rejected the shape and the save. Pass the limits to the input, which
already clamps the typed value.
Closes#13250
AI-assisted-by: claude-opus-5-5
* 🐛 Keep values unchanged when leaving a number input untouched
The number input clamped its value on focus, so with the new limits
leaving an Auto grid size without typing saved 1, and leaving a field
with an old value out of range rewrote it. Focus now keeps the current
value; only typed and stepped values are clamped.
The grid size field is also nillable now: Auto shows its placeholder
instead of 0, and clearing the field goes back to Auto.
AI-assisted-by: claude-opus-5-5
* 🐛 Keep untouched and mixed number inputs unchanged on leave
The keydown handler stored the clamped value for every key, so Tab or
Escape on a font size of 2 saved 3 with no typing. Store it only for
arrows and Enter; typed text is stored by the change handler.
A mixed value has no number, so leaving the field fell back to the
default 0 and saved a font size the backend rejects. Leaving a field
that is not nillable without a value now saves nothing.
AI-assisted-by: claude-opus-5-5
* 🐛 Fix the pointer-map read and write contracts
fdata/objects-map is consolidated, so the server stops negotiating it:
get-file and get-file-snapshot no longer convert it for a client that
does not declare it. Converting it rewrote the page map, and doing that
on a page that is still a pointer produced a fresh fragment id with no
row behind it (a read never persists), so the client got a 404 for
every page.
The save path now reattaches unchanged pages after migrating, like the
read path: a save that triggers a pending migration keeps the fragment
ids of the pages the migration does not change.
A pointer carries its file id in its metadata and the fragment loader
resolves with it, so it no longer depends on a per-file binding. That
makes libraries lazy (they were materialized in full on first access),
removes the file-id argument from the loader macros and the extra
arities of realize-pointers, and lets the snapshot preview resolve
without the live file id. A pointer without the field raises instead
of falling back: the feature has never been enabled in production.
Also use with-untracked in the validation and repair sites, cover
enable-objects-map with the encode-file tracking binding, document the
fragment contract, and delete two dynamic vars that have had no
readers since 2024-01-17.
AI-assisted-by: deepseek-v4.1-flash
* 🐛 Fix the pointer-map review findings
The snapshot preview no longer materializes the objects map when it has
to apply a pending migration: it realizes the pointers only, so an old
version and an already-migrated one return the same shape. The preview
stays read-only.
`wrap` now lets the bound metadata win, so the `:file-id` of the file
that writes the fragment row is authoritative, and the ns docstring
records that pointer metadata is changed with `vary-meta` (it merges
over the current map and keeps the file id) rather than `with-meta`.
Also bind the fragment loader in `srepl/main/validate-file-schema`,
remove a leftover argument from a test, and add the two missing tests:
the public RPC rejects a marked fragment while the internal loader
reads it, and the id plus the metadata survive the fressian and transit
round-trip.
AI-assisted-by: deepseek-v4.1-flash
* 🐛 Avoid orphan fragments during save migrations
Skip pointer tracking only while pending migrations run. Reattach unchanged
pointers after tracking resumes; verify stored fragment references in tests.
AI-assisted-by: gpt-6-luna
* 🐛 Prevent save migration tests from masking failures
Use one non-migrating file read for post-save IDs and migration state, so
a later read cannot mask a missing migration record.
AI-assisted-by: gpt-6-luna
The save-failed audit event now carries the file of the failed commit and
the distinct codes of the validation details, so failed saves can be split
by cause and broken files counted from the event itself.
Since the backend keeps the valid commits of a save and returns the rest
as rejected, a validation failure no longer halts the queue and sent no
event. The rollback of rejected commits now sends save-failed too, with
the number of rejected commits.
Closes#12578
AI-assisted-by: claude-opus-5-5
* 🐛 Keep a valid transform when a shape is squashed far from the origin
A path squashed almost flat tens of millions of pixels from the origin
got an inverse transform with values beyond the safe range, for example
:f -1.04E10. The backend rejected the shape as invalid and the file
stopped saving.
apply-transform already kept the previous transform pair when the new
one had no inverse. It now does the same when either matrix is not a
valid matrix.
AI-assisted-by: claude-opus-5-5
* 🐛 Check the squashed geometry in the transform overflow test
From the review: once the fallback keeps the identity pair, the product
of the transform and its inverse is the identity by construction. Also
check that the selrect and the points still follow the squash, and point
the test comment to #13324.
AI-assisted-by: claude-opus-5-5
* ✨ Add on-demand pull request reviews
Run Claude Code, Copilot CLI and OpenCode Go from PR slash commands in the
official development image. Let maintainers configure a default model and
effort for each reviewer and override both in a comment. Configure MCP
for code navigation and reply to inline questions in their original thread.
AI-assisted-by: gpt-6
Signed-off-by: Michael Panchenko <michael.panchenko@oraios-ai.de>
* ✨ Add a local runner for pull request reviews
Run the CI review scripts for a PR on a local machine and print the
review instead of posting it. Use the local Claude login when no OAuth
token is set, start Serena through uvx when it is not installed, and
show OpenCode errors when it returns no answer.
AI-assisted-by: claude-opus-5-5
* ✨ Add /review and default OpenCode to DeepSeek V4.1 Flash
Accept /review at the start of a comment as an alias for /oc with the
repository defaults, and keep the typed command as the native agent's
mention. Use deepseek-v4.1-flash when no OPENCODE_MODEL is configured.
AI-assisted-by: claude-opus-5-5
* 🔧 Default OpenCode reviews to high effort
Use high effort for DeepSeek V4.1 Flash when no OPENCODE_EFFORT is
configured, in CI and in the local runner.
AI-assisted-by: claude-opus-5-5
---------
Signed-off-by: Michael Panchenko <michael.panchenko@oraios-ai.de>
Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
* 📚 Fix Clear undo keys and snap labels in shortcuts docs
Clear undo is bound to alt+q on every platform, not Ctrl+Q on Linux and
Windows. The two snap rows used labels that do not match the actions
their keys toggle: Ctrl+Shift+' is "Snap to guides" and Ctrl+Shift+G is
"Snap to ruler guides" in the app.
AI-assisted-by: claude-opus-5-5
* 📚 Align guide shortcut labels and macOS keys in the user guide
Rename "Show/hide grid" to "Show/hide guides" to match the app label for
Ctrl+'. Use the macOS option symbol for Copy link to board and in the
shortcut recording note. Keep the snap rows in alphabetical order.
Fix the ruler guides shortcut in Workspace basics: ruler guides show
only while rulers (Ctrl+Shift+R) and guides (Ctrl+') are both visible.
Document Ctrl+Shift+G to toggle snap to ruler guides.
AI-assisted-by: claude-opus-5-5
* 📚 Note that toggling guides also hides board guides
Ctrl+' hides ruler guides and board guides alike, since both depend on
the same display-guides setting.
AI-assisted-by: claude-opus-5-5
---------
Co-authored-by: Roshan Ramani <roshanramani.dev@gmail.com>
* 🐛 Normalize legacy svg attrs of pasted shapes
Shapes copied from a version before 2.20 can hold camelCase svg attrs,
for example :strokeLinejoin. Files get them normalized by migration
0037 when they load, but clipboard data skips the migrations, so the
closed SvgAttrs schema rejected the pasted shape and the whole paste was
cancelled.
Move the shape normalization of migration 0037 to csvg/normalize-shape
and run it on every pasted shape in paste-shapes.
Closes#13327
AI-assisted-by: claude-opus-5-5
* 📚 Name the shared svg repair in the data model checklist
From the review: the checklist still named the withdrawn migration 0035
as the svg repair site. Point it to csvg/normalize-shape, used by
migration 0037 and by paste-shapes.
AI-assisted-by: claude-opus-5-5
* ✨ Count the trips of a throttled update loop before reporting it
The report of a throttled update loop could not tell a loop that goes
on from a long chain of updates that ends. It now waits five seconds
and reports how many times the scheduler tripped meanwhile, the stack
of the last trip and the number of objects of the page. The trace still
shows the first trip.
Relates #12580
AI-assisted-by: claude-opus-5-5
* ♻️ Drop the bang suffix from the update loop report function
Review asked for no new functions with a ! suffix.
AI-assisted-by: claude-opus-5-5
Variants.properties and currentValues() went through a set, which loses
order past eight items, so index-based removeProperty/renameProperty from a
plugin hit the wrong property. Use distinct to keep the order.
In the sidebar, input-with-meta* kept the input node after a real blur and
replayed a stale rename with an old position when its row unmounted,
undoing a property removal. Clear the node in on-stop-edit.
Add a unit test, a plugin-api-test-suite case and a plugins changelog entry.
Closes#13247
Dragging a shape into a board sets its constraints to the default for
that place (left/top, or scale inside a group) without marking them
touched. A component main on the canvas has no constraints, so the
sync saw nil against left/top and wrote nil over the copy. With nested
components that sync writes into the middle library, so any change to
the inner component, even a 1px move, showed an update banner in every
file that uses it.
Treat a missing constraint as the default for the placement of the
shape being written when comparing during sync.
Closes#12719
AI-assisted-by: claude-opus-5-5
color-att->text built the text fill without the :image of the color,
so picking an image in Selected colors left a fill with only
:fill-opacity. The backend rejected the text as an invalid shape. The
same gap made an image fill impossible to match, so changing it back
to a plain color did nothing.
AI-assisted-by: claude-opus-5-5
Validation compared each variant's property names with the first child
of its board, so it missed forbidden characters, too-long text and
repeated names, and never checked labels in deleted components. Repair
cut every variant down to the first child's names, which dropped
values, and left the file invalid.
Validation now checks the members of each board as one set: cleaned
text, and the same names in the same order, in layers-panel order as in
migration 0038. Repeated value combinations stay valid, as the editor
allows them. It also checks boards that exist only in a component's
objects, variant components that belong to no board, and the whole
board when a save touches only one of its members.
Repair writes the aligned properties and labels on each component and
its main. A live variant main outside its board is reported as
:variant-main-outside-board and detached, as the editor does, instead
of turning its parent into a board. :main-instance-not-a-variant now
repairs the main of a deleted component inside its objects.
Moving a shape or component into a board now cuts property values taken
from its name or path to 60 characters, as the schema requires.
Closes#13238
AI-assisted-by: claude-opus-5-5
With the WebGL renderer, applying a typography changed the text but left
its box at the old size, because nothing asked the renderer to measure
the text again. apply-typography now waits for the new font and resizes
the auto-grow texts inside its undo step, as the Design tab does.
The typography bar at the bottom of the canvas had its own copy of this
logic, with no resize and no undo step: the font-load heal resized the
box later without recording undo, so Ctrl+Z left the new size. It now
calls apply-typography.
Closes#13124
AI-assisted-by: claude-opus-5-5
* 🐛 Submit the import audit events from the import job
Since 2.20 the dashboard imports .penpot files through the
:import-binfile job, which submitted no audit event. The outcome of
an import and the files it created were lost, so analytics could no
longer tell completed imports from failed ones.
The job now submits the import-binfile event with the name and props
of the legacy RPC event (status, file-ids, file-count, project,
version, generated-by, referer), plus the job id, the team id, the
package size and the elapsed time. A cancelled job reports the
cancelled status. A completed import also submits a create-file event
per imported file, as the legacy RPC does. As in the RPC, an import
refused by the permission check submits no event.
Closes#13148
AI-assisted-by: claude-opus-5-5
* 🐛 Audit import jobs at their terminal transition
Run optional terminal hooks in the winning job transaction and use one
for import audit events. Preserve the separate import transaction and
cover cancellation, rollback, RPC paths, and dispatcher aborts.
AI-assisted-by: gpt-6.1-terra
* ♻️ Simplify the terminal job hook contract
Pass a semantic terminal job to the hook with its final status and
decoded parameters, result or error. Adapt the import audit and tests.
AI-assisted-by: gpt-6.1-terra
* 🐛 Keep import jobs bound to their original team
Freeze the destination team when creating an import job and serialize
imports with project moves. Use the frozen team for audit and webhook
events, and keep compatibility with existing jobs.
Select import audit props explicitly to prevent new job parameters from
being included in events by default.
AI-assisted-by: gpt-6.1-terra
* 📚 Document the import team fallback removal
Mark the legacy job audit fallback for removal in version 2.21.0.
AI-assisted-by: gpt-6.1-terra
* 🔧 Validate canonical AI model IDs in commit trailers
Require bare lowercase model IDs in AI-assisted-by trailers and cover
the validation with tests. Align the commit and PR workflows with the
same attribution rules.
AI-assisted-by: gpt-6.1-terra
---------
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
* 🐛 Keep all padding sides when setting one on a layout without padding
Setting one padding side on a board whose layout had no stored padding
(made through the API or MCP) saved only that side, for example {:p1 12}.
The backend rejected the shape as invalid.
Start a padding change from the four sides at 0 when the shape has no
padding yet.
Closes#13265
AI-assisted-by: claude-opus-5-5
* 🐛 Complete the layout padding after patching it
From the review: fill the four padding sides after the patch instead of
before, so a side cleared to nil also becomes 0, and any layout change
completes a partial padding saved before the fix.
AI-assisted-by: claude-opus-5-5
* 🐛 Leave gradient mode when undo removes a stroke gradient
Undoing a gradient with the color picker open sent a plain color.
The picker dropped the stops but stayed in gradient mode, so adding
a stop built a gradient with no coordinates or colors and applied it
to the stroke. The backend rejected it as an invalid shape.
Switch the picker to color (or image) when the color is no longer a
gradient, and skip invalid gradients before applying them.
Closes#13261
AI-assisted-by: claude-opus-5-5
* 🐛 Cover more colorpicker cases in the stroke gradient tests
From the review: plain and image colors still reach on-change through
the gradient guard, both gradient types leave the gradient tab, and a
plain color keeps the color tab. The image tab test is renamed after
what it checks.
AI-assisted-by: claude-opus-5-5
The legacy editor writes the attrs it gets into the data of an empty
paragraph, nil values included, so turning off a text decoration there
leaves :text-decoration nil. finalize-editor-state copied that data into
the shape content as it was, the only commit path that skipped
ensure-valid-text-content, and the backend rejected the shape. Build the
content with a helper that runs it, shared by both renderer branches.
Closes#13252
AI-assisted-by: claude-opus-5-5
* 🐛 Fix SVG upload frame when the selection is inside a group
With a shape selected inside a group, an uploaded or pasted SVG goes
into that group, but its frame-id came from the board under the drop
point. When the two boards differ, the save fails with invalid-frame.
Take the frame from the group instead.
AI-assisted-by: claude-opus-5-5
* 🐛 Keep SVG upload frame aligned with its parent
Keep the SVG upload frame and parent from the same source.
When a shape inside a group was selected, the frame for the new SVG
came from the board under the cursor while the parent came from the
group, so saving failed with invalid-frame. The parent and frame now
come from one shared predicate, which also prevents a repeat of the
original drift between two copies of the condition.
Add the board-parent test for the frame branch this change rewrote,
and make the group checker assert that the SVG exists and that its
frame is the expected one. Add mutation evidence for both.
AI-assisted-by: deepseek-v4.1-flash
---------
Co-authored-by: Luis de Dios <luis.dedios@kaleidos.net>