mirror of
https://github.com/penpot/penpot.git
synced 2026-10-03 01:06:14 +00:00
* 🐛 Gate pastes on page load and harden base-shape lookup Pasting while the workspace is still opening crashed the session: the layer-order lookup called rseq on a missing root children list. Ignore paste events until the page objects are loaded (the clipboard keeps its content, so retrying works), return empty instead of throwing from the shared layer-order helpers, and fall back to pasting at the pointer position when the selection is detached from the shape tree. Selecting the page root keeps working as before through the frame branches. Closes #11666 AI-assisted-by: muse-spark-1.3-contributor * 🐛 Cover props paste and root-plus-other in paste guards Address review follow-ups on the paste-before-init fix: gate props pasting on page readiness like the shape entries, and route root-plus-other selections without a base shape to the pointer fallback instead of the unguarded else branch. Pin single-root selection to the frame path with a regression test. Closes #11666 AI-assisted-by: muse-spark-1.3-contributor * ♻️ Hoist page lookup out of paste-shapes gate Bind page and page-objects once in an outer let instead of calling lookup-page twice (once for the readiness gate and once inside the body). No behavior change. AI-assisted-by: muse-spark-1.3-contributor * ♻️ Reuse bound ids in paste-shapes page lookup Bind file-id and page-id once and pass them to the lookup-page arity that takes both, instead of resolving the page twice and rebinding file-id in the inner let. No behavior change. AI-assisted-by: muse-spark-1.3-contributor