Skip to content

Split the WordPress version setting into an update mode and a version picker - #4752

Open
gcsecsey wants to merge 18 commits into
trunkfrom
gcsecsey/separate-wp-update-mode-from-version
Open

Split the WordPress version setting into an update mode and a version picker#4752
gcsecsey wants to merge 18 commits into
trunkfrom
gcsecsey/separate-wp-update-mode-from-version

Conversation

@gcsecsey

@gcsecsey gcsecsey commented Sep 1, 2026

Copy link
Copy Markdown
Member

Related issues

How AI was used in this PR

I used Opus 5 for implementation and tests.

Proposed Changes

The WordPress version setting mixes two decisions: whether the site updates itself, and which version it is pinned to. #4702 fixes the wording of the single dropdown, but the two decisions still share one control.

This PR splits them into an Automatic updates toggle and a version picker that's only shown when the toggle is off, so the picker only ever means "pin this version". While auto-update is on, the field reports the version the site runs.

  • Without a version list (no network, no cached versions) the control degrades to the old plain dropdown.
  • Turning auto-update off seeds the picker with the version the site already runs, or with the newest stable release for a site that does not exist yet. Beta or nightly are never set as defaults.

Testing Instructions

  • Open a site, then Settings
  • Check that if Automatic updates is on, the field shows Installed version: <version>.
  • Turn the toggle off
  • Check that the Version picker appears, preselected to the version the site runs
  • Pick another version and check that Save settings becomes enabled
  • Go back, add a site, and open Advanced settings
  • Check the same toggle, and that turning it off preselects the newest stable release
State Light Dark
Agentic UI settings auto-update CleanShot 2026-09-02 at 15 48 25@2x CleanShot 2026-09-02 at 15 50 34@2x
Agentic UI settings pinned version CleanShot 2026-09-02 at 15 50 22@2x CleanShot 2026-09-02 at 15 50 29@2x
Agentic UI new site auto-update CleanShot 2026-09-02 at 15 51 00@2x CleanShot 2026-09-02 at 15 50 43@2x
Agentic UI new site pinned version CleanShot 2026-09-02 at 15 50 58@2x CleanShot 2026-09-02 at 15 50 54@2x
Classic UI settings auto-update CleanShot 2026-09-02 at 15 45 08@2x CleanShot 2026-09-02 at 15 43 58@2x
Classic UI settings pinned version CleanShot 2026-09-02 at 16 14 04@2x CleanShot 2026-09-02 at 15 44 57@2x
Classic UI new site auto-update CleanShot 2026-09-02 at 15 44 28@2x CleanShot 2026-09-02 at 15 44 15@2x
Classic UI new site pinned version CleanShot 2026-09-02 at 15 44 31@2x CleanShot 2026-09-02 at 15 44 35@2x

Pre-merge Checklist

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

Copilot AI 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.

🟡 Changes recommended

The automatic-update description is not programmatically associated with its radio control for screen-reader users.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Splits the Agentic UI’s WordPress setting into update mode and pinned-version controls.

Changes:

  • Adds automatic-update and version-selection radio choices.
  • Handles unknown and unavailable versions safely.
  • Adds responsive styling, dark-theme colors, and focused tests.
File summaries
File Description
apps/ui/src/index.css Styles radio controls across themes.
apps/ui/src/components/site-overview-view/index.test.tsx Tests settings interactions and edge cases.
apps/ui/src/components/site-fields/wp-version-control.tsx Implements the split controls.
apps/ui/src/components/site-fields/style.module.css Lays out the new controls.
apps/ui/src/components/site-fields/index.ts Builds current and unknown version options.
apps/ui/src/components/site-fields/index.test.ts Tests generated version options.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread apps/ui/src/components/site-fields/wp-version-control.tsx Outdated
@gcsecsey
gcsecsey marked this pull request as ready for review September 2, 2026 15:18
@gcsecsey
gcsecsey requested review from a team, shaunandrews and wojtekn September 2, 2026 15:28
@shaunandrews

shaunandrews commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

I don't think the toggle switch works; it adds extra complexity, hiding and showing controls, along with the broken/janky layout when controls pop into row.

image

^^ That is not something I would be comfortable shipping.

--

I still strongly suggest the radio buttons, and avoiding the side-by-side rows:
image

I only showed the toggle option previously to rule it out; not entice implementation. Sorry about that.

@shaunandrews

Copy link
Copy Markdown
Contributor

Mostly, we should be aiming towards an end state as shown in #4747

image image

…alue' into gcsecsey/separate-wp-update-mode-from-version-v1

# Conflicts:
#	apps/cli/lib/wp-version-option.ts
#	apps/studio/src/components/wp-version-selector/index.tsx
#	apps/studio/src/modules/add-site/components/create-site-form.tsx
#	apps/studio/src/modules/site-settings/edit-site-details.tsx
#	apps/studio/src/modules/site-settings/tests/edit-site-details.test.tsx
#	apps/ui/src/components/site-fields/index.test.ts
#	apps/ui/src/components/site-fields/index.ts
#	apps/ui/src/components/site-fields/wp-version-control.tsx
#	apps/ui/src/components/site-overview-view/index.test.tsx
#	packages/common/lib/wordpress-version-labels.ts
#	skills/studio-cli/SKILL.md
Base automatically changed from gcsecsey/accept-auto-update-wp-value to trunk September 3, 2026 13:34
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing fc37fea vs trunk

app-size

Metric trunk fc37fea Diff Change
App Size (Mac) 1426.01 MB 1425.97 MB 0.04 MB ⚪ 0.0%

site-editor

Metric trunk fc37fea Diff Change
load 1199 ms 1216 ms +17 ms ⚪ 0.0%

site-startup

Metric trunk fc37fea Diff Change
siteCreation 7528 ms 7538 ms +10 ms ⚪ 0.0%
siteStartup 3369 ms 3365 ms 4 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@gcsecsey

gcsecsey commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@shaunandrews I updated the site settings pages and create site modals, to bring them closer to the end result you shared. WDYT about this layout?

Classic UI Edit site modal:

CleanShot.2026-09-03.at.18.35.38.mp4

Classic UI add site screen:

CleanShot 2026-09-03 at 18 36 51@2x

Agentic UI site settings pane:

narrow width wide width
CleanShot 2026-09-03 at 18 36 05@2x CleanShot 2026-09-03 at 18 36 23@2x

Agentic UI create site screen:

CleanShot 2026-09-03 at 18 36 34@2x

@wojtekn

wojtekn commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@gcsecsey I think this UI is much easier to understand. However, I would still display the version that will be installed, as now, it can surprise the user. Also, spacing between elements seems odd:

CleanShot 2026-09-04 at 13 48 30@2x

@shaunandrews

shaunandrews commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Looks great! Some spacing issues:

image

There's all this extra white-space on the left/right that we don't need.

image

Can we clean up all of these different spacing values? We need to define a system.

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.

5 participants