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

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

Closed
1 of 6 tasks
lanitochka17 opened this issue May 2, 2024 · 47 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented May 2, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

Copy link
Contributor

github-actions bot commented May 2, 2024

👋 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.

@lanitochka17
Copy link
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

@lanitochka17
Copy link
Author

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

@puneetlath
Copy link
Contributor

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

@francoisl
Copy link
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.

@bernhardoj
Copy link
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

@puneetlath puneetlath added Weekly KSv2 Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 Weekly KSv2 labels May 3, 2024
@melvin-bot melvin-bot bot changed the title iOS - Expense - Chat header appears after delay when opening expense report [$250] iOS - Expense - Chat header appears after delay when opening expense report May 3, 2024
Copy link

melvin-bot bot commented May 3, 2024

Job added to Upwork: https://www.upwork.com/jobs/~011fdda098a71985a0

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

melvin-bot bot commented May 3, 2024

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

Copy link

melvin-bot bot commented May 7, 2024

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

@melvin-bot melvin-bot bot added the Overdue label May 7, 2024
@puneetlath
Copy link
Contributor

@DylanDylann thoughts on the proposal above?

@DylanDylann
Copy link
Contributor

Will update today

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

Oh see, I got misunderstand your mean

@DylanDylann
Copy link
Contributor

@bernhardoj's proposal looks good. I agree with using useOnyx instead of withOnyx
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented May 16, 2024

Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

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

melvin-bot bot commented May 16, 2024

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented May 16, 2024

📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@bernhardoj
Copy link
Contributor

PR is ready

cc: @DylanDylann

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 29, 2024
@melvin-bot melvin-bot bot 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 May 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

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

Copy link

melvin-bot bot commented May 29, 2024

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:

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Daily KSv2 and removed Weekly KSv2 labels May 30, 2024
@puneetlath
Copy link
Contributor

@DylanDylann bump on the checklist!

@DylanDylann
Copy link
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 👎

@DylanDylann
Copy link
Contributor

@puneetlath thanks for your reminder

@puneetlath
Copy link
Contributor

All paid. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

6 participants