-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for Payment 2024-10-07][$250][Search v2.1] Web - App navigates from search page to inbox when refreshing #46773
Comments
Triggered auto assignment to @lschurr ( |
@lschurr 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 |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Inbox page is shown after refresh while hold educational page is showing in search page. What is the root cause of that problem?The hold educational page can be accessed from the report screen (central pane) and report RHP, so we don't have the central pane mapping for the hold educational page. If a RHP page doesn't have the matching route from the mapping, then a report (of inbox) is shown by default when we refresh the web. App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 188 to 196 in 4bce838
But we actually have another way to show the correct central pane screen, that is by using App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 106 to 131 in 4bce838
What changes do you think we should make in order to solve the problem?First, we need to add the
Then, we need to update all the usages of App/src/components/MoneyRequestHeader.tsx Lines 111 to 117 in 4bce838
This way, the App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 118 to 124 in 4bce838
However, the stateForBackTo of report RHP is
so, App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 109 to 110 in 4bce838
We can apply this |
Job added to Upwork: https://www.upwork.com/jobs/~015e208924e7bade60 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah ( |
Reviewing today 👀 |
@luacmartins - This bug is reproducible if we open any transaction edit pages or details pages and then refresh. Do you think we should fix it for all pages? Screen.Recording.2024-08-07.at.2.37.44.PM.mov |
Yea, we should fix this for all these pages. |
On a small screen, the app returns to the home page instead of the search page after the refresh: Screen.Recording.2024-08-07.at.2.42.58.PM.mov |
@bernhardoj - Could you please update your proposal to fix this for all report pages? thanks! |
Edited by proposal-police: This proposal was edited at 2024-08-15 04:08:17 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.App navigates from search page to inbox when refreshing What is the root cause of that problem?The issue is the change of base url that will lead the app to navigate to report inbox section because of having only What changes do you think we should make in order to solve the problem?Report and Search Component Updates: We’ve updated the Report and Search components to navigate back to the search page and open the "hold-expense-educational" modal. However, after these updates, the app navigates back to the search page from the inbox page upon reload. Additionally, any report chat with an "on hold" status is redirected to the search page upon reload. Types of Reports:
Navigation Issue Resolution: We need to update the condition to handle navigation issues, ensuring that when moving to other tabs in the search component, auto-navigation to the search section from the expense inbox section upon reload is correctly managed. UseEffect in Search Component: Add a useEffect to check if the URL contains "hold-expense-educational" and "transaction". This will ensure that the current URL and type are consistent with the sidebar tabs of the search page (e.g., expenses with transaction type). This change will help in navigating to the correct tab and ensuring that on reload, the app shifts to the search > expenses tab. UseEffect in ReportWelcomeText Component: Add a useEffect to check the initial URL of the hold state and automatically reload to the search page if necessary. This will also allow navigation to other inboxes with a hold status. If the URL contains "/r/", the user will remain on that URL; otherwise, they will be redirected to the search page. In the
In the
Above code will find the initial URL and then nagivate user to initial URL. New.Expensify.mp4 |
@raza-ak we need to fix the bug for all report pages not just for the "hold-expense- |
Waiting on proposals |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Edited by proposal-police: This proposal was edited at 2024-08-15 09:12:45 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.App navigates to different page when refreshing What is the root cause of that problem?The money request edit route can be accessed from SearchNavigator / report RHp and from the central pane navigator, but we don't currently save the last NavigationState. As a result, the app assumes the path is accessed from central pane navigator. We can persist the navigation state similar to the approach outlined here: https://reactnavigation.org/docs/state-persistence/, but we haven't implemented it yet. What changes should we make to solve the problem?We can store the App/src/libs/Navigation/NavigationRoot.tsx Lines 93 to 124 in 0980fcd
We should check if the To accomplish this, we can add library functions in App/src/libs/Navigation/NavigationRoot.tsx Line 152 in 0980fcd
This will fix many refresh related issues. Result:macos-web-d.mp4The test branch. What alternative solutions did you explore? (Optional) |
@rayane-djouah could you review the latest proposal? |
Will review today |
@tsa321 - I think that using navigation state persistence might be a breaking change. Do we have any simpler solutions? |
@rayane-djouah Please have a look at my proposal because I've updated my original proposal and fixed the issue for all report pages and attached a new video. |
@rayane-djouah Sorry for the late reply. What exactly is broken? |
This issue has not been updated in over 15 days. @luacmartins, @lschurr, @bernhardoj, @rayane-djouah eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
PR on production |
Note The production deploy automation failed: This should be on [HOLD for Payment 2024-10-07] according to #49855 production deploy checklist, confirmed in #47990 (comment) cc @lschurr |
BugZero Checklist
Regression Test Proposal
Do we agree 👍 or 👎 |
Thanks! @rayane-djouah @bernhardoj - was this a regression from the original PR? |
@lschurr, did you mean the deploy blocker comment mentioned above? @bernhardoj and I addressed it in a follow-up PR (#49916), and the issue is now closed. I would argue that no penalty should be applied here because, in addition to tackling the regression in a follow-up (the regression did not reach production), we did extra work on this issue beyond just fixing the original reported bug. We addressed these types of bugs on all screens opened in RHP from the search page (#46773 (comment), #46773 (comment)). Moreover, the original PR (#47990) was substantial, involving 71 changed files, and required extensive work on both implementation and review sides, making the detection of the regression very challenging given that it's an edge case. |
Agree with @rayane-djouah. In fact, I'm hoping the price could be increased 😅 |
Payment summary:
|
Requested in ND. |
@lschurr - Offer Accepted |
All set! |
$250 approved for @bernhardoj |
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.16
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): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
App stays on inbox page when refreshing
Actual Result:
App navigates from search page to inbox when refreshing while its showing Hold banner page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6554941_1722111871260.2024-07-27_23_01_54.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: