App icon indicating copy to clipboard operation
App copied to clipboard

IOU - No way to dismiss IOU report with RBR from LHN when paying deleted request offline

Open lanitochka17 opened this issue 1 year ago • 3 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-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4463293 Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. [User A] Request money from User B
  3. [User B] Go to 1:1 DM with User A and click on IOU preview to go to IOU report
  4. [User B] Go offline
  5. [User B] Pay elsewhere the report and stay in IOU report
  6. [User A] Delete the IOU request
  7. [User B] Go online 8/ [User B] After not here page shows up, navigate to a different chat

Expected Result:

The IOU report with RBR should dismiss from LHN

Actual Result:

The IOU report with RBR does not dismiss from LHN. There is no way to dismiss the RBR

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [x] Android: Native
  • [x] Android: mWeb Chrome
  • [x] iOS: Native
  • [x] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/e990f24f-0247-4990-b4e8-52201ba5a999

View all open jobs on GitHub

lanitochka17 avatar Mar 30 '24 16:03 lanitochka17

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Mar 30 '24 16:03 melvin-bot[bot]

We think that this bug might be related to #wave-collect - Release 1

lanitochka17 avatar Mar 30 '24 16:03 lanitochka17

@kadiealexander 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 30 '24 16:03 lanitochka17

Job added to Upwork: https://www.upwork.com/jobs/~019cc4c27732f8c447

melvin-bot[bot] avatar Apr 03 '24 01:04 melvin-bot[bot]

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

melvin-bot[bot] avatar Apr 03 '24 01:04 melvin-bot[bot]

Proposal

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

The IOU report with RBR does not dismiss from LHN. There is no way to dismiss the RBR

What is the root cause of that problem?

When User B paid the IOU and goes online, the back-end will return errorFields.notFound on the report in Onyx, because the IOU was already deleted by User A

This is a known case, we can see that here, we will show not found page specifically in the case of errorFields.notFound error, but we didn't have any logic to clear the notFound report after leaving the screen, so the report and it's RBR will be stuck there.

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

Add logic to clear the notFound/inaccessible report after leaving the screen, it's safe to delete then because the user already sees the NotFound page and understands what's going on, they also have no need to return to that report. We already did the same when the user clears the createChat error here.

Pseudocode (to be added here):

useEffect(() => {
    if (prevIsFocused && !isFocused && report.reportID && shouldHideReport) {
        Report.deleteReport(report.reportID);
    }
}, [isFocused, report?.reportID, shouldHideReport]);

shouldHideReport here means that the report is not accessible, and has no helpfulErrors (see here for more info)

We can optionally further improve the logic to:

  • deleteReport only if the user switched to a new report (by making use of isTopMostReportId), that means if the user opens settings page and the errored report loses focus, the report will not be deleted
  • After deleting the report, make sure to purge the errored report screen from the route, so that it could not be "go back" to from another report.

What alternative solutions did you explore? (Optional)

An alternative UX is that, we don't show Not found page in this case, but show the error normally, instead ignoring that error in here. We can show an error like This report is not found, and when the user clears that error, we'll delete that report, just like when clearing the createChat error.

nkdengineer avatar Apr 03 '24 07:04 nkdengineer

@DylanDylann bump!

kadiealexander avatar Apr 04 '24 22:04 kadiealexander

@nkdengineer After deleting the request in the second device, the screen is navigated to the main report and the IOU report with a red dot appears after a moment. I think the error report shouldn't appear in this case. Could you check again and update the proposal

https://github.com/Expensify/App/assets/141406735/ab123e91-9452-4f68-91a8-b5518cca4f75

DylanDylann avatar Apr 05 '24 10:04 DylanDylann

@kadiealexander, @DylanDylann Whoops! This issue is 2 days overdue. Let's get this updated quick!

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

@nkdengineer did you have any thoughts on the feedback above?

kadiealexander avatar Apr 09 '24 05:04 kadiealexander

@kadiealexander @DylanDylann I'll give an update in 24h, thanks 🙏

nkdengineer avatar Apr 10 '24 04:04 nkdengineer

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

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

It seems the behavior here has changed, I'll need some more time to check, I'll do tomorrow.

Thanks for the patience!

nkdengineer avatar Apr 11 '24 16:04 nkdengineer

Not overdue, still looking for proposals!

kadiealexander avatar Apr 12 '24 05:04 kadiealexander

@kadiealexander @DylanDylann this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

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

@nkdengineer any thoughts on an updated proposal?

kadiealexander avatar Apr 15 '24 04:04 kadiealexander

Sorry I haven't been able to get back to this, I will try to give an update tomorrow.

nkdengineer avatar Apr 17 '24 11:04 nkdengineer

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Apr 17 '24 16:04 melvin-bot[bot]

Not overdue, please get your proposals in! 📣

kadiealexander avatar Apr 18 '24 04:04 kadiealexander

@nkdengineer Any update here? Could you reproduce anymore?

DylanDylann avatar Apr 22 '24 00:04 DylanDylann

@mvtglobally confirmed this is no longer reproducible. Closing, please reopen if you still experience the issue.

kadiealexander avatar Apr 23 '24 06:04 kadiealexander