Skip to content

Fix staged binary assets in browser previews - #1939

Merged
chubes4 merged 1 commit into
mainfrom
fix/1935-staged-binary-preview
Jul 21, 2026
Merged

Fix staged binary assets in browser previews#1939
chubes4 merged 1 commit into
mainfrom
fix/1935-staged-binary-preview

Conversation

@chubes4

@chubes4 chubes4 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the programmatic Playground preview on one PHP instance so setup/materialization writes and browser HTTP requests observe the same VFS
  • add a browser-level integration that stages a real PNG and HTML under WordPress uploads
  • verify intrinsic dimensions, visible geometry, and exact canvas-painted RGBA bytes

Root cause

materializePlaygroundStagedInputs() writes staged binary bytes through the primary PHP instance. The programmatic request handler previously allowed secondary PHP instances for browser HTTP requests; those instances did not receive post-boot VFS writes, so staged HTML/CSS could load while PNG/JPEG assets failed.

Setting maxPhpInstances: 1 makes runtime setup, staged input materialization, and browser preview requests share one coherent filesystem.

Closes #1935.

Verification

  • npm run build
  • npm run test:playground-staged-upload-preview
  • npx tsx tests/staged-input-materialization.test.ts
  • npm run test:browser-visual-compare-capture-reliability
  • npm run test:playground-readonly-mounts-integration
  • Linux Lab: npm run test:playground-staged-upload-preview

Focused Fisiostetic Lab rerun with this branch:

  • source images: 26/26 loaded, 0 failed (previously 15 loaded, 11 failed)
  • candidate images: 17/17 loaded, 0 failed
  • source/candidate capture readiness: high
  • mismatch: 11.90% (837041/7036160), improved from 19.58% (1377921/7036160) without Blocks Engine or SSI changes

The remaining mismatch is real source/candidate geometry rather than missing source assets.

AI assistance

  • AI assistance: Yes
  • Tool: OpenAI GPT-5.6 Sol via OpenCode
  • Used for: Root-cause analysis, implementation, integration coverage, and Lab verification.

@chubes4
chubes4 merged commit 4cdad6a into main Jul 21, 2026
4 checks passed
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.

Serve staged binary assets during visual-compare source capture

1 participant