-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[$250] android-workflow-Unable to delete approval workflow #61986
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
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Triggered auto assignment to @techievivek ( |
Triggered auto assignment to @muttmuure ( |
💬 A slack conversation has been started in #expensify-open-source |
🚨 Edited by proposal-police: This proposal was edited at 2025-05-14 07:26:13 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.android-workflow-Unable to delete approval workflow What is the root cause of that problem?Once we tap on the delete button, App/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx Line 166 in 23537ae
This function is responsible for this issue: App/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx Lines 61 to 72 in 23537ae
It calls the removeApprovalWorkflow from the actions App/src/libs/actions/Workflow.ts Lines 191 to 195 in 23537ae
Once deleted it sets the value to null but it's not updated in the UI InteractionManager.runAfterInteractions(() => {
// Remove the approval workflow using the initial data as it could be already edited
removeApprovalWorkflow(route.params.policyID, initialApprovalWorkflow);
}); this block is the root cause What changes do you think we should make in order to solve the problem?We should call App/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx Line 67 in 23537ae
and remove const removeApprovalWorkflowCallback = useCallback(() => {
if (!initialApprovalWorkflow) {
return;
}
setIsDeleteModalVisible(false);
Navigation.dismissModal();
removeApprovalWorkflow(route.params.policyID, initialApprovalWorkflow);
}, [initialApprovalWorkflow, route.params.policyID]); What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)If deferring via const removeApprovalWorkflowCallback = useCallback(() => {
if (!initialApprovalWorkflow) {
return;
}
setIsDeleteModalVisible(false);
Navigation.dismissModal();
setTimeout(() => {
removeApprovalWorkflow(route.params.policyID, initialApprovalWorkflow);
}, 0);
}, [initialApprovalWorkflow, route.params.policyID]); Resultworkflow_delete_approver_ios.mp4Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
@techievivek Since this is a DeployBlockerCash, i can help raise a quick PR if it goes external. Thanks |
Thanks! I am just confused why this issue isn't reproducible in production, especially since the related code hasn't changed in a while. |
@techievivek I think this issue is reproducible on latest main, also i think it's occuring on iOS aswell. Can you please verify? Thanks |
My DEV setup for iOS/Android is currently broken, so I can’t verify it there. However, I did test this on iOS version V9.1.44-8(probably latest production deploy) and wasn’t able to reproduce the issue. I also reviewed the recent deploy diff but didn’t find anything there either. This is particularly tricky since the issue doesn’t reproduce on web. Let me bring in a C+ to help us review the proposal. Thanks! |
Job added to Upwork: https://www.upwork.com/jobs/~021922597876858234035 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-05-14 14:39:18 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Add approval workflow not deleted on tapping delete. What is the root cause of that problem?This comes from #60023 as they replaced current Modal with a new one. The interaction is not cleared when the modal is closed because it's unmounted App/src/components/Modal/BottomDockedModal/index.tsx Lines 150 to 157 in c45e5b3
Then the logic inside App/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx Lines 66 to 71 in c45e5b3
What changes do you think we should make in order to solve the problem?We should also clear the interaction in the clean-up function of this
App/src/components/Modal/BottomDockedModal/index.tsx Lines 113 to 128 in efbc737
or we can only clear it if the component is unmounted
App/src/components/Modal/BottomDockedModal/index.tsx Lines 150 to 157 in c45e5b3
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None What alternative solutions did you explore? (Optional)NA Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
Thanks all for the proposals @nkdengineer how many places are affected by this change? I think we use the same logic in other places like there in the same file App/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsEditPage.tsx Lines 55 to 58 in 23537ae
|
@ahmedGaber93 I haven’t investigated deeply, but I believe the root cause is that App/src/components/Modal/BottomDockedModal/index.tsx Lines 141 to 143 in c45e5b3
App/src/components/Modal/BottomDockedModal/index.tsx Lines 150 to 152 in c45e5b3
Removing that line will resolve the issue, but it might introduce other problems, maybe SWM knows that |
@linhvovan29546 Hmm! I comment those lines, but it not works with me. Can you test again and share a video? |
I removed those lines, thinking they were the same, but they’re actually different. :) not sure that
It looks like we're calling |
@ahmedGaber93 I checked and I see the logic clear interaction inside App/src/components/Modal/BottomDockedModal/index.tsx Lines 150 to 157 in c45e5b3
So we should also clear the interaction in the clean-up function of this
App/src/components/Modal/BottomDockedModal/index.tsx Lines 113 to 128 in efbc737
or we can only clear it if the component is unmounted
I tested both solutions and it works. |
Thanks, @linhvovan29546 @nkdengineer for investing this. The only thing we still need to confirm is that case #57536 is not broken (the case that those lines add for fixing it). |
@PiyushChandra17 thanks for the proposal. Removing |
@ahmedGaber93 I think on @nkdengineer proposal here close property doesn't exist. Maybe call Navigation.dismissModal() without it |
@ahmedGaber93 The reason in FAB is the navigation logic is only triggered after the modal is closed then the interaction have already cleared on the close callback. |
@nkdengineer anyway we don't remove that logic, we just add extra Just update your proposal with changes here #61986 (comment) for reference. |
What do you mean? Do you mean the logic create interaction or clear interaction? |
I mean, your fix have no effect on this PR fix, because we just add new |
Just update your proposal with this #61986 (comment) to move forward. |
@nkdengineer's proposal works fine with me! We have uncomplete interaction here that prevent any 🎀 👀 🎀 C+ reviewed |
Current assignee @techievivek is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@nkdengineer please remember this #61986 (comment) |
@ahmedGaber93 Updated. |
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. |
Sorry, didn't mean to trigger melvin, not a deploy blocker, just two issues caused by the same underlying problem. |
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: V9.1.45-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/6097474
Email or phone of affected tester (no customers): Slottwo1 [email protected]
Issue reported by: Applause Internal Team
Device used: Redminote note 10s android 13
App Component: Workspace Settings
Action Performed:
Expected Result:
Add approval workflow must get deleted on tapping delete.
Actual Result:
Add approval workflow not deleted on tapping delete.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6830254_1747172525761.Screenrecorder-2025-05-14-03-00-26-332.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @The text was updated successfully, but these errors were encountered: