App icon indicating copy to clipboard operation
App copied to clipboard

[$250] mWeb - Send money-In send money report page, an extra skeleton preview is displayed

Open lanitochka17 opened this issue 1 year ago • 14 comments

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.58 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. Go to https://staging.new.expensify.com/
  2. Tap on a report with no previous conversation
  3. Tap plus icon -- send money 4.Enter an amount and tap next 5.Tap pay elsewhere 6.Open the newly created send money request

Expected Result:

In send money report page, an extra skeleton preview must not be displayed

Actual Result:

In send money report page, an extra skeleton preview is displayed

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

https://github.com/Expensify/App/assets/78819774/d8b90e32-751f-4412-9101-7cecdc937004

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01523fec2621a20689
  • Upwork Job ID: 1773847838939754496
  • Last Price Increase: 2024-03-29

lanitochka17 avatar Mar 29 '24 22:03 lanitochka17

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

melvin-bot[bot] avatar Mar 29 '24 22:03 melvin-bot[bot]

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

  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.

github-actions[bot] avatar Mar 29 '24 22:03 github-actions[bot]

@hayata-suenaga 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 avatar Mar 29 '24 22:03 lanitochka17

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

lanitochka17 avatar Mar 29 '24 22:03 lanitochka17

I am going to take over this one, I think ti might be related to https://github.com/Expensify/App/pull/36657 @dukenv0307 @abdulrahuman5196 the issue is actually minor and I dont think its a blocker

mountiny avatar Mar 29 '24 22:03 mountiny

@abdulrahuman5196 @dukenv0307 could you please test if this occurs also in revert of the PR?

mountiny avatar Mar 29 '24 22:03 mountiny

Job added to Upwork: https://www.upwork.com/jobs/~01523fec2621a20689

melvin-bot[bot] avatar Mar 29 '24 23:03 melvin-bot[bot]

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

melvin-bot[bot] avatar Mar 29 '24 23:03 melvin-bot[bot]

Upwork job price has been updated to $250

melvin-bot[bot] avatar Mar 29 '24 23:03 melvin-bot[bot]

Proposal

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

In send money report page, an extra skeleton preview is displayed

What is the root cause of that problem?

The root cause is found here.

const moneyRequestActions = reportActions.filter(
            (action) => action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && action.originalMessage && action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE,
        );

We are filtering out all report action types except CREATE. This causes the moneyRequestActions.length number to be incorrect when the originalMessage action type is PAY, for example.

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

This depends on product requirements. Assuming we want to apply this flow for any IOU ReportAction we can drop the originalMessage filters like so:

 const moneyRequestActions = reportActions.filter(
            (action) => action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU 
);

Alternatively, if we want to only allow certain types, we can extend the conditional. For example, if the types are PAY and CREATE, it would look like this:



const moneyRequestActions = reportActions.filter(
            (action) =>
                action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU &&
                action.originalMessage &&
                (action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE || action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.PAY),
        );

What alternative solutions did you explore? (Optional)

N/A

mmmbytes avatar Mar 30 '24 07:03 mmmbytes

@mountiny This is the regression of https://github.com/Expensify/App/pull/36657. But the problem is when we send money, the type of iouAction is pay, and then moneyRequestActions is empty.

Is it expected that the iouAction that is the iou preview in send money flow has type is pay.

dukenv0307 avatar Mar 30 '24 07:03 dukenv0307

@mountiny @abdulrahuman5196 The PR is ready for review.

dukenv0307 avatar Mar 30 '24 18:03 dukenv0307

@mountiny Does this need C+ review?

mananjadhav avatar Mar 30 '24 19:03 mananjadhav

@dukenv0307 @mountiny

It looks like you used the root cause and second solution from my proposal for this PR. As I said, we simply extend the conditional to match the product requirements. Would you please confirm if you will award me the bug bounty since my work is being used for this?

mmmbytes avatar Mar 30 '24 19:03 mmmbytes

@mmmbytes You can see the code change in my PR, this is different from your alternative solution and I just re-use the logic in ReportActionItem without using any proposal.

dukenv0307 avatar Mar 31 '24 06:03 dukenv0307

Thank you for your response, dukenv0307. For clarity, if you re-read my proposal you can see that I mentioned that depending on product requirements, we can extend the conditional to encompass other action types such as PAY.

This is what your PR has done. You extended the conditional to include PAY and TRACK. The only difference between my proposal and your PR is that you check for IOUDetails if the action type is PAY. This is a minor detail, but the logic is still the same.

mmmbytes avatar Mar 31 '24 19:03 mmmbytes

📣 @abdulrahuman5196 🎉 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 📖

melvin-bot[bot] avatar Mar 31 '24 20:03 melvin-bot[bot]

@mananjadhav Assigning @abdulrahuman5196 coming from the original PR

@mmmbytes Thank you for the proposal. Since this bug originated from recent PR, the guidelines suggest the PR author should be the one fixing it. Unfortunately, in this case, we have only confirmed that after you have already made the proposal.

mountiny avatar Mar 31 '24 20:03 mountiny

Checking now

abdulrahuman5196 avatar Apr 01 '24 07:04 abdulrahuman5196

@mountiny I see. Thanks for clarifying this.

mmmbytes avatar Apr 01 '24 20:04 mmmbytes

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

melvin-bot[bot] avatar Apr 08 '24 10:04 melvin-bot[bot]

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

  • https://github.com/Expensify/App/pull/39326

If no regressions arise, payment will be issued on 2024-04-15. :confetti_ball:

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

melvin-bot[bot] avatar Apr 08 '24 10:04 melvin-bot[bot]

Issue is ready for payment but no BZ is assigned. @Christinadobrzyn you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

melvin-bot[bot] avatar Apr 15 '24 18:04 melvin-bot[bot]

Payouts due:

  • [x] Contributor: $250 @abdulrahuman5196 (paid in Upwork - https://www.upwork.com/nx/wm/workroom/36962727/overview)

Upwork job is here.

@mananjadhav should you be paid as the C+?

@mananjadhav or @abdulrahuman5196 do we need a regression test?

Christinadobrzyn avatar Apr 16 '24 00:04 Christinadobrzyn

@Christinadobrzyn I don’t think any payouts are needed. IIRC this was a regression.

mananjadhav avatar Apr 16 '24 02:04 mananjadhav

Oh thanks @mananjadhav - sorry @abdulrahuman5196 I just requested a refund for the $250 paid to you via Upwork. sorry about that - I should have asked before paying. Let me know if I'm missing anything

Christinadobrzyn avatar Apr 16 '24 02:04 Christinadobrzyn

@Christinadobrzyn done.

abdulrahuman5196 avatar Apr 16 '24 05:04 abdulrahuman5196

thank you @abdulrahuman5196 so sorry about that. I think this can be closed since there's no payments or regression test.

Closing but let me know if I'm missing anything

Christinadobrzyn avatar Apr 17 '24 07:04 Christinadobrzyn