Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.52k stars 2.87k forks source link

[$250] Track Expense - Actionable whisper stays on LHN after expense is moved #47075

Open izarutskaya opened 2 months ago

izarutskaya commented 2 months ago

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.18-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: https://expensify.testrail.io/index.php?/tests/view/4834393 Email or phone of affected tester (no customers): nathanmulugetatesting+912@gmail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Create a track expense
  3. On the actionable whisper click on submit to someone
  4. Enter an account to submit to and select it
  5. Click on submit to confirm
  6. Click on your self DM report

Expected Result:

The actionable whisper doesn't reappear on the LHN

Actual Result:

The actionable whisper message reappears on the LHN even if the expense is moved to another report

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

https://github.com/user-attachments/assets/c7d2cdb0-a249-47f2-ad39-0109559844f4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0165e88bc0f739036b
  • Upwork Job ID: 1821706141212640383
  • Last Price Increase: 2024-08-16
Issue OwnerCurrent Issue Owner: @jliexpensify
melvin-bot[bot] commented 2 months ago

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.

izarutskaya commented 2 months ago

We think this issue might be related to the #collect project.

jliexpensify commented 2 months ago

Very odd one! I can repro.

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

trjExpensify commented 2 months ago

Track bug, moving to #vip-vsb.

ijmalik commented 2 months ago

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

Track Expense - Actionable Whisper Remains on LHN After Expense is Moved

Actions to reproduce:

  1. Navigate to staging.new.expensify.com
  2. Create a track expense
  3. On the actionable whisper click on submit to someone
  4. Enter an account to submit to and select it
  5. Click on submit to confirm
  6. Click on your self DM report

What is the root cause of that problem?

The root cause of the problem lies in the backend (BE) processing, specifically related to the handling of an action type called ACTIONABLETRACKEXPENSEWHISPER

https://github.com/Expensify/App/blob/e6546d658b17a8dc94aee6e8ceba1eb988397053/src/libs/OptionsListUtils.ts#L717 Here lastMessageText is being used to show message for selfDM on LHN

In step 6, the API OpenReport request was sent, and the response was received. The last action of type ACTIONABLETRACKEXPENSEWHISPER ultimately set the lastMessageText in the Report to "What would you like to do with this expense?"

                "8220943923986747993": {
                    "person": [
                        {
                            "type": "TEXT",
                            "style": "strong",
                            "text": "concierge@expensify.com"
                        }
                    ],
                    "actorAccountID": 8392101,
                    "message": [
                        {
                            "type": "COMMENT",
                            "html": "What would you like to do with this expense?",
                            "text": "What would you like to do with this expense?",
                            "isEdited": false,
                            "whisperedTo": [],
                            "isDeletedParentAction": false,
                            "deleted": ""
                        }
                    ],
                    "originalMessage": {
                        "html": "What would you like to do with this expense?",
                        "lastModified": "2024-08-09 03:49:33.075",
                        "resolution": "request",
                        "transactionID": "4103948917902194526"
                    },
                    "avatar": "https:\/\/d1wpcgnaa73g0y.cloudfront.net\/894b50e60056c966d12216005fbcacec8ce5a2c0.png",
                    "created": "2024-08-09 03:48:02.807",
                    "timestamp": 1723175282,
                    "reportActionTimestamp": 1723175282807,
                    "automatic": false,
                    "actionName": "ACTIONABLETRACKEXPENSEWHISPER",
                    "shouldShow": true,
                    "reportActionID": "8220943923986747993",
                    "lastModified": "2024-08-09 03:49:33.075",
                    "whisperedToAccountIDs": []
                },

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

The backend should handle the message for the ACTIONABLETRACKEXPENSEWHISPER action.

https://github.com/user-attachments/assets/a7da4244-97d0-4dcb-b52c-37a334c4eed9

melvin-bot[bot] commented 2 months ago

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

jliexpensify commented 2 months ago

Bumping @DylanDylann for a review of the proposal

DylanDylann commented 2 months ago

On my list today

codewaseem commented 2 months ago

I could not reproduce this after syncing with main branch.

ijmalik commented 2 months ago

@codewaseem

I've synced with the main branch and am now on version 9.0.19-10, but the issue still persists. It also continues to occur on staging.

I've noticed that the issue reoccurs particularly when the OpenReport API response is received. Sometimes, the OpenReport API call isn't sent, which causes the issue to reappear upon page refresh.

https://github.com/user-attachments/assets/e7023ff9-5953-4d07-ae0f-ba34017f33c9

jliexpensify commented 2 months ago

Bumping @DylanDylann again

DylanDylann commented 2 months ago

I still can reproduce this bug

DylanDylann commented 2 months ago

Looking for more proposals

DylanDylann commented 2 months ago

@jliexpensify After rechecking again, I see this bug should be handled on the BE side. report.lastMessageText is wrong

🎀👀🎀 C+ reviewed

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] commented 2 months ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

jliexpensify commented 2 months ago

Not overdue! Internal issue.

melvin-bot[bot] commented 2 months ago

@AndrewGable @jliexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

jliexpensify commented 2 months ago

Not overdue

jliexpensify commented 2 months ago

Not overdue, internal issue.

jliexpensify commented 1 month ago

Not overdue, internal - @AndrewGable should the priority be changed here?

AndrewGable commented 1 month ago

What would you suggest? I don't really have time to look into this one, focused on HybridApp, sorry!

jliexpensify commented 1 month ago

Re-tested it on Staging v9.0.38-4: I can't repro this one anymore. The actionable whisper isn't showing here:

image

Lets close it!

IuliiaHerets commented 2 weeks ago

This issue is still reproducible, build - v9.0.51-2

https://github.com/user-attachments/assets/ce5a03bf-5b2b-49eb-a245-bbaa039136f5

AndrewGable commented 4 days ago

Still focused on higher priority issues, so going to un-assign

jliexpensify commented 4 days ago

Adding the Retest label as I can't reliably repro on v9.0.56-0 now.