[Release 3.6] [Domain Control] Bulk close members' accounts#81527
[Release 3.6] [Domain Control] Bulk close members' accounts#81527mountiny merged 32 commits intoExpensify:mainfrom
Conversation
# Conflicts: # src/languages/en.ts # src/pages/domain/Members/DomainMembersPage.tsx
…n-member-add-selection # Conflicts: # src/languages/en.ts # src/pages/domain/Members/DomainMembersPage.tsx
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
CC: @mountiny |
|
@situchan Did you also want to review/ test? |
|
@codex review |
|
On it now |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10b65660b7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const memberLogin = personalDetails?.[accountID]?.login ?? ''; | ||
| const securityGroupData = selectSecurityGroupForAccount(accountID)(domain); | ||
| closeUserAccount(domainAccountID, domainName ?? '', memberLogin, securityGroupData, shouldForceCloseAccount); |
There was a problem hiding this comment.
Skip bulk close when member login is unavailable
This loop always falls back to '' for memberLogin and still calls closeUserAccount, so if personal details are not hydrated yet for any selected account (a valid state because selection is driven by account IDs), the API request is sent with targetEmail: '' and optimistic/error updates are keyed to the empty string instead of the real member. In that case the selected user is not actually closed and failures are misattributed, so the bulk action should skip unresolved members (or block until their login is loaded).
Useful? React with 👍 / 👎.
| onSelectAll={toggleAllUsers} | ||
| onCheckboxPress={toggleUser} | ||
| selectedItems={selectedMembers} | ||
| turnOnSelectionModeOnLongPress |
There was a problem hiding this comment.
Gate long-press selection mode to selectable pages
Long-press selection is now always enabled in the shared base list, but BaseDomainMembersPage is also used by pages like DomainAdminsPage that do not pass selection state handlers. On mobile, long-pressing an admin row now opens the "Select" flow even though no item can be selected and no bulk actions exist, which is a regression in UX and state handling; this should only be enabled when multi-select props are actually wired.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actually good point
We need to fix this
There was a problem hiding this comment.
Indeed this causes regression
Screen.Recording.2026-02-10.at.9.32.16.PM.mov
| customText={translate('common.more')} | ||
| options={[]} | ||
| isSplitButton={false} | ||
| wrapperStyle={styles.flexGrow0} |
There was a problem hiding this comment.
I suppose it's okay
If we don't have any options in the more menu
But from another side
Do we need to show the button in this case?🧐
There was a problem hiding this comment.
I suppose this is temporary empty button. Maybe add items in next PR?
There was a problem hiding this comment.
On mobile it's only active when something is selected. Selection mode obfuscates that so it's always disabled. But on the other hand it suggests user that there are more actions avaiable ...
|
@situchan all fixed + Follow up PR for checkbox alignment |
|
Conflicts! And revert this change as it's out of scope: - listHeaderWrapperStyle: [styles.ph9, styles.pv3, styles.pb5],
+ listHeaderWrapperStyle: [styles.ph10, styles.pv3, styles.pb5], |
mountiny
left a comment
There was a problem hiding this comment.
Thanks! I think that @Beamanator was assigned by coincidence, since there is a lot of changes here to avoid conflicts, I will merge it
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.18-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.18-8 🚀
|




Explanation of Change
Part for Domain Control project.
This PR adds bulk closing member account with GBR and RBR flows. It features a double modal confirmation.
Fixed Issues
$ #79572
PROPOSAL:
Tests
Offline tests
1 - 11 same as regular tests
12. Members should be crossed out on the list and disappear after the connection is reestablished.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
0092.android.native.mov
Android: mWeb Chrome
0092.android.chrome.mov
iOS: Native
092.ios.native.mov
iOS: mWeb Safari
0092.ios.safari.mov
MacOS: Chrome / Safari
0092.desktop.chrome.mov