App
App copied to clipboard
No response when clicking back button and link on not found 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.30-15 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 Expensify/Expensify Issue URL: Issue reported by: @dukenv0307 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1725706526160129
Action Performed:
- Create a new workspace
- Navigate to Workspace Settings > More Features > Enable Report Field.
- In Report Field, add a field, name it, choose a type, and save.
- Go to Workspace Chat > Click the plus sign > Submit Expense > Add amount, merchant, and submit.
- In Expense report, click on the custom report fields
- Edit field id on router and press enter
- Notice that page not found is displayed
- Try to click back button and link on this page
Expected Result:
Can click the back button and link to go back.
Actual Result:
Can't click the back button and link to go back.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
https://github.com/user-attachments/assets/7df94954-4c6f-4e80-8333-a18c023baab5
https://github.com/user-attachments/assets/a6c99ba3-db1c-4854-b7f5-40d3842e9ec0
Add any screenshot/video evidence
Triggered auto assignment to @kadiealexander (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.
@kadiealexander I report this bug so I can help take it as C+
Proposal
Please re-state the problem that we are trying to solve in this issue.
No response when clicking back button and link on not found page
What is the root cause of that problem?
Currently, we are setting 2 functions onBackButtonPress and onLinkPress which are empty here
https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/EditReportFieldPage.tsx#L70-L71
What changes do you think we should make in order to solve the problem?
We just need to remove the 2 props onBackButtonPress and onLinkPress because we already have the default values here
https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/components/BlockingViews/FullPageNotFoundView.tsx#L52-L55
What alternative solutions did you explore? (Optional)
Proposal
Please re-state the problem that we are trying to solve in this issue.
No response when clicking back button and link on not found page
What is the root cause of that problem?
https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/EditReportFieldPage.tsx#L70-L71 We assign empty functions to onBackButtonPress and onLinkPress
What changes do you think we should make in order to solve the problem?
To fix this bug, we should simply remove the onBackButtonPress and onLinkPress props, as default values have already been set for them.
Additionally, for clarity and simplicity, I recommend removing this section entirely
https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/EditReportFieldPage.tsx#L61-L75
And using FullPageNotFoundView as a wrapper
<FullPageNotFoundView shouldShow={!reportFieldsEnabled || !reportField || !report || isDisabled}>
This way is used widely in many other places
https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/AddPersonalBankAccountPage.tsx#L70-L71
https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/FlagCommentPage.tsx#L161-L162
https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/ProfilePage.tsx#L188-L189
What alternative solutions did you explore? (Optional)
Job added to Upwork: https://www.upwork.com/jobs/~021832973509277607149
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (External)
Report field config was added in #wave-control, moving this to that project.
@cretadn22 Your improvement looks good. But I think the main fix already be mentioned in @nkdengineer's proposal
Let's go with @nkdengineer's proposal because they go first
π π π C+ reviewed
Triggered auto assignment to @puneetlath, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @DylanDylann π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @nkdengineer π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@kadiealexander This issue is ready for payment
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:
- [x] [@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA
- [x] [@DylanDylann] 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: NA
- [x] [@DylanDylann] 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: NA
- [x] [@DylanDylann] Determine if we should create a regression test for this bug. Yes
- [x] [@DylanDylann] 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.
- [x] [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/432947
Payouts due:
- [x] Contributor: $250 @nkdengineer
- [x] Contributor+: $250 @DylanDylann
Upwork job is here.
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:
[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA [@DylanDylann] 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: NA [@DylanDylann] 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: NA [@DylanDylann] Determine if we should create a regression test for this bug. Yes [@DylanDylann] 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.
Regression Test Proposal
- Create a new workspace
- Navigate to Workspace Settings > More Features > Enable Report Field.
- In Report Field, add a field, name it, choose a type, and save.
- Go to Workspace Chat > Click the plus sign > Submit Expense > Add amount, merchant, and submit.
- In the Expense report, click on the custom report fields
- Edit field ID on router and press enter
- Notice that page not found is displayed
- Try to click the back button and link on this page
- Verify that we can click the back button and link to go back.
Do we agree π or π
https://github.com/Expensify/Expensify/issues/432947