mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 22:10:34 +00:00
🐛 Keep the branch column out of a trimmed library's envelope
The viewer test that develop carries, share-link-bundle-trims-linked- libraries, pins the envelope keys a trimmed library may expose, and the branching column :is-branch is not one of them: whether the source file of a library is a branch is not something a share-link viewer may read. The column exists only on this stack, so develop's test could not see it and the collision appears only on the rebase. trim-library-data drops it. A library a branch links is materialised, so the column is false there anyway; dropping it is about the envelope, not about hiding a value. backend-tests.rpc-viewer-test: 11 tests, 95 assertions, 0 failures. AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
1410d66ca2
commit
d975b1f0b6
@ -94,9 +94,13 @@
|
||||
never grants pages of a library), and keep only the components
|
||||
referenced by the allowed pages of the primary file. Envelope metadata
|
||||
outside `:data` (name, project, sync state) is intentionally preserved:
|
||||
the viewer client needs it and it carries no design content."
|
||||
the viewer client needs it and it carries no design content. The
|
||||
branching column `:is-branch` is dropped: whether the source file of a
|
||||
library is a branch says nothing a share-link viewer may read, and a
|
||||
library a branch links is materialised so the column is false there."
|
||||
[used-refs {:keys [id] :as lib}]
|
||||
(-> lib
|
||||
(dissoc :is-branch)
|
||||
(update :data select-keys view-only-data-keys)
|
||||
(assoc-in [:data :pages] [])
|
||||
(assoc-in [:data :pages-index] {})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user