App icon indicating copy to clipboard operation
App copied to clipboard

Report - Offline deleted message is not struck through

Open lanitochka17 opened this issue 1 year ago • 2 comments

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: 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): [email protected] 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?

  • [ ] Android: Native
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Native
  • [ ] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

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

lanitochka17 avatar Mar 29 '24 22:03 lanitochka17

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

melvin-bot[bot] avatar Mar 29 '24 22:03 melvin-bot[bot]

@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

lanitochka17 avatar Mar 29 '24 22:03 lanitochka17

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

nkdengineer avatar Apr 01 '24 05:04 nkdengineer

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

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

strepanier03 avatar Apr 03 '24 23:04 strepanier03

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

strepanier03 avatar Apr 03 '24 23:04 strepanier03

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

melvin-bot[bot] avatar Apr 03 '24 23:04 melvin-bot[bot]

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

melvin-bot[bot] avatar Apr 03 '24 23:04 melvin-bot[bot]

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

hungvu193 avatar Apr 04 '24 03:04 hungvu193

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.

roryabraham avatar Apr 04 '24 05:04 roryabraham

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

hungvu193 avatar Apr 04 '24 06:04 hungvu193

Hello @hungvu193

Can you please hold this issue on another similar issue?

Thanks

shubham1206agra avatar Apr 05 '24 03:04 shubham1206agra

Can you please link that similar issue here?

Hello @hungvu193

Can you please hold this issue on another similar issue?

Thanks

hungvu193 avatar Apr 05 '24 03:04 hungvu193

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

shubham1206agra avatar Apr 05 '24 03:04 shubham1206agra

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

hungvu193 avatar Apr 05 '24 03:04 hungvu193

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

hungvu193 avatar Apr 08 '24 09:04 hungvu193

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

roryabraham avatar Apr 08 '24 19:04 roryabraham

Still on hold, good to keep pausing.

strepanier03 avatar Apr 23 '24 20:04 strepanier03

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

roryabraham avatar May 03 '24 07:05 roryabraham

Thanks Rory!

strepanier03 avatar May 14 '24 23:05 strepanier03

still on hold

roryabraham avatar May 23 '24 20:05 roryabraham

Currently on hold.

strepanier03 avatar Jun 14 '24 03:06 strepanier03

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

strepanier03 avatar Jun 26 '24 23:06 strepanier03

Moving to monthly for now.

strepanier03 avatar Jul 17 '24 01:07 strepanier03

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

strepanier03 avatar Sep 03 '24 19:09 strepanier03

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.

strepanier03 avatar Sep 03 '24 19:09 strepanier03