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
[Due for payment 2025-05-20] [$250] iOS - Workspace - Unable to delete workspace, app freezes after tapping Delete workspace #61040
Version Number: 9.1.33-3 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):dhidjdjdkd@gmail.com Issue reported by: Applause Internal Team Device used: iPhone 15 Pro Max / iOS 18.4 App Component: Workspace Settings
Action Performed:
Launch Expensify app.
Log in with a new Gmail account.
Select Something else during onboarding and complete the flow.
Go to Account > Workspaces.
Create a new workspace.
Tap app back button to return to workspace list.
Tap 3-dot menu.
Tap Delete workspace.
Expected Result:
Confirmation modal to delete workspace will show up.
Actual Result:
Confirmation modal to delete workspace does not show up.
After tapping Delete workspace, tapping any button on the same page is not responsive.
Please re-state the problem that we are trying to solve in this issue.
Confirmation modal to delete workspace does not show up.
After tapping Delete workspace, tapping any button on the same page is not responsive.
What is the root cause of that problem?
When pressing "Delete workspace", we open the Delete modal immediately without waiting for the popover menu to close. This behaviour creates a race condition where the modal Onyx values are all set to false when popover menu closes, but Delete modal still opens
So on screen, the Delete modal is not shown but the invisible overlay still exists, blocking user from interacting with any other components under.
What changes do you think we should make in order to solve the problem?
We should close the popover menu before opening delete modal
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
It's a modal race condition so I don't think we need a test
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.
However, on iOS, if we want to show a modal from another modal, we need to wait for the previous modal to close first. That's why we have the shouldCallAfterModalHide. We set it to false if shouldCalculateBillNewDot is true, because we don't want to close the modal yet until the calculation is complete.
What changes do you think we should make in order to solve the problem?
To fix this, after completing the calculation, we need to close the previous modal first using Modal.close.
We can add it into usePayAndDowngrade hook.
close(() => setIsDeleteModalOpen(true));
We can optionally do it using a props because usePayAndDowngrade is used in overview page too which doesn't need it.
Or to make it cleaner, we can update the setIsDeleteModalOpen props to be a calculate complete callback, but doesn't need pay when downgrading. So, we can use it like:
⚠️@bernhardoj Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).
changed the title [-][$250] iOS - Workspace - Unable to delete workspace, app freezes after tapping Delete workspace[/-][+][Due for payment 2025-05-20] [$250] iOS - Workspace - Unable to delete workspace, app freezes after tapping Delete workspace[/+]on May 13, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.44-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@shubham1206agra@maddylewis@shubham1206agra 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]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[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:
[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:
[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.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
[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: Not Required
[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
Test:
Create a WS
Go to Workspace list page
Click 3-dot menu of the created workspace
Click delete workspace
Verify that: Confirmation modal to delete workspace shows up.
Click Delete
Verify that: WS is deleted, user can interact with screen normally.
Activity
melvin-bot commentedon Apr 29, 2025
Triggered auto assignment to @maddylewis (
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.daledah commentedon Apr 29, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Confirmation modal to delete workspace does not show up.
After tapping Delete workspace, tapping any button on the same page is not responsive.
What is the root cause of that problem?
When pressing "Delete workspace", we open the Delete modal immediately without waiting for the popover menu to close. This behaviour creates a race condition where the modal Onyx values are all set to
falsewhen popover menu closes, but Delete modal still opensSo on screen, the Delete modal is not shown but the invisible overlay still exists, blocking user from interacting with any other components under.
What changes do you think we should make in order to solve the problem?
We should close the popover menu before opening delete modal
App/src/hooks/usePayAndDowngrade.ts
Line 22 in d391099
Screen.Recording.2025-04-29.at.19.01.12.mov
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
It's a modal race condition so I don't think we need a test
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.
bernhardoj commentedon Apr 29, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Can't delete workspace.
What is the root cause of that problem?
When we try to delete a workspace and
shouldCalculateBillNewDotis true, it will calculate the bill firstApp/src/pages/workspace/WorkspacesListPage.tsx
Lines 217 to 241 in d391099
Only after the calculate bill completes, we close the current modal,
App/src/pages/workspace/WorkspacesListRow.tsx
Lines 134 to 144 in d391099
and then show the delete confirm modal.
App/src/hooks/usePayAndDowngrade.ts
Lines 16 to 22 in d391099
However, on iOS, if we want to show a modal from another modal, we need to wait for the previous modal to close first. That's why we have the
shouldCallAfterModalHide. We set it to false ifshouldCalculateBillNewDotis true, because we don't want to close the modal yet until the calculation is complete.What changes do you think we should make in order to solve the problem?
To fix this, after completing the calculation, we need to close the previous modal first using
Modal.close.We can add it into
usePayAndDowngradehook.We can optionally do it using a props because
usePayAndDowngradeis used in overview page too which doesn't need it.Or to make it cleaner, we can update the
setIsDeleteModalOpenprops to be a calculate complete callback, but doesn't need pay when downgrading. So, we can use it like:Then, we can remove the modal hide from here.
App/src/pages/workspace/WorkspacesListRow.tsx
Lines 134 to 144 in d391099
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
github-actions commentedon Apr 29, 2025
[-]iOS - Workspace - Unable to delete workspace, app freezes after tapping Delete workspace[/-][+][$250] iOS - Workspace - Unable to delete workspace, app freezes after tapping Delete workspace[/+]melvin-bot commentedon Apr 29, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021917225435968213171
melvin-bot commentedon Apr 29, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (
External)melvin-bot commentedon May 5, 2025
@shubham1206agra Huh... This is 4 days overdue. Who can take care of this?
17 remaining items
[-][$250] iOS - Workspace - Unable to delete workspace, app freezes after tapping Delete workspace[/-][+][Due for payment 2025-05-20] [$250] iOS - Workspace - Unable to delete workspace, app freezes after tapping Delete workspace[/+]melvin-bot commentedon May 13, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 13, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.44-8 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-05-20. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 13, 2025
@shubham1206agra @maddylewis @shubham1206agra 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]
maddylewis commentedon May 20, 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:
[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:
[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.
Regression Test Proposal Template
[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:
Test:
Do we agree 👍 or 👎
maddylewis commentedon May 20, 2025
Payments + Final To-Dos
shubham1206agra commentedon May 20, 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/59070/files#r2098477678
[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: Not Required
[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
Test:
Do we agree 👍 or 👎
garrettmknight commentedon Jun 19, 2025
$250 approved for @shubham1206agra