Add studio create --from for static sources - #4725
Merged
Merged
Conversation
Create a site directly from a static source on disk: a compiled site artifact directory, a plain static directory, a zip, or a Figma file. The source is staged into the site, materialized into a block theme by the Static Site Importer, and the staging directory is cleaned up. Remote URLs are out of scope here. `resolveStaticSiteImporterSource` rejects them, because a URL has to be rendered into a local source before SSI can materialize it. That rendering step lands separately. `resolveDataLiberationWebsiteRoot` reads `websiteRoot` from a capture receipt when the source directory has one, so an existing liberation on disk imports without the caller knowing its internal layout, and falls back to the directory itself for any other static source. Also adds `canonicalizeBlocks`, which serializes content through the target site's own block registry so imported markup matches what the editor would save.
chubes4
marked this pull request as ready for review
August 29, 2026 16:57
This was referenced Aug 29, 2026
Collaborator
📊 Performance Test ResultsComparing 4493b03 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) |
This was referenced Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
studio create --from <path>for compiled site artifacts, static directories, zip archives, and Data Liberation capture directoriesstatic-site-importer/importrequest and invoke onewp static-site-importer import --request=.studio-import/request.jsonhost commandstatic-site-importer/import-cli-receipt/v1response, preserve failed requests for matching reruns, and clean staging after success--static-site-importer-pathand alternate release URLs through--static-site-importer-urlImporter version
The branch currently defaults to Static Site Importer v1.8.2, which contains the unified import command from Static Site Importer #1385, but that pin is stale.
Static Site Importer v1.8.3 subsequently shipped source-fidelity, standalone-materializer, form-topology, visual-comparison, and PHP transformer 0.8.1 updates. SSI
mainalso contains three changes that postdate v1.8.3:This PR should pin the next SSI release containing those changes before merge. Until then,
--static-site-importer-pathprovides the complete paired package used by the end-to-end verification.URL capture remains a Data Liberation concern: it produces a portable local source directory for this command. Figma input remains outside the canonical import command contract.
Verification
AI assistance
OpenAI GPT-5.6 Sol via OpenCode refactored the Studio integration to the unified SSI CLI boundary, rewrote the focused tests, verified the end-to-end import, and updated this description against the landed SSI contracts and current diff. Chris Huber directed and reviewed the work.