[$250] mWeb - Debug - In workspace chat, delete via debug directs to blank page.
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
- Go to https://staging.new.expensify.com/home
- Tap on a workspace chat
- Send a message
- Tap header -- debug
- Scroll down to tap delete
- Note a blank page displayed
- Refresh the page
- Note hmm not here page displayed
- Navigate to LHN
- 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
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 Owner
Current Issue Owner: @allroundexperts
Triggered auto assignment to @lakchote (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
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.
π¬ A slack conversation has been started in #expensify-open-source
: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:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Not a blocker, it concerns an issue with Debug mode. It also concerns Web as a whole.
Job added to Upwork: https://www.upwork.com/jobs/~021849364084876247061
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External)
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)
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)
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:
- User A invite user B to a room
- User B open the room details page
- User A removes B from room
- 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;
}
@alitoshmatov please review proposals, thank you.
@lakchote, @alitoshmatov, @adelekennedy Huh... This is 4 days overdue. Who can take care of this?
bumping in Slack
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
reassigning to @allroundexperts based on Slack thread
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) {
Current assignee @lakchote is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
Yeah, I think that's better.
Thanks for your quick review @allroundexperts, @bernhardoj's proposal LGTM.
PR is ready
cc: @allroundexperts
Reviewing label has been removed, please complete the "BugZero Checklist".
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
@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]
Payment Summary
- 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
Requested in ND.
Payouts due:
- [x] Contributor: $250 @allroundexperts (NewDot)
- [x] Reviewer: $250 @bernhardoj (NewDot)
confirming payment summary here
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 π
nearly forgot the checklist @allroundexperts for a quick review
Checklist
- There isn't a single PR that caused this. We never handled this edge case.
- N/A
- N/A
- A regression test would be helpful
Regression Test
Prerequisite: Enable debug mode by going to settings -> troubleshoot
- Open any chat
- Press the header to open details
- Press Debug
- Scroll to the bottom and press Delete
Verify you see a not found detail page
Do we π or π ?