Skip to content

[HOLD for payment 2023-08-10] [$1000] Mweb - "Deleted message" chat appears in chat list for pinned deleted threads #22950

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Login to staging new dot
  2. Go to any chat and long press on any message within the chat
  3. Click on reply in thread and send a message in thread
  4. Pin the thread using the pin icon at top right corner
  5. Now delete the parent message in the thread
  6. Go back to parent message and click on thread
  7. Now delete the child message in the thread
  8. Go back to chat and observe the thread has been removed
  9. Go to chat list and observe that the deleted thread can be found pinned as "Deleted message" chat

Expected Result:

The deleted thread should also be removed

Actual Result:

The deleted thread remains in the chat list even after parent and child messages are both deleted

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.41-1
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
Notes/Photos/Videos: Any additional supporting documentation

2023_07_14_09_59_40.mp4
Screen_Recording_20230715_141340_Chrome.mp4

Expensify/Expensify Issue URL:
Issue reported by: @SofoniasN
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689361647727409

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01259a3effbfb36398
  • Upwork Job ID: 1682395479803457536
  • 2023-07-21
  • Automatic offers:
    • | | 0
    • hoangzinh | Contributor | 25765217
    • sofoniasN | Reporter | 25765220

Activity

  1. added
    Daily
    Bug
    on Jul 15, 2023
  2. melvin-bot commented on Jul 15, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jul 15, 2023

    @melvin-bot

    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
  4. hungvu193 commented on Jul 15, 2023

    @hungvu193
    Contributor

    Proposal

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

    Mweb - "Deleted message" chat appears in chat list for pinned deleted threads

    What is the root cause of that problem?

    We're checking in here, if our reports are pinned or hasDraft then added it to the list.

    App/src/libs/ReportUtils.js

    Lines 2127 to 2129 in 6e5b07c

    if (report.hasDraft || report.isPinned || hasOutstandingIOU(report, iouReports)) {
    return true;
    }

    In this case, even our parent reportAction was deleted and not visible any more, we still show the child report because it's pinned.

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

    Add a condition in here to check, if our thread is empty and deleted, we shouldn't add it to the list even it has draft or pinned.

        const parentAction = ReportActionsUtils.getParentReportAction(report);
    
        if (isChatThread(report) && !ReportActionsUtils.hasCommentThread(parentAction) && !ReportActionsUtils.shouldReportActionBeVisible(parentAction)) {
            return false;
        }

    or

        if (isChatThread(report) && !ReportActionsUtils.hasCommentThread(parentAction) && ReportActionsUtils.isDeletedAction(parentAction)) {
            return false;
        }

    Incase we wanna keep the report if we have draft we can change the condition above, it depends on the expected requirements.

    What alternative solutions did you explore? (Optional)

    N/A

  5. alexpensify commented on Jul 17, 2023

    @alexpensify
    Contributor

    I was assigned over the weekend-- I will review it soon.

  6. alexpensify commented on Jul 19, 2023

    @alexpensify
    Contributor

    @fedirjh and @MonilBhavsar - Could I get feedback here? I see that @hungvu193 worked on the fix for #21103. @hungvu193 please add feedback too. I see the fixed issue was focused on web. To confirm, that fix does not take into account Mweb say for Chrome on Android? I'm trying to confirm this one isn't a dupe before assigning the external label. Thanks!

  7. fedirjh commented on Jul 20, 2023

    @fedirjh
    Contributor

    @alexpensify This issue doesn’t looks related to the PR @hungvu193 worked on. But I think this is a missed case from #21508 , cc @dangrous or @mananjadhav could you please add any feedbacks ?

  8. alexpensify commented on Jul 20, 2023

    @alexpensify
    Contributor

    @fedirjh - thank you for pointing me in a better direction! I'll wait for @dangrous or @mananjadhav feedback before assigning the external label.

  9. dangrous commented on Jul 21, 2023

    @dangrous
    Contributor

    @alexpensify This issue doesn’t looks related to the PR @hungvu193 worked on. But I think this is a missed case from #21508 , cc @dangrous or @mananjadhav could you please add any feedbacks ?

    Yep, I think this is a case we didn't think about when we changed the expected behavior in that issue. Not specifically a regression since I'm guessing this behavior would have happened before the change too. Should be a pretty easy fix though!

  10. added
    External
    on Jul 21, 2023
  11. changed the title [-]Mweb - "Deleted message" chat appears in chat list for pinned deleted threads[/-] [+][$1000] Mweb - "Deleted message" chat appears in chat list for pinned deleted threads[/+] on Jul 21, 2023
  12. 33 remaining items

  13. changed the title [-][$1000] Mweb - "Deleted message" chat appears in chat list for pinned deleted threads[/-] [+][HOLD for payment 2023-08-10] [$1000] Mweb - "Deleted message" chat appears in chat list for pinned deleted threads[/+] on Aug 3, 2023
  14. melvin-bot commented on Aug 3, 2023

    @melvin-bot

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

  15. removed
    Reviewing
    on Aug 3, 2023
  16. melvin-bot commented on Aug 3, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.49-3 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 2023-08-10. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

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

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  17. melvin-bot commented on Aug 3, 2023

    @melvin-bot

    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:

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

    @alexpensify
    Contributor

    I've confirmed that the hires are in Upwork and will complete the payment summary next as we get closer to the payment date.

    @rushatgabhane - when you get a chance, can you please complete the checklist before August 10? Thanks!

  19. alexpensify commented on Aug 8, 2023

    @alexpensify
    Contributor

    @rushatgabhane - bumping again, we are approaching the pay period. Please complete the checklist to avoid delays to close this GH. Thanks!

  20. added
    Daily
    and removed
    Weekly
    on Aug 9, 2023
  21. rushatgabhane commented on Aug 10, 2023

    @rushatgabhane
    Member
    1. The PR that introduced the bug has been identified. Link to the PR: Hide Threads with No Comments from LHN  #19375

    2. 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: https://github.com/Expensify/App/pull/19375/files#r1291252591

    3. 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: One off case.

    4. Determine if we should create a regression test for this bug. No

    5. 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 - N.A.

  22. alexpensify commented on Aug 10, 2023

    @alexpensify
    Contributor

    Here is the payment summary:

    Upwork Job: https://www.upwork.com/jobs/~01259a3effbfb36398

    *If applicable, the bonuses will be applied on the final payment

    Extra Notes regarding payment: No urgency bonus here but I've completed the payments in Upwork for @SofoniasN and @hoangzinh


    @rushatgabhane it looks like the checklist is still WIP but please request a payment via chat when it's complete. Thanks!

  23. rushatgabhane commented on Aug 11, 2023

    @rushatgabhane
    Member

    checklist done

    manual request created - https://staging.new.expensify.com/r/750834249578109

  24. alexpensify commented on Aug 11, 2023

    @alexpensify
    Contributor

    Thank you for the update! We are all set and I'm going to close this GH.

  25. JmillsExpensify commented on Aug 16, 2023

    @JmillsExpensify
    Contributor

    Reviewed the details for @rushatgabhane. Approved for payment in NewDot based on BZ summary above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions