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

CRITICAL: [Actionable Whisper] [$250] Submit tracked expense to user you do not have an existing chat with fails #41181

Closed
1 of 6 tasks
thienlnam opened this issue Apr 28, 2024 · 19 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@thienlnam
Copy link
Contributor

thienlnam commented Apr 28, 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: v1.4.67-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

Action Performed:

  1. Track an expense
  2. With the actionable whisper, select 'Submit it to someone'
  3. Select a user that you have not chatted with yet / do not have an existing chat with

Expected Result:

Describe what you think should've happened
The flow should work as expected, you should see the IOU in the chat between you, and be able to modify it normally

Actual Result:

Describe what actually happened
The chat disappears, and the request is flashing

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Start a chat with the user first, before performing the steps

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence

Failure case:

Screen.Recording.2024-04-28.at.3.37.59.PM.mov

Success case with existing chat:

Screen.Recording.2024-04-28.at.3.38.39.PM.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b61241ab3673e9f6
  • Upwork Job ID: 1784714489572352000
  • Last Price Increase: 2024-05-09
@thienlnam thienlnam added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 28, 2024
@thienlnam thienlnam self-assigned this Apr 28, 2024
Copy link

melvin-bot bot commented Apr 28, 2024

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.

@thienlnam thienlnam added the External Added to denote the issue can be worked on by a contributor label Apr 28, 2024
Copy link

melvin-bot bot commented Apr 28, 2024

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

@melvin-bot melvin-bot bot changed the title [Actionable Whisper] Submit tracked expense to user you do not have an existing chat with fails [$250] [Actionable Whisper] Submit tracked expense to user you do not have an existing chat with fails Apr 28, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 28, 2024
Copy link

melvin-bot bot commented Apr 28, 2024

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

@thienlnam thienlnam changed the title [$250] [Actionable Whisper] Submit tracked expense to user you do not have an existing chat with fails [$500] [Actionable Whisper] Submit tracked expense to user you do not have an existing chat with fails Apr 28, 2024
Copy link

melvin-bot bot commented Apr 28, 2024

Upwork job price has been updated to $500

@thienlnam
Copy link
Contributor Author

When I test this, I see that after signing out and signing back in the chat and the IOU does exist. It crashes the first time I try to open the IOU, but after refresh it works fine.

Additionally, this only seems to happen for new users / users we do not have existing chats for - so

My current theory is that we're missing some pusher updates on the creation on the chat report / there is a mismatch of an optimistic ID and what something is created with.

Opening up externally to see if there's maybe another issue that I'm not seeing here

@thienlnam
Copy link
Contributor Author

We'll also need to start passing an email down via the ConvertTrackedExpenseToRequest command so we can create the account if it doesn't exist

@thienlnam
Copy link
Contributor Author

Upon closer inspection, I think this is related to the lack of personal details when we're chatting with someone we don't have the details for yet

@james-tindal
Copy link

Proposal

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

After using Actionable Whisper to "Submit it [a tracked expense] to someone"...

In chat report:

  • Optimistic: Submitted expense shows immediately, but the user wont see this if the request resolves fast.
  • After request resolves: expense gone.
  • After navigating away and back:
    • the expense shows, but the recipient details are lost
      (in the report header and after "This is the beginning of your chat with ")
    • chat report disappears from LHN even if it's pinned.
  • After re-fetch from server: the IOU ReportAction has also lost sender and recipient.

In IOU report:

  • It flashes 404 once after a second (different from the original bug report)
  • After re-fetch from server: not found

What is the root cause of that problem?

The work that would usually be done by an OpenReport API write is not done when ConvertTrackedExpenseToRequest creates a new chat.

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

Make the ConvertTrackedExpenseToRequest mutation also submit data to create the chat like OpenReport does. Ensure optimistic and server get all the right data.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 30, 2024
@james-tindal
Copy link

james-tindal commented Apr 30, 2024

@thienlnam

There is a problem only solvable on the server-side.

Problem
Recipient's email/image don't show in the header.

Solution
When the server handles ConvertTrackedExpenseToRequest,
It needs to set chatReport.participantAccountIDs = [parameters.payerAccountID]
Where chatReport is the report with id parameters.chatReportId

@quinthar quinthar changed the title [$500] [Actionable Whisper] Submit tracked expense to user you do not have an existing chat with fails CRITICAL: [Actionable Whisper] [$500] Submit tracked expense to user you do not have an existing chat with fails May 2, 2024
Copy link

melvin-bot bot commented May 7, 2024

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

@jliexpensify
Copy link
Contributor

Hi @thienlnam, based on this comment - should we make this Internal?

@thienlnam
Copy link
Contributor Author

Yes this should be internal, I've fixed the flow for users that don't exist yet - now I just need to fix the IOU getting removed

@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 May 9, 2024
@melvin-bot melvin-bot bot changed the title CRITICAL: [Actionable Whisper] [$500] Submit tracked expense to user you do not have an existing chat with fails CRITICAL: [Actionable Whisper] [$250] Submit tracked expense to user you do not have an existing chat with fails May 9, 2024
Copy link

melvin-bot bot commented May 9, 2024

Current assignee @eVoloshchak is eligible for the Internal assigner, not assigning anyone new.

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

Copy link

melvin-bot bot commented May 15, 2024

@eVoloshchak, @thienlnam, @jliexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@thienlnam
Copy link
Contributor Author

Still working on the IOU disappearing

Copy link

melvin-bot bot commented May 23, 2024

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

Copy link

melvin-bot bot commented May 27, 2024

@eVoloshchak, @thienlnam, @jliexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@thienlnam
Copy link
Contributor Author

We're good here!

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 Help Wanted Apply this label when an issue is open to proposals by contributors Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
No open projects
Status: CRITICAL
Development

No branches or pull requests

5 participants