Closed kozer closed 1 week ago
NOTE: We ll need to change things if https://github.com/Automattic/studio/pull/213 is merged first.
@fluiddot , I did all the changes you requested. Can you please check again? Thanks!
@fluiddot , I did all the changes you requested. Can you please check again? Thanks!
They look great, thanks 🙇 !
I have a concern about running wp-cli commands multiple times when the site or focus changes. I found that changing the site in the left sidebar has a performance issue and freezes the app, even in the overview tab. Is possible to fix it?
Oh, I've just noticed this issue when selecting different sites, thanks for spotting it @sejas. Sorry to overlook it when testing it, as it severely impacts the performance of basic actions like selecting sites 😞 .
I think the main problem comes from the fact that the initial load is only marked as complete when all promises are finished (reference). A potential workaround could be to mark it as complete right before invoking the promises to avoid executing the wp-cli
commands multiple times. In case they fail, we could mark the initial load as empty to let the app try again later on.
Another enhancement would be to debounce the run to avoid invoking multiple times the wp-cli
commands when selecting different sites quickly.
Proposed Changes
This PR handles adding extra chat context to the API request. Fixes: https://github.com/Automattic/dotcom-forge/issues/7601
Testing Instructions
eg: what is my wordpress version? What is my php version? What are my themes?
Pre-merge Checklist