Andrey Antukh 96c44c4c30
🐛 Trim linked-library data in view-only bundle for share links (#11627)
* 🐛 Trim linked-library data in view-only bundle for share links

The anonymous get-view-only-bundle RPC merged each linked library whole,
exposing library pages the share link never granted. For share-link
permissions, each library is now reduced to the narrow data keys with
its own pages dropped and only the components referenced by the allowed
pages kept (nested references followed); membership bundles are
unchanged.

Closes #11617

AI-assisted-by: muse-spark-1.3-contributor

* 🐛 Resolve nested library components via main instance in bundle trim

Stored components carry no objects, so the transitive walk missed nested
components. Follow references through the main-instance subtree instead,
share the narrow data keys between the primary and library scopes, and
cover component filtering with a real-instance RPC test.

Review follow-ups F1-F3 for #11617

AI-assisted-by: muse-spark-1.3-contributor

* 🐛 Address review findings on view-only library trim

Hoist invariant refs out of the fixpoint, make the cross-library
main-instance fallback deterministic, pin the trimmed envelope,
and add RPC tests for disallowed-page isolation and
cross-library nesting.

Follow-ups to #11617

AI-assisted-by: muse-spark-1.3-contributor

* ♻️ Index libraries by id with d/index-by

Replace the manual into/juxt index with the shared helper.
No behavior change.

AI-assisted-by: muse-spark-1.3-contributor
2026-09-22 14:43:04 +02:00
..
2026-09-22 10:22:31 +02:00
2026-09-22 10:22:31 +02:00
2024-05-29 19:05:04 +02:00