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-07] [$500] IOU - Composer reappears and amount reverts to original amount for an empty report #34386

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

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.24-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. Go offline
  2. Go to 1:1 DM
  3. Create a manual request
  4. Delete the request
  5. Return to main chat > Right click IOU preview > Reply in thread
  6. Go online

Expected Result:

The report page will remain empty with no composer input and the amount should remain at 0.00

Actual Result:

The composer reappears and the amount reverts to original amount. When user attempts to send a message in the report, error shows up

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

Bug6339135_1704992826319.bandicam_2024-01-11_10-42-17-510.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0106494542083722ce
  • Upwork Job ID: 1745498086905307136
  • Last Price Increase: 2024-01-11
  • Automatic offers:
    • jjcoffee | Reviewer | 28104825
    • dukenv0307 | Contributor | 28104826
@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 11, 2024
@melvin-bot melvin-bot bot changed the title IOU - Composer reappears and amount reverts to original amount for an empty report [$500] IOU - Composer reappears and amount reverts to original amount for an empty report Jan 11, 2024
Copy link

melvin-bot bot commented Jan 11, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0106494542083722ce

Copy link

melvin-bot bot commented Jan 11, 2024

Triggered auto assignment to @peterdbarkerUK (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 11, 2024
Copy link

melvin-bot bot commented Jan 11, 2024

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 12, 2024

Proposal

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

The composer reappears and the amount reverts to original amount. When user attempts to send a message in the report, error shows up

What is the root cause of that problem?

When deleting money request such that the iouReport is also deleted (see this condition):

  1. We're not deleting the iouReport optimistically but we only delete it after the request is successful here, this is why the user can still access this report and only after coming online, they'll no longer be accessible. This is different from the transaction thread which will be removed in Onyx immediately after it's deleted. There's no reason we should keep the iouReport optimistically when shouldDeleteIOUReport is true, because the user won't be able to interact with it (there'll be no composer when going to the thread), and the thread will be removed completely once online so we should do the same optimistically.
  2. We're not setting the html of the message of the report preview to empty string if the report preview is deleted. This causes this condition to be false and the "Reply in thread" option still shows. This is not correct because we don't allow threading on deleted (even optimistically deleted) report action. Try delete a normal comment and we can see we can no longer thread on it.

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

  1. If shouldDeleteIOUReport is true, Optimistically delete the iou report, and restore it in failureData. We should retain only the necessary fields of iouReport to display the report preview (and any other places that require those fields). Or in ReportPreview, instead of using fields in iouReport, we can use equivalent fields inside the report preview action itself as the fallback.
  2. [Optiona] Set html of the message of the report preview to empty string if the report preview is deleted. We should prevent clicking on the report preview as well because the iou report is no longer accessible.

What alternative solutions did you explore? (Optional)

NA

@peterdbarkerUK
Copy link
Contributor

Hmm, is the video only bugging out for me?

I think this is #vip-split, checked with Gabi here.

@melvin-bot melvin-bot bot removed the Overdue label Jan 15, 2024
@jjcoffee
Copy link
Contributor

@peterdbarkerUK I get that quite often with GH videos for some reason, usually refreshing the page helps!

@jjcoffee
Copy link
Contributor

jjcoffee commented Jan 16, 2024

Can't replicate on latest staging (v1.4.25-5) - I get redirected back to the 1:1 DM once I come back online.

I do think it's probably worth disabling the Reply in thread option when the report action is pending deletion. We do this for comments, so it makes sense to do it here too for consistency. If we want to that, we can go with @dukenv0307's proposal (though we'd only need the second part).

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 16, 2024

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

@peterdbarkerUK
Copy link
Contributor

Added to #vip-split :D

@puneetlath can @dukenv0307 take care of this or does it need to be implemented by you following this assignment?

@dukenv0307
Copy link
Contributor

@puneetlath can @dukenv0307 take care of this or does it need to be implemented by you following this assignment?

I can take care of it once assigned 👍

@puneetlath
Copy link
Contributor

Makes sense to me to do for consistency.

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

melvin-bot bot commented Jan 16, 2024

📣 @jjcoffee 🎉 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 Jan 16, 2024

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

@dukenv0307
Copy link
Contributor

@jjcoffee The PR is ready for review.

@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 31, 2024
@melvin-bot melvin-bot bot changed the title [$500] IOU - Composer reappears and amount reverts to original amount for an empty report [HOLD for payment 2024-02-07] [$500] IOU - Composer reappears and amount reverts to original amount for an empty report Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 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 Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-5 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-07. 🎊

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

Copy link

melvin-bot bot commented Jan 31, 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:

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

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

melvin-bot bot commented Feb 1, 2024

Current assignee @puneetlath is eligible for the Bug assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 1, 2024
@jjcoffee
Copy link
Contributor

jjcoffee commented Feb 5, 2024

  • The PR that introduced the bug has been identified. Link to the PR: N/A - just an inconsistency bug
  • 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: N/A
  • 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: N/A
  • Determine if we should create a regression test for this bug. Yes
  • 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.

Regression Test Proposal

  1. Go offline
  2. Create a money request on a chat without any open IOU report
  3. Go to the IOU report
  4. Delete the request
  5. After going back to the chat report, hover or long press on the report preview
  6. Verify that Reply in thread option isn't present

Do we agree 👍 or 👎

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

Issue for regression test: https://github.com/Expensify/Expensify/issues/366703

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Feb 6, 2024
@puneetlath
Copy link
Contributor

All paid. Thanks y'all!

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

6 participants