Skip to content

AU - Chat - Deleted message with a thread disappears from chat #62191

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

Open
3 of 8 tasks
jponikarchuk opened this issue May 16, 2025 · 8 comments
Open
3 of 8 tasks

AU - Chat - Deleted message with a thread disappears from chat #62191

jponikarchuk opened this issue May 16, 2025 · 8 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2

Comments

@jponikarchuk
Copy link

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: v9.1.46-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/6122620
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Windows 10, iPhone 13/iOS 18.4.1
App Component: Chat Report View

Action Performed:

  1. Navigate to any conversation
  2. Send any message
  3. Reply in thread and add a comment
  4. Navigate back to DM and delete the parent message

Expected Result:

The parent message is now displayed as [Deleted message]

Actual Result:

The message disappears from the chat

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

@jponikarchuk jponikarchuk added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels May 16, 2025
Copy link

melvin-bot bot commented May 16, 2025

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

Copy link

melvin-bot bot commented May 16, 2025

Triggered auto assignment to @RachCHopkins (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 May 16, 2025
Copy link

melvin-bot bot commented May 16, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels May 16, 2025
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.

@gijoe0295
Copy link
Contributor

gijoe0295 commented May 16, 2025

Offending PR: #62002 and #62151

This is quite a weird one. I think the diff shown in #62002 is not correct and eventually cause the revert PR not to restore to the correct state on main before.

Image

My guess is because of these force pushes so Github displays the wrong diff.

Image

So in short, the correct revert should be:

const {
reportActions: reportActionsWithDeletedExpenses,
linkedAction,
sortedAllReportActions,
hasNewerActions,
hasOlderActions,
} = usePaginatedReportActions(reportID, reportActionIDFromRoute);
const reportActions = reportActionsWithDeletedExpenses.filter((value) => !isDeletedParentAction(value));

const {reportActions, linkedAction, sortedAllReportActions, hasNewerActions, hasOlderActions} = usePaginatedReportActions(reportID, reportActionIDFromRoute);

You can verify that by tracing back Blame in ReportScreen file.

cc @JakubKorytko @mountiny @aldo-expensify because you worked on the revert.

@JakubKorytko
Copy link
Contributor

My guess is that the problem with the revert was probably not caused by the force push, but rather by the fact that two PRs were merged very close together: #61777 and #62002. They both changed the same line just below usePaginatedReportActions, so a conflict occurred that needed to be resolved. That is why the diff may be incorrect. I think only #62002 is the problem here and it should be reverted but we should keep the functionality added by #61777.

@aldo-expensify
Copy link
Contributor

but we should keep the functionality added by #61777.

I think I'm missing something, I see that the lines in the current staging and main:

const {
reportActions: reportActionsWithDeletedExpenses,
linkedAction,
sortedAllReportActions,
hasNewerActions,
hasOlderActions,
} = usePaginatedReportActions(reportID, reportActionIDFromRoute);
const reportActions = reportActionsWithDeletedExpenses.filter((value) => !isDeletedParentAction(value));

are the same the PR #61777 changed to:

https://github.com/Expensify/App/pull/61777/files#diff-68b13bc8344820144538408415f307efee198ccc63977ba318c4234102ec3917L269-R276

Image

Can you help me see what is the line that is wrong after the revert? 🙇

@JakubKorytko
Copy link
Contributor

JakubKorytko commented May 16, 2025

Can you help me see what is the line that is wrong after the revert? 🙇

Actually, I think my approach to filtering these actions was incorrect. Feel free to remove this line if it fixes the issue and I think there's another file with the same logic for filtering actions - so that should also be considered. However, please don't revert the entire #61777 because more changes were made than just this one.

I will reconsider this on Monday and prepare a follow-up for these two PRs (#61777 & reverted #62002) because removing this line will most likely reopen two linked issues in the PR. The important thing is deciding which issue is more important to fix, because either way, I will start working on a follow-up on Monday to correct these two bad boys.

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. DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants