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-08-29] [$250] Workspace - Leave button does not response for approver #68355
Please re-state the problem that we are trying to solve in this issue.
Workspace - Leave button does not response for approver
What is the root cause of that problem?
We get this error
What changes do you think we should make in order to solve the problem?
We shouldn't show the leave button when the user is default approver by using getDefaultApprover in PolicyUtils
const defaultApprover = getDefaultApprover(getPolicy(item.policyID)); // we can use another way to get policy here
if (!(isAdmin || isOwner) && defaultApprover !== session?.email) {
threeDotsMenuItems.push({
icon: Expensicons.Exit,
text: translate('common.leave'),
onSelected: callFunctionIfActionIsAllowed(() => leaveWorkspace(item.policyID)),
});
}
changed the title [-]Workspace - Leave button does not response for approver[/-][+][$250] Workspace - Leave button does not response for approver[/+]on Aug 13, 2025
Problem:
When an approver in a workspace clicks Leave in the workspace settings, nothing happens — there’s no success action and no error message. This makes it unclear whether leaving is allowed and prevents the user from taking action or understanding the restriction.
Steps to Reproduce:
User A creates a workspace.
User A invites User B as an approver.
User B navigates to:
Workspace → More menu → Leave.
Click Leave.
Observe no response.
Expected Result:
If approvers are allowed to leave: the workspace should be removed from their list and confirmation should be shown.
If approvers are not allowed to leave: display an error message clearly stating the restriction.
Actual Result:
The Leave button is non-responsive — no visual feedback, no action taken.
Proposed Solution:
Ensure the Leave button for approvers triggers the onLeaveWorkspace handler and sends the request to the backend.
If the backend rejects the request (e.g., approver role restriction), display a visible error toast (e.g., “Approvers must be removed from their role before leaving this workspace”).
Optionally disable the button with a tooltip if leaving is disallowed, to prevent confusion.
📣 @nikolai-git-house! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
changed the title [-][$250] Workspace - Leave button does not response for approver[/-][+][Due for payment 2025-08-29] [$250] Workspace - Leave button does not response for approver[/+]on Aug 22, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.97-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307@RachCHopkins 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. Yes
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Aug 12, 2025
Triggered auto assignment to @RachCHopkins (
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 Aug 12, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace - Leave button does not response for approver
What is the root cause of that problem?
We get this error
What changes do you think we should make in order to solve the problem?
We shouldn't show the leave button when the user is default approver by using
getDefaultApproverinPolicyUtilsApp/src/pages/workspace/WorkspacesListPage.tsx
Lines 221 to 227 in d1ecdb1
Note: we can check other leave button
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)
Or we can still show the leave button and will alert if the default approver click to this button
RachCHopkins commentedon Aug 13, 2025
I don't think these repro steps are correct:
The only roles available are Admin, Auditor or Member
Going by the video included the actual repro steps are:
Expected Result:
Approver should be able to leave the workspace or there should be an error message that approver can not perform the action
Actual Result:
The workspace disappears briefly and then reappears.
There is actually a log line in the background:
I'm not sure how thoroughly this was tested, because it's not just mWeb Chrome and Windows: Chrome
[-]Workspace - Leave button does not response for approver[/-][+][$250] Workspace - Leave button does not response for approver[/+]melvin-bot commentedon Aug 13, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021955490692804894556
melvin-bot commentedon Aug 13, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (
External)nikolai-git-house commentedon Aug 13, 2025
Proposal
Problem:
When an approver in a workspace clicks Leave in the workspace settings, nothing happens — there’s no success action and no error message. This makes it unclear whether leaving is allowed and prevents the user from taking action or understanding the restriction.
Steps to Reproduce:
Workspace → More menu → Leave.
Expected Result:
If approvers are allowed to leave: the workspace should be removed from their list and confirmation should be shown.
If approvers are not allowed to leave: display an error message clearly stating the restriction.
Actual Result:
The Leave button is non-responsive — no visual feedback, no action taken.
Proposed Solution:
melvin-bot commentedon Aug 13, 2025
📣 @nikolai-git-house! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
melvin-bot commentedon Aug 13, 2025
9 remaining items
[-][$250] Workspace - Leave button does not response for approver[/-][+][Due for payment 2025-08-29] [$250] Workspace - Leave button does not response for approver[/+]melvin-bot commentedon Aug 22, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Aug 22, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.97-5 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-08-29. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Aug 22, 2025
@dukenv0307 @RachCHopkins 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 commentedon Aug 25, 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/35671/files#r2297670121
[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. Yes
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/541137
Regression Test Proposal
Test:
Do we agree 👍 or 👎
RachCHopkins commentedon Aug 27, 2025
Payment Summary:
Upwork job here
RachCHopkins commentedon Aug 29, 2025
Contributor has been paid, the contract has been completed, and the Upwork post has been closed.
@dukenv0307 🟢 to request payment.
quinthar commentedon Sep 15, 2025
Approved $250 to @dukenv0307