Skip to content

[HOLD for payment 2024-06-05] [$250] iOS - Expense - Chat header appears after delay when opening expense report #41523

Closed

Description

@lanitochka17

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.70-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch New Expensify app
  2. Submit two expenses to a user with no chat history
  3. In 1:1 DM, tap on the expense preview

Expected Result:

Expense report header will appear instantly

Actual Result:

The report content is displayed first, then followed by the chat header

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

Bug6469112_1714669668576.RPReplay_Final1714668295.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011fdda098a71985a0
  • Upwork Job ID: 1786406953110065152
  • Last Price Increase: 2024-05-10
  • Automatic offers:
    • DylanDylann | Reviewer | 0
    • bernhardoj | Contributor | 0
Issue OwnerCurrent Issue Owner: @puneetlath

Activity

  1. melvin-bot commented on May 2, 2024

    @melvin-bot

    Triggered auto assignment to @puneetlath (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  2. github-actions commented on May 2, 2024

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  3. lanitochka17 commented on May 2, 2024

    @lanitochka17
    Author

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

  4. lanitochka17 commented on May 2, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-vsp

  5. puneetlath commented on May 2, 2024

    @puneetlath
    Contributor

    I'm not able to reproduce this on my iOS app.

  6. francoisl commented on May 3, 2024

    @francoisl
    Contributor

    Can't repro either with Browserstack. I get a "Review required" violation on each expense, but that's unrelated, and violations are still in beta.

  7. bernhardoj commented on May 3, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The money report header shows with a delay.

    What is the root cause of that problem?

    The money report header connects to several onyx data,

    export default withOnyx<MoneyReportHeaderProps, MoneyReportHeaderOnyxProps>({
    chatReport: {
    key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT}${report.chatReportID}`,
    },
    nextStep: {
    key: ({report}) => `${ONYXKEYS.COLLECTION.NEXT_STEP}${report.reportID}`,
    },
    transactionThreadReport: {
    key: ({transactionThreadReportID}) => `${ONYXKEYS.COLLECTION.REPORT}${transactionThreadReportID}`,
    },
    session: {
    key: ONYXKEYS.SESSION,
    },
    })(MoneyReportHeader);

    and if the data is not available yet, withOnyx will return null. In this case, nextStep data is not available yet.

    This has the same root cause as #41397

    This also happens in the transaction header and the one that's not available yet is shownHoldUseExplanation

    shownHoldUseExplanation: {
    key: ONYXKEYS.NVP_HOLD_USE_EXPLAINED,
    initWithStoredValues: true,
    },

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

    Set an initial value of the missing data.

    For the nextStep, we can set it to an empty object.

    nextStep: {
    key: ({report}) => `${ONYXKEYS.COLLECTION.NEXT_STEP}${report.reportID}`,
    },

    For the shownHoldUseExplanation, we can set it to false.

    shownHoldUseExplanation: {
    key: ONYXKEYS.NVP_HOLD_USE_EXPLAINED,
    initWithStoredValues: true,
    },

    However, there is currently a bug in withOnyx where a falsey initial value is ignored. I previously fixed it here to fix #35906, but gets reverted because of some bugs that appear in the App where it expects the falsey initial value to not work. So, in the new PR, I use useOnyx hook instead that doesn't have this falsey initial value issue. So, we can do the same by using useOnyx here.

    We can consider this as a migration issue from withOnyx to useOnyx

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on May 3, 2024
  9. 50 remaining items

  10. changed the title [-][$250] iOS - Expense - Chat header appears after delay when opening expense report[/-] [+][HOLD for payment 2024-06-05] [$250] iOS - Expense - Chat header appears after delay when opening expense report[/+] on May 29, 2024
  11. melvin-bot commented on May 29, 2024

    @melvin-bot

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

  12. melvin-bot commented on May 29, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.76-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-06-05. 🎊

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

  13. puneetlath commented on Jun 5, 2024

    @puneetlath
    Contributor

    @DylanDylann bump on the checklist!

  14. DylanDylann commented on Jun 5, 2024

    @DylanDylann
    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:

    [@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA
    [@DylanDylann] 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
    [@DylanDylann] 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: NA
    [@DylanDylann] Determine if we should create a regression test for this bug. Yes
    [@DylanDylann] 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.

    Regression Test Proposal

    1. (Web/Desktop/mWeb) Refresh the app (iOS/Android) Close the app and reopen the app
    2. Verify the header/top bar of the home page/LHN is shown immediately

    Do we agree 👍 or 👎

  15. DylanDylann commented on Jun 5, 2024

    @DylanDylann
    Contributor

    @puneetlath thanks for your reminder

  16. puneetlath commented on Jun 10, 2024

    @puneetlath
    Contributor

    All paid. Thanks everyone!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions