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
[$175] Member Security - UI does not reflect that the unlock request was submitted. #102734
BugSomething is broken. Auto assigns a BugZero manager.DesignExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Version Number: v9.5.0-0 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/folder/53678307/test-cases/94420076 Email or phone of affected tester (no customers):nchandekar@applausemail.com Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: iOS , Windows 11, Android App Component: Other
Action Performed:
Preconditions
1.Sign into NewDot as a domain admin. (use admin@expplause.com account)
2.Add a new member to test this scenario and don't lock any existing members
Steps:
Navigate to Workspace > Domains [Your Domain] > Domain Members and click on a member row
Click Report suspicious activity
Review the warning message and Verify it states: "Are you sure? This will lock [email]'s account..."
Click the red Report suspicious activity button at the bottom
Click Lock account to confirm
Click Unlock account
Click Got it
Expected Result:
The modal closes and the UI reflects that the unlock request has been submitted
Actual Result:
UI does not reflect that the unlock request was submitted.
Please re-state the problem that we are trying to solve in this issue.
A domain admin taps Unlock account for a locked member and then taps Got it. After that, the member details page looks the same as before. Nothing shows that the unlock request was sent.
What is the root cause of that problem?
The App sends the request, but it never records it. The UI has no "unlock requested" state to show.
showUnlockAccountModal calls requestUnlockAccount(accountID), then opens a modal that only gives information. Got it just closes the modal.
requestUnlockAccount makes a plain API.write call with no optimistic, success, or failure Onyx data, so Onyx doesn't change.
The page decides what to show from one true/false lock flag. That flag stays true until the security review finishes, so the Unlock account row stays the same. The admin can also tap it again and send duplicate requests.
What changes do you think we should make in order to solve the problem?
First, product should decide whether a visible "Unlock requested" state is wanted. If it is not, this is expected behavior. Then we should update BrowserStack test case 94420076, step 13, to "modal closes" and close this issue.
If product wants the state, follow the pattern already used to unlock bank accounts (BankAccounts.ts:1767-1786):
Backend (outside App): store an "unlock requested" marker for the member and return it with the domain data. The App can't make this state survive a reload or show on other devices without it. An internal engineer would need to handle this part.
App, requestUnlockAccount: set that marker in optimisticData. Add failureData that rolls it back and shows an error. Send domainAccountID and domainName too, the same way lockAccount does.
App, DomainMemberDetailsPage: when the marker is set, show "Unlock requested" help text on the row. If the admin taps the row again, reopen the info modal but don't call the API again.
Add the new copy to all src/languages/* files.
What alternative solutions did you explore? (Optional)
App-only local flag: set a flag that exists only on the client, with no backend change. The flag would disappear after a reload and wouldn't show on other devices, so I don't recommend relying on it alone.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/102734) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Member Security - UI does not reflect that the unlock request was submitted.[/-][+][$175] Member Security - UI does not reflect that the unlock request was submitted.[/+]on Oct 1, 2026
Please re-state the problem that we are trying to solve in this issue.
When a domain admin clicks Unlock account for a locked domain member in Workspace > Domains > [Domain] > Domain Members > [Member] and closes the confirmation modal by clicking Got it, the UI does not indicate that the unlock request was submitted. The Unlock account button remains unchanged and interactive, allowing the admin to repeatedly trigger duplicate unlock API requests.
What is the root cause of that problem?
In src/libs/actions/User.ts, requestUnlockAccount(accountID) only sends accountID via API.write(WRITE_COMMANDS.REQUEST_UNLOCK_ACCOUNT, params) with no optimisticData, successData, or failureData. It also omits domainAccountID and domainName, which are defined in LockAccountParams:
In src/pages/domain/Members/DomainMemberDetailsPage.tsx, showUnlockAccountModal unconditionally executes requestUnlockAccount(accountID) immediately on tap before showing the informational modal:
The UnlockAccount menu item is not wrapped in OfflineWithFeedback, does not track any pendingAction (unlike other member actions like changeDomainSecurityGroup), and does not provide any visual indication (e.g. description/helpText or pending status) indicating that an unlock request has been submitted. Because unlocking an account involves external security/risk review, isAccountLocked remains true, leaving the button visually active and re-triggerable.
(Note on context: In the original PR #78372[Domain Control] Report suspicious activity, the flow was designed to acknowledge the action via the modal We’ve received your request. However, BrowserStack TC 94420076 explicitly expects the page UI itself to reflect the submitted state).
What changes do you think we should make in order to solve the problem?
1. Update requestUnlockAccount in src/libs/actions/User.ts:
Update the signature to accept (accountID: number, domainAccountID?: number, domainName?: string) and provide optimistic, failure, and error-clearing data:
lockAccountPage: {
...
unlockRequested: 'Unlock requested',failedToUnlockAccount: 'Failed to submit unlock request. Please try again or contact Concierge.',}
What alternative solutions did you explore? (Optional)
Product / QA specification review (NAB alternative):
If Product confirms that the confirmation modal (We’ve received your request) was intentionally designed as the sole confirmation feedback (matching the original PR #78372 and test cases issue #84809), then BrowserStack TC 94420076 (Step 13: "The modal closes and the UI reflects that the unlock request has been submitted") should be updated to "The modal closes", and this issue closed as Expected Behavior.
📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
Checks: 335 targeted tests pass, plus lint, typecheck, spelling, formatting, changed-page React Compiler check, and Storybook smoke test. Full Jest timed out; translation dry-run was blocked. Pending state remains local-only as agreed. Manual browser verification is still required before marking ready for review.
BugSomething is broken. Auto assigns a BugZero manager.DesignExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Activity
applause-bot commentedon Oct 1, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/d86b63f365821a73029848597281be27b880d82c1941d7580ec6d4a515657063
https://platform.applause.com/services/links/v1/external/4db0508f3f46c337d7aa6d7ed0ba5bbde9533778ccff5762752104fb9cc36fcd
MelvinBot commentedon Oct 1, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
A domain admin taps Unlock account for a locked member and then taps Got it. After that, the member details page looks the same as before. Nothing shows that the unlock request was sent.
What is the root cause of that problem?
The App sends the request, but it never records it. The UI has no "unlock requested" state to show.
showUnlockAccountModalcallsrequestUnlockAccount(accountID), then opens a modal that only gives information. Got it just closes the modal.requestUnlockAccountmakes a plainAPI.writecall with no optimistic, success, or failure Onyx data, so Onyx doesn't change.trueuntil the security review finishes, so the Unlock account row stays the same. The admin can also tap it again and send duplicate requests.Code references
isAccountLockedrequestUnlockAccountwrites with no Onyx data and sends onlyaccountIDThis matches the original design. [Release 3.3] [Domain Control] Report suspicious activity only tested "Click Unlock account → Dismiss modal". [Test cases] Domain Control - Release 3 expects only "The modal closes. The unlock request is submitted." The wording "UI reflects that the unlock request has been submitted" appears only in the BrowserStack test case.
What changes do you think we should make in order to solve the problem?
First, product should decide whether a visible "Unlock requested" state is wanted. If it is not, this is expected behavior. Then we should update BrowserStack test case 94420076, step 13, to "modal closes" and close this issue.
If product wants the state, follow the pattern already used to unlock bank accounts (BankAccounts.ts:1767-1786):
requestUnlockAccount: set that marker inoptimisticData. AddfailureDatathat rolls it back and shows an error. SenddomainAccountIDanddomainNametoo, the same waylockAccountdoes.DomainMemberDetailsPage: when the marker is set, show "Unlock requested" help text on the row. If the admin taps the row again, reopen the info modal but don't call the API again.src/languages/*files.What alternative solutions did you explore? (Optional)
App-only local flag: set a flag that exists only on the client, with no backend change. The flag would disappear after a reload and wouldn't show on other devices, so I don't recommend relying on it alone.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/102734)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Oct 1, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)[-]Member Security - UI does not reflect that the unlock request was submitted.[/-][+][$175] Member Security - UI does not reflect that the unlock request was submitted.[/+]melvin-bot commentedon Oct 1, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022105585895255968582
camesenin commentedon Oct 1, 2026
bonnhatnguyen commentedon Oct 1, 2026
Proposal for Issue #102734: [$175] Member Security - UI does not reflect that the unlock request was submitted.
Contributor Details
@bonnhatnguyenbonnhatnguyen0@gmail.comhttps://www.upwork.com/freelancers/~0139ed4098bdc50182Proposal
Please re-state the problem that we are trying to solve in this issue.
When a domain admin clicks Unlock account for a locked domain member in Workspace > Domains > [Domain] > Domain Members > [Member] and closes the confirmation modal by clicking Got it, the UI does not indicate that the unlock request was submitted. The Unlock account button remains unchanged and interactive, allowing the admin to repeatedly trigger duplicate unlock API requests.
What is the root cause of that problem?
src/libs/actions/User.ts,requestUnlockAccount(accountID)only sendsaccountIDviaAPI.write(WRITE_COMMANDS.REQUEST_UNLOCK_ACCOUNT, params)with nooptimisticData,successData, orfailureData. It also omitsdomainAccountIDanddomainName, which are defined inLockAccountParams:src/pages/domain/Members/DomainMemberDetailsPage.tsx,showUnlockAccountModalunconditionally executesrequestUnlockAccount(accountID)immediately on tap before showing the informational modal:UnlockAccountmenu item is not wrapped inOfflineWithFeedback, does not track anypendingAction(unlike other member actions likechangeDomainSecurityGroup), and does not provide any visual indication (e.g. description/helpText or pending status) indicating that an unlock request has been submitted. Because unlocking an account involves external security/risk review,isAccountLockedremainstrue, leaving the button visually active and re-triggerable.(Note on context: In the original PR #78372
[Domain Control] Report suspicious activity, the flow was designed to acknowledge the action via the modalWe’ve received your request. However, BrowserStack TC 94420076 explicitly expects the page UI itself to reflect the submitted state).What changes do you think we should make in order to solve the problem?
1. Update
requestUnlockAccountinsrc/libs/actions/User.ts:Update the signature to accept
(accountID: number, domainAccountID?: number, domainName?: string)and provide optimistic, failure, and error-clearing data:2. Add
clearUnlockAccountErrorinsrc/libs/actions/User.ts(and export it):3. Update
DomainMemberDetailsPage.tsx:domainAccountIDanddomainNametorequestUnlockAccount.unlockAccountpending action is already active. If already submitted, simply show the informationalshowConfirmModal:UnlockAccountinOfflineWithFeedbackand render appropriate help/subtitle text indicating pending submission:4. Add translation keys:
In
src/languages/en.ts(and other locale files):What alternative solutions did you explore? (Optional)
Product / QA specification review (NAB alternative):
If Product confirms that the confirmation modal (
We’ve received your request) was intentionally designed as the sole confirmation feedback (matching the original PR #78372 and test cases issue #84809), then BrowserStack TC 94420076 (Step 13: "The modal closes and the UI reflects that the unlock request has been submitted") should be updated to "The modal closes", and this issue closed as Expected Behavior.camesenin commentedon Oct 1, 2026
camesenin commentedon Oct 1, 2026
camesenin commentedon Oct 1, 2026
31 remaining items
melvin-bot commentedon Nov 13, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (
External)mallenexpensify commentedon Nov 13, 2026
Claude posting on behalf of Matt:
@eh2077 please take over as C+. Please review the status of PR #104188: #104188
eh2077 commentedon Nov 16, 2026
I don't have self owned domain email to test this issue, so asked in slack and @getusha will take over!
melvin-bot commentedon Nov 16, 2026
📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
eh2077 commentedon Nov 16, 2026
@mallenexpensify hmm, I tried to unassign myself and assign it to another C+, but Melvin sent an offer to them. It doesn't seem right, wdyt?
getusha commentedon Nov 16, 2026
@MelvinBot implement this
MelvinBot commentedon Nov 16, 2026
🤖 Web test steps verification results:⚠️ partial
All six assertions were blocked: the session was suspended and browser snapshots returned no UI nodes. No accounts were locked or modified.
Report suspicious activity for a new test member
Blocked: app UI inaccessible.Confirm Lock account
Blocked; no lock attempted.Unlock → Got it shows pending label and hourglass
Blocked before reaching a locked test member.Reopening pending confirmation sends no duplicate request
Blocked; pending state could not be established.Offline unlock shows alert without queuing
Blocked by inaccessible UI.Failed unlock shows dismissible error and allows retry
Blocked by inaccessible UI.Implemented in draft PR: Show pending domain member unlock requests and block offline submission, assigned to
getusha.Checks: 335 targeted tests pass, plus lint, typecheck, spelling, formatting, changed-page React Compiler check, and Storybook smoke test. Full Jest timed out; translation dry-run was blocked. Pending state remains local-only as agreed. Manual browser verification is still required before marking ready for review.
view run · no recording available
expensify-chore-bot commentedon Nov 23, 2026
@getusha Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
expensify-chore-bot commentedon Nov 25, 2026
@getusha Eep! 4 days overdue now. Issues have feelings too...