Closed lanitochka17 closed 3 months ago
Triggered auto assignment to @puneetlath (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: 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:
@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
We think that this bug might be related to #vip-vsp
I'm not able to reproduce this on my iOS app.
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.
The money report header shows with a delay.
The money report header connects to several onyx data, https://github.com/Expensify/App/blob/0f39e4370ccd84ccf7e1647b42cb505a69a2e9a3/src/components/MoneyReportHeader.tsx#L318-L331
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 https://github.com/Expensify/App/issues/41397
This also happens in the transaction header and the one that's not available yet is shownHoldUseExplanation https://github.com/Expensify/App/blob/0f39e4370ccd84ccf7e1647b42cb505a69a2e9a3/src/components/MoneyRequestHeader.tsx#L246-L249
Set an initial value of the missing data.
For the nextStep, we can set it to an empty object. https://github.com/Expensify/App/blob/0f39e4370ccd84ccf7e1647b42cb505a69a2e9a3/src/components/MoneyReportHeader.tsx#L322-L324
For the shownHoldUseExplanation, we can set it to false. https://github.com/Expensify/App/blob/0f39e4370ccd84ccf7e1647b42cb505a69a2e9a3/src/components/MoneyRequestHeader.tsx#L246-L249
However, there is currently a bug in withOnyx where a falsey initial value is ignored. I previously fixed it here to fix https://github.com/Expensify/App/issues/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
Job added to Upwork: https://www.upwork.com/jobs/~011fdda098a71985a0
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (External
)
@puneetlath, @DylanDylann Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@DylanDylann thoughts on the proposal above?
Will update today
@bernhardoj Your proposal looks promising. Could you provide a draft branch?
@DylanDylann here is the test branch
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@bernhardoj As I understand we need to set the initial value:
For the nextStep, we can set it to an empty object.
For the shownHoldUseExplanation, we can set it to false.
But we can't set the initial value is false for shownHoldUseExplanation
because this bug
However, there is currently a bug in withOnyx where a falsey initial value is ignored.
Correct, so I used the useOnyx hook which doesn't have that bug.
Issue not reproducible during KI retests. (First week)
I also can't reproduce anymore, @bernhardoj Could you reproduce this issue anymore?
I can still reproduce it. If you already opened the report once, then the data is already available. In that case, try to reopen the app.
https://github.com/Expensify/App/assets/50919443/85b8a911-1b1d-4cb4-862c-6b58d35ac5de
@bernhardoj Yeah, a bit delay in MoneyReportHeader. But I don't see delay in MoneyRequestHeader. Could you help to confirm that?
You can see the MoneyRequestHeader delay in 0:09 after the header skeleton disappears
Oh see, a very small delay
Your proposal works well but gives me a time to dive deep into useOnyx to understand why it resolves this problem
@bernhardoj Could you explain why useOnyx will fix this issue?
and if the data is not available yet, withOnyx will return null.
The important point of the issue is this. code ref
if we move from withOnyx HOC to useOnyx hook, then we won't have this problem.
@bernhardoj I have a bit curious
If the data is not available, what does useOnyx return?
why the header is delayed when the data is not available?
If the data is not available, what does useOnyx return?
It's null from my testing
why the header is delayed when the data is not available?
and if the data is not available yet, withOnyx will return null.
You mean if data isn't available both withOnyx and useOnyx return null ????
Yes
why the header is delayed when the data is not available?
I want to ask why when the data is null, the header is delay
if we move from withOnyx HOC to useOnyx hook, then we won't have this problem.
Could you help to detail your point? Why useOnyx will resolve this bug?
When you render null, you see nothing. Please check the ref I put in my comment here
When you render null
which null? You mean the nextStep prop? From my testing, I don't see nextStep has null value
This null π
Oh see, I got misunderstand your mean
@bernhardoj's proposal looks good. I agree with using useOnyx instead of withOnyx πππ C+ reviewed
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
π£ @DylanDylann π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @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 π
PR is ready
cc: @DylanDylann
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.76-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-06-05. :confetti_ball:
For reference, here are some details about the assignees on this issue:
@DylanDylann bump on the checklist!
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
Do we agree π or π
@puneetlath thanks for your reminder
All paid. Thanks everyone!
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:
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?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/eef5e978-b8ae-48af-a5a9-0dcda4f7cd32
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @puneetlath