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-09-18] [Search v2.2] Deleted message changes to empty content with (edited) in Search - Chat page #48810

Closed
3 of 6 tasks
IuliiaHerets opened this issue Sep 9, 2024 · 11 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 9, 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: 9.0.31-0
Reproducible in staging?: Y
Reproducible in production?: N/A
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to DM.
  3. Send a message.
  4. Go to Search > Chat.
  5. Go to Sent.
  6. Click on the message sent in Step 3.
  7. Send another message in report RHP.
  8. Delete the first message sent in Step 3.

Expected Result:

The deleted message will be removed from Search - Chat page.

Actual Result:

The deleted message changes to empty content with (edited) in Search - Chat page.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6597777_1725902332343.20240910_010857.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @strepanier03
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

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

Copy link

melvin-bot bot commented Sep 9, 2024

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

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

github-actions bot commented Sep 9, 2024

👋 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.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-control

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Sep 9, 2024

Edited by proposal-police: This proposal was edited at 2024-09-09 18:50:51 UTC.

Proposal

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

Search - Deleted message changes to empty content with (edited) in Search - Chat page

What is the root cause of that problem?

We are not checking if a reportAction is deleted before adding it to reportActionItems

App/src/libs/SearchUtils.ts

Lines 203 to 209 in 61ee515

reportActionItems.push({
...reportAction,
from,
formattedFrom: from?.displayName ?? from?.login ?? '',
date: reportAction.created,
keyForList: reportAction.reportActionID,
});

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

We should check if a report action is deleted before adding it to reportActionItems

const isDeleted = isDeletedAction(reportAction);
if (!isDeleted) {
        const from = data.personalDetailsList?.[reportAction.accountID];
       reportActionItems.push({
      ...reportAction,
      from,
      formattedFrom: from?.displayName ?? from?.login ?? '',
      date: reportAction.created,
      keyForList: reportAction.reportActionID,
     });
}

What alternative solutions did you explore? (Optional)

We can use shouldReportActionBeVisible to cover other cases in adition to deleted messages

const shouldShowReportAction = ReportActionsUtils.shouldReportActionBeVisible(reportAction, reportAction.reportActionID);
if (shouldShowReportAction) {
  reportActionItems.push({
      ...reportAction,
      from,
      formattedFrom: from?.displayName ?? from?.login ?? '',
      date: reportAction.created,
      keyForList: reportAction.reportActionID,
     });
}

@luacmartins
Copy link
Contributor

I'll take this since it's part of Search. cc @shubham1206agra @ikevin127

@luacmartins luacmartins changed the title Search - Deleted message changes to empty content with (edited) in Search - Chat page [Search v2.2] Deleted message changes to empty content with (edited) in Search - Chat page Sep 9, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Sep 9, 2024
@luacmartins
Copy link
Contributor

CPing fix

@luacmartins
Copy link
Contributor

Fixed in staging.

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Sep 9, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 11, 2024
@melvin-bot melvin-bot bot changed the title [Search v2.2] Deleted message changes to empty content with (edited) in Search - Chat page [HOLD for payment 2024-09-18] [Search v2.2] Deleted message changes to empty content with (edited) in Search - Chat page Sep 11, 2024
Copy link

melvin-bot bot commented Sep 11, 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 Sep 11, 2024
Copy link

melvin-bot bot commented Sep 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.31-26 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-09-18. 🎊

Copy link

melvin-bot bot commented Sep 11, 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:

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

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. Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants