Skip to content

[HOLD for payment 2024-07-10] [$250] [CRITICAL] [UX Reliability] When deeplinking to expense report from email empty screen is shown #42753

Closed

Description

@mountiny

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:
Reproducible in staging?: Y
Reproducible in production?: Y
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: @danielrvidal
Slack conversation:

Action Performed:

  1. daniel@expensify.com submitted danrvidal+upgradetest7@gmail.com an IOU.
  2. danrvidal+upgradetest7@gmail.com got the email and clicked Pay , is taken to the sign in page, gets the magic code and logs in
  3. danrvidal+upgradetest7@gmail.com is taken to directly to the expense.
  4. The subheader is not loading right away and LHN chats are not loading right away.
  5. After letting it load, I click into the DM and there is nothing showing.
    a. I let it load for a bit, nothing.
    b. I refresh and see the expense show up.

This makes for a confusing experience. As a side note, we’ll be updating the flow so we don’t send users to the expense directly but rather the DM (GH) but I still experienced this bug so it felt like we should update it.

Expected Result:

The DM chat should load immediately as well as the chats should be available in LHN first, we should wait for the openApp response and show the skeleton if its not available

Actual Result:

  • Subheader not showing when I’m brought into a report for the first time as a new user, and the DM the IOU sent to me is not loading.
  • The DM chat is showing empty screen

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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

In slack here https://expensify.slack.com/archives/C05LX9D6E07/p1716940223060999?thread_ts=1716939884.285849&cid=C05LX9D6E07

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0167ada75a878e8b10
  • Upwork Job ID: 1795785341708906496
  • Last Price Increase: 2024-05-29
  • Automatic offers:
    • c3024 | Reviewer | 102542821
Issue OwnerCurrent Issue Owner: @johncschuster

Activity

  1. added
    Daily
    Bug
    on May 29, 2024
  2. melvin-bot commented on May 29, 2024

    @melvin-bot

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

  3. added
    External
    on May 29, 2024
  4. changed the title [-][CRITICAL] [UX Reliability] When deeplinking to expense report from email empty screen is shown[/-] [+][$250] [CRITICAL] [UX Reliability] When deeplinking to expense report from email empty screen is shown[/+] on May 29, 2024
  5. melvin-bot commented on May 29, 2024

    @melvin-bot
  6. added
    Help Wanted
    on May 29, 2024
  7. melvin-bot commented on May 29, 2024

    @melvin-bot

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

  8. Skakruk commented on May 30, 2024

    @Skakruk
    Contributor

    Proposal

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

    Subheader not showing when user brought into a report for the first time as a new user, and the DM the IOU sent to me is not loading.
    Also reproducible for any user, who received IOU link, on the first app load (after clearing DB) when the user navigates to IOU report directly.

    What is the root cause of that problem?

    On the first app load, we're making OpenApp request which blocks any other updates to Onyx, until it finishes.

    if (isLoadingApp) {
    // When ONYX_UPDATES_FROM_SERVER is set, we pause the queue. Let's unpause
    // it so the app is not stuck forever without processing requests.
    SequentialQueue.unpause();
    console.debug(`[OnyxUpdateManager] Ignoring Onyx updates while OpenApp hans't finished yet.`);
    return;
    }

    Since OpenReport request is established before the OpenApp, the Report data is skipped and not saved into IndexedDB.

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

    We need to delay OpenReport request until OpenApp is made.

    In ReportScreen.tsx we add

    const [isLoadingApp] = useOnyx(ONYXKEYS.IS_LOADING_APP);
    

    and add checks for isLoadingApp in a few places:

    1. don't make fetchReportIfNeeded() call
      useEffect(() => {
      // Call OpenReport only if we are not linking to a message or the report is not available yet
      if (isLoadingReportOnyx || (reportActionIDFromRoute && report.reportID)) {
      return;
      }
      fetchReportIfNeeded();
      // eslint-disable-next-line react-hooks/exhaustive-deps
      }, [isLoadingReportOnyx]);
    2. for showing skeleton while the app is still loading
      const isLoading = !reportIDFromRoute || (!isSidebarLoaded && !isReportOpenInRHP) || PersonalDetailsUtils.isPersonalDetailsEmpty();
    3. to condition shouldShowNotFoundPage for not showing "Report not found"
      const shouldShowNotFoundPage = useMemo(

    Also add condition

    if (report.reportID === reportIDFromRoute) {
        return;
    }
    

    to

    const fetchReportIfNeeded = useCallback(() => {
    to make sure we don't make a duplicate request for already loaded report.

    load-report.mp4
  9. self-assigned this
    on May 30, 2024
  10. arosiclair commented on May 30, 2024

    @arosiclair
    Contributor

    I can manage this. Looks like we're having @kacper-mikolajczak take a look

  11. 50 remaining items

  12. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Jul 3, 2024
  13. changed the title [-][$250] [CRITICAL] [UX Reliability] When deeplinking to expense report from email empty screen is shown[/-] [+][HOLD for payment 2024-07-10] [$250] [CRITICAL] [UX Reliability] When deeplinking to expense report from email empty screen is shown[/+] on Jul 3, 2024
  14. removed
    Reviewing
    on Jul 3, 2024
  15. melvin-bot commented on Jul 3, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. melvin-bot commented on Jul 3, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-07-10. 🎊

    For reference, here are some details about the assignees on this issue:

  17. melvin-bot commented on Jul 3, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@c3024] The PR that introduced the bug has been identified. Link to the PR:
    • [@c3024] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@c3024] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@c3024] Determine if we should create a regression test for this bug.
    • [@c3024] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  18. johncschuster commented on Jul 8, 2024

    @johncschuster
    Contributor

    Acknowledged! I will issue payment after the regression window 👍

  19. johncschuster commented on Jul 9, 2024

    @johncschuster
    Contributor

    @c3024 can you complete the BZ Checklist above when you get a moment? Thank you!

  20. c3024 commented on Jul 9, 2024

    @c3024
    Contributor

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@c3024] The PR that introduced the bug has been identified. Link to the PR: No specific PR can be held responsible for this bug.
    • [@c3024] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: NA
    • [@c3024] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: Not started as this bug cannot be caught earlier.
    • [@c3024] Determine if we should create a regression test for this bug. Yes
    • [@c3024] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. Test here in the author checklist Tests
    1. Log into NewDot as user A
    2. Verify the app and the initial report load without issue
    3. Open a DM to user B
    4. Submit an expense in the DM
    5. Open the report and copy the link
    6. Sign out
    7. Open the link and sign in as user B
    8. Verify
    • the app loads
    • the expense report loads
    • the header includes a link to the parent report
  21. added
    Daily
    and removed
    Weekly
    on Jul 10, 2024
  22. johncschuster commented on Jul 10, 2024

    @johncschuster
    Contributor

    Payment has been issued. Thanks for your contributions! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyInternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions