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

[HOLD #39432][$500] Report - Offline deleted message is not struck through #39307

Closed lanitochka17 closed 2 months ago

lanitochka17 commented 7 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: 1.4.58-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: https://expensify.testrail.io/index.php?/tests/view/4467827 Email or phone of affected tester (no customers): natnael.expensify+3@gmail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to any report
  2. Apply offline mode
  3. Delete a message

Expected Result:

Message should be grayed out, and struck through

Actual Result:

Message disappears

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/878be84c-f887-4d93-9b10-6ee07461dd8a

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0123d5e156c38fe58b
  • Upwork Job ID: 1775662468195880960
  • Last Price Increase: 2024-04-03
melvin-bot[bot] commented 7 months ago

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

lanitochka17 commented 7 months ago

@strepanier03 FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

nkdengineer commented 7 months ago

Proposal

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

Message disappears

What is the root cause of that problem?

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

When we delete a message that isn't a thread parent message, the current request is included to handle conflicting request and then we merge the successData into Onyx after we merge the optimistic data of the request here. That is the root cause of the issue

https://github.com/Expensify/App/blob/272b05f087c19baaeeb7b37dc8619c89c8ca572c/src/libs/actions/Report.ts#L1321

https://github.com/Expensify/App/blob/272b05f087c19baaeeb7b37dc8619c89c8ca572c/src/libs/actions/PersistedRequests.ts#L40

What alternative solutions did you explore? (Optional)

We should handle merge the optimistic data of the request after we handle conflicting request

https://github.com/Expensify/App/blob/272b05f087c19baaeeb7b37dc8619c89c8ca572c/src/libs/API/index.ts#L67-L69

To do that we should move this block after we push the request here

strepanier03 commented 7 months ago

Raising this internally because I'm finding contradicting expected behavior.

https://github.com/Expensify/App/issues/17081

strepanier03 commented 7 months ago

Okay "greyed out and struck through" is the expected behavior.

melvin-bot[bot] commented 7 months ago

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

melvin-bot[bot] commented 7 months ago

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

hungvu193 commented 7 months ago

Hey @roryabraham, I believe this issue is a regression from your recent PR, do you want to fix this as a separate issue or treat it as a regression?

Revert PR https://github.com/Expensify/App/assets/16502320/5ed1a0db-a74f-4fc2-93d6-f70a46171b95
roryabraham commented 7 months ago

I'd be happy to fix this in a follow-up, I don't think we should revert this, as the bug(s) I fixed were worse than this one.

hungvu193 commented 7 months ago

Thanks, @nkdengineer. I'm not convinced by the solution of moving the updating optimisticData after SequentialQueue.push(request). Also, it didn't work when you turned off and then turned on your internet connection few times.

https://github.com/Expensify/App/assets/16502320/f8f72a92-377c-4a8d-b144-f1eebc797d19

shubham1206agra commented 7 months ago

Hello @hungvu193

Can you please hold this issue on another similar issue?

Thanks

hungvu193 commented 7 months ago

Can you please link that similar issue here?

Hello @hungvu193

Can you please hold this issue on another similar issue?

Thanks

shubham1206agra commented 7 months ago

https://github.com/Expensify/App/issues/39432

hungvu193 commented 7 months ago

Awesome, @strepanier03 let's put this on hold for https://github.com/Expensify/App/issues/39432

hungvu193 commented 7 months ago

hold for https://github.com/Expensify/App/issues/39432

roryabraham commented 7 months ago

HOLD, should be fixed in https://github.com/Expensify/App/issues/39432

strepanier03 commented 6 months ago

Still on hold, good to keep pausing.

roryabraham commented 6 months ago

Still on HOLD, will resume https://github.com/Expensify/App/issues/39432 as soon as I can

strepanier03 commented 5 months ago

Thanks Rory!

roryabraham commented 5 months ago

still on hold

strepanier03 commented 4 months ago

Currently on hold.

strepanier03 commented 4 months ago

VSB is on hold. Thinking of moving this to monthly.

strepanier03 commented 3 months ago

Moving to monthly for now.

strepanier03 commented 2 months ago

Going to retest this, it's been quite some time since it was created and tested.

strepanier03 commented 2 months ago

On v9.0.28-2, I am unable to repro. Going offline and deleting a message strikes the message through as expected.

image

I'm going to close this out as already fixed. Reopen if you disagree.