Conversation
When creating a site via the desktop app with a blueprint that references local resources (e.g. "./koinonia.zip"), Playground couldn't find the files because the blueprint was written to a temp file, losing the original directory context. This threads the original blueprint file path from the renderer through IPC to the CLI via a hidden --original-blueprint-path flag, so relative resources resolve from the correct directory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📊 Performance Test ResultsComparing ef4f6ee vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
bcotrim
left a comment
There was a problem hiding this comment.
The changes make sense but I wonder if we could write the absolute paths in the tmp blueprint file, to avoid the new field.
It seems like a more contained change, with a clear intention.
What do you think?
|
I think using a parameter is a better solution. The issue I see with copying other files is that it needs to work across many different steps, and copying them to /tmp could also cause us to hit disk size limits. Some themes or imports could be large. The parameter is hidden, so it won’t be accessible directly from the CLI. The parameter solution is a solution suggested in STU-1458 |
bcotrim
left a comment
There was a problem hiding this comment.
I think using a parameter is a better solution. The issue I see with copying other files is that it needs to work across many different steps, and copying them to /tmp could also cause us to hit disk size limits. Some themes or imports could be large.
I meant changing the paths in the blueprints to be absolute paths instead of relative ones.
But the current approach works and it's clean, so LGTM 👍
Related issues
How AI was used in this PR
Claude was used to trace the blueprint path flow across renderer → IPC → CLI, identify the root cause (temp file losing original directory context), and implement the fix. All code was reviewed and tested manually.
Proposed Changes
originalBlueprintPaththroughcreateSiteIPC →SiteServer.create()→createSiteViaCli()--original-blueprint-pathnew hidden CLI parameter so the CLI uses the original directory for resolving relative resources (e.g../koinonia.zip)Testing Instructions
koinonia.zip) to the same directory (e.g.~/Downloads/).{ "$schema": "https://playground.wordpress.net/blueprint-schema.json", "login": true, "siteOptions": { "blogname": "Koinonia" }, "steps": [ { "step": "resetData" }, { "step": "installTheme", "themeData": { "resource": "bundled", "path": "./koinonia.zip" }, "options": { "activate": true } } ] }npm startinstallThemestep resolves the local zip)local-blueprint-relative-path.mp4
Pre-merge Checklist