mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-01 21:05:42 +09:00
This PR reduces user-site publish time by sharing CLI startup between sync and build, reducing asset downloads when hosted builds do not need them, and testing smaller publish artifacts. The paired [SaaS PR #685](https://github.com/webstudio-is/webstudio-saas/pull/685) uses the combined CLI path when the Builder artifact advertises support; older artifacts keep the existing split path. The paired staging publish served HTML and JavaScript successfully. The combined CLI step took 4 s versus about 8 s for the previous split steps in that run; total publish time remained about 40 s. This is one observation, not a controlled benchmark or a large-site measurement. Local artifact pruning reduced the compressed archive from 119 MiB to 111 MiB (6.7%); it was not adopted. The full artifact is still downloaded and extracted on every publish. ## Checklist - [x] Preserve standalone sync/build behavior and gate combined sync/build with an artifact capability marker. - [x] Skip hosted asset downloads only when content indexing does not need them; preserve static and MDX-required downloads. - [x] Test CLI startup, synthetic build, and artifact-size opportunities; record why no riskier change was adopted. - [x] Verify the paired staging publish and review Builder documentation. - [x] Keep only the E2E schema snapshot matching current inputs; no migration source or migration was added. - [x] Retry the failing `pages-drag` shard: all 17 tests passed, including the drag-and-nest test. - [x] Resolve the two outdated review threads; current code retains finding details and closes diagnostics on element navigation. - [x] Required CI on the cleanup commit passed, including all Builder E2E shards, visual regression, and the existing migration-chain check. - [ ] Run the agent evaluation suite only after separate approval; remind the user before merging. No large-site publish or production release has been tested.
Webstudio Fixtures
Fixtures are test projects that ensure the CLI and build process work correctly across different deployment targets.
Updating Fixtures After Changes
# From repository root - updates all fixtures
pnpm fixtures
This command will:
- Link all fixtures to their respective projects
- Sync the latest data from the development environment
- Build all fixtures with the latest code
Working with Individual Fixtures
# Go to fixture folder
cd fixtures/webstudio-features
# Link to project
pnpm fixtures:link
# Sync latest data
pnpm fixtures:sync
# Build fixture
pnpm fixtures:build
# Start it
pnpm run dev
Adding Assets to Fixtures
To add a new asset (image, video, audio, etc.) to a fixture:
-
Publish to staging
- Make your changes in the builder
- Publish to the staging environment
-
Get the build ID from CI
- After publishing, check the CI logs
- Find the build ID that was created
-
Update the fixture's build ID
- Edit
fixtures/[fixture-name]/package.json - Update the
--buildIdparameter in thefixtures:syncscript
"fixtures:sync": "pnpm cli sync --buildId NEW_BUILD_ID_HERE && pnpm oxfmt ./.webstudio/" - Edit
-
Sync with the correct environment
# Go to fixture folder cd fixtures/webstudio-features # Sync from staging environment (replace with your branch) BUILDER_HOST=fix-assets.staging.webstudio.is pnpm run fixtures -
Fix the origin URL
- After syncing, edit
.webstudio/data.json - Change the origin back to:
"origin": "https://main.development.webstudio.is"- This is necessary because sync changes it to the current branch
- After syncing, edit
-
Commit the changes
git add fixtures/ git commit -m "chore: update fixtures with new assets" git push