You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2025-01-30] [$250] The checkmark isn't displayed when back to access level page for copilot #52903
Version Number: 9.0.64-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: 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:@DylanDylann Slack conversation (hyperlinked to channel name): ts_external_expensify_bugs
Action Performed:
Go to Security Page
Add copilot
Select an user
Select "Full" option
Click back button
Expected Result:
The checkmark should be displayed when back to access level page for the access level selected
Actual Result:
The checkmark isn't displayed when back to access level page , selected level is highlighted
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android: Standalone
Android: HybridApp
Android: mWeb Chrome
iOS: Standalone
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBUG-copilot.movRecording.774.mp4
Please re-state the problem that we are trying to solve in this issue.
The previously selected role isn't displayed as selected when navigating back to the Access Level page using the header back button from the Add Copilot page.
What is the root cause of that problem?
On the SelectDelegateRolePage, we rely on the role parameter from the route passed from the previous screen using this condition:isSelected: role === route.params.role.
However, when navigating back from the Add Copilot page using the header back button, the checkmark for the previously selected user isn’t displayed because the parameter isn’t passed in this case. On the other hand, if the "Access Level" item on the Add Copilot page is clicked, the pre-selection is displayed since the parameter is passed during navigation.
What changes do you think we should make in order to solve the problem?
Instead of relying solely on the route.params.role, we can manage the selection locally using useState. For example:
But when we open the select role for the first time, the role is undefined. As mentioned by the others, when we press back, we actually call goBack with a fallback of the select role page with the selected role passed to the param.
But this just simply goes back, unless you refresh the page first. But the thing I want to focus on here is that I think we shouldn't show the selected icon in a new delegate flow (when we are going to select the role for the first time), just like when you select the delegate user, there is no selected icon. Because it's a single list selection, the selected icon feels like I'm editing the option.
But the reason QA expects the selected icon is maybe because of the highlighted background of the role. It's because we pass shouldUpdateFocusedIndex which updates the focused item to the pressed item.
@anmurali 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!
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.88-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@eh2077@anmurali@eh2077 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]
[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
[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.
[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
Precondition:
NA
Test:
Go to Security Page
Add copilot
Select an user
Select "Full" option
Click back button
Verify that: The checkmark should be displayed when back to access level page for the access level selected
It states above that @DylanDylann is due, it's an error, likely leftover from when we paid for reporting bugs. If I see it happen again I'll create an issue to fix.
Activity
melvin-bot commentedon Nov 21, 2024
Triggered auto assignment to @anmurali (
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.nkdengineer commentedon Nov 21, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The checkmark isn't displayed when back to access level page
What is the root cause of that problem?
Currently we are using the goBack function here to navigate when the user presses the back button
App/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx
Line 54 in 376f9f0
But before that route params in route were
undefinedsoroute.params.rolehere will be undefinedApp/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Line 28 in 376f9f0
What changes do you think we should make in order to solve the problem?
We should set value to
roleparams before we navigate to confirm pageApp/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Line 59 in 376f9f0
What alternative solutions did you explore? (Optional)
Or we can use
navigatefunction instead ofgoBackfunction herejayeshmangwani commentedon Nov 21, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The previously selected role isn't displayed as selected when navigating back to the Access Level page using the header back button from the Add Copilot page.
What is the root cause of that problem?
On the
SelectDelegateRolePage, we rely on the role parameter from the route passed from the previous screen using this condition:isSelected: role === route.params.role.App/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Lines 24 to 28 in 4c44827
However, when navigating back from the Add Copilot page using the header back button, the checkmark for the previously selected user isn’t displayed because the parameter isn’t passed in this case. On the other hand, if the "Access Level" item on the Add Copilot page is clicked, the pre-selection is displayed since the parameter is passed during navigation.
What changes do you think we should make in order to solve the problem?
Instead of relying solely on the route.params.role, we can manage the selection locally using useState. For example:
When generating
roleOptions, compare the role with currentRole to determine the value of isSelected.On row selection (onSelectRow), update the local state (
setCurrentRole), and then invoke the existingNavigation.navigatemethod.What alternative solutions did you explore? (Optional)
Replace Navigation.goBack() with explicit navigation that ensures the necessary parameters are passed. For example:
App/src/pages/settings/Security/AddDelegate/AddDelegatePage.tsx
Line 134 in 0029614
bernhardoj commentedon Nov 21, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The checkmark isn't displayed on the previously selected role.
What is the root cause of that problem?
We show the selected icon only if the route params role equals the role itself.
App/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Lines 24 to 28 in 4c44827
But when we open the select role for the first time, the role is undefined. As mentioned by the others, when we press back, we actually call goBack with a fallback of the select role page with the selected role passed to the param.
App/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx
Line 54 in 4c44827
But this just simply goes back, unless you refresh the page first. But the thing I want to focus on here is that I think we shouldn't show the selected icon in a new delegate flow (when we are going to select the role for the first time), just like when you select the delegate user, there is no selected icon. Because it's a single list selection, the selected icon feels like I'm editing the option.
But the reason QA expects the selected icon is maybe because of the highlighted background of the role. It's because we pass
shouldUpdateFocusedIndexwhich updates the focused item to the pressed item.App/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Line 45 in 4c44827
What changes do you think we should make in order to solve the problem?
If we agree with what I explain above, then we can remove
shouldUpdateFocusedIndex(or set it to false when role is undefined)App/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Line 45 in 4c44827
And update the confirm role page to not pass the role when going back.
App/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx
Lines 53 to 54 in 4c44827
melvin-bot commentedon Nov 25, 2024
@anmurali Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Nov 27, 2024
@anmurali Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Nov 29, 2024
@anmurali 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Dec 3, 2024
@anmurali 10 days overdue. I'm getting more depressed than Marvin.
melvin-bot commentedon Dec 5, 2024
@anmurali 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!
melvin-bot commentedon Dec 5, 2024
@anmurali 12 days overdue. Walking. Toward. The. Light...
55 remaining items
melvin-bot commentedon Jan 23, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.88-7 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 2025-01-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 23, 2025
@eh2077 @anmurali @eh2077 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]
eh2077 commentedon Jan 31, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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/47353/files#r1937423476
[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
[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.
[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
Precondition:
NA
Test:
Do we agree 👍 or 👎
melvin-bot commentedon Feb 4, 2025
@AndrewGable, @anmurali, @eh2077, @nkdengineer Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Feb 6, 2025
@AndrewGable, @anmurali, @eh2077, @nkdengineer Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Feb 10, 2025
@AndrewGable, @anmurali, @eh2077, @nkdengineer 10 days overdue. Is anyone even seeing these? Hello?
eh2077 commentedon Feb 11, 2025
@anmurali Friendly bump!
melvin-bot commentedon Feb 12, 2025
@AndrewGable, @anmurali, @eh2077, @nkdengineer 12 days overdue now... This issue's end is nigh!
mallenexpensify commentedon Feb 14, 2025
Contributor: @nkdengineer paid $250 via Upwork
Contributor+: @eh2077 due $250 via NewDot
Test case created, thx
It states above that @DylanDylann is due, it's an error, likely leftover from when we paid for reporting bugs. If I see it happen again I'll create an issue to fix.
JmillsExpensify commentedon Feb 17, 2025
$250 approved for @eh2077