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-01-17] [$500] LHN - Red dot does not appear in LHN conversation when IOU deletion error occurs #33535

Closed
3 of 6 tasks
lanitochka17 opened this issue Dec 23, 2023 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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 Dec 23, 2023

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.16-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Open New Expensify app
  2. Log in with any account
  3. Navigate to any conversation with an user you have access to and Request $10
  4. Disable the internet connection on the main testing device.
  5. As the secondary user/device navigate to the conversation with the main user where the 10$ were just requested
  6. As the Secondary user/device Pay the IOU via "Pay elsewhere"
  7. On the main testing device while offline - cancel the 10$ IOU
  8. Enable the internet connection on the main testing device
  9. Navigate to a paid IOU

Expected Result:

The red dot should appear in the LHN conversation when the error is caused by an offline deletion of a paid IOU

Actual Result:

A red dot does not appear in the LHN conversation when the error is caused by a paid IOU being removed offline

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

Bug6324507_1703287642404.Recording__969.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c5cf5023e3aab261
  • Upwork Job ID: 1738392838951575552
  • Last Price Increase: 2023-12-23
  • Automatic offers:
    • shubham1206agra | Reviewer | 28071466
    • tienifr | Contributor | 28071467
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 23, 2023
@melvin-bot melvin-bot bot changed the title LHN - Red dot does not appear in LHN conversation when IOU deletion error occurs [$500] LHN - Red dot does not appear in LHN conversation when IOU deletion error occurs Dec 23, 2023
Copy link

melvin-bot bot commented Dec 23, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01c5cf5023e3aab261

Copy link

melvin-bot bot commented Dec 23, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 23, 2023
Copy link

melvin-bot bot commented Dec 23, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 23, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Dec 23, 2023

Proposal

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

A red dot does not appear in the LHN conversation when the error is caused by a paid IOU being removed offline

What is the root cause of that problem?

We're not setting the error message to the report preview action in Onyx in failureData when deleting money request. We did it when creating the money request here so it works fine in that case.

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

Set the error message to the report preview action in Onyx in failureData when deleting money request, by updating this to:

[reportPreviewAction.reportActionID]: {
    ...reportPreviewAction,
    errors: ErrorUtils.getMicroSecondOnyxError('iou.error.genericDeleteFailureMessage'),
},

Currently even for other money request-related errors (like when creating money request fails), if we want to clear error by clicking "X", we have to clear errors individually in the report preview action and the IOU report. This will be the same for the delete money request error here.

But if we want clearing by "X" at 1 place to clear in both places, we can do that as well (for example by updating clearReportActionErrors), because they'd share the same error key, just that they are in 2 different report actions.

What alternative solutions did you explore? (Optional)

Consider fixing the same for editing money request error and other types of money request-related operations.

While testing I see there's sometimes an issue where if we reload the IOU report, the IOU report action disappears but the error in LHN still show. This is existing issue but seems out of scope of this issue but we might want to log and fix it.

@melvin-bot melvin-bot bot added the Overdue label Dec 25, 2023
Copy link

melvin-bot bot commented Dec 26, 2023

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

@shubham1206agra
Copy link
Contributor

@tienifr Your proposal doesn't seem right in this case. Your RCA is correct but solution seems wrong

@melvin-bot melvin-bot bot removed the Overdue label Dec 26, 2023
@brunovjk
Copy link
Contributor

Proposal

Problem Statement

The red dot isn't appearing in the Expensify LHN conversation when a paid IOU is removed offline.

Root Cause

During the deletion of a money request, the IOU.deleteMoneyRequest.failureData doesn't set the error message to the reportPreviewAction in Onyx.

Solution

To resolve this, we propose enhancing the code responsible for updating ONYXKEYS.COLLECTION.REPORT_ACTIONS for chatReport. Instead of a simple merge, explicitly set the errors field for the reportPreviewAction. Also, modify ReportActions.clearReportActionErrors to clear errors in both the IOU report and its parent chat.

Alternative Solutions Explored

Alternatively, making the IOU report 'unread' when an error emerge, could push it to the top of the list upon reconnection, eliminating the need to send the error message in two places.

@tienifr
Copy link
Contributor

tienifr commented Dec 27, 2023

@tienifr Your proposal doesn't seem right in this case. Your RCA is correct but solution seems wrong

@shubham1206agra just curious what do you think seems wrong about it?

Since we're doing the same thing when creating money request here. That's why creating money request doesn't have the same problem.

@shubham1206agra
Copy link
Contributor

shubham1206agra commented Dec 27, 2023

@tienifr Your proposal doesn't seem right in this case. Your RCA is correct but solution seems wrong

@shubham1206agra just curious what do you think seems wrong about it?

Since we're doing the same thing when creating money request here. That's why creating money request doesn't have the same problem.

Oh shoot, I actually got confused with something else. Your solution is correct. Sorry for the confusion.

Currently even for other money request-related errors (like when creating money request fails), if we want to clear error by clicking "X", we have to clear errors individually in the report preview action and the IOU report. This will be the same for the delete money request error here.

Lets keep this as it is right now as it is out of scope for this issue.

@shubham1206agra
Copy link
Contributor

@tienifr's proposal looks good to me

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 27, 2023

Triggered auto assignment to @robertjchen, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@robertjchen
Copy link
Contributor

Agreed, let's go with @tienifr 's proposal!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 28, 2023
Copy link

melvin-bot bot commented Dec 28, 2023

📣 @shubham1206agra 🎉 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 Dec 28, 2023

📣 @tienifr 🎉 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 melvin-bot bot added the Weekly KSv2 label Dec 28, 2023
@robertjchen robertjchen added Reviewing Has a PR in review and removed Reviewing Has a PR in review labels Dec 28, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 10, 2024
@melvin-bot melvin-bot bot changed the title [$500] LHN - Red dot does not appear in LHN conversation when IOU deletion error occurs [HOLD for payment 2024-01-17] [$500] LHN - Red dot does not appear in LHN conversation when IOU deletion error occurs Jan 10, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 10, 2024
Copy link

melvin-bot bot commented Jan 10, 2024

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

Copy link

melvin-bot bot commented Jan 10, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-4 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-01-17. 🎊

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

Copy link

melvin-bot bot commented Jan 10, 2024

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:

  • [@shubham1206agra] The PR that introduced the bug has been identified. Link to the PR:
  • [@shubham1206agra] 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:
  • [@shubham1206agra] 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:
  • [@shubham1206agra] Determine if we should create a regression test for this bug.
  • [@shubham1206agra] 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.
  • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jan 16, 2024
@robertjchen
Copy link
Contributor

Awaiting completion of BZ checklist 🙏

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 19, 2024
@robertjchen robertjchen added the Reviewing Has a PR in review label Jan 23, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jan 23, 2024
@shubham1206agra
Copy link
Contributor

shubham1206agra commented Jan 23, 2024

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:

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jan 23, 2024

Sorry for the delay- paying this out.

Payouts due:

Issue Reporter: NA
Contributor: $500 @tienifr (paid in Upwork)
Contributor+: $500 @shubham1206agra (paid in Upwork)

Eligible for 50% #urgency bonus? NA

Upwork job is here.

@shubham1206agra can you accept our offer in Upwork and I'll pay you? Thanks!

@shubham1206agra
Copy link
Contributor

Accepted

@Christinadobrzyn
Copy link
Contributor

Awesome! paid in Upwork based on this payment summary - #33535 (comment)

Closing this out as complete! 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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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