Skip to content

fix(app): render preview backgrounds inside sandbox - #11

Merged
Richardpwe merged 1 commit into
masterfrom
agent/fix-preview-background
Aug 11, 2026
Merged

fix(app): render preview backgrounds inside sandbox#11
Richardpwe merged 1 commit into
masterfrom
agent/fix-preview-background

Conversation

@Richardpwe

Copy link
Copy Markdown
Member

What changed

  • render the selected preview background inside the opaque sandbox runner
  • keep uploaded background images in a closed shadow root
  • update backgrounds through the session-bound runner channel without reloading the Graphic
  • bump the preview protocol to v4 and cache-bust the runner assets
  • reject oversized image uploads before they reach the runner
  • add Playwright coverage for checker, solid colors, image uploads, session reuse, and shadow-root isolation

Why

Chromium composites a sandboxed opaque-origin iframe onto a white top-level canvas. The parent preview background therefore remained hidden even though the picker state and parent styles changed correctly.

Impact

Transparent Graphics now show the selected background. The iframe remains sandbox="allow-scripts" without same-origin access, and background changes do not remount the Graphic or create a new preview session.

Checks

  • npm run release:check
  • 125 app unit tests
  • 115 core tests
  • 9 Playwright tests
  • app/core build and core tarball smoke
  • full and production npm audits: 0 vulnerabilities

@Richardpwe
Richardpwe marked this pull request as ready for review August 11, 2026 20:47
@Richardpwe
Richardpwe merged commit 40ead30 into master Aug 11, 2026
4 checks passed
@Richardpwe
Richardpwe deleted the agent/fix-preview-background branch August 11, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant