Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Log in – Welcome modal is missing when login as a new user from public room login modal #41500

Open
lanitochka17 opened this issue May 2, 2024 · 38 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented May 2, 2024

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: 1.4.69-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4531005
Email or phone of affected tester (no customers): ponikarchuks+131524@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Log out of New Expensify
  2. Navigate to this link - https://staging.new.expensify.com/r/2652281908731856
  3. Verify you can see the announce room as an anonymous user
  4. Click on Sign In
  5. Log in with a new account

Expected Result:
Welcome modal appears and user should enter the name

Actual Result:
Welcome modal is missing when login as a new user from public room login modal, the user's name remains Guest

Workaround:
Unknown

Platforms:
Which of our officially supported platforms is this issue occurring on?

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence

Bug6468653_1714637134436.Guest.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

Triggered auto assignment to @dylanexpensify (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.

@lanitochka17
Copy link
Author

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

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label May 2, 2024
@melvin-bot melvin-bot bot changed the title Log in – Welcome modal is missing when login as a new user from public room login modal [$250] Log in – Welcome modal is missing when login as a new user from public room login modal May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

Job added to Upwork: https://www.upwork.com/jobs/~017616f5f829d51bb6

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil (External)

@c3024
Copy link
Contributor

c3024 commented May 3, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Welcome modal does not open for a new account when logged in from right hand sign modal for a public room

What is the root cause of that problem?

The useEffect here

Welcome.isOnboardingFlowCompleted({onNotCompleted: () => Navigation.navigate(ROUTES.ONBOARDING_ROOT)});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isLoadingApp]);

for showing the onboarding modal triggers only when isLoadingApp changes and isLoadingApp changes only when openApp is called.

App/src/libs/actions/App.ts

Lines 216 to 225 in 387ab0e

if (!isOpenApp) {
return defaultData;
}
return {
optimisticData: [
...defaultData.optimisticData,
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.IS_LOADING_APP,
value: true,

so, when we visit a public room openApp is called and after logging in from RHP sign in modal, it is not called again and isLoadingApp value does not change and the useEffect does not trigger.

What changes do you think we should make in order to solve the problem?

We can have an Onyx value to check if the RHP SignIn modal closed after signing in and set it to true here

Navigation.isNavigationReady().then(() => Navigation.dismissModal());
}

like

            Navigation.isNavigationReady().then(() => Navigation.dismissModal());
         +++Onyx.set(ONYXKEYS.SIGNIN_MODAL_CLOSED, true);
        }

after the dismissing the RHP.
Subscribe to this key in BottomTabBar and add it as a dependency to the useEffect mentioned in the RCA so that when the value changes the useEffect triggers again and the Welcome.isOnboardingFlowCompleted is called.

What alternative solutions did you explore? (Optional)

@NJ-2020
Copy link

NJ-2020 commented May 4, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

The welcome modal is missing when login as a new user from a public room

What is the root cause of that problem?

The BottomTabBar file(Inside Report page) will invoke the Welcome onboarding functionality after the user logs in as a new user from the Login Page, but If I try to log in as a new user from the Public room the BottomTabBar won't be invoked, I think because the BottomTabBar is being cached on the Report Page as I've already opened it so it won't call the Welcome onboarding functionality.

I've tried to hard refresh to remove the cache and the Welcome onboarding is showing up but after a while when I tried to refresh the page again and again it won't show up.

For the Guest input, the issue comes from the backend, and when a user logs in as a new user from the public room we do not remove the Guest input value.

What changes do you think we should make in order to solve the problem?

We can add the Welcome onboarding functionality inside the LoginForm directly so that when the user logs in as a new account, the Welcome onboarding will be triggered automatically.

Welcome.isOnboardingFlowCompleted({onNotCompleted: () => Navigation.navigate(ROUTES.ONBOARDING_ROOT)});

And for the Guest input issue, we can fix it inside LoginForm and Report Utils (for rendering the participant name) directly by checking if the user has logged in as a new user and has not yet completed the Welcome onboarding and the Account Display name as a guest, we can set it the user display name to empty which will show the user email.

I've fixed the issue and it is working successfully, below is the video demo(updated):

2024-05-12.16-28-17.mp4

What alternative solutions did you explore? (Optional)

N/A

@tsa321
Copy link
Contributor

tsa321 commented May 5, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Welcome modal doesn't show up when user sign in in rigth panel if the user visit public room.

What is the root cause of that problem?

Welcome step is executed by this function:

Welcome.isOnboardingFlowCompleted({onNotCompleted: () => Navigation.navigate(ROUTES.ONBOARDING_ROOT)});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isLoadingApp]);

But it will only executed right after App is finished loading. the use effect depend on isLoadingApp which is based on onyxkey: IS_LOADING_APP.

When user visit public room the app is finished loading and the useEffect function is executed but won't reach welcome function because the user is anonymous user.
So when the user sign in using right panel login form, the Welcome.isOnboardingFlowCompleted won't be executed again because there is no change in IS_LOADING_APP value.

What changes do you think we should make in order to solve the problem?

We can change or add the useEffect dependency using other onyx value for example LAST_VISITED_PATH. So the bottom part of the BottomTabBar could be :

export default withOnyx<PurposeForUsingExpensifyModalProps, PurposeForUsingExpensifyModalOnyxProps>({
    isLoadingApp: {
        key: ONYXKEYS.IS_LOADING_APP,
    },
    lastVisitedPath: {
      key: ONYXKEYS.LAST_VISITED_PATH,
    },
})(BottomTabBar);

the the dependency of useEffect will be:

+ }, [lastVisitedPath, isLoadingApp]);

and to prevent the welcome modal shown two times right after user completed welcome steps and app send nvp onboarding to server then the app navigate to welcome video. We could add:

+ let isOnboardingInProgress : boolean = false;
...
...
function isOnboardingFlowCompleted({onCompleted, onNotCompleted}: HasCompletedOnboardingFlowProps) {
    isOnboardingFlowStatusKnownPromise.then(() => {
        if (Array.isArray(onboarding) || onboarding?.hasCompletedGuidedSetupFlow === undefined) {
            return;
        }

        if (onboarding?.hasCompletedGuidedSetupFlow) {
+            isOnboardingInProgress = false;
            onCompleted?.();
        } else {
+            if (isOnboardingInProgress) {
+             return;
+           }
+            isOnboardingInProgress = true;
            onNotCompleted?.();
        }
    });
}

The solution is not fixed to certain onyxkey but can use other onyxkey based on other consideration.
Or the dependency can use navigation variable which store the value of useNavigation.

What alternative solutions did you explore?

Adding dependency on useEffect will cause unnecessary re-trigger of Welcome.isOnboardingFlowCompleted multiples times for existing user.
So we can remove the useEffect clause of bottomTabBar where Welcome.isOnboardingFlowCompleted is being triggered and remove the Welcome.isOnboardingFlowCompleted completely.
The new logic is based on promise that contains onyx connect session, pathchange, nvp_onboarding and then immediately resolve the promise and disconnect the onyx connection when condition match.
This logic is already inside Welcome.ts and I will add promise to session (to check whether user is logged in) and last_path_change (to check on current navigation / route name). This could be done by adding isRouteReadyPromise isUserLoggedInPromise similar to isServerDataReadyPromise and isOnboardingFlowStatusKnownPromise.

function startOnBoarding(){
  listenToSessionChange();
  isUserLoggedInPromise
  .then(() => isServerDataReadyPromise)
  .then(() => {
      listenToNvpOnboardingChange();
      return isOnboardingFlowStatusKnownPromise;
  }).then(() => {
      listenToPathChange();
      return isRouteReadyPromise;
  }).then(() => {
      if (Array.isArray(onboarding) || onboarding?.hasCompletedGuidedSetupFlow === undefined) {
          return;
      }
  
      if (onboarding?.hasCompletedGuidedSetupFlow) {
          onCompleted?.();
      } else {
          Navigation.navigate(ROUTES.ONBOARDING_ROOT)
          //onNotCompleted?.();
      }
      return;
  });
}
startOnBoarding();

and in callback of LAST_ViSITED_PATH onyx:

          const rootRoute = navigationRef.getRootState()?.routes;
          const currentRouteName = rootRoute?.[rootRoute.length - 1]?.name;
          if (Boolean(currentRouteName && currentRouteName !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRouteName !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR)) {
            return;
          }
  
          resolveRouteIsReady();
          Onyx.disconnect(lastVistedConnectID);
Complete rough code:
let resolveIsReadyPromise: (value?: Promise<void>) => void | undefined;
let isServerDataReadyPromise = new Promise<void>((resolve) => {
    resolveIsReadyPromise = resolve;
});

let resolveOnboardingFlowStatus: (value?: Promise<void>) => void | undefined;
let isOnboardingFlowStatusKnownPromise = new Promise<void>((resolve) => {
    resolveOnboardingFlowStatus = resolve;
});

