Skip to content

Agentic UI: Lock the create-site WordPress version field while offline - #4332

Open
bcotrim wants to merge 3 commits into
trunkfrom
mognet/create-site-wp-version-offline-dropdown
Open

Agentic UI: Lock the create-site WordPress version field while offline#4332
bcotrim wants to merge 3 commits into
trunkfrom
mognet/create-site-wp-version-offline-dropdown

Conversation

@bcotrim

@bcotrim bcotrim commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Implemented with Claude: ported the legacy wp-version-selector offline semantics onto the create-site form, reusing the offline support wpVersionField already gained in #4284. Code and tests reviewed by me.

Proposed Changes

The WordPress version field in the agentic UI create-site form didn't account for being offline. Because the version list is fetched over the network, going offline left the field with nothing to offer and it degraded to a free-text input — you could type any version, and only "latest" can actually be installed without a download.

  • Offline, the field now locks to "latest" and is disabled, with the explanation shown as a hover tooltip — the same behavior Studio Classic's create form has, and the same the settings form got in Agentic UI: Make the site settings WordPress version field a dropdown #4284.
  • The field stays a dropdown while offline instead of degrading to free text, so there's no way to type a version that can't be installed.
  • A pre-seeded version is forced back to "latest" while offline — e.g. when a Blueprint suggestion asks for 6.7 — so the form can't submit something that would fail on creation.
  • Online behavior is unchanged, including the existing free-text fallback when the version list can't be fetched while online.
Light Dark
image image

Testing Instructions

  1. Launch Studio with the agentic UI and start creating a new site → expand Advanced settings.
  2. While online, confirm the WordPress version field is unchanged: a dropdown with "latest" plus the available versions, and still editable.
  3. Go offline (turn off Wi-Fi), then reopen the create-site form → Advanced settings.
  4. The WordPress version field should be a disabled dropdown showing "latest" — not a text input. Hover it: the tooltip reads "Changing WordPress version requires an internet connection."
  5. Still offline, start the flow from a Blueprint that suggests a specific version (e.g. 6.7) — the field should force back to "latest" rather than keeping the suggested version.
  6. Create the site while offline and confirm it succeeds on the latest bundled version.
  7. Go back online — the field should re-enable and list the fetched versions again.
  8. Check the field 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 24, 2026
@bcotrim
bcotrim marked this pull request as draft July 24, 2026 13:56
@wpmobilebot

wpmobilebot commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing f364a04 vs trunk

app-size

Metric trunk f364a04 Diff Change
App Size (Mac) 1377.87 MB 1377.87 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk f364a04 Diff Change
load 1071 ms 1098 ms +27 ms ⚪ 0.0%

site-startup

Metric trunk f364a04 Diff Change
siteCreation 6987 ms 7006 ms +19 ms ⚪ 0.0%
siteStartup 2344 ms 2342 ms 2 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@bcotrim
bcotrim marked this pull request as ready for review July 24, 2026 16:11
@bcotrim
bcotrim requested review from nightnei and sejas July 24, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants