Skip to content

Add studio create --from for static sources - #4725

Merged
chubes4 merged 7 commits into
trunkfrom
feat/create-from-static-source
Aug 30, 2026
Merged

Add studio create --from for static sources#4725
chubes4 merged 7 commits into
trunkfrom
feat/create-from-static-source

Conversation

@chubes4

@chubes4 chubes4 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add studio create --from <path> for compiled site artifacts, static directories, zip archives, and Data Liberation capture directories
  • stage the canonical static-site-importer/import request and invoke one wp static-site-importer import --request=.studio-import/request.json host command
  • leave source normalization, dependency materialization, bounded continuation, canonical block generation, persistence, and terminal receipts inside Static Site Importer
  • validate the terminal static-site-importer/import-cli-receipt/v1 response, preserve failed requests for matching reruns, and clean staging after success
  • support local SSI packages through --static-site-importer-path and alternate release URLs through --static-site-importer-url
  • keep native imports observable and bounded through live WP-CLI output with a retained 64 KiB diagnostic tail

Importer 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 main also contains three changes that postdate v1.8.3:

  • #1421 updates the PHP transformer to 0.8.2
  • #1412 builds release ZIPs from the runtime package profile
  • #1416 adds the portable source manifest contract

This PR should pin the next SSI release containing those changes before merge. Until then, --static-site-importer-path provides 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.

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.
@wpmobilebot

wpmobilebot commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 4493b03 vs trunk

app-size

Metric trunk 4493b03 Diff Change
App Size (Mac) 1422.68 MB 1422.70 MB +0.02 MB ⚪ 0.0%

site-editor

Metric trunk 4493b03 Diff Change
load 1192 ms 1223 ms +31 ms ⚪ 0.0%

site-startup

Metric trunk 4493b03 Diff Change
siteCreation 7514 ms 7499 ms 15 ms ⚪ 0.0%
siteStartup 3372 ms 3369 ms 3 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@chubes4
chubes4 merged commit cb9273f into trunk Aug 30, 2026
8 of 13 checks passed
@chubes4
chubes4 deleted the feat/create-from-static-source branch August 30, 2026 04:42
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.

2 participants