Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.57k stars 2.91k forks source link

Fix - [CRITICAL] Multiple workspaces get created when someone either refreshes the page, or drops off and returns later. #52899

Closed FitseTLT closed 9 hours ago

FitseTLT commented 17 hours ago

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/52894 PROPOSAL: https://github.com/Expensify/App/issues/52894#issuecomment-2491045711

Tests

  1. Sign-up on expensify.com
  2. Choose the “1-9” option on the home page (signUpQualifier: vsb)
  3. Get redirected to new.expensify.com
  4. Observe a workspace is created
  5. Don’t complete the onboarding modal steps (hasCompletedGuidedSetupFlow: false)
  6. Refresh the page on web or close and re-open app on native
  7. Verify that another workspace is not created

Offline tests

Same as above

QA Steps

Same as above

PR Author Checklist

Screenshots/Videos

Android: Native https://github.com/user-attachments/assets/ef1b80af-ea7d-4ab3-99d8-9f2366601051
Android: mWeb Chrome https://github.com/user-attachments/assets/9429dc86-34a4-4113-9e61-cc7938176a92
iOS: Native https://github.com/user-attachments/assets/925c9ac7-14df-46df-9966-f4b6b1efea38
iOS: mWeb Safari https://github.com/user-attachments/assets/bfe14ae0-60ef-4998-903c-84ab8bf1526a
MacOS: Chrome / Safari https://github.com/user-attachments/assets/2794d79c-ab42-4ce5-963f-4062497594e1
MacOS: Desktop https://github.com/user-attachments/assets/dfba3951-4c9c-4968-a22b-3c7dafde1628
melvin-bot[bot] commented 17 hours ago

@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]

FitseTLT commented 17 hours ago

Working on uploading screenshots ...

FitseTLT commented 16 hours ago

Upload finished

jayeshmangwani commented 16 hours ago

Reviewer Checklist

Screenshots/Videos

Android: Native
Android: mWeb Chrome https://github.com/user-attachments/assets/2fd67b3c-0e51-459c-9e17-6b1e325ec8c6
iOS: Native https://github.com/user-attachments/assets/9b567a3f-517f-48f6-bf04-721313f1fb17
iOS: mWeb Safari https://github.com/user-attachments/assets/40e39f43-ca75-4536-8371-6cd531959bc6
MacOS: Chrome / Safari https://github.com/user-attachments/assets/ff74dd09-cf2d-4ab0-9b62-146b71aa5682
MacOS: Desktop https://github.com/user-attachments/assets/921a3f5f-bf04-4c92-bc2e-e57f978de4b5
jayeshmangwani commented 15 hours ago

@FitseTLT I'm not sure why, but on Android, a workspace is created twice if it comes from a closed app on onboarding flow.

https://github.com/user-attachments/assets/3ecbc133-2469-4cc0-a4ad-26580fb11eff

FitseTLT commented 15 hours ago

I don't think so @jayeshmangwani Maybe you were on a wrong branch. I tried to exactly do what is on your video but couldn't reproduce

https://github.com/user-attachments/assets/39e377be-dffa-4307-b74b-6839b3df9660

jayeshmangwani commented 15 hours ago

Maybe you were on a wrong branch

No, thats not the case, I am on right branch

jayeshmangwani commented 15 hours ago

I am checking on real device, let's see if that my emulator thing

jayeshmangwani commented 15 hours ago

For me, it's still creating two workspaces

jayeshmangwani commented 15 hours ago

@mountiny Can we please generate build here so that we can test it on an Android device?"

jayeshmangwani commented 14 hours ago

@FitseTLT Do you have any idea, How can we open the OD web link in the ND staging version of the app? We are testing locally using npx uri-scheme open, but how can we verify it on the staging version?

FitseTLT commented 14 hours ago

@FitseTLT Do you have any idea, How can we open the OD web link in the ND staging version of the app? We are testing locally using npx uri-scheme open, but how can we verify it on the staging version?

@jayeshmangwani Sorry but I am totally not understanding what you meant.

jayeshmangwani commented 14 hours ago

I am totally not understanding what you meant.

Sorry about that! Let me simplify it: how have you tested this PR on Android?

FitseTLT commented 14 hours ago

npm run android

jayeshmangwani commented 14 hours ago

Sorry, I didn’t quite get you. npm run android doesn’t work for me with this PR. Can you please at least show me on video how you trigger the Choose the “1-9” option on the home page (signUpQualifier: vsb) step on Android?

github-actions[bot] commented 13 hours ago

🚧 @mountiny has triggered a test build. You can view the workflow run here.

github-actions[bot] commented 12 hours ago
:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: Android :robot: iOS :apple:
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/52899/index.html https://ad-hoc-expensify-cash.s3.amazonaws.com/ios/52899/index.html
Android iOS
Desktop :computer: Web :spider_web:
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/52899/NewExpensify.dmg https://52899.pr-testing.expensify.com
Desktop Web

:eyes: View the workflow run that generated this build :eyes:

mountiny commented 12 hours ago

@jayeshmangwani here is the build

jayeshmangwani commented 12 hours ago

Thanks, I’m checking it now

jayeshmangwani commented 12 hours ago

@mountiny , I am trying to test the transition link from OldDot to NewDot on a native Android device for the signup flow when we select the VSB option on OD, but for me, it is always opening in mobile web. Is there any way you are aware of to test on a native Android device? Otherwise, this issue cannot be tested in a real scenario.

mountiny commented 12 hours ago

I am not sure how to test the short-lived token in your dev setup, sorry 😬 its probably not possible as the deeplinks will be picked up in the actual app, not your dev apk

jayeshmangwani commented 11 hours ago

I think we can proceed with this PR and merge it, as testing on both the production web and mobile app shows that we are not opening the transition deep link on mobile (when creating a new account and selecting the VSB option).

OSBotify commented 9 hours ago

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.