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.36k stars 2.78k forks source link

[Create Money Request] Update iouReport optimistically #49717

Open grgia opened 3 days ago

grgia commented 3 days ago

Context

Follow up to https://github.com/Expensify/App/pull/49172

Reported here: https://github.com/Expensify/App/pull/49172#issuecomment-2374163798

Steps Taken

MULTI TRANSACTIONS FROM DIFFERENT USERS (IOU) AVATAR CASE

  1. Log into user B in a separate session
  2. Send a money request from user B
  3. Verify that report preview avatar is both avatars, user A and B
  4. Verify that report preview title is &
  5. Both preview avatar and title are incorrect.

Expected Result: Report preview avatar is both avatars, user A and B

Actual Result: Report preview avatar is still only user A until refresh

Video

https://github.com/user-attachments/assets/077ef9ff-1a99-484b-95bc-6322990c18e3

https://github.com/user-attachments/assets/c948febf-3340-4c57-a297-065681d62588

Solution

I think this is probably an issue with updating the iouReport data optimistically when the IOU is made. https://github.com/Expensify/App/blob/main/src/libs/actions/IOU.ts#L1998

melvin-bot[bot] commented 3 days ago

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

mallenexpensify commented 21 hours ago

Checking to see if this is same/similar to what Cole reported https://expensify.slack.com/archives/C01SKUP7QR0/p1727461394841889?thread_ts=1727360298.835599&cid=C01SKUP7QR0