Skip to content

[Due for payment 2026-02-23] Domains - When invited member is auto deselected, dropdown button still shows "1 selected" #82352

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: 9.3.18-2
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #81527
Email or phone of affected tester (no customers): applausetester@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  1. Go to staging.new.expensify.com
  2. Go to Workspaces tab.
  3. Scroll down to Domains section and open @applause.expensifail.com.
  4. Go to Domain members.
  5. On the search field, enter a non-existing email which you will invite in the next step.
  6. Click Add member.
  7. Enter the same email from Step 5 and click Invite.
  8. Quickly click Select all checkbox while the invited member avatar is still fallback avatar.

Expected Result:

When the selected member is auto deselected, the dropdown button will disappear as no member is selected.

Actual Result:

When the selected member is auto deselected, the dropdown button persists and shows "1 selected" when there is no selected member

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

Issue OwnerCurrent Issue Owner: @twisterdotcom

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 13, 2026
  2. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #81527

  3. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

  5. github-actions commented on Feb 13, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. OSBotify commented on Feb 13, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #81527 - "[Release 3.6] [Domain Control] Bulk close members' accounts" by @jmusial (High confidence)
    Related Issues: None

    Recommendation: ROLL FORWARD

    A fix should be straightforward - the selectedMembers state needs to be cleaned up when members become disabled (e.g., when their pending action changes). This is simpler than reverting the entire bulk close members feature, which adds significant functionality.

    Labels: Keeping DeployBlockerCash as this is a Frontend bug in the App repository that needs to be fixed before deploying to production.

    📋 Detailed Analysis

    Evidence

    PR #81527 introduced the bulk member selection and close accounts feature for Domain members. The issue directly references this PR in the reproduction steps and melvin-bot assigned the PR author.

    The bug occurs specifically with the new bulk selection functionality:

    1. When a member is invited, they initially appear with a fallback avatar
    2. User can select them with "Select all" during this optimistic state
    3. When the member data updates (avatar loads, pending action changes), they become isDisabled
    4. The member is no longer selectable, but their ID remains in the selectedMembers state array
    5. The dropdown button visibility check only looks at selectedMembers.length > 0, not whether those members are still valid/enabled

    Verification

    Files modified by PR #81527 that are affected:

    • /home/runner/_work/App/App/src/pages/domain/Members/DomainMembersPage.tsx - Contains the bulk selection logic and button visibility condition (line 124)
    • /home/runner/_work/App/App/src/pages/domain/BaseDomainMembersPage.tsx - Contains the toggleAllUsers function that filters disabled members (line 149)

    Key code locations:

    • DomainMembersPage.tsx:124 - Button visibility condition: (shouldUseNarrowLayout ? canSelectMultiple : selectedMembers.length > 0)
    • BaseDomainMembersPage.tsx:132 - Member becomes disabled: isDisabled: isPendingActionDelete
    • BaseDomainMembersPage.tsx:149 - Select all filters disabled: filter((member) => !member.isDisabled && !member.isDisabledCheckbox)

    Root Cause

    The selectedMembers state in DomainMembersPage.tsx is not automatically cleaned up when members become disabled. When a newly invited member transitions from optimistic to final state and becomes disabled, their accountID remains in the selectedMembers array, causing the button to show "1 selected" even though no valid members are selected.

    Fix approach: Add a useEffect or similar mechanism to filter out disabled member IDs from selectedMembers, or update the button visibility condition to check against actually selectable members in filteredData.

  7. jmusial commented on Feb 13, 2026

    @jmusial
    Contributor

    Looking into that

  8. jmusial commented on Feb 13, 2026

    @jmusial
    Contributor

    Raised a PR here

  9. IuliiaHerets commented on Feb 13, 2026

    @IuliiaHerets

    Issue is not rerpo anymore on Windows 11 / Chrome and iPhone 13 / iOS 18.7.1, v9.3.18-4

    select.2.mp4
    domain.ios.MP4
  10. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Feb 16, 2026
  11. changed the title [-]Domains - When invited member is auto deselected, dropdown button still shows "1 selected"[/-] [+][Due for payment 2026-02-23] Domains - When invited member is auto deselected, dropdown button still shows "1 selected"[/+] on Feb 16, 2026
  12. melvin-bot commented on Feb 16, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Feb 16, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.19-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-02-23. 🎊

  14. melvin-bot commented on Feb 16, 2026

    @melvin-bot

    @mountiny @twisterdotcom 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]

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.EngineeringWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions