Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C+ Checklist Needs Completion] [$500] Web - App does not close Hmm its not here page on selecting current report from search #27580

Closed
1 of 6 tasks
kbecciv opened this issue Sep 16, 2023 · 35 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Sep 16, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the app
  2. Open any report
  3. 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.
  4. Open search page by CTRL+K
  5. Click on same report as opened in step 2
  6. 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

Hmm.its.not.here.full.page.not.closed.mp4
Recording.4524.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694765722471659

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ba78cc3a004601db
  • Upwork Job ID: 1703071612120547328
  • Last Price Increase: 2023-10-07
  • Automatic offers:
    • fedirjh | Reviewer | 27150714
    • s-alves10 | Contributor | 27150719
    • dhanashree-sawant | Reporter | 27150722
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 16, 2023
@melvin-bot melvin-bot bot 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 Sep 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 16, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 16, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Sep 16, 2023

Triggered auto assignment to @lschurr (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 16, 2023

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

@abdel-h66
Copy link
Contributor

abdel-h66 commented 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_NAVIGATOR

function dismissModal(targetReportID) {

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)

N/A

@s-alves10
Copy link
Contributor

s-alves10 commented 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, RightModalNavigator is added to the end

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});
}

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

            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 if (targetReportID && _.some(rootState.routes, route => route.name === SCREENS.NOT_FOUND)) {
                const lastRouteIndex = rootState.routes.length - 1;
                const centralRouteIndex = _.findLastIndex(rootState.routes, route => route.name === NAVIGATORS.CENTRAL_PANE_NAVIGATOR);
                navigationRef.current.dispatch({...StackActions.pop(lastRouteIndex - centralRouteIndex), target: rootState.key});
            } else {
                navigationRef.current.dispatch({...StackActions.pop(), target: rootState.key});
            }

This works fine

Result
27580.mp4

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Sep 19, 2023
@lschurr lschurr removed their assignment Sep 19, 2023
@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 23, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@greg-schroeder
Copy link
Contributor

Awaiting proposal review @fedirjh

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 25, 2023
@greg-schroeder
Copy link
Contributor

Bump @fedirjh

@melvin-bot melvin-bot bot removed the Overdue label Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 30, 2023

@greg-schroeder @fedirjh this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Sep 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 30, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@fedirjh
Copy link
Contributor

fedirjh commented Oct 1, 2023

@abdel-h66 @s-alves10 Thank you both for the proposals.


@abdel-h66 The part of your proposal that addresses the root cause should clarify why it does not dismiss the "not found" page. Regarding the solution, it appears to be a highly specific fix, which may fail if we encounter varying stacked screen lengths. For instance, if we simply open the search screen and select the same report, it will navigate to the home screen.

CleanShot.2023-10-01.at.20.26.18.mp4

@melvin-bot melvin-bot bot removed the Overdue label Oct 1, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Oct 12, 2023
@s-alves10
Copy link
Contributor

@fedirjh

PR is ready for review #29404

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

🎯 ⚡️ Woah @fedirjh / @s-alves10, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @s-alves10 got assigned: 2023-10-11 22:51:24 Z
  • when the PR got merged: 2023-10-13 19:45:05 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [$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 Oct 16, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented 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.

  • 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:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented 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:

  • [@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:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot 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 [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 Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented 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.

  • 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:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented 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:

  • [@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:

@greg-schroeder greg-schroeder 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 Oct 19, 2023
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Oct 23, 2023
@greg-schroeder
Copy link
Contributor

Processing

@greg-schroeder
Copy link
Contributor

Payments complete. @fedirjh just need you to complete the C+ checklist and we can close this out!

@greg-schroeder greg-schroeder 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 Oct 23, 2023
@fedirjh
Copy link
Contributor

fedirjh commented Oct 24, 2023

BugZero Checklist:

  • 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

  1. Open ND and login with any account on web/desktop
  2. Open any report
  3. Send an invalid route inside the report, e.g. : https://new.expensify.com/settings/not-found
  4. click the invalid link you just sent, and it will open a not found page.
  5. Open search page by CMD + K
  6. Select the same report as in step 2
  7. Verify that the report is opened
  • Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Oct 26, 2023
@greg-schroeder
Copy link
Contributor

filing regression test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants