App icon indicating copy to clipboard operation
App copied to clipboard

[$250] mWeb - Debug - In workspace chat, delete via debug directs to blank page.

Open IuliiaHerets opened this issue 1 year ago β€’ 21 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: 9.0.53-0 Reproducible in staging?: Y Reproducible in production?: Unable to check in Prod, Debug mode is not available Issue reported by: Applause Internal Team

Action Performed:

Pre-condition: 1.Go to https://staging.new.expensify.com/home 2. Go to profile icon -- troubleshoot 3. Scroll down to enable debug mode

  1. Go to https://staging.new.expensify.com/home
  2. Tap on a workspace chat
  3. Send a message
  4. Tap header -- debug
  5. Scroll down to tap delete
  6. Note a blank page displayed
  7. Refresh the page
  8. Note hmm not here page displayed
  9. Navigate to LHN
  10. Note report disappeared from LHN

Expected Result:

In workspace chat, delete via debug must not direct to blank page.

Actual Result:

In workspace chat, delete via debug directs to blank page initially and on refresh directs to hmm not here. Then navigating to LHN, particular report is not shown.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

https://github.com/user-attachments/assets/02014ea0-2158-4623-b9ca-eea79799b3f7

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021849364084876247061
  • Upwork Job ID: 1849364084876247061
  • Last Price Increase: 2024-10-31
Issue OwnerCurrent Issue Owner: @allroundexperts

IuliiaHerets avatar Oct 24 '24 07:10 IuliiaHerets

Triggered auto assignment to @lakchote (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] avatar Oct 24 '24 07:10 melvin-bot[bot]

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

melvin-bot[bot] avatar Oct 24 '24 07:10 melvin-bot[bot]

πŸ’¬ A slack conversation has been started in #expensify-open-source

melvin-bot[bot] avatar Oct 24 '24 07:10 melvin-bot[bot]

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

github-actions[bot] avatar Oct 24 '24 07:10 github-actions[bot]

Not a blocker, it concerns an issue with Debug mode. It also concerns Web as a whole.

lakchote avatar Oct 24 '24 08:10 lakchote

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

melvin-bot[bot] avatar Oct 24 '24 08:10 melvin-bot[bot]

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

melvin-bot[bot] avatar Oct 24 '24 08:10 melvin-bot[bot]

Proposal

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

mWeb - Debug - In workspace chat, delete via debug directs to blank page.

What is the root cause of that problem?

We use Navigation.goBack(); after the delete action https://github.com/Expensify/App/blob/45cabbfd877234921be4439a7c9c922f6a45a581/src/pages/Debug/DebugDetails.tsx#L233-L241

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

Use Navigation.dismissModal(); instead

What alternative solutions did you explore? (Optional)

nyomanjyotisa avatar Oct 24 '24 08:10 nyomanjyotisa

Edited by proposal-police: This proposal was edited at 2024-10-24 12:34:01 UTC.

Proposal

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

mWeb - Debug - In workspace chat, delete via debug directs to blank page

What is the root cause of that problem?

When clicking the delete the report, we only navigating back from the report which will only dismiss the modal https://github.com/Expensify/App/blob/45cabbfd877234921be4439a7c9c922f6a45a581/src/pages/Debug/DebugDetails.tsx#L237-L240

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

We need to add the Navigation.dismissModal(); too And we will run the goBack function if it's small screen width

Navigation.dismissModal();
if (isSmallScreenWidth) {
    Navigation.isNavigationReady().then(() => {
        Navigation.goBack();
    })
}

Result

https://github.com/user-attachments/assets/2ab0ff2d-12f9-49c6-859d-9e28dc42fb65

What alternative solutions did you explore? (Optional)

NJ-2020 avatar Oct 24 '24 08:10 NJ-2020

Proposal

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

After deleting report from debug page, a blank page is shown.

What is the root cause of that problem?

When we press delete, it will delete the report and go back to the previous page. The previous page in our case is the report details page. The report details page is wrapped with a withReportOrNotFound HOC. In the HOC, if shouldShowNotFoundPage is true (because the report is empty) and contentShown ref is true, we render nothing. https://github.com/Expensify/App/blob/bb4e3e45586aa63e027972da29ebc125b56ea05e/src/pages/home/report/withReportOrNotFound.tsx#L86-L90

The comment mentions why we do that. Basically, if the report is previously available but now is not, we assume that the page will be dismissed along with the deletion and we don't want to show not found page while navigating back. However, that is not the case when we delete it from the debug page.

Also, that's not the case if say:

  1. User A invite user B to a room
  2. User B open the room details page
  3. User A removes B from room
  4. User B sees blank page

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

Because we don't want to show the not found briefly when navigating back, we can check for the screen focused state instead. https://github.com/Expensify/App/blob/bb4e3e45586aa63e027972da29ebc125b56ea05e/src/pages/home/report/withReportOrNotFound.tsx#L86-L90

if (shouldShowNotFoundPage && !isFocused) {
    return null;
}

bernhardoj avatar Oct 24 '24 11:10 bernhardoj

Proposal Updated

NJ-2020 avatar Oct 24 '24 13:10 NJ-2020

@alitoshmatov please review proposals, thank you.

lakchote avatar Oct 25 '24 05:10 lakchote

@lakchote, @alitoshmatov, @adelekennedy Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] avatar Oct 29 '24 18:10 melvin-bot[bot]

bumping in Slack

adelekennedy avatar Oct 30 '24 20:10 adelekennedy

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Oct 31 '24 16:10 melvin-bot[bot]

reassigning to @allroundexperts based on Slack thread

adelekennedy avatar Oct 31 '24 21:10 adelekennedy

Thanks for the proposals everyone.

@nyomanjyotisa and @NJ-2020 I think your proposals are lacking a clear RCA. @nyomanjyotisa For example, you're stating that the RCA is: We use Navigation.goBack(); after the delete action. But why is that? Why doesn't a goBack work after the delete action?

I think @bernhardoj's proposal has the most accurate RCA, and the solution proposed makes sense. Let's go with there proposal.

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

On a side note, @bernhardoj wouldn't it be better to have the following condition instead.

if (shouldShowNotFoundPage && contentShown.current && !isFocused) {

allroundexperts avatar Oct 31 '24 22:10 allroundexperts

Current assignee @lakchote is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

melvin-bot[bot] avatar Oct 31 '24 22:10 melvin-bot[bot]

Yeah, I think that's better.

bernhardoj avatar Nov 01 '24 03:11 bernhardoj

Thanks for your quick review @allroundexperts, @bernhardoj's proposal LGTM.

lakchote avatar Nov 01 '24 08:11 lakchote

PR is ready

cc: @allroundexperts

bernhardoj avatar Nov 02 '24 02:11 bernhardoj

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] avatar Nov 11 '24 18:11 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.59-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/51920

If no regressions arise, payment will be issued on 2024-11-18. :confetti_ball:

For reference, here are some details about the assignees on this issue:

  • @allroundexperts requires payment through NewDot Manual Requests
  • @bernhardoj requires payment through NewDot Manual Requests

melvin-bot[bot] avatar Nov 11 '24 18:11 melvin-bot[bot]

@allroundexperts @adelekennedy The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

melvin-bot[bot] avatar Nov 11 '24 18:11 melvin-bot[bot]

Payment Summary

Upwork Job

  • Reviewer: @allroundexperts owed $250 via NewDot
  • Reviewer: @bernhardoj owed $250 via NewDot

BugZero Checklist (@adelekennedy)

  • [x] I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • [x] I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1849364084876247061/hired)
  • [ ] I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • [x] I have verified the payment summary above is correct

melvin-bot[bot] avatar Nov 18 '24 09:11 melvin-bot[bot]

Requested in ND.

bernhardoj avatar Nov 18 '24 09:11 bernhardoj

Payouts due:

  • [x] Contributor: $250 @allroundexperts (NewDot)
  • [x] Reviewer: $250 @bernhardoj (NewDot)

confirming payment summary here

adelekennedy avatar Nov 18 '24 17:11 adelekennedy

BugZero Checklist:

  • [ ] [Contributor] Classify the bug:
Bug classification

Source of bug:

  • [ ] 1a. Result of the original design (eg. a case wasn't considered)
  • [ ] 1b. Mistake during implementation
  • [ ] 1c. Backend bug
  • [ ] 1z. Other:

Where bug was reported:

  • [ ] 2a. Reported on production
  • [ ] 2b. Reported on staging (deploy blocker)
  • [ ] 2c. Reported on both staging and production
  • [ ] 2d. Reported on a PR
  • [ ] 2z. Other:

Who reported the bug:

  • [ ] 3a. Expensify user
  • [ ] 3b. Expensify employee
  • [ ] 3c. Contributor
  • [ ] 3d. QA
  • [ ] 3z. Other:
  • [ ] [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment:

  • [ ] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion:

  • [ ] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template
  • [ ] [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

Do we agree πŸ‘ or πŸ‘Ž

adelekennedy avatar Nov 18 '24 17:11 adelekennedy

nearly forgot the checklist @allroundexperts for a quick review

adelekennedy avatar Nov 18 '24 17:11 adelekennedy

Checklist

  1. There isn't a single PR that caused this. We never handled this edge case.
  2. N/A
  3. N/A
  4. A regression test would be helpful

Regression Test

Prerequisite: Enable debug mode by going to settings -> troubleshoot

  1. Open any chat
  2. Press the header to open details
  3. Press Debug
  4. Scroll to the bottom and press Delete

Verify you see a not found detail page

Do we πŸ‘ or πŸ‘Ž ?

allroundexperts avatar Nov 20 '24 14:11 allroundexperts