Skip to content

Add blueprints library to agentic UI - #4701

Open
katinthehatsite wants to merge 10 commits into
trunkfrom
fix/bring-back-blueprints-library
Open

Add blueprints library to agentic UI#4701
katinthehatsite wants to merge 10 commits into
trunkfrom
fix/bring-back-blueprints-library

Conversation

@katinthehatsite

@katinthehatsite katinthehatsite commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Related issues

Fixes STU-2321/

How AI was used in this PR

It was used to port the feature from the classic UI.

Proposed Changes

This PR brings the blueprints library to the agentic UI:

CleanShot 2026-08-31 at 17 57 44@2x

Testing Instructions

  • Pull the changes from this branch
  • Start Studio with npm start
  • Enable the agentic UI
  • Click on Create site and confirm that you can see the options to do it with blueprint.
  • Select qny option to either select one of the blueprints from the blueprints library or what you have the option to upload a file

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@katinthehatsite katinthehatsite self-assigned this Aug 27, 2026
@katinthehatsite
katinthehatsite marked this pull request as draft August 27, 2026 08:46
@wpmobilebot

wpmobilebot commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing a4ed85a vs trunk

app-size

Metric trunk a4ed85a Diff Change
App Size (Mac) 1425.05 MB 1425.07 MB +0.02 MB ⚪ 0.0%

site-editor

Metric trunk a4ed85a Diff Change
load 1183 ms 1203 ms +20 ms ⚪ 0.0%

site-startup

Metric trunk a4ed85a Diff Change
siteCreation 7502 ms 7538 ms +36 ms ⚪ 0.0%
siteStartup 3370 ms 3370 ms 0 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@katinthehatsite
katinthehatsite requested a review from a team August 27, 2026 12:13
@katinthehatsite
katinthehatsite marked this pull request as ready for review August 27, 2026 12:13

@gcsecsey gcsecsey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While testing, I ran into an issue both while trying to select a blueprint from the gallery, and when trying to upload a blueprint.

I got this error for the gallery:

Image
[2026-08-27T16:18:14.660Z][erro][main] Error occurred in handler for 'createSite': CliCommandError: [Last error message] Failed to start WordPress server: Path referenced in the Blueprint was not found in the execution context: ./kentwood.zip
  [Base message] Failed to create site
  [stdout] Would have recorded Tracks event: studio_site_start {
  platform: 'darwin',
  arch: 'arm64',
  app_version: '1.19.0',
  is_a11n: false,
  channel: 'studio-ui',
  ui_version: 'v2',
  success: false,
  failure_reason: 'unknown',
  time_ms: 1321
}
  [Exit code] 1

And this one for the blueprint upload:

Image
[2026-08-27T16:19:27.049Z][erro][main] Error occurred in handler for 'createSite': CliCommandError: [Last error message] Failed to start WordPress server: Invalid Blueprint v1 provided. See the validation errors below:
Blueprint root["steps"][0]["pluginData"]:
Value did not match any of the allowed shapes: FileReference, DirectoryReference.
Property "resource" must be one of [vfs, literal, wordpress.org/themes, wordpress.org/plugins, url, bundled], but it was "git:directory".
  [Base message] Failed to create site
  [stdout] Would have recorded Tracks event: studio_site_start {
  platform: 'darwin',
  arch: 'arm64',
  app_version: '1.19.0',
  is_a11n: false,
  channel: 'studio-ui',
  ui_version: 'v2',
  success: false,
  failure_reason: 'unknown',
  time_ms: 1016
}
  [Exit code] 1

I'll investigate these further and push a fix if I found the root cause.

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

Thanks for testing @gcsecsey - I saw some errors as well but it was not these ones so I disabled some blueprints that threw other errors 👍 Maybe it does not take bundled blueprint or something?

@Poliuk

Poliuk commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@katinthehatsite, where are we pulling the blueprints from? We need to curate them to make sure every blueprint that we show is great

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@Poliuk they are coming from https://blueprintlibrary.wordpress.com/ through the API but some of them are not enabled because of the error they were throwing. The ones meant for Studio have Studio category. Some of them are also set to drafts: https://blueprintlibrary.wordpress.com/wp-admin/edit.php?post_type=blueprint

It is fairly easy to disable them as they come from the client side. They can be turned off and on within seconds through that site if something does not work.

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@gcsecsey it should not be resolve, the issue was related to processing bundleUrls that come from the blueprints library. Would you be able to give it another test?

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@shaunandrews any feedback for the UI is also welcome 🙇 feel free to make direct changes to this PR

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@gcsecsey Just a note is that I resolve the issue with the University website blueprint (the one resolved through the library) and I tested with blueprint file (attached to this message) and no longer saw the issues.

If you still see the issue with the blueprint file you shared, could you please paste it here and I can take a look? thanks!

@gcsecsey gcsecsey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @katinthehatsite! I tested again with a couple blueprints from the gallery, and it's working well.

University Photo gallery
Image Image

Sorry I forgot to share earlier that I got the validation error when trying to upload the Cookbook blueprint.

For that I'm still getting the same error when trying to create the site. I checked that when we upload the Blueprint, at the selector we validate against the schema from @wp-playground/blueprints. But then when the site is created, blueprints.phar has a different schema.

I also tested with the blocky formats blueprint, which causes a validation error at the selector.

Selector error Site creation error
Image Image

I think it'd be worth unifying in a follow-up, but the user will get the same validation error, so this is just about when to surface it.

@shaunandrews

Copy link
Copy Markdown
Contributor

Could we add these below the existing create a site screen instead of introducing a new option and screen?

@gavande1

Copy link
Copy Markdown
Contributor

@katinthehatsite Would you be able to finish this, or would you like me to take it forward?

@gavande1

Copy link
Copy Markdown
Contributor

I am taking over this task.

…step

Choosing a Blueprint is part of deciding what kind of site to add, so the
gallery now sits under the four options rather than behind a card leading to a
separate screen. That screen goes back to redirecting to Create, as it did
before this branch.
@gavande1

gavande1 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@shaunandrews I removed the separate Blueprint screen. The Blueprints now sit on the Add a site screen below the four options, and uploading your own is one of the tiles there. Let me know if you would rather see them below the create site form instead.

CleanShot 2026-08-31 at 17 57 44@2x

cc @katinthehatsite

@gavande1 gavande1 self-assigned this Aug 31, 2026
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.

6 participants