-
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-08-26] [$250] Submit expense - Not here page displayed in the background after a refresh #46774
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
@joekaufmanexpensify 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 |
Edited by proposal-police: This proposal was edited at 2024-08-05 06:59:14 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.A "not found" page is displayed in the background after refreshing the page or when creating an IOU request. What is the root cause of that problem?When a user clicks on the The report only contains the report name and an error field with a "not found" property. When a user visits the app by entering a URL in the address bar or refreshing the page, the app adapts the root state by storing the correct navigation state/path to reach that address. This adaptation is handled by App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 154 to 156 in 8fd61d6
This results in the report screen being added to the navigation root state, even though it is not required for IOU request URLs to open the correct report in the background to start the IOU request step. What changes do you think we should make in order to solve the problem?We should modify We can adjust the condition in : App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 154 to 156 in 8fd61d6
to be: if (route?.path.indexOf('/r/') === 0 || route?.path.indexOf('r/') === 0) {
const reportID = (route.params as Record < string, string | undefined > )?.reportID;
if (ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]) {
return {name: SCREENS.REPORT, params: {reportID}};
}
} Additionally, if there are specific routes where the report screen must be included regardless of the URL path, we can add these routes to an exception list (currently I don't find any route). |
ProposalPlease re-state the problem that we are trying to solve in this issue.Not here page gets displayed in the background when submit expense page is open on the right and user refreshes the page which is a different behavior that doesn't happen when other right hand pages are open What is the root cause of that problem?When we submit an expense from FAB, the
Then the report screen with invalid App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 154 to 156 in 2eb65f8
App/src/libs/Navigation/linkTo/index.ts Lines 135 to 141 in 2eb65f8
What changes do you think we should make in order to solve the problem?
App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts Lines 154 to 156 in 2eb65f8
What alternative solutions did you explore? (Optional) |
@tsa321 did you link this issue with the other one above because these have the same RCA? |
@joekaufmanexpensify this is simlar to #46713 and my proposal can fix it too, but RCA a little bit differerent |
Job added to Upwork: https://www.upwork.com/jobs/~01a60ec1cb3ed7a96b |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
Got it. If we can fix all of the various cases in one issue, that feels ideal IMO |
Pending proposal review |
@sobitneupane mind taking a look here? |
Thanks for the proposal @nkdengineer . @nkdengineer Regarding the changes you have proposed,
It was added by this PR. Won't removing it cause regression? The third change you proposed has already been implemented in the latest main branch. |
Thanks for your proposal @tsa321 We cannot implement the change you suggested. In some scenarios, when opening the app through a deep link, it's necessary to open the report in the background. For instance, if we're currently viewing a report at |
@sobitneupane I think it is not required. That route is similar when sumbit expense from FAB button. Which I think is not required to open the report. |
@sobitneupane No I meant we will not call |
Thanks for the update Proposal from @nkdengineer looks good to me. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@sobitneupane If your last action, for example, is submitting expense report A, then opening report B and clicking QAB, report A does not open; it stays on report B. Based on this, it is not necessary to open the report with the reportID( There are actually many issues related to `getAdaptedStateFromPath`. If you search through the issues, you'll find that my solution is more general and addresses the related problems. |
Just a note about this case: When we submit expenses to report A and then open report B, if we click on the QAB report B still appears. If we refresh the page, the report A is displayed as expected since we access the deep link has |
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR in review |
PR merged and on staging |
Hmm, automation did not work here. This went out to prod on the 19th, so is actually due today. Will tackle payment in the next day or so! |
Payments here are:
|
All set to issue payment! |
@nkdengineer $250 sent and contract ended |
Closing as only thing left here is for @sobitneupane to request payment via NewDot! |
$250 approved for @sobitneupane |
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: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Everything should work as normal just as it is on step 5
Actual Result:
Not here page gets displayed in the background when submit expense page is open on the right and user refreshes the page which is a different behavior that doesn't happen when other right hand pages are open
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6554859_1722100817716.4_5848162808948069362.1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @sobitneupaneThe text was updated successfully, but these errors were encountered: