From d975b1f0b696d3419f874ba10a929871176e200d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero=20Cantero?= Date: Sun, 4 Oct 2026 09:14:07 +0200 Subject: [PATCH] :bug: 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 --- backend/src/app/rpc/commands/viewer.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/viewer.clj b/backend/src/app/rpc/commands/viewer.clj index 0d1421aa0d..55c2d908a3 100644 --- a/backend/src/app/rpc/commands/viewer.clj +++ b/backend/src/app/rpc/commands/viewer.clj @@ -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] {})