[CP Staging] Fix - A Follow up on [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later.#53093
Conversation
|
@jayeshmangwani Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@jayeshmangwani To reproduce on native I had to remove and started the sign up flow in ND selecting Manage teams > 1 - 10 employees > and then closing and reopening the app Hope it will be helpful 👍 |
|
@mountiny You can consider reviewing this if it is too critical to wait for @jayeshmangwani's review 👍 |
|
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid.movAndroid: mWeb ChromeAndroid-chrome.moviOS: NativeScreen.Recording.2024-11-27.at.7.00.22.PM-1.moviOS: mWeb Safarisafari.movMacOS: Chrome / SafariScreen.Recording.2024-11-27.at.5.53.32.PM.movMacOS: DesktopScreen.Recording.2024-11-27.at.6.46.54.PM.mov |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
|
Still not fixed on Desktop 1st it creates a workspace on web ND on which it is landed from OD, then when redirected of Desktop app it creates a workspace again Screen.Recording.2024-11-27.at.12.07.18.AM.mov |
Yeah @ishpaul777 unfortunately we are currently saving the onboardingPolicy in onyx only, so there is no way for the Desktop to know about the onboardingPolicy that was created in web. |
|
i believe this is the case what are failing in QA test here otherwise i could not recreate issue even without these changes. 🤔 |
But I did recreate it on IOS before the fix as it was also mentioned in #52899 (comment) |
Yes I think that we should not create a new policy if they already have one |
When qa reproduced this they did not have the abilty make any changes in the code, right? so this should be reproducable as is no?
Regardless, i think this should be enough and we did not need the current changes anymore after adding this check |
|
@ishpaul777 Fixed! U can proceed. |
|
I have finished up for today, will test changes tmrw when i start |
|
LGTM 🚀 |
A Follow up on [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later.
A Follow up on [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later.A Follow up on [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later.
| // So we need to create the new workspace in the accounting step | ||
| useEffect(() => { | ||
| if (!isVsb || !!onboardingPolicyID || isLoadingOnyxValue(onboardingPolicyIDResult)) { | ||
| const filteredPolicies = Object.values(allPolicies ?? {}).filter(PolicyUtils.isPaidGroupPolicy); |
There was a problem hiding this comment.
Lets change this to some, we just need to know they have one paid policy we dont have to iterate over the entire list
There was a problem hiding this comment.
Should I raise another PR? because pushing the changes is not working because the pr is merged.
There was a problem hiding this comment.
@mountiny but it might not be much of a concern as the onboarding flow is displayed when the user has one or none workspaces WDYT
There was a problem hiding this comment.
You can just add it in some future pr
There was a problem hiding this comment.
I can raise a quick one now and you can merge it. WDYT??
…n-bug [CP Staging] Fix - `A Follow up on` [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. (cherry picked from commit 3b832f8) (CP triggered by mountiny)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.0.67-9 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.67-9 🚀
|
Details
Fixed Issues
$ #52894
PROPOSAL: #52894 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
a.mp4
Android: mWeb Chrome
aw.mp4
iOS: Native
i.mp4
iOS: mWeb Safari
iw.mp4
MacOS: Chrome / Safari
w.mp4
MacOS: Desktop
2024-11-26.01-31-44.mp4