Skip to content

Move createSiteFromRemote from feature flag to beta flag - #2078

Merged
sejas merged 11 commits into
trunkfrom
update/stu-984-studio-move-the-new-create-site-and-pull-remote-site-to-beta
Nov 20, 2025
Merged

Move createSiteFromRemote from feature flag to beta flag#2078
sejas merged 11 commits into
trunkfrom
update/stu-984-studio-move-the-new-create-site-and-pull-remote-site-to-beta

Conversation

@sejas

@sejas sejas commented Nov 17, 2025

Copy link
Copy Markdown
Member

Related issues

Proposed Changes

  • Enables creating a site from a remote site flow using a beta flag

Testing Instructions

  • Run npm start
  • Click on Electron > Beta features > Enable create site from remote
  • Click on Add site
  • Select Add site from remote site
  • Continue the flow
  • Confirm the new site is created and start pulling as expected
  • Click on Electron > Beta features > Disable create site from remote
  • Click on Add site
  • Observe that the new option doesn't appear anymore.
beta-flag-create-site-from-remote.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@sejas sejas self-assigned this Nov 17, 2025
@github-actions

github-actions Bot commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

📊 Performance Test Results

Comparing 83d497e vs trunk

site-editor

Metric trunk 83d497e Diff Change
load 11955.00 ms 13883.00 ms +1928.00 ms 🔴 16.1%

site-startup

Metric trunk 83d497e Diff Change
siteCreation 26304.00 ms 25398.00 ms -906.00 ms 🟢 -3.4%
siteStartup 10019.00 ms 10052.00 ms +33.00 ms 🔴 0.3%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

Comment thread src/lib/beta-features.ts Outdated
Comment thread src/lib/beta-features.ts Outdated
sejas and others added 2 commits November 18, 2025 10:15
Co-authored-by: Wojtek Naruniec <wojtek.naruniec@automattic.com>
Co-authored-by: Wojtek Naruniec <wojtek.naruniec@automattic.com>
@Automattic Automattic deleted a comment from claude Bot Nov 18, 2025
@Automattic Automattic deleted a comment from claude Bot Nov 18, 2025
@Automattic Automattic deleted a comment from claude Bot Nov 18, 2025
@sejas
sejas marked this pull request as ready for review November 20, 2025 08:25
@sejas
sejas requested a review from a team November 20, 2025 08:31
Comment thread src/lib/beta-features.ts Outdated
description: '"studio site" command to manage local sites from terminal',
},
createSiteFromRemote: {
label: 'Create a site from existing remote 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.

I am wondering if the label could be "Site creation from existing remote site" to be consistent with another label that uses nouns and not verbs:

Image

Not a big deal though, feel free to proceed without adjusting this if you think this is not necessary.

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.

Makes sense!

@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 changes look good and work as expected 👍 I left one minor comment but feel free to proceed without implementing it.

@ivan-ottinger ivan-ottinger 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 changes look good and work as expected. The beta feature selection works correctly:

CleanShot.2025-11-20.at.10.23.24.mp4

The remote site gets pulled right-away (I just did not record it).

I only noticed one small issue of extra line.

Comment thread src/stores/beta-features-slice.ts Outdated
@sejas
sejas merged commit 65b8969 into trunk Nov 20, 2025
9 of 10 checks passed
@sejas
sejas deleted the update/stu-984-studio-move-the-new-create-site-and-pull-remote-site-to-beta branch November 20, 2025 10:18
@fredrikekelund

Copy link
Copy Markdown
Contributor

I suggest following a different pattern to implement this (same concern as I raised in #2083 (comment)). The RTK Query createApi API (docs) is perfect for on-demand queries to the Electron "back-end" with IPC.

See src/stores/installed-apps-api.ts for a good example of how this can be implemented, or #2095, where I'm working on refactoring the connectedSites Redux store to use this approach instead.

Basically, whenever we need to dispatch a "load data" action at app start (like we do here), that's an opportunity to consider using RTK Query instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants