Skip to content

Agentic UI: Create blank or Blueprint sites - #4177

Merged
bcotrim merged 18 commits into
trunkfrom
harden-agentic-site-creation
Jul 17, 2026
Merged

Agentic UI: Create blank or Blueprint sites#4177
bcotrim merged 18 commits into
trunkfrom
harden-agentic-site-creation

Conversation

@bcotrim

@bcotrim bcotrim commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Codex helped compare the original umbrella PR with current trunk, implement the scoped first increment, and add focused coverage. The resulting behavior, cleanup paths, and tests were manually reviewed. The updated visual design still needs human review in both color schemes.

Proposed Changes

  • Give users one Create flow for blank sites and uploaded JSON or ZIP Blueprints, including full-window drop, replacement, removal, reset of prior untouched suggestions, and Blueprint deep-link handoff.
  • Preserve user-entered values while applying Blueprint suggestions only to pristine fields, and retain the existing path and WordPress-version reliability behavior.
  • Keep temporary uploads safe across selection, replacement, cancellation, creation, and failure recovery.
  • Make creation progress accessible, prevent route interaction and closing while creation is active, restore the flow after failure, and manage focus between onboarding routes.
  • Simplify onboarding around the currently working Create and Import jobs, redirect the legacy Blueprint route into Create, and remove the unused gallery surface.
  • Bring the updated onboarding design into the reduced flow with the animated dot-grid backdrop, illustrated job cards, frosted panels, responsive layouts, persistent footer actions, and compact Blueprint picker.

Testing Instructions

  1. Open onboarding and confirm the home screen shows the dot-grid backdrop, illustrated Create and Import cards, and persistent Back action when existing sites are present. Start Create and create a blank site.
  2. Select JSON and ZIP Blueprints using the inline picker and full-window drop target. Confirm the selected file can be replaced or removed and that ZIP-relative assets still resolve during creation.
  3. Edit the site name or path before selecting a Blueprint. Confirm suggestions fill pristine fields without overwriting dirty fields.
  4. Open a Blueprint deep link and confirm it hands the uploaded Blueprint to /onboarding/create.
  5. During creation, confirm the visible status is announced, route content is inert, Close is disabled, and route headings receive focus. Force a failure and confirm the form recovers.
  6. Confirm uploaded and extracted temporary files are cleaned after invalid uploads, stale selections, replacement, removal, success, and failure.
  7. Check the Create flow, selected Blueprint state, drop overlay, advanced settings, and progress state in both light and dark color schemes.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@bcotrim bcotrim self-assigned this Jul 10, 2026
@bcotrim bcotrim changed the title Harden agentic site creation Jul 13, 2026
Comment thread apps/local/src/index.ts Fixed
@bcotrim bcotrim changed the title Unify blank and Blueprint site creation Jul 13, 2026
@bcotrim
bcotrim marked this pull request as ready for review July 13, 2026 19:33
@bcotrim
bcotrim requested review from a team and katinthehatsite July 13, 2026 19:34
@wpmobilebot

wpmobilebot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 3cea8eb vs trunk

app-size

Metric trunk 3cea8eb Diff Change
App Size (Mac) 1353.04 MB 1354.35 MB +1.30 MB 🔴 0.1%

site-editor

Metric trunk 3cea8eb Diff Change
load 1086 ms 1090 ms +4 ms ⚪ 0.0%

site-startup

Metric trunk 3cea8eb Diff Change
siteCreation 7017 ms 6992 ms 25 ms ⚪ 0.0%
siteStartup 2353 ms 2358 ms +5 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

return {
...base,
error: __(
'The directory is already associated with another Studio site. Please choose a different site name or a custom local path.'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't know if it is intentional but just noting that the error does not have a strong visibility so it might not be easy for the user to distinguish it:

Image
const field: Field< T > = {
id: 'wpVersion',
type: 'text',
label: __( 'WordPress version' ),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When you expand this field to choose a different option from the dropdown, the PHP version field that is located nearby jumps down a bit:

Image

Once you close the dropdown, it jumps back

type: 'text',
label: __( 'WordPress version' ),
placeholder,
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, as a sidenote, the design of these field is different e.g. we can see it when looking at the scrollbar:

Image Image
adminPassword: 'first-password',
adminEmail: 'first@example.com',
} );
fireEvent.change( screen.getByLabelText( /Admin username/ ), {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it is not a comment for this specific line, but just noting that in the original create-site form, when there is an error related to admin username field e.g. it is empty, the neighbouring Admin password field jumps down:

Image

Additionally, this error looks different from the Local path error:

Image

It would be nice if we can ensure consistency in this case

return (
<>
<h1>{ page }</h1>
<button type="button" onClick={ () => setProgress( 'Creating site…' ) }>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This button seems to visually overlap with whatever is on top of the create site screen, sometimes with the site title which I think does not look great:

Image

Perhaps it could either replace the content on the screen or push it down if the button sticks to the top or we could find some sort of alternative approach

}

if ( ! isZip ) {
throw new Error( __( 'Please select a Blueprint JSON or ZIP bundle.' ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps we could make this error a bit clearer e.g. The provided file is not valid. Please select a Blueprint JSON or ZIP bundle.

Because if the user drops the file that is not valid, then see this error but the button to Create site is still enabled, they might assume that the blueprint file was used. Additionally, we could consider making the error more prominent

return {
...base,
error: __(
'This directory is not empty. Please select an empty directory or an existing WordPress folder.'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These two descriptions / errors are centered differently:

Image

Perhaps we could also ensure consistency for that case.

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The flow to create a site either with or without blueprints worked for me and I did not encounter issues there 👍

I had some UI inconsistencies which I noted down in the comments so once these are addressed, I think this will be in a good shape for merging.

One thing to note is that we also don't have blueprints gallery in this PR: not sure if it was intentional or not so just leaving it here as an observation.

@bcotrim

bcotrim commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

The flow to create a site either with or without blueprints worked for me and I did not encounter issues there 👍

I had some UI inconsistencies which I noted down in the comments so once these are addressed, I think this will be in a good shape for merging.

Thanks for the thorough testing, I've addressed the issues. Could you take another look please? 🙇

One thing to note is that we also don't have blueprints gallery in this PR: not sure if it was intentional or not so just leaving it here as an observation.

The blueprint gallery was removed based on the latest exploration pfHvTO-1wR-p2 and the Design Preview PR: #3975

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for addressing the feedback 👍

I tested everything thoroughly again and I think this is good to go 👍

The error and the form is much more consistent:

Image

I would maybe think more about improving Creating site progress screen but it does not need to be handled in this PR and can be explored separately

@bcotrim
bcotrim enabled auto-merge (squash) July 17, 2026 10:51
@bcotrim
bcotrim merged commit e8933b2 into trunk Jul 17, 2026
13 checks passed
@bcotrim
bcotrim deleted the harden-agentic-site-creation branch July 17, 2026 11:33
@bcotrim bcotrim mentioned this pull request Jul 30, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants