Open trjExpensify opened 18 hours ago
Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new.
@nkdengineer This is coming from your PR here https://github.com/Expensify/App/pull/51839/files
We should not be creating the workspace on each mount forever. Only if there is no group policy the user is admin of yet
Multiple workspaces get created when someone either refreshes the page, or drops off and returns later.
We are already returning early in case there is onboarding policy id set but on refresh the useOnyx will not make the data available and the effect runs too early https://github.com/Expensify/App/blob/2d2555b173b47c0bce0b1c16b275f1f98639664c/src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx#L61-L62
We should first check that onBoarding Policy ID data is loaded not loading https://github.com/Expensify/App/blob/2d2555b173b47c0bce0b1c16b275f1f98639664c/src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx#L48
const [onboardingPolicyID, onboardingPolicyIDResults] = useOnyx(ONYXKEYS.ONBOARDING_POLICY_ID);
if (!isVsb || !!onboardingPolicyID || isLoadingOnyxValue(onboardingPolicyIDResults)) {
return;
}
@mountiny The code is already doing that but the effect runs too early for the useEffect. I have posted a fix I can immediately raise a PR if you want 👍
Job added to Upwork: https://www.upwork.com/jobs/~021859580489556912069
Current assignee @jayeshmangwani is eligible for the External assigner, not assigning anyone new.
@jayeshmangwani I see the offending PR is just on the fence of the 1 week regression period and it was paid out. I think its fair if you will review this PR as part of regression still. Let us know if that sounds fine with you
@FitseTLT I think your solution makes sense, you also need to add the isLoading
to the useEffect dependency but sounds good.
@jayeshmangwani I see the offending PR is just on the fence of the 1 week regression period and it was paid out. I think its fair if you will review this PR as part of regression still. Let us know if that sounds fine with you
@FitseTLT I think your solution makes sense, you also need to add the
isLoading
to the useEffect dependency but sounds good.
Yep I only missed it when commenting the proposal 👍
@trjExpensify I requested to become a contributor through email, but I have not received feedback for a few days. Is there another way to do this?
📣 @myspace20! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
@jayeshmangwani I see the offending PR is just on the fence of the 1 week regression period and it was paid out. I think its fair if you will review this PR as part of regression still. Let us know if that sounds fine with you
Yes, I am definitely fine with it. We missed the case during testing
@mountiny, @FitseTLT 's Suggestion looks good to me here. Should I raise a PR quickly, or will @FitseTLT do it?
@jayeshmangwani I am already preparing 👍
Cool, please do it
offending PR is just on the fence of the 1 week regression period and it was paid out
@mountiny BTW, the payment for the original issue that this one is coming from hasn't been completed yet for me(I've requested on ND today). We can hold the payment until this issue is resolved. I can delete the payment request for that issue, please let me know.
@jayeshmangwani that is fine, we would just not process any payment here
Thanks!
@trjExpensify I requested to become a contributor through email, but I have not received feedback for a few days. Is there another way to do this?
Welcome! We have a problem with Slack invites at the moment, so we can't give you access to the Slack channel atm. That's okay though, you submit proposals and pick up available jobs in GitHub. We then hire you via Upwork to make the payment. Good place to start looking is here: https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22
Contributor details Your Expensify account email: rogersatsi98@outlook.com Upwork Profile Link: https://www.upwork.com/freelancers/~016c50704f37520a88
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
We should not be creating the workspace on each mount forever. Only if there is no group policy the user is admin of yet
I already did it but missed the refresh case. The reason is useOnyx
return the onboardingPolicyID
is undefined
at the first time if we don't have cache data.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.0.65-1 Reproducible in staging?: Y Reproducible in production?:Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:N/A If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @trjExpensify Slack conversation : #convert thread
Action Performed:
Expected Result:
If we’ve created a workspace for the new sign-up already, don’t create another one when they refresh or return.
Actual Result:
We create a workspace every time they refresh or get redirected to NewDot and haven’t completed the onboarding modal steps yet.
Workaround:
N/A
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Refreshing the page
https://github.com/user-attachments/assets/2587d4c0-7191-4ab6-847b-960ca1c30785
Returning to expensify.com
https://github.com/user-attachments/assets/9525a801-2360-46d3-b663-512c919403da
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @FitseTLT