You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C+ Checklist Needs Completion] [$500] Web - App does not close Hmm its not here page on selecting current report from search #27580
Trigger full page Hmm its not here page by visiting settings->workspace->any workspace->settings, copy the URL, remove 's' from the end and visit it.
Open search page by CTRL+K
Click on same report as opened in step 2
Observe that app still displays Full page 'Hmm its not here' page instead of report
Expected Result:
App should close Full page 'Hmm its not here' page on selecting any report from search
Actual Result:
App does not close Full page 'Hmm its not here' page on selecting same report as opened in background from search
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.70.5 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
changed the title [-]Web - App does not close Hmm its not here page on selecting current report from search[/-][+][$500] Web - App does not close Hmm its not here page on selecting current report from search[/+]on Sep 16, 2023
Please re-state the problem that we are trying to solve in this issue.
Web - App does not close Hmm its not here page on selecting current report from search
What is the root cause of that problem?
When the serach is opened on the current report. and the current report is clicked We are just dissmissing the Search modal which makes sense because the report is already open.
What changes do you think we should make in order to solve the problem?
When the not found page appears, we have the last route name equal to NAVIGATORS.RIGHT_MODAL_NAVIGATOR
We can then add a check when the getTopmostReportId is the current report and also when the last route is NAVIGATORS.RIGHT_MODAL_NAVIGATOR this will handle this specific case only and will keep the rest of the behavior intact.
case SCREENS.REPORT_ATTACHMENTS:
// if the
if(targetReportID === getTopmostReportId(rootState) && lastRoute === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) {
navigationRef.current.dispatch({...StackActions.pop(2), target: rootState.key});
return
}
// if we are not in the target report, we need to navigate to it after dismissing the modal
if (targetReportID && targetReportID !== getTopmostReportId(rootState)) {
const state = getStateFromPath(ROUTES.getReportRoute(targetReportID));
const action = getActionFromState(state, linkingConfig.config);
action.type = 'REPLACE';
navigationRef.current.dispatch(action);
} else {
navigationRef.current.dispatch({...StackActions.pop(), target: rootState.key});
}
break;
Notice the use of StackActions.pop(2) instead of StackActions.pop() to make sure we go back twice to reach the previously opened report route.
The dismissModal function code can be improved but i'm new to the codebase and can't make such big changes and double check all the others cases 😄
issue-27580-proposal.mp4
What alternative solutions did you explore? (Optional)
Please re-state the problem that we are trying to solve in this issue.
App doesn't close not-found page when navigating to the not-found page and navigating back to the current report from search
What is the root cause of that problem?
If user goes to the not-found page, the navigation stack has 3 navigators: Home, CentralPanNavigator(report), not-found.
If the user opens the search report modal, the navigation stack has 4, RightModalNavigator is added to the end
In this case, targetReportID is the same as top-most reportID and so we pop the navigation stack once in line 174. That's why not-found page appears(not closed)
This is the root cause
What changes do you think we should make in order to solve the problem?
We're assuming that we can go to the report by popping once from the RightModalNavigator. This is wrong. We need to generalize this
We can fix this issue by popping to central navigator
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-23. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
[@fedirjh] 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:
[@fedirjh] A discussion in #expensify-bugs 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:
[@fedirjh] Determine if we should create a regression test for this bug.
[@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
changed the title [-][HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [$500] Web - App does not close Hmm its not here page on selecting current report from search[/-][+][HOLD for payment 2023-10-23] [$500] Web - App does not close Hmm its not here page on selecting current report from search[/+]on Oct 19, 2023
changed the title [-][HOLD for payment 2023-10-23] [$500] Web - App does not close Hmm its not here page on selecting current report from search[/-][+][C+ Checklist Needs Completion] [$500] Web - App does not close Hmm its not here page on selecting current report from search[/+]on Oct 23, 2023
Link to the PR: I couldn’t find the offending PR, however, the code was refactored during the navigation refactor in @swm/navigation refactor #19263.
Link to discussion: N/A This is an extremely minor issue that could be easily overlooked during PR review. I don't think anything could have been done to prevent it.
Determine if we should create a regression test for this bug: I'm unsure if we need a regression test for this particular edge case. If necessary, I will suggest one.
Regression Test Proposal
Open ND and login with any account on web/desktop
Open any report
Send an invalid route inside the report, e.g. : https://new.expensify.com/settings/not-found
click the invalid link you just sent, and it will open a not found page.
Activity
[-]Web - App does not close Hmm its not here page on selecting current report from search[/-][+][$500] Web - App does not close Hmm its not here page on selecting current report from search[/+]melvin-bot commentedon Sep 16, 2023
Triggered auto assignment to @greg-schroeder (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 16, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01ba78cc3a004601db
melvin-bot commentedon Sep 16, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Sep 16, 2023
Triggered auto assignment to @lschurr (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.melvin-bot commentedon Sep 16, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (
External)abdel-h66 commentedon Sep 16, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - App does not close Hmm its not here page on selecting current report from search
What is the root cause of that problem?
When the serach is opened on the current report. and the current report is clicked We are just dissmissing the Search modal which makes sense because the report is already open.
What changes do you think we should make in order to solve the problem?
When the not found page appears, we have the last route name equal to
NAVIGATORS.RIGHT_MODAL_NAVIGATORApp/src/libs/Navigation/Navigation.js
Line 156 in 76c1559
We can then add a check when the
getTopmostReportIdis the current report and also when the last route isNAVIGATORS.RIGHT_MODAL_NAVIGATORthis will handle this specific case only and will keep the rest of the behavior intact.Notice the use of
StackActions.pop(2)instead ofStackActions.pop()to make sure we go back twice to reach the previously opened report route.The dismissModal function code can be improved but i'm new to the codebase and can't make such big changes and double check all the others cases 😄
issue-27580-proposal.mp4
What alternative solutions did you explore? (Optional)
N/A
dummy-1111 commentedon Sep 16, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
App doesn't close not-found page when navigating to the not-found page and navigating back to the current report from search
What is the root cause of that problem?
If user goes to the not-found page, the navigation stack has 3 navigators:
Home,CentralPanNavigator(report),not-found.If the user opens the search report modal, the navigation stack has 4,
RightModalNavigatoris added to the endApp/src/libs/Navigation/Navigation.js
Lines 167 to 175 in 76c1559
In this case,
targetReportIDis the same as top-most reportID and so we pop the navigation stack once in line 174. That's why not-found page appears(not closed)This is the root cause
What changes do you think we should make in order to solve the problem?
We're assuming that we can go to the report by popping once from the RightModalNavigator. This is wrong. We need to generalize this
We can fix this issue by popping to central navigator
This works fine
Result
27580.mp4
What alternative solutions did you explore? (Optional)
50 remaining items
melvin-bot commentedon Oct 16, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-23. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Oct 16, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[-][HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [$500] Web - App does not close Hmm its not here page on selecting current report from search[/-][+][HOLD for payment 2023-10-23] [$500] Web - App does not close Hmm its not here page on selecting current report from search[/+]greg-schroeder commentedon Oct 23, 2023
Processing
greg-schroeder commentedon Oct 23, 2023
Payments complete. @fedirjh just need you to complete the C+ checklist and we can close this out!
[-][HOLD for payment 2023-10-23] [$500] Web - App does not close Hmm its not here page on selecting current report from search[/-][+][C+ Checklist Needs Completion] [$500] Web - App does not close Hmm its not here page on selecting current report from search[/+]fedirjh commentedon Oct 24, 2023
BugZero Checklist:
Regression Test Proposal
https://new.expensify.com/settings/not-foundgreg-schroeder commentedon Oct 27, 2023
filing regression test