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

[$250] Chat - After sending user suggestions, if any text deleted, LHN displays "this chat is with.." #55057

Closed
4 of 8 tasks
IuliiaHerets opened this issue Jan 10, 2025 · 16 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Jan 10, 2025

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: 9.0.83-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
Issue reported by: Applause Internal Team
Device used: Redmi note 10s android 13
App Component: Chat Report View

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Open a report
  3. Enter @ and select a user from suggestion list
  4. Navigate to LHN
  5. Note user suggestion is shown in LHN
  6. Open the report and send any text now
  7. Navigate to LHN
  8. Note text is shown in LHN
  9. Open the report and delete the text
  10. Navigate to LHN

Expected Result:

After sending user suggestions, if any text deleted, LHN must display the previous message.

Actual Result:

After sending user suggestions, if any text deleted, LHN displays "this chat is with.." instead of previous message.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6710694_1736497087619.Screenrecorder-2025-01-10-13-39-53-640.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021877637446096588180
  • Upwork Job ID: 1877637446096588180
  • Last Price Increase: 2025-01-10
Issue OwnerCurrent Issue Owner: @eh2077
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

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

@jliexpensify
Copy link
Contributor

I can repro this:
image

It definitely is strange to see This chat is with in the LHN.

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Jan 10, 2025
@melvin-bot melvin-bot bot changed the title Chat - After sending user suggestions, if any text deleted, LHN displays "this chat is with.." [$250] Chat - After sending user suggestions, if any text deleted, LHN displays "this chat is with.." Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

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

@jliexpensify
Copy link
Contributor

I don't think this fits into any of the major projects (maybe #quality, but it's not a consistency thing). I think it would go into #expense

@twilight2294
Copy link
Contributor

Proposal

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

After sending user suggestions, if any text deleted, LHN displays "this chat is with.."

What is the root cause of that problem?

This requires a BE as well as FE fix, the BE doesn't return correct value for lastMessageText and we do not set lastMessage in successData:

Screenshot 2025-01-10 at 5 39 49 PM

App/src/libs/actions/Report.ts

Lines 1598 to 1609 in 219e66d

const successData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`,
value: {
[reportActionID]: {
pendingAction: null,
previousMessage: null,
},
},
},
];

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

So we need to set the successData for the report as follows:

    const successData: OnyxUpdate[] = [
        {
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`,
            value: {
                [reportActionID]: {
                    pendingAction: null,
                    previousMessage: null,
                },
            },
        },
        {
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.REPORT}${originalReportID}`,
            value: {
                lastMessageText,
            },
        },
    ];

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

What alternative solutions did you explore? (Optional)

@mohit6789
Copy link
Contributor

mohit6789 commented Jan 10, 2025

In case of email address BE return empty value but in other case it is working fine. So this issue can be fixed from BE only, FE automatically update the data once delete completes. no explicit changes required in FE.

@jliexpensify
Copy link
Contributor

@eh2077 - let me know if this should be an Internal issue, cheers!

@melvin-bot melvin-bot bot added the Overdue label Jan 12, 2025
Copy link

melvin-bot bot commented Jan 13, 2025

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

@eh2077
Copy link
Contributor

eh2077 commented Jan 13, 2025

@jliexpensify Yes, I agree that this should be internal.

Note that it works as expected in offline mode

Screen.Recording.2025-01-13.at.8.08.20.PM.mov

@melvin-bot melvin-bot bot removed the Overdue label Jan 13, 2025
@jliexpensify jliexpensify added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor labels Jan 13, 2025
@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Jan 14, 2025
Copy link

melvin-bot bot commented Jan 17, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Jan 17, 2025
@jliexpensify
Copy link
Contributor

Not overdue, just waiting for an Internal Engineer to follow up.

@eh2077
Copy link
Contributor

eh2077 commented Jan 20, 2025

Not overdue, this is internal

@melvin-bot melvin-bot bot removed the Overdue label Jan 20, 2025
@eh2077
Copy link
Contributor

eh2077 commented Jan 20, 2025

@jliexpensify Can you add hot pick label on this?

@jliexpensify jliexpensify added the Hot Pick Ready for an engineer to pick up and run with label Jan 20, 2025
@amyevans amyevans self-assigned this Jan 20, 2025
@amyevans amyevans removed Help Wanted Apply this label when an issue is open to proposals by contributors Hot Pick Ready for an engineer to pick up and run with labels Jan 20, 2025
@amyevans
Copy link
Contributor

Backend PR is up: https://github.com/Expensify/Auth/pull/13892

@amyevans amyevans added the Reviewing Has a PR in review label Jan 21, 2025
@amyevans
Copy link
Contributor

PR deployed, closing!

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Jan 22, 2025
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. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
Status: Done
Development

No branches or pull requests

6 participants