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-02-15] [$500] IOU - Dismissing IOU deletion error also dismisses IOU preview when the preview should stay #35434

Closed
6 tasks done
lanitochka17 opened this issue Jan 30, 2024 · 22 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

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 30, 2024

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.33-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:
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. [User A] Request money from User B
  2. [User A] Go to IOU report
  3. [User A] Go offline
  4. [User B] Pay the request
  5. [User A] Delete the request while offline and stay in the main chat
  6. [User A] Go online
  7. [User A] Dismiss the error message in the main chat

Expected Result:

Since the deleted IOU request fails, the IOU preview should appear in the main chat

Actual Result:

After dismissing the deletion error, the IOU preview is also dimissed

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

Bug6361317_1706642664751.20240130_141635.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0117ee863b24012323
  • Upwork Job ID: 1752426712396840960
  • Last Price Increase: 2024-01-30
  • Automatic offers:
    • situchan | Reviewer | 28142911
    • bernhardoj | Contributor | 28142912
@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 Jan 30, 2024
@melvin-bot melvin-bot bot changed the title IOU - Dismissing IOU deletion error also dismisses IOU preview when the preview should stay [$500] IOU - Dismissing IOU deletion error also dismisses IOU preview when the preview should stay Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0117ee863b24012323

Copy link

melvin-bot bot commented Jan 30, 2024

Triggered auto assignment to @garrettmknight (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 Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-bills.
CC @davidcardoza

@Tony-MK

This comment was marked as outdated.

@bernhardoj
Copy link
Contributor

Proposal

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

If we close the request preview error message, the report preview also disappears, but it should stay visible.

What is the root cause of that problem?

When we delete the request, we optimistically set the pendingAction to DELETE.

updatedReportPreviewAction.pendingAction = shouldDeleteIOUReport ? CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE : CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE;

If we pay the request from the requested user, the delete action will fail when we come back online. If fails, the error message will show with a close button, but the DELETE pendingAction still exists.

If the pendingAction is DELETE while online, the view should be hidden, but because we have an error message, the view is displayed.

const hasErrors = !isEmptyObject(errors ?? {});

const hideChildren = shouldHideOnDelete && !isOffline && pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !hasErrors;

So, once we press the close error message, the request view is hidden.

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

We should clear the pendingAction when the delete fails.

App/src/libs/actions/IOU.js

Lines 2813 to 2816 in 4e88eea

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

this is very similar to #33158, but on a different component and under a different condition which I didn't expect it would have the same issue

@melvin-bot melvin-bot bot added the Overdue label Feb 2, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

@garrettmknight, @situchan Huh... This is 4 days overdue. Who can take care of this?

@situchan
Copy link
Contributor

situchan commented Feb 5, 2024

@bernhardoj's proposal looks good to me.
Agree this is separate issue. Btw the regression period of #33158 is already over.
🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

📣 @situchan 🎉 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 Feb 5, 2024

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

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 6, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @situchan

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Feb 8, 2024
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Feb 8, 2024
@melvin-bot melvin-bot bot changed the title [$500] IOU - Dismissing IOU deletion error also dismisses IOU preview when the preview should stay [HOLD for payment 2024-02-15] [$500] IOU - Dismissing IOU deletion error also dismisses IOU preview when the preview should stay Feb 8, 2024
Copy link

melvin-bot bot commented Feb 8, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 8, 2024
Copy link

melvin-bot bot commented Feb 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.38-6 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-02-15. 🎊

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

Copy link

melvin-bot bot commented Feb 8, 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:

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

@garrettmknight garrettmknight added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Feb 14, 2024
Copy link

melvin-bot bot commented Feb 14, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 14, 2024
@garrettmknight
Copy link
Contributor

@isabelastisser reassigning for payment since I'll be OOO when the date comes. Thanks!

@garrettmknight garrettmknight removed their assignment Feb 14, 2024
@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Feb 15, 2024
@isabelastisser
Copy link
Contributor

Hey @situchan, can you please complete the checklist? Thanks!

@isabelastisser
Copy link
Contributor

Payment summary:

@situchan Reviewier $500 - paid in Upwork
@bernhardoj Contributor $500 - paid in Upwork

@isabelastisser
Copy link
Contributor

bump @situchan to complete the list so we can close this. Thanks!

@situchan
Copy link
Contributor

No need another regression test as caught by QA team

@isabelastisser
Copy link
Contributor

Thanks @situchan! All set.

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
Projects
None yet
Development

No branches or pull requests

7 participants