App
App copied to clipboard
IOU - No way to dismiss IOU report with RBR from LHN when paying deleted request offline
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:
- Go to staging.new.expensify.com
- [User A] Request money from User B
- [User B] Go to 1:1 DM with User A and click on IOU preview to go to IOU report
- [User B] Go offline
- [User B] Pay elsewhere the report and stay in IOU report
- [User A] Delete the IOU request
- [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
Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
We think that this bug might be related to #wave-collect - Release 1
@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
Job added to Upwork: https://www.upwork.com/jobs/~019cc4c27732f8c447
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (External)
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:
deleteReportonly if the user switched to a new report (by making use ofisTopMostReportId), 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.
@DylanDylann bump!
@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
@kadiealexander, @DylanDylann Whoops! This issue is 2 days overdue. Let's get this updated quick!
@nkdengineer did you have any thoughts on the feedback above?
@kadiealexander @DylanDylann I'll give an update in 24h, thanks 🙏
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
It seems the behavior here has changed, I'll need some more time to check, I'll do tomorrow.
Thanks for the patience!
Not overdue, still looking for proposals!
@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!
@nkdengineer any thoughts on an updated proposal?
Sorry I haven't been able to get back to this, I will try to give an update tomorrow.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Not overdue, please get your proposals in! 📣
@nkdengineer Any update here? Could you reproduce anymore?
@mvtglobally confirmed this is no longer reproducible. Closing, please reopen if you still experience the issue.