Open IuliiaHerets opened 2 days ago
Triggered auto assignment to @jliexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@jliexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Able to repro this one
Job added to Upwork: https://www.upwork.com/jobs/~021836961456209861456
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
Reloading after going back online bring back the Onboarding flow for a moment
When calling CompleteGuidedSetup
API, we didn't set hasCompletedGuidedSetupFlow: true
so when users reload, the onboarding flow will be shown again
set hasCompletedGuidedSetupFlow: true
optimistically when calling CompleteGuidedSetup
API. We should reset hasCompletedGuidedSetupFlow: false
in failureData
Onboarding Modal opens when returning back online
CompleteGuidedSetup
will be stored locally when there is no internet connection, and hasCompletedGuidedSetupFlow
will not be updated because CompleteGuidedSetup
has not been executed yet. Once the connection is restored, the condition checking hasCompletedGuidedSetupFlow
will still return false
until the CompleteGuidedSetup
API is fully executed. As a result, the onboarding process will reappear because the condition to show onboarding is checked before CompleteGuidedSetup
is completed.
https://github.com/Expensify/App/blob/00d2e327ab2a8cd5dfdae785eb2cc8c5b962c2bd/src/libs/actions/Report.ts#L3692
We need to add a condition for displaying onboarding. If there is a CompleteGuidedSetup
pending for the account, onboarding will not be displayed. By using this method, we can avoid the scenario where, if the CompleteGuidedSetup
API call encounters an error, onboarding will still follow the correct flow
// .src/libs/hasCompletedGuidedSetupFlowSelector.ts#L6
function hasCompletedGuidedSetupFlowSelector(onboarding: OnyxValue<typeof ONYXKEYS.NVP_ONBOARDING>): boolean {
// onboarding is an array for old accounts and accounts created from olddot
if (Array.isArray(onboarding)) {
return true;
}
+ const persistedRequests = PersistedRequests.getAll();
+ const hasPendingCompleteGuidedSetupRequest = persistedRequests.some((item) => item.command === WRITE_COMMANDS.COMPLETE_GUIDED_SETUP);
+ // If there's a pending request to complete guided setup, return false
+ if (hasPendingCompleteGuidedSetupRequest) {
+ return false;
+ }
return onboarding?.hasCompletedGuidedSetupFlow ?? true;
}
This is a regression from https://github.com/Expensify/App/pull/49263 and was fixed in https://github.com/Expensify/App/pull/49516 by removing the hasCompletedGuidedSetupFlowSelector
call. Ideally we should still revert https://github.com/Expensify/App/pull/49263 to prevent bugs in other places
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.38-0 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
Reloading after going back online should not bring the Onboarding flow back
Actual Result:
Reloading after going back online bring back the Onboarding flow for a moment
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/29ca040f-6dff-4547-8102-88ecf81324e0
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @eVoloshchak