New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ai status missing on CYS transitional page #44121
Conversation
Test Results SummaryCommit SHA: 72bc464
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
38b78d1
to
72bc464
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Tested & confirmed things are working as expected. Test results:
Go to WooCommerce > Home, click on the Start Customizing button, finish the CYS process, and click on Done to go to the /transitional page.
Refresh the page.
Make sure you see the Share feedback button.
✅ Confirmed the "Share feedback" button is available on initial and subsequent requests whenever AI is up.
Open your browser's inspector and use Chrome's content override feature to change the content of https://status.openai.com/api/v2/status.json call. Change status.indicator to major.
Refresh the page and make sure you don't see the Share feedback button.
✅ Confirmed that whenever AI API is offline, the "Share feedback" button is not visible on the transitional page, both on initial render and after refresh.
Submission Review Guidelines:
Changes proposed in this Pull Request:
This PR solves a bug that was happening when reloading the page on the
/transitional
step of the CYS flow:When reloading on
/transitional
, the state machine context is the default one, so theaiOnline
variable was set to the default value (false
), so theShare feedback
button was never displayed.Note: I think this can be optimized as well and I've added it as an item in this issue #43856
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
On a WooExpress site
0. Make sure to test this on a site where the feedback survey has not been submitted before.
/wp-admin/tools.php?page=woocommerce-admin-test-helper
and enablecustomize-store
feature flag.WooCommerce > Home
, click on theStart Customizing
button, finish the CYS process, and click onDone
to go to the/transitional
page.Share feedback
button.https://status.openai.com/api/v2/status.json
call. Changestatus.indicator
to major.Share feedback
button.Changelog entry
Significance
Type
Message
Fix the missing AI status when reloading the CYS transitional page.
Comment