Fixes in the sync of copies from their mains, in reset and in update main
(Phase 3c).
- Undo a token sync to the tokens a copy shape had.
The token sync of a copy shape wrote, as its undo, the shape's tokens read
with an empty map as default, so undoing the sync of a main's token gave a
copy shape that had none an empty :applied-tokens map instead of no map
(F55). The undo now writes the value the shape had.
Case AY no longer marks its round trip as a known failure; both golden
masters record the round trip without failures in the two variants that
hit it.
- Reorder a copy's children with the fewest moves and exact undo.
When a main reordered its children, sync wrote a move for every copy child
the walk found out of place, from its position in the copy's original list
to its main's index:
- once one child was out of place, every following pair was too, so a main
with 1,000 children that moved its first one to the end wrote 999 moves
per copy, quadratic in the children (F85);
- :mov-objects inserts before the index of the list that still holds the
shape, so a move to a later place landed one short, and the undo, which
used the original position, did not put the child back: undoing a
reorder in a main left its copies reordered (F41).
The walk now syncs the pairs, removals and additions first, and then moves
the copy's children, as those changes left them, into their main shapes'
order: the longest run already in order stays, and each other child moves
right after the one before it in the main's order. Each move is computed
on the order the moves before it left, so its index is exact, and its undo
puts the child back after its old neighbour.
The update main walk keeps its moves: the copy's order differs from the
main's only after F41's undo, as the UI never reorders a copy.
comp-sync-test: a reorder in a six-child main moves each displaced copy
child once, gives the main's order, and undoes exactly. Cases F, AG and AO
no longer mark their round trip as a known failure; both golden masters
record it without failures.
- Remap a main's grid cells after the update main pairs children.
An update main from a copy of a grid main pushes the copy's cells into the
main, with each copy child mapped to its main shape. The cells were
remapped before the children walk, when a swapped copy child still
referred to the main child it replaces; the walk then removed that child
and added a new main child for the swapped one. The main's cell kept the
removed child's id and the new child was in no cell (F49); the next sync
of the copy took that broken cell back.
The cells are now remapped after the walk: each copy child goes with the
main shape the walk added for it, or else with the one it refers to.
Case AK no longer pins F49: with a swap, the main's third cell holds the
new main child, the main takes the copy's cells as they are (the swap had
made the first one manual), and the copy keeps its child in the third
cell. Both golden masters record that.
- Add update main's new main shapes and their undo in the main.
When update main pushes a copy child the main lacks (a swapped child), it
adds a copy of it to the main (F102):
- the refit of the groups around it was a :reg-objects that named the
component, which reaches only a deleted component's stored shapes, so a
group in the main kept its old bounds;
- the undo deleted the new shapes from the copy's page, so when the main
sat on another page the undo left them in the main.
The new shapes, the refit of their parents and the undo of both now go to
the main's container; undoing deletes the new shapes and refits the
parents again.
The case AM setup and the new test fit their groups to their children, as
the editor does; an unfitted group's size is one the refit cannot give
back on undo. Both golden masters record case AM with the fitted groups.
comp-sync-test: an update main from a copy on one page into a main on
another fits the group around the pushed copy, and undo gives the main
back.
- Sync flips with the rest of the geometry.
A flip changes a shape's transform, points and selrect, which sync and
touch as geometry, and toggles :flip-x or :flip-y, which were not in
sync-attrs: when a main flipped a child, its copies took the flipped
transform but kept their old flip flags, which the renderers and the
placement of swapped shapes read (F38). A flip on a copy touched geometry
through the transform all the same.
:flip-x and :flip-y now sync and touch as :geometry-group.
comp-sync-test: a copy follows its main's flip, flags and transform,
untouched.
- Reset a nested copy of a flex board keeping its children.
Sync gives each child of a copy of a flex board the flex child attributes
(margins, sizing, z-index, ...) of the main child it refers to. It looked
that child up in the copy head's own component; for a nested copy that is
not where its children's mains are (they are the children of the nested
copy in the outer main), so the lookup gave nil, and a reset, which copies
every attribute, wrote nil into all of them (F103). A child with no main
was written nil the same way.
The lookup now uses the container the walk reads the main shapes from,
where every child's :shape-ref points, and a child with no main shape is
left as it is.
comp-reset-test: resetting a nested copy of a flex board keeps its child's
margin (with a grid board too, whose children F15 leaves).
- Sync layout child attributes of the children of grid mains.
Sync and update main copy the layout child attributes of a board's
children (margins, sizing limits, z-index, absolute position, align-self)
from the shapes they pair with, but only when the main was a flex board:
the children of a grid main never got them, so a margin set on a grid
main's child never reached its copies (F15). Grid boards now go through
the same step, renamed update-layout-children.
comp-sync-test: a copy follows the margin its grid main gives a child.
comp-reset-test checks the reset of a nested grid copy keeps it too.
- Clear remote-synced when a nested copy is reset.
A reset makes a copy equal to its near main, but the reset of a nested
head marked every shape below the copy root :remote-synced, the mark of a
shape last synced from a remote main. Update main reads that mark: it
gives the main the copy's overrides only for shapes without it, and
otherwise clears the main's touched groups. So after resetting a nested
copy, an update main from the top copy cleared the overrides of the nested
copy in the main, which the next sync from its own component then
overwrote (F13).
A reset now clears the mark, as the shapes follow their near main.
comp-reset-test: after a reset of a nested copy, an update main from the
top copy keeps the fill override of the nested copy in the main. Both
golden masters record case AB without the marks.
- Check that a nested copy keeps its constraints.
A copy of one component dropped into another's main, whose constraints the
outer main then sets, keeps them, in that main and in its copies, when the
inner component's main is edited: the setting is an override of the nested
copy. The test guards it; the reset of the constraints a drop writes,
which looked like a loss (F45), changes nothing a user sees, as nil means
the same left/top.
- Undo a library typography sync to the text's measured layout.
The library color and typography syncs rewrite a text's content and clear
its :position-data, so the text is measured again. Their undo put back the
old content but cleared the position data too, so an undone sync left the
text unmeasured (F90). The undo now writes back the position data the text
had.
library-asset-sync-test: undoing a typography sync gives back the font
size and the position data.
- File the copy's relinks of an update main with the copy's file.
Update main from a copy of a library component writes some changes in the
library (the main) and some in the copy's file; the frontend commits each
part to its file, telling them apart by the changes of the copy shapes the
walk visited (F9). A swapped copy child is not visited: update main adds a
main shape for it and relinks the copy shapes to it, and those relinks,
changes of the copy, went with the library's changes. The shapes it
relinks now count as the copy's.
comp-sync-test: pushing a swap from a copy of a library component keeps
every change of the copy's shapes in the local part.
Benchmark (lower quantile, ms; baseline / now / ratio):
deepest-edit-through-three-levels 35.2 / 16.9 / 0.48
edit-through-a-chain-of-dependents 68.9 / 33.0 / 0.48
library-update-into-copies 83.1 / 40.9 / 0.49
main-edit-among-many-shapes 4.8 / 2.3 / 0.48
main-edit-into-10-copies 1.8 / 0.8 / 0.45
main-edit-into-100-copies 15.4 / 7.8 / 0.51
main-edit-into-1000-copies 153.1 / 82.2 / 0.54
variant-switch-into-copies 32.1 / 18.2 / 0.57
AI-assisted-by: claude-opus-5-5
Website • User Guide • Learning Center • Community
Youtube • Peertube • Linkedin • Instagram • Mastodon • Bluesky • X
Penpot is the open-source design platform for teams that build digital products at scale.
Penpot’s key strength lies in giving you full ownership of your design infrastructure. Built on open source and designed for self-hosting, it puts teams in complete control of their design environment supporting strict compliance and governance requirements. Whether used in the browser or deployed on your own servers, Penpot works with open standards like SVG, CSS, HTML, and JSON.
Real-time collaboration strengthens this foundation, helping teams scale and bring design closer to the product through top-tier capabilities. Additionally, developers feel at home using Penpot, because design is expressed as code, enabling a direct translation and shipping products faster.
Best-in-class native Design Tokens provide a single source of truth between design and development. They ensure consistency, improve collaboration, and make it easier to manage complex design systems.
The MCP server takes it further by enabling multi-directional workflows between design and code. A powerful open API and plugin system makes the workspace programmable, enabling automation, AI-driven workflows, and integrations with the tools and systems you already use.
With CSS Grid and Flex Layout, teams can design responsive interfaces that behave like real code from the start.
Combined, these features turn Penpot into a full-stack design platform for building scalable design systems and fully integrated product development processes.
If your organization is scaling and needs extra support, we’re here to help. Talk to us
Table of contents
Why Penpot
Penpot connects design, code, and AI workflows through a code-based approach, making designs readable by developers and AI via the MCP server. This approach helps teams ship what’s actually designed and manage design systems at scale with powerful design tokens. As a self-hosted, open-source and real-time collaboration platform, Penpot offers full flexibility, security, and ownership without vendor lock-in. Learn more about why Penpot is the platform for your team.
Plugin system
Penpot plugins let you expand the platform's capabilities, give you the flexibility to integrate it with other apps, and design custom solutions.
Designed for developers
Penpot was built to serve both designers and developers and create a fluid design-code process. You have the choice to enjoy real-time collaboration or play "solo".
Inspect mode
Work with ready-to-use code and make your workflow easy and fast. The inspect tab gives instant access to SVG, CSS and HTML code.
Integrations
Penpot offers integration into the development toolchain, thanks to its support for webhooks and an API accessible through access tokens.
Building Design Systems: design tokens, components and variants
Penpot brings design systems to code-minded teams: a single source of truth with native Design Tokens, Components, and Variants for scalable, reusable, and consistent UI across projects and platforms.
Getting started
Penpot is the only design & prototype platform that is deployment agnostic. You can use it in our SAAS or deploy it anywhere.
Learn how to install it with Docker, Kubernetes, Elestio or other options on our website.
Penpot Enterprise
Penpot Enterprise is our paid plan for organizations that need to scale their design work across multiple teams with advanced governance, security, and administration. Manage teams and access from a centralized Admin Console, configure advanced permissions, and connect your identity provider through SSO. Available for cloud and self-hosted environments, it combines enterprise controls with Penpot’s open-source foundation and open standards.
Community
We love the Open Source software community. Contributing is our passion and if it’s yours too, participate and improve Penpot. All your designs, code and ideas are welcome!
Want to go a step further? Become a Penpot Ambassador and help grow the Penpot community in your region while contributing to a global, open design ecosystem.
If you need help or have any questions; if you’d like to share your experience using Penpot or get inspired; if you’d rather meet our community of developers and designers, join our Community!
Categories include:
- Ask the Community
- Troubleshooting
- Help us Improve Penpot
- Events and Announcements
- Penpot in your language
- Education
Code of Conduct
Anyone who contributes to Penpot, whether through code, in the community, or at an event, must adhere to the code of conduct and foster a positive and safe environment.
Contributing
Any contribution will make a difference to improve Penpot. How can you get involved?
Choose your way:
- Create and share Libraries & Templates that will be helpful for the community.
- Invite your team to join.
- Give this repo a star and follow us on Social Media: Mastodon, Youtube, Instagram, Linkedin, Peertube, X and BlueSky.
- Participate in the Community space by asking and answering questions; reacting to others’ articles; opening your own conversations and following along on decisions affecting the project.
- Report bugs with our easy guide for bugs hunting or GitHub issues.
- Become a translator.
- Give feedback: Email us.
- Contribute to Penpot's code: Watch this video by Alejandro Alonso, CIO and developer at Penpot, where he gives us a hands-on demo of how to use Penpot’s repository and make changes in both front and back end.
To find (almost) everything you need to know on how to contribute to Penpot, refer to the contributing guide.
Resources
You can ask and answer questions, have open-ended conversations, and follow along on decisions affecting the project.
✏️ Tutorials
🏘️ Architecture
🧑🏫 UI Design Course
License
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (c) KALEIDOS SUBSIDIARY SL
Penpot is a Kaleidos’ open source project