let resolveRouteIsReady: (value?: Promise<void>) => void | undefined;
let isRouteReadyPromise = new Promise<void>((resolve) => {
    resolveRouteIsReady = resolve;
});

let resolveUserIsLoggedIn: (value?: Promise<void>) => void | undefined;
let isUserLoggedInPromise = new Promise<void>((resolve) => {
    resolveUserIsLoggedIn = resolve;
});

function onServerDataReady(): Promise<void> {
    return isServerDataReadyPromise;
}

const listenToSessionChange = function() {
  const sessionConeectionId = Onyx.connect({
      key: ONYXKEYS.SESSION,
      initWithStoredValues: false,
      callback: (session) => {
          if (session?.accountID === undefined || session?.authTokenType === CONST.AUTH_TOKEN_TYPES.ANONYMOUS) {
              return;
          }
          resolveUserIsLoggedIn?.();
          Onyx.disconnect(sessionConeectionId);
      },
  });
}

const listenToPathChange = function() {
  const connectionId = Onyx.connect({
      key: ONYXKEYS.LAST_VISITED_PATH,
      initWithStoredValues: true,
      callback: (cc) => {
          const rootRoute = navigationRef.getRootState()?.routes;
          const currentRouteName = rootRoute?.[rootRoute.length - 1]?.name;
          if (Boolean(currentRouteName && currentRouteName !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRouteName !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR)) {
            return;
          }
  
          resolveRouteIsReady();
          Onyx.disconnect(lastVistedConnectID);
      },
  });
}

const listenToNvpOnboardingChange = function() {
  const connectionId = Onyx.connect({
      key: ONYXKEYS.NVP_ONBOARDING,
      initWithStoredValues: true,
      callback: (value) => {
          if (value === null || value === undefined) {
              return;
          }
          onboarding = value;
          resolveOnboardingFlowStatus();
          Onyx.disconnect(connectionId);
      },
  });
}

function startOnBoarding(){
  listenToSessionChange();
  isUserLoggedInPromise
  .then(() => isServerDataReadyPromise)
  .then(() => {
      listenToNvpOnboardingChange();
      return isOnboardingFlowStatusKnownPromise;
  }).then(() => {
      listenToPathChange();
      return isRouteReadyPromise;
  }).then(() => {
      if (Array.isArray(onboarding) || onboarding?.hasCompletedGuidedSetupFlow === undefined) {
          return;
      }
  
      if (onboarding?.hasCompletedGuidedSetupFlow) {
          onCompleted?.();
      } else {
          Navigation.navigate(ROUTES.ONBOARDING_ROOT)
          //onNotCompleted?.();
      }
      return;
  });
}
startOnBoarding();

@melvin-bot melvin-bot bot added the Overdue label May 5, 2024
@NJ-2020
Copy link

NJ-2020 commented May 6, 2024

Proposal

Updated

@dylanexpensify
Copy link
Contributor

@rojiphil to review updated proposal

@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
@rojiphil
Copy link
Contributor

rojiphil commented May 8, 2024

Reviewing today

@rojiphil
Copy link
Contributor

rojiphil commented May 9, 2024

We can add the Welcome onboarding functionality inside useEffect and trigger it when the user logs in as a new user from a public room
I've fixed the issue and it is working successfully,

@NJ-2020 Can you please add relevant code to your proposal so we know how you fixed it?

@NJ-2020
Copy link

NJ-2020 commented May 9, 2024

Proposal

Updated

@NJ-2020
Copy link

NJ-2020 commented May 9, 2024

@rojiphil Done

@rojiphil
Copy link
Contributor

Thanks for your proposals.
But I don’t think the RCA is good enough to proceed with any proposal. Simply triggering the Welcome Onboarding flow will not help as it is not required for existing accounts.
Further, the proposals do not address the Guest user name issue after a new account login. This is part of the scope of this issue as mentioned in the OP.
Looking forward to reviewing your revised proposals.

@NJ-2020
Copy link

NJ-2020 commented May 10, 2024

Ok, I will look into it. Thanks

@c3024
Copy link
Contributor

c3024 commented May 10, 2024

@rojiphil

Simply triggering the Welcome Onboarding flow will not help as it is not required for existing accounts.

Logic to show the onboarding modal or not is within the isOnboardingFlowCompleted of Welcome. Presently Welcome.isOnboardingFlowCompleted is invoked every time in a normal flow when a user ((including an existing user who completed onboarding already)) logs in because openApp is called on login and the useEffect in BottomTabBar gets triggered due to change of isLoadingApp on calling openApp. But showing the onboarding modal or not is based on the hasCompletedGuidedSetupFlow and this logic is in Welcome here.

if (onboarding?.hasCompletedGuidedSetupFlow) {

For users who already completed the onboarding, the backend returns the hasCompletedGuidedSetupFlow values as true. Nothing happens in this case and no onboarding modal shows up because we are not passing any onCompleted in the Welcome.isOnboardingFlowCompleted.

The proposal extends this logic to trigger it similarly when a user logs in from RHP. So, with the suggested solution Welcome.isOnboardingFlowCompleted is called but the modal is shown only if the guided setup has not been completed yet due to the existing logic in isOnboardingFlowCompleted of Welcome.

About the Guest name, once the welcome modal shows up, changing the name is part of the flow and it will be overwritten.

If we want the display name to be login for new sign-ins from RHP as well similar to new logins in normal flow, that needs to be fixed from backend because Guest is sent from backend.

Let me know if I am missing something or something is unclear in my comments.

@tsa321
Copy link
Contributor

tsa321 commented May 12, 2024

Proposal

updated on alternative solution

But I don’t think the RCA is good enough to proceed with any proposal. Simply triggering the Welcome Onboarding flow will not help as it is not required for existing accounts.

@rojiphil yes adding dependency on useEffect will cause unnecessary re-trigger of Welcome.isOnboardingFlowCompleted multiples times for existing user.
So we can remove the useEffect clause of bottomTabBar where Welcome.isOnboardingFlowCompleted is being triggered and remove the Welcome.isOnboardingFlowCompleted completely.
The new logic is based on promise that contains onyx connect session, pathchange, nvp_onboarding and then immediately resolve the promise and disconnect the onyx connection when condition match.
This logic is already inside Welcome.ts and I will add promise to session (to check whether user is logged in) and last_path_change (to check on current navigation / route name). This could be done by adding isRouteReadyPromise isUserLoggedInPromise similar to isServerDataReadyPromise and isOnboardingFlowStatusKnownPromise.

Complete rough code:
let resolveIsReadyPromise: (value?: Promise<void>) => void | undefined;
let isServerDataReadyPromise = new Promise<void>((resolve) => {
    resolveIsReadyPromise = resolve;
});

let resolveOnboardingFlowStatus: (value?: Promise<void>) => void | undefined;
let isOnboardingFlowStatusKnownPromise = new Promise<void>((resolve) => {
    resolveOnboardingFlowStatus = resolve;
});

let resolveRouteIsReady: (value?: Promise<void>) => void | undefined;
let isRouteReadyPromise = new Promise<void>((resolve) => {
    resolveRouteIsReady = resolve;
});

let resolveUserIsLoggedIn: (value?: Promise<void>) => void | undefined;
let isUserLoggedInPromise = new Promise<void>((resolve) => {
    resolveUserIsLoggedIn = resolve;
});

function onServerDataReady(): Promise<void> {
    return isServerDataReadyPromise;
}

const listenToSessionChange = function() {
  const sessionConeectionId = Onyx.connect({
      key: ONYXKEYS.SESSION,
      initWithStoredValues: false,
      callback: (session) => {
          if (session?.accountID === undefined || session?.authTokenType === CONST.AUTH_TOKEN_TYPES.ANONYMOUS) {
              return;
          }
          resolveUserIsLoggedIn?.();
          Onyx.disconnect(sessionConeectionId);
      },
  });
}

const listenToPathChange = function() {
  const connectionId = Onyx.connect({
      key: ONYXKEYS.LAST_VISITED_PATH,
      initWithStoredValues: true,
      callback: (cc) => {
          const rootRoute = navigationRef.getRootState()?.routes;
          const currentRouteName = rootRoute?.[rootRoute.length - 1]?.name;
          if (Boolean(currentRouteName && currentRouteName !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRouteName !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR)) {
            return;
          }
  
          resolveRouteIsReady();
          Onyx.disconnect(connectionId);
      },
  });
}

const listenToNvpOnboardingChange = function() {
  const connectionId = Onyx.connect({
      key: ONYXKEYS.NVP_ONBOARDING,
      initWithStoredValues: true,
      callback: (value) => {
          if (value === null || value === undefined) {
              return;
          }
          onboarding = value;
          resolveOnboardingFlowStatus();
          Onyx.disconnect(connectionId);
      },
  });
}

function startOnBoarding(){
  listenToSessionChange();
  isUserLoggedInPromise
  .then(() => isServerDataReadyPromise)
  .then(() => {
      listenToNvpOnboardingChange();
      return isOnboardingFlowStatusKnownPromise;
  }).then(() => {
      listenToPathChange();
      return isRouteReadyPromise;
  }).then(() => {
      if (Array.isArray(onboarding) || onboarding?.hasCompletedGuidedSetupFlow === undefined) {
          return;
      }
  
      if (onboarding?.hasCompletedGuidedSetupFlow) {
          onCompleted?.();
      } else {
          Navigation.navigate(ROUTES.ONBOARDING_ROOT)
          //onNotCompleted?.();
      }
      return;
  });
}
startOnBoarding();
function startOnBoarding(){
  listenToSessionChange();
  isUserLoggedInPromise
  .then(() => isServerDataReadyPromise)
  .then(() => {
      listenToNvpOnboardingChange();
      return isOnboardingFlowStatusKnownPromise;
  }).then(() => {
      listenToPathChange();
      return isRouteReadyPromise;
  }).then(() => {
      if (Array.isArray(onboarding) || onboarding?.hasCompletedGuidedSetupFlow === undefined) {
          return;
      }
  
      if (onboarding?.hasCompletedGuidedSetupFlow) {
          onCompleted?.();
      } else {
          Navigation.navigate(ROUTES.ONBOARDING_ROOT)
          //onNotCompleted?.();
      }
      return;
  });
}
startOnBoarding();

and in callback of LAST_ViSITED_PATH onyx:

          const rootRoute = navigationRef.getRootState()?.routes;
          const currentRouteName = rootRoute?.[rootRoute.length - 1]?.name;
          if (Boolean(currentRouteName && currentRouteName !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRouteName !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR)) {
            return;
          }
  
          resolveRouteIsReady();
          Onyx.disconnect(lastVistedConnectID);
Complete rough code:
let resolveIsReadyPromise: (value?: Promise<void>) => void | undefined;
let isServerDataReadyPromise = new Promise<void>((resolve) => {
    resolveIsReadyPromise = resolve;
});

let resolveOnboardingFlowStatus: (value?: Promise<void>) => void | undefined;
let isOnboardingFlowStatusKnownPromise = new Promise<void>((resolve) => {
    resolveOnboardingFlowStatus = resolve;
});

let resolveRouteIsReady: (value?: Promise<void>) => void | undefined;
let isRouteReadyPromise = new Promise<void>((resolve) => {
    resolveRouteIsReady = resolve;
});

let resolveUserIsLoggedIn: (value?: Promise<void>) => void | undefined;
let isUserLoggedInPromise = new Promise<void>((resolve) => {
    resolveUserIsLoggedIn = resolve;
});

function onServerDataReady(): Promise<void> {
    return isServerDataReadyPromise;
}

const listenToSessionChange = function() {
  const sessionConeectionId = Onyx.connect({
      key: ONYXKEYS.SESSION,
      initWithStoredValues: false,
      callback: (session) => {
          if (session?.accountID === undefined || session?.authTokenType === CONST.AUTH_TOKEN_TYPES.ANONYMOUS) {
              return;
          }
          resolveUserIsLoggedIn?.();
          Onyx.disconnect(sessionConeectionId);
      },
  });
}

const listenToPathChange = function() {
  const connectionId = Onyx.connect({
      key: ONYXKEYS.LAST_VISITED_PATH,
      initWithStoredValues: true,
      callback: (cc) => {
          const rootRoute = navigationRef.getRootState()?.routes;
          const currentRouteName = rootRoute?.[rootRoute.length - 1]?.name;
          if (Boolean(currentRouteName && currentRouteName !== NAVIGATORS.BOTTOM_TAB_NAVIGATOR && currentRouteName !== NAVIGATORS.CENTRAL_PANE_NAVIGATOR)) {
            return;
          }
  
          resolveRouteIsReady();
          Onyx.disconnect(lastVistedConnectID);
      },
  });
}

const listenToNvpOnboardingChange = function() {
  const connectionId = Onyx.connect({
      key: ONYXKEYS.NVP_ONBOARDING,
      initWithStoredValues: true,
      callback: (value) => {
          if (value === null || value === undefined) {
              return;
          }
          onboarding = value;
          resolveOnboardingFlowStatus();
          Onyx.disconnect(connectionId);
      },
  });
}

function startOnBoarding(){
  listenToSessionChange();
  isUserLoggedInPromise
  .then(() => isServerDataReadyPromise)
  .then(() => {
      listenToNvpOnboardingChange();
      return isOnboardingFlowStatusKnownPromise;
  }).then(() => {
      listenToPathChange();
      return isRouteReadyPromise;
  }).then(() => {
      if (Array.isArray(onboarding) || onboarding?.hasCompletedGuidedSetupFlow === undefined) {
          return;
      }
  
      if (onboarding?.hasCompletedGuidedSetupFlow) {
          onCompleted?.();
      } else {
          Navigation.navigate(ROUTES.ONBOARDING_ROOT)
          //onNotCompleted?.();
      }
      return;
  });
}
startOnBoarding();

Further, the proposals do not address the Guest user name issue after a new account login.

For the guest user name, The guest name will change when user complete the onboarding processes, after user change the user name.

@melvin-bot melvin-bot bot added the Overdue label May 12, 2024
@NJ-2020
Copy link

NJ-2020 commented May 12, 2024

Proposal

Updated

  • Updated video
  • Updated Proposal

@NJ-2020
Copy link

NJ-2020 commented May 12, 2024

@rojiphil Done. I've updated my proposal

Looking forward to hearing from you

@NJ-2020
Copy link

NJ-2020 commented May 13, 2024

Proposal

Updated

Copy link

melvin-bot bot commented May 13, 2024

@rojiphil, @dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@rojiphil
Copy link
Contributor

I will review the updated proposals tomorrow

@melvin-bot melvin-bot bot removed the Overdue label May 13, 2024
@dylanexpensify
Copy link
Contributor

@rojiphil any update?

@rojiphil
Copy link
Contributor

Thanks for all your proposals.
@tsa321 The proposal and follow-up comment proposes additional logic or to reimplement the feature to fix this issue but I don’t think it is required as we can resolve this in simpler steps.
@NJ-2020 The updated proposal root cause does not seem correct as I don’t think it has to do anything with caching. The earlier proposed root cause was more correct but it was already shared here. Further, directly calling the welcome onboard flow from within RHP signin modal could solve the problem but is just a minor enhancement to the solution already proposed here.
@c3024 proposal is the closest to the correct RCA as mentioned below and the first to arrive at that. But, do we need an additional Onyx value to solve this?

when we visit a public room openApp is called and after logging in from RHP sign in modal, it is not called again

@c3024 Instead of relying on an additional Onyx value, would it not work if we call App.openApp()? This will also trigger the Welcome onboard flow.

@c3024
Copy link
Contributor

c3024 commented May 16, 2024

@rojiphil

Yes, it does not need a Onyx value. Calling App.openApp() works just fine.

@rojiphil
Copy link
Contributor

@c3024 proposal LGTM along with comment here.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented May 16, 2024

Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@rojiphil
Copy link
Contributor

@c3024 And oh! I forgot to mention about Guest user name issue. I agree that this is a BE issue but this is a different issue and the details of why this is a BE issue also need to be shared with the internal team.

Copy link

melvin-bot bot commented May 16, 2024

@rojiphil @grgia @dylanexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label May 20, 2024
@dylanexpensify
Copy link
Contributor

Update please @c3024

@melvin-bot melvin-bot bot removed the Overdue label May 21, 2024
@c3024
Copy link
Contributor

c3024 commented May 21, 2024

I haven't been assigned yet. @dylanexpensify

My fix for front end part of the bug was approved by C+.

Waiting for @grgia to review and assign me.

@dylanexpensify
Copy link
Contributor

Sounds good, thanks for update @c3024!

@rojiphil
Copy link
Contributor

@grgia Gentle bump on this here

@melvin-bot melvin-bot bot added the Overdue label May 27, 2024
Copy link

melvin-bot bot commented May 27, 2024

@rojiphil, @grgia, @dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot removed Help Wanted Apply this label when an issue is open to proposals by contributors Overdue labels May 28, 2024
@grgia
Copy link
Contributor

grgia commented May 28, 2024

All yours @c3024!

@dylanexpensify
Copy link
Contributor

Let's goooo!

@dylanexpensify
Copy link
Contributor

@c3024 how're we looking? Mind giving an eta?

@c3024
Copy link
Contributor

c3024 commented Jun 5, 2024

C+ @rojiphil approved the PR. Awaiting @grgia 's approval and merge of the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

7 participants