Skip to content

[Awaiting checklist] [$250] Thread - Thread header shows skeleton, message is empty when parent message is deleted #58134

Closed

Description

@mitarachim

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.1.11-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+3408349@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Chat Report View

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to any chat.
  3. Send a message.
  4. Right click on the message > Reply in thread.
  5. Right click on the parent message > Delete comment.
  6. Delete the comment.

Expected Result:

  • Thread header in chat report view and LHN will show "Deleted comment".
  • The deleted comment will show "Deleted comment".

Actual Result:

  • Thread header in chat report view shows skeleton.
  • Thread title in LHN shows Hidden.
  • The deleted comment is empty with (edited) label.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6766813_1741651828851.thread.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021900900424719200581
  • Upwork Job ID: 1900900424719200581
  • Last Price Increase: 2025-03-15
  • Automatic offers:
    • nkdengineer | Contributor | 106601494
Issue OwnerCurrent Issue Owner: @mananjadhav

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 11, 2025
  2. melvin-bot commented on Mar 11, 2025

    @melvin-bot

    Triggered auto assignment to @twisterdotcom (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.

  3. nkdengineer commented on Mar 11, 2025

    @nkdengineer
    Contributor

    Proposal

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

    Thread header in chat report view shows skeleton.
    Thread title in LHN shows Hidden.
    The deleted comment is empty with (edited) label.

    What is the root cause of that problem?

    After deleting the parent message, the chat is empty and we don't have the logic to go back to the previous chat, so we can see the skeleton in the header (the report is deleted and never loaded)

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

    We should add the logic to handle this case in

    else if(Navigation.isActiveRoute(ROUTES.REPORT_WITH_ID.getRoute(reportAction.childReportID)) && !isDeletedParentAction){
           Navigation.setShouldPopAllStateOnUP(true);
            Navigation.goBack(undefined, {shouldPopToTop: true});
        }
    

    We also can use ROUTES.REPORT_WITH_ID.getRoute(reportID) as fallback url or use navigateToMostRecentReport

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    We can write the test to mimic this case in tests/ui, simulate this case then verify the parent chat is shown at the end

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    @twisterdotcom Whoops! This issue is 2 days overdue. Let's get this updated quick!

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 15, 2025
  6. changed the title [-]Thread - Thread header shows skeleton, message is empty when parent message is deleted[/-] [+][$250] Thread - Thread header shows skeleton, message is empty when parent message is deleted[/+] on Mar 15, 2025
  7. melvin-bot commented on Mar 15, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 15, 2025
  9. melvin-bot commented on Mar 15, 2025

    @melvin-bot

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

  10. kaushiktd commented on Mar 18, 2025

    @kaushiktd
    Contributor

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

    Thread header shows skeleton, message is empty when parent message is deleted

    What is the root cause of that problem?

    The root cause of the issue lies in the navigation logic that handles the transition after deleting a parent message.

    The original implementation only checks if the parent route is active and navigates back to the parent report

    if (Navigation.isActiveRoute(ROUTES.REPORT_WITH_ID.getRoute(reportID, reportActionID)) && !isDeletedParentAction) {

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

    To address this issue, we updated the logic to handle both the parent and child routes. The conditions to check whether either the parent or the child route is active before navigating back to the parent report.

         const isActiveRoute = Navigation.isActiveRoute(ROUTES.REPORT_WITH_ID.getRoute(reportID, reportActionID)) || 
         Navigation.isActiveRoute(ROUTES.REPORT_WITH_ID.getRoute(reportAction.childReportID));
     
     if (isActiveRoute && !isDeletedParentAction) {
     Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(reportID));
     }
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    What alternative solutions did you explore? (Optional)

    N/A

    video:-

    screen-capture.webm
  11. 16 remaining items

  12. changed the title [-][$250] Thread - Thread header shows skeleton, message is empty when parent message is deleted[/-] [+][Due for payment 2025-04-02] [$250] Thread - Thread header shows skeleton, message is empty when parent message is deleted[/+] on Mar 26, 2025
  13. melvin-bot commented on Mar 26, 2025

    @melvin-bot

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

  14. melvin-bot commented on Mar 26, 2025

    @melvin-bot

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

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

  15. melvin-bot commented on Mar 26, 2025

    @melvin-bot

    @mananjadhav @twisterdotcom @mananjadhav The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  16. twisterdotcom commented on Mar 26, 2025

    @twisterdotcom
    Contributor

    @mananjadhav must complete the checklist.

  17. twisterdotcom commented on Apr 2, 2025

    @twisterdotcom
    Contributor

    Payment Summary:

  18. changed the title [-][Due for payment 2025-04-02] [$250] Thread - Thread header shows skeleton, message is empty when parent message is deleted[/-] [+][Awaiting checklist] [$250] Thread - Thread header shows skeleton, message is empty when parent message is deleted[/+] on Apr 2, 2025
  19. mananjadhav commented on Apr 2, 2025

    @mananjadhav
    Collaborator

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: I couldn't pinpoint a specific PR where this could've been handled.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: NA

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Go to any chat.
    2. Send a message.
    3. Right click on the message > Reply in thread.
    4. Right click on the parent message > Delete comment.
    5. Delete the comment.
    6. Verify that: user should go back to the previous chat

    @twisterdotcom Do we agree 👍 or 👎

  20. garrettmknight commented on Apr 10, 2025

    @garrettmknight
    Contributor

    $250 approved for @mananjadhav

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions