Skip to content

Conversation

@ivan-ottinger
Copy link
Contributor

@ivan-ottinger ivan-ottinger commented Oct 23, 2025

Related issues

Proposed Changes

The goal of this PR is to make the "Windows speed-up" prompt display on app start after each version update, unless the user has already confirmed the prompt.

  • change the type of PromptWindowsSpeedUpResult from 'yes' | 'no' to
{
	response: 'yes' | 'no';
	appVersion: string;
	dontAskAgain: boolean;
}

→ this will ensure we can record on which app version the prompt has been triggered

  • move the prompt trigger from onboarding to app load
  • update the prompt logic to allow it to trigger on version update, unless the user already accepted the prompt
  • add handling for legacy promptWindowsSpeedUpResult format to ensure the prompt won't trigger if the user already accepted it
  • add checkbox to let users skip the prompt even after app version updates
  • add related unit tests
Markup on 2025-10-24 at 14:51:48

Testing Instructions

On Windows:

  1. Open the appdata-v1.json file for editing (e.g. by running notepad "$env:APPDATA\Studio\appdata-v1.json" in PowerShell).
  2. Check out the PR branch, build the app and start it.
  3. If the Want to speed up site creation? prompt displays, clicking:
  • the Sounds good, do it for me option should record the following in the appdata-v1.json :
    "promptWindowsSpeedUpResult": {
    "response": "yes",
    "appVersion": "1.6.1" // should match the current app version
  }
  • the I'm to interested option should record the following in the appdata-v1.json :
    "promptWindowsSpeedUpResult": {
    "response": "no",
    "appVersion": "1.6.1" // should match the current app version
    "dontAskAgain": true | false // depending on whether you have checked the box
  }
  1. Test the following scenarios on app start (by triggering the prompt manually through the app menu (Help → How can I make WordPress Studio faster?) - or - by manually editing the appdata-v1.json file).

a) if the appdata-v1.json file does not include the promptWindowsSpeedUpResult record, the prompt should open automatically
b) if the appdata-v1.json file includes promptWindowsSpeedUpResult in the old format and:

  • the value is "promptWindowsSpeedUpResult": 'no',, the prompt should open automatically
  • the value is "promptWindowsSpeedUpResult": 'yes',, the prompt should not open

c) if the appdata-v1.json file includes promptWindowsSpeedUpResult in the new format and:

  • the response value is no and the appVersion is different from the current app version, the prompt should open automatically
  • the response value is no and the appVersion is the same as the current app version, the prompt should not open automatically
  • the response value is yes, the prompt should not open regardless of the appVersion
  1. Triggering the prompt from the app menu (Help → How can I make WordPress Studio faster?) should work regardless of the promptWindowsSpeedUpResult value in the appdata-v1.json. The dontAskAgain checkbox should not render in this case.

On macOS:

  1. Check out the PR branch, build the app and start it.
  2. There should be no regressions.

Pre-merge Checklist

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

@ivan-ottinger ivan-ottinger self-assigned this Oct 23, 2025
@ivan-ottinger ivan-ottinger force-pushed the update/promptWindowsSpeedUpResult-trigger-logic branch from 601b318 to 71f3380 Compare October 23, 2025 10:55
@github-actions
Copy link

github-actions bot commented Oct 23, 2025

📊 Performance Test Results

Comparing 0c65467 vs trunk

site-editor

Metric trunk 0c65467 Diff Change
load 9121.00 ms 10020.00 ms +899.00 ms 🔴 9.9%

site-startup

Metric trunk 0c65467 Diff Change
siteCreation 11978.00 ms 16005.00 ms +4027.00 ms 🔴 33.6%
siteStartup 3988.00 ms 4934.00 ms +946.00 ms 🔴 23.7%

Results are median values from multiple test runs.

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

@ivan-ottinger ivan-ottinger marked this pull request as ready for review October 23, 2025 14:08
@ivan-ottinger ivan-ottinger requested a review from a team October 23, 2025 14:10
Copy link
Contributor

@bcotrim bcotrim left a comment

Choose a reason for hiding this comment

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

LGTM and worked as described

I wonder if we should add a third option or a checkbox to "don't ask me again"
We don't have metrics for this, as far as I know, and I imagine most users would be willing to add that permission, but for the ones that don't want to, it can be annoying to get asked on every update (every 2 weeks approx.)

What do you think?

@ivan-ottinger
Copy link
Contributor Author

Thank you for the review, Bernardo!

I wonder if we should add a third option or a checkbox to "don't ask me again"
We don't have metrics for this, as far as I know, and I imagine most users would be willing to add that permission, but for the ones that don't want to, it can be annoying to get asked on every update (every 2 weeks approx.)

What do you think?

Yes, I think that's a good point. I will take a look at it.

@ivan-ottinger
Copy link
Contributor Author

Yes, I think that's a good point. I will take a look at it.

I have made the changes and added related unit tests as well.

Copy link
Contributor

@bcotrim bcotrim left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the changes and adding unit tests!
LGTM 👍

@wojtekn
Copy link
Contributor

wojtekn commented Oct 27, 2025

We don't have metrics for this, as far as I know, and I imagine most users would be willing to add that permission, but for the ones that don't want to, it can be annoying to get asked on every update (every 2 weeks approx.)

Wasn't the main motive to let the user dismiss it, but only until the app is updated to a newer version?

@wojtekn
Copy link
Contributor

wojtekn commented Oct 27, 2025

Adding to the previous comment: Studio doesn't check whether the real-time protection exclusion rule exists, so without the "Don't Ask me again" option, it would also display to users who already added the exclusion, correct?

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.

3 participants