Skip to content

[Due for payment 2026-01-15] [$250] Workspace - Delete banner still display after clicking on the Got it button in Overview #78514

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.2.87-7
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-2545/41237957/1092911729?q=delete+workspace&issue_type=jira
Email or phone of affected tester (no customers): applausetester+vq+2712@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Windows 10/Chrome
App Component: Workspace Settings

Action Performed:

Preconditions: Workspace has issued an Expensify card to the member

  1. Open the NewDot app
  2. Navigate to the Workspace Overview
  3. Click on the More button
  4. Select the Delete option
  5. Click on the Delete button and click on the Got it
  6. Navigate to the Workspace tab
  7. Click on the three dots button and select Delete
  8. Click on the Delete button and click on the Got it

Expected Result:

Step 5: After clicking the " Got it" button, the Delete banner should dismiss like Step 8

Actual Result:

The Delete banner at step 5 still displays

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022005772487710361501
  • Upwork Job ID: 2005772487710361501
  • Last Price Increase: 2025-12-29
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 29, 2025
  2. melvin-bot commented on Dec 29, 2025

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (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.

  3. daledah commented on Dec 29, 2025

    @daledah
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    The Delete banner at step 5 still displays

    What is the root cause of that problem?

    We don't setIsDeleteModalOpen when the user confirm delete if it's online

    if (isOffline) {
    setIsDeleteModalOpen(false);
    goBackFromInvalidPolicy();
    }

    then on hideDeleteWorkspaceErrorModal we also don't setIsDeleteModalOpen as false

    What changes do you think we should make in order to solve the problem?

    We should also setIsDeleteModalOpen as false in hideDeleteWorkspaceErrorModal function

        const hideDeleteWorkspaceErrorModal = () => {
            setIsDeleteWorkspaceErrorModalOpen(false);
            setIsDeleteModalOpen(false);
            clearDeleteWorkspaceError(policy?.id);
        };
    

    What alternative solutions did you explore? (Optional)

    Or we can setIsDeleteModalOpen(false); in confirmDelete function even if it's online

            setIsDeleteModalOpen(false);
            deleteWorkspace({...
            ...
            if (isOffline) {
                goBackFromInvalidPolicy();
            }
    

    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.

  4. ryntgh commented on Dec 29, 2025

    @ryntgh
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Workspace - Delete banner still display after clicking on the Got it button in Overview

    What is the root cause of that problem?

    When the delete operation fails, the effect opens the error modal but doesn't close the delete modal

    useEffect(() => {
    if (!isFocused || !prevIsPendingDelete || isPendingDelete) {
    return;
    }
    if (!policyLastErrorMessage) {
    goBackFromInvalidPolicy();
    return;
    }
    setIsDeleteWorkspaceErrorModalOpen(true);
    }, [isFocused, isPendingDelete, prevIsPendingDelete, policyLastErrorMessage]);

    Meanwhile, in WorkspacesListPage, the same effect properly closes the delete modal (setIsDeleteModalOpen(false)) before showing the error modal

    useEffect(() => {
    if (!prevIsPendingDelete || isPendingDelete || !policyIDToDelete) {
    return;
    }
    setIsDeleteModalOpen(false);
    if (!isFocused || !policyToDeleteLatestErrorMessage) {
    return;
    }
    setIsDeleteWorkspaceErrorModalOpen(true);
    }, [isPendingDelete, prevIsPendingDelete, isFocused, policyToDeleteLatestErrorMessage, policyIDToDelete]);

    What changes do you think we should make in order to solve the problem?

    We should close the delete modal before opening the error modal in WorkspaceOverviewPage

        useEffect(() => {
            if (!isFocused || !prevIsPendingDelete || isPendingDelete) {
                return;
            }
    
            if (!policyLastErrorMessage) {
                goBackFromInvalidPolicy();
                return;
            }
            setIsDeleteModalOpen(false);
            setIsDeleteWorkspaceErrorModalOpen(true);
        }, [isFocused, isPendingDelete, prevIsPendingDelete, policyLastErrorMessage]);

    useEffect(() => {
    if (!isFocused || !prevIsPendingDelete || isPendingDelete) {
    return;
    }
    if (!policyLastErrorMessage) {
    goBackFromInvalidPolicy();
    return;
    }
    setIsDeleteWorkspaceErrorModalOpen(true);
    }, [isFocused, isPendingDelete, prevIsPendingDelete, policyLastErrorMessage]);

    What alternative solutions did you explore? (Optional)

    NA

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 29, 2025
  6. changed the title [-]Workspace - Delete banner still display after clicking on the Got it button in Overview[/-] [+][$250] Workspace - Delete banner still display after clicking on the Got it button in Overview[/+] on Dec 29, 2025
  7. melvin-bot commented on Dec 29, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 29, 2025
  9. melvin-bot commented on Dec 29, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)

  10. mallenexpensify commented on Dec 29, 2025

    @mallenexpensify
    Contributor

    Spent too long trying to repro, marked at External

  11. github-actions commented on Dec 30, 2025

    @github-actions
    Contributor

    ⚠️ @yatin-italy Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  12. jayeshmangwani commented on Dec 31, 2025

    @jayeshmangwani
    Contributor

    Thanks to both of you for the proposals above.

    I like @ryntgh 's approach #78514 (comment) of setting setIsDeleteModalOpen to false in the effect when we enable setIsDeleteWorkspaceErrorModalOpen. Let’s go with that.

    🎀 👀 🎀 C+ reviewed

  13. 16 remaining items

  14. melvin-bot commented on Jan 8, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.95-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 2026-01-15. 🎊

    For reference, here are some details about the assignees on this issue:

    • @jayeshmangwani requires payment through NewDot Manual Requests
    • @ryntgh requires payment (Needs manual offer from BZ)
  15. melvin-bot commented on Jan 8, 2026

    @melvin-bot

    @jayeshmangwani @mallenexpensify 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]

  16. jayeshmangwani commented on Jan 15, 2026

    @jayeshmangwani
    Contributor

    BugZero Checklist:

    • [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: fix: Reports - Filters become unresponsive after deleting the workspace. #74856 (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: Not that CRITICAL to add a new checklist or the need 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

    Precondition:

    • The workspace has issued an Expensify card to the member.

    Test:

    1. Navigate to the Workspace Overview.
    2. Click the More button.
    3. Select the Delete option.
    4. Click the Delete button.
    5. Verify that after clicking Delete, the Delete modal closes and the “Got it” modal opens.
    6. Verify that pressing “Got it” closes the modal.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-7921-a7bb-a9dc-477a03f681f4
  17. mallenexpensify commented on Jan 16, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @ryntgh paid $250 via Upwork
    Contributor+: @jayeshmangwani due $250 via NewDot

    @ryntgh can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022005772487710361501

    ^ Test case created

  18. ryntgh commented on Jan 16, 2026

    @ryntgh
    Contributor

    @mallenexpensify Thanks! I've accepted the offer

  19. melvin-bot commented on Jan 20, 2026

    @melvin-bot

    @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  20. mallenexpensify commented on Jan 21, 2026

    @mallenexpensify
    Contributor

    Paid @ryntgh , thx. paid, summary updated above.

  21. trjExpensify commented on Jan 21, 2026

    @trjExpensify
    Contributor

    approved $250 for @jayeshmangwani.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions