[$250] iOS Search - Rename page opens twice when renaming search and opening Rename page again
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.41-3 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:
Precondition:
- User has saved search
- Launch New Expensify app
- Go to Search
- Tap on the dropdown
- Tap 3-dot menu next to the saved search
- Tap Rename
- Rename and save it
- Tap on the dropdown
- Tap 3-dot menu next to the saved search
- Tap Rename
Expected Result:
Rename page will open once
Actual Result:
Rename page opens twice. Another one is in the background of the current Rename page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android: Native
- [x] Android: mWeb Chrome
- [x] iOS: Native
- [ ] iOS: mWeb Safari
- [ ] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/22d7969e-157b-401a-af1a-4d8b5495ac08
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021852037932647375330
- Upwork Job ID: 1852037932647375330
- Last Price Increase: 2024-10-31
- Automatic offers:
- dukenv0307 | Reviewer | 104702512
- Nodebrute | Contributor | 104702515
Issue Owner
Current Issue Owner: @dukenv0307
Triggered auto assignment to @muttmuure (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.
@muttmuure 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 #wave-control
Edited by proposal-police: This proposal was edited at 2024-09-30 16:24:52 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
iOS Search - Rename page opens twice when renaming search and opening Rename page again
What is the root cause of that problem?
We haven't dismiss modal yet
What changes do you think we should make in order to solve the problem?
Add Navigation.dismissModal(); in
https://github.com/Expensify/App/blob/main/src/pages/Search/SavedSearchRenamePage.tsx#L27-L34
What alternative solutions did you explore? (Optional)
N/A
Proposal
Please re-state the problem that we are trying to solve in this issue.
Rename page opens twice when renaming search and opening Rename page again
What is the root cause of that problem?
We are not dismissing the modal while navigating to central pane here https://github.com/Expensify/App/blob/a9224f30ef9643644d20a90bc4488371c5f542ff/src/pages/Search/SavedSearchRenamePage.tsx#L28-L33
What changes do you think we should make in order to solve the problem?
We can add Navigation.dismissModal() here
https://github.com/Expensify/App/blob/a9224f30ef9643644d20a90bc4488371c5f542ff/src/pages/Search/SavedSearchRenamePage.tsx#L28-L33
const applyFiltersAndNavigate = () => {
SearchActions.clearAdvancedFilters();
Navigation.dismissModal();
Navigation.navigate(
ROUTES.SEARCH_CENTRAL_PANE.getRoute({
query: q,
name: newName,
}),
);
};
What alternative solutions did you explore? (Optional)
@user Your proposal will be dismissed because you did not follow the proposal template.
Note for C+ we both posted the proposal in almost the same second and this is @drminh2807's proposal before edits
@muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@muttmuure Still overdue 6 days?! Let's take care of this!
@muttmuure 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
@muttmuure 10 days overdue. I'm getting more depressed than Marvin.
@muttmuure this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
This issue has not been updated in over 14 days. @muttmuure eroding to Weekly issue.
Job added to Upwork: https://www.upwork.com/jobs/~021852037932647375330
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (External)
Proposal
Please re-state the problem that we are trying to solve in this issue.
Rename page opens twice. Another one is in the background of the current Rename page
What is the root cause of that problem?
We navigate to the new query search page without dismissing the rename page.
https://github.com/Expensify/App/blob/6763f1a114817c059426c7304b605e1e31cdaa10/src/pages/Search/SavedSearchRenamePage.tsx#L28
Another problem is the old search page with the old query name still appears if we click on back button twice after renaming a saved search.
What changes do you think we should make in order to solve the problem?
- We should dismiss the modal before navigating to the search page with the new query name
Navigation.dismissModal();
https://github.com/Expensify/App/blob/6763f1a114817c059426c7304b605e1e31cdaa10/src/pages/Search/SavedSearchRenamePage.tsx#L28
- If the current viewing search is the renaming search we should navigate with type
UPto remove the old search page from the navigation stack.
-
We need to introduce a new param
isViewingSearchfor the route ofSavedSearchRenamePage -
the same param for
getOverflowMenufunction here and pass this togetRoutefunction
Navigation.navigate(ROUTES.SEARCH_SAVED_SEARCH_RENAME.getRoute({name: encodeURIComponent(itemName), jsonQuery: inputQuery, isViewingSearch}));
https://github.com/Expensify/App/blob/6763f1a114817c059426c7304b605e1e31cdaa10/src/libs/SearchUIUtils.ts#L485
- Pass
isViewingSearchparam togetOverflowMenufunction here
menuItems={SearchUIUtils.getOverflowMenu(
item.title ?? '',
Number(item.hash ?? ''),
item.query ?? '',
showDeleteModal,
true,
closeMenu,
currentSavedSearch?.hash === item.hash,
)}
https://github.com/Expensify/App/blob/6763f1a114817c059426c7304b605e1e31cdaa10/src/pages/Search/SearchTypeMenuNarrow.tsx#L144
- Navigate to the search page with type
UPifisViewingSearchparam is true
Navigation.navigate(
ROUTES.SEARCH_CENTRAL_PANE.getRoute({
query: q,
name: newName?.trim(),
}),
isViewingSearch === 'true' ? CONST.NAVIGATION.TYPE.UP : undefined
);
https://github.com/Expensify/App/blob/6763f1a114817c059426c7304b605e1e31cdaa10/src/pages/Search/SavedSearchRenamePage.tsx#L28
What alternative solutions did you explore? (Optional)
Thanks for all your proposals. @Nodebrute's proposal is the first to point out the correct RCA and solution.
@mkzie2 I think the bug you mentioned is not really related to this issue, so we should fix it in another issue (I'll report it).
Let's go with @Nodebrute's solution
πππ C+ reviewed
Triggered auto assignment to @francoisl, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @dukenv0307 π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @Nodebrute π 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 π
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.58-2 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/51925
If no regressions arise, payment will be issued on 2024-11-14. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @Nodebrute requires payment automatic offer (Contributor)
- @dukenv0307 requires payment automatic offer (Reviewer)
@dukenv0307 @muttmuure The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
@dukenv0307 requires payment automatic offer (Reviewer)
@muttmuure FYI I receive payment via NewDot, I'll request there
BugZero Checklist:
- [x] [Contributor] Classify the bug:
Bug classification
Source of bug:
- [ ] 1a. Result of the original design (eg. a case wasn't considered)
- [x] 1b. Mistake during implementation
- [ ] 1c. Backend bug
- [ ] 1z. Other:
Where bug was reported:
- [x] 2a. Reported on production
- [ ] 2b. Reported on staging (deploy blocker)
- [ ] 2c. Reported on a PR
- [ ] 2z. Other:
Who reported the bug:
- [ ] 3a. Expensify user
- [ ] 3b. Expensify employee
- [ ] 3c. Contributor
- [x] 3d. QA
- [ ] 3z. Other:
-
[x] [Contributor] 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: https://github.com/Expensify/App/pull/48566/files#r1847608611
-
[x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
-
[x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
-
[ ] [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
- Go to Search
- Tap on the dropdown
- Tap 3-dot menu next to the saved search
- Tap Rename
- Rename and save it
- Tap on the dropdown
- Tap 3-dot menu next to the saved search
- Tap Rename
- Verify rename page will open once
Do we agree π or π
@francoisl, @muttmuure, @Nodebrute, @dukenv0307 Eep! 4 days overdue now. Issues have feelings too...
We already had a test suite for saved searches so I added new steps for that test (internal tracking issue: https://github.com/Expensify/Expensify/issues/445936)
This is ready for payment @muttmuure
@Nodebrute - paid $250 for C
@dukenv0307 - $250 for C+
$250 approved for @dukenv0307