Skip to content
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

Merged
merged 3 commits into from Jan 30, 2024

Conversation

albarin
Copy link
Contributor

@albarin albarin commented Jan 26, 2024

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 the aiOnline variable was set to the default value (false), so the Share 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.

  1. Head over to /wp-admin/tools.php?page=woocommerce-admin-test-helper and enable customize-store feature flag.
  2. Go to WooCommerce > Home, click on the Start Customizing button, finish the CYS process, and click on Done to go to the /transitional page.
  3. Refresh the page.
  4. Make sure you see the Share feedback button.
  5. 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.
  6. Refresh the page and make sure you don't see the Share feedback button.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Fix the missing AI status when reloading the CYS transitional page.

Comment

Copy link
Contributor

github-actions bot commented Jan 26, 2024

Test Results Summary

Commit SHA: 72bc464

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests29000902996m 32s

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.

@albarin albarin changed the title Fix ai status missing on cys transitional Fix ai status missing on CYS transitional page Jan 29, 2024
@albarin albarin marked this pull request as ready for review January 29, 2024 07:46
@woocommercebot woocommercebot requested review from a team and imanish003 and removed request for a team January 29, 2024 07:46
Copy link
Contributor

github-actions bot commented Jan 29, 2024

Hi @gigitux, @nefeline,

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:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@albarin albarin requested review from gigitux and nefeline and removed request for imanish003 January 29, 2024 07:48
@albarin albarin force-pushed the fix-ai-status-missing-on-cys-transitional branch from 38b78d1 to 72bc464 Compare January 29, 2024 08:01
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Jan 29, 2024
Copy link
Member

@nefeline nefeline left a 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.

@albarin albarin merged commit 4ad6b41 into trunk Jan 30, 2024
30 checks passed
@albarin albarin deleted the fix-ai-status-missing-on-cys-transitional branch January 30, 2024 08:54
@github-actions github-actions bot added this to the 8.7.0 milestone Jan 30, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Jan 30, 2024
@rodelgc rodelgc added needs: internal testing Indicates if the PR requires further testing conducted by Solaris status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants