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-04-05] [$500] Avatar of user who sent message disappears after deleting comment #38830

Closed
6 tasks done
kavimuru opened this issue Mar 22, 2024 · 34 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Mar 22, 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.56-0
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Go to https://staging.new.expensify.com/
    and log in as user A
  2. In incognito log in as user B
  3. As user A, open the chat with user B and send a message
  4. As user B, send two messages
  5. As user B, delete the last sent message

Expected Result:

The avatar of user B is still displayed next to the sent message

Actual Result:

The avatar of user B disappears after deleting a message

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

Bug6423493_1711131226128.Recording__333.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010d8a4fbe15a51d30
  • Upwork Job ID: 1771294914072977408
  • Last Price Increase: 2024-03-22
  • Automatic offers:
    • Pujan92 | Reviewer | 0
    • gijoe0295 | Contributor | 0
Issue OwnerCurrent Issue Owner: @anmurali
@kavimuru kavimuru added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 22, 2024
Copy link

melvin-bot bot commented Mar 22, 2024

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

@github-actions github-actions bot added Hourly KSv2 and removed Daily KSv2 labels Mar 22, 2024
@melvin-bot melvin-bot bot added the Daily KSv2 label Mar 22, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot melvin-bot bot removed the Hourly KSv2 label Mar 22, 2024
Copy link

melvin-bot bot commented Mar 22, 2024

Triggered auto assignment to @bondydaa (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@kavimuru
Copy link
Author

@bondydaa 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.

@kavimuru
Copy link
Author

We think this bug might be related to #vip-vsb

@iwiznia iwiznia added the Hourly KSv2 label Mar 22, 2024
@gijoe0295
Copy link
Contributor

gijoe0295 commented Mar 22, 2024

Proposal

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

The avatar of user B disappears after deleting a message

What is the root cause of that problem?

Regression from #30269. Before that PR, we filtered out report actions by shouldReportActionBeVisible which also filtered deleted actions. But after that, we retrieved all report actions.

Later in ReportActionsList, we did not take into account the case when the previous action is deleted when evaluating isConsecutiveActionMadeByPreviousActor. So even though the previous message was deleted, displayAsGroup of the second message is still true, causing it to display without sender info.

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

I think for evaluating consecutive actions, we should only take into account visible actions. That's also what we've been doing previously (see RCA for code ref). We should use sortedVisibleReportActions as a param for isConsecutiveActionMadeByPreviousActor.

What alternative solutions did you explore? (Optional)

Add isDeletedAction(previousAction) check to the above function.

if (isDeletedAction(previousAction)) {
    return false;
}

or we can use shouldReportActionBeVisible for previous action in the above function.

@bondydaa
Copy link
Contributor

👀 looking into this

@bondydaa bondydaa removed the Daily KSv2 label Mar 22, 2024
@bondydaa
Copy link
Contributor

I'm sus of this PR #36747, reverting locally and testing.

@bondydaa
Copy link
Contributor

🚫 nope nevermind still reproducible

@bondydaa
Copy link
Contributor

heh was probably the big comment linking PR #30269 then 😅 but i don't know that we're going to revert that.

I'm going to add external b/c I think the existing proposal makes sense, i'm a little confused how this works without anything checking for if the comment is deleted or not (ie: this should probably happen on production as well but 🤷).

@bondydaa bondydaa added the External Added to denote the issue can be worked on by a contributor label Mar 22, 2024
Copy link

melvin-bot bot commented Mar 22, 2024

Job added to Upwork: https://www.upwork.com/jobs/~010d8a4fbe15a51d30

@melvin-bot melvin-bot bot changed the title Avatar of user who sent message disappears after deleting comment [$500] Avatar of user who sent message disappears after deleting comment Mar 22, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 22, 2024
Copy link

melvin-bot bot commented Mar 22, 2024

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

Copy link

melvin-bot bot commented Mar 25, 2024

📣 @Pujan92 🎉 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 Mar 25, 2024

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

@bondydaa
Copy link
Contributor

Great thank you for the discussion and helping get to the bottom of all that 🙇.

I think we should still block the deploy for this one since it is pretty bad to have a message from a different user end up getting shown as if it was from the wrong user.

@bondydaa
Copy link
Contributor

merged the PR, requesting a CP now.

@bondydaa
Copy link
Contributor

@kavimuru can you retest this and confirm it's fixed, CP should have been completed about 40 minutes ago so should be ready on staging.

@yuwenmemon
Copy link
Contributor

Can confirm this does not happen on staging anymore. Removing the blocker label

@yuwenmemon yuwenmemon removed the DeployBlockerCash This issue or pull request should block deployment label Mar 25, 2024
@gijoe0295
Copy link
Contributor

PR is on production.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 29, 2024
@melvin-bot melvin-bot bot changed the title [$500] Avatar of user who sent message disappears after deleting comment [HOLD for payment 2024-04-05] [$500] Avatar of user who sent message disappears after deleting comment Mar 29, 2024
Copy link

melvin-bot bot commented Mar 29, 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 Mar 29, 2024
Copy link

melvin-bot bot commented Mar 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-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-04-05. 🎊

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

Copy link

melvin-bot bot commented Mar 29, 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:

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

@gijoe0295
Copy link
Contributor

gijoe0295 commented Apr 9, 2024

@bondydaa PR was on production 2 weeks ago without any regression. Please handle payment when you have time.

@gijoe0295
Copy link
Contributor

gijoe0295 commented Apr 15, 2024

@bondydaa Can you complete payment? @Pujan92 Can you complete the checklist? We are 3 weeks overdue but Melvin is not working.

@bondydaa
Copy link
Contributor

@anmurali will handle payment

@Pujan92
Copy link
Contributor

Pujan92 commented Apr 15, 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:

Regression Test Steps

  1. Send consecutive messages from User A to User B and vice-versa
  2. Delete any of the message
  3. Verify that the senders info shows correctly with the messages

Do you agree 👍 or 👎 ?

@gijoe0295
Copy link
Contributor

Awaiting @anmurali handling here.

@anmurali
Copy link

Paid and added regression test.

@anmurali anmurali removed the Awaiting Payment Auto-added when associated PR is deployed to production label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants