Skip to content

Show pending domain member unlock requests and block offline submission - #107005

Open
MelvinBot wants to merge 4 commits into
mainfrom
claude-pendingUnlockRequestState-getusha
Open

MelvinBot wants to merge 4 commits into
mainfrom
claude-pendingUnlockRequestState-getusha

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Show Pending unlock request with an hourglass after a domain member unlock request succeeds. Reopening the row explains the next steps without sending a duplicate request. Failed requests display dismissible errors on the member details, members list, and domain warning indicators.

Disable Unlock account while offline so no request is queued.

The indicator is local-only, per the storage decision; signing out, clearing cache, or using another device can allow another request.

Fixed Issues

$ #102734
PROPOSAL: #102734 (comment)

Tests

Precondition: Sign in as a domain admin and add a new test member. Do not lock existing members.

  1. Open Domains > your domain > Domain Members > the new member.
  2. Select Report suspicious activity, verify the warning identifies that member, and confirm Lock account.
  3. Select Unlock account and wait for success, then select Got it.
  4. Verify the modal closes and Pending unlock request with an hourglass appears. Reopen the row and verify no duplicate request is sent.
  • Verify that no errors appear in the JS console

Offline tests

  1. With the new test member locked and no pending request, go offline. Verify Unlock account is disabled with no modal or queued request.
  2. Reconnect and verify the control is enabled, then repeat Tests steps 3–4.

QA Steps

Same as tests

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Recordings supplied by getusha.

Android: Native
android-skjhsdkjfh.webm
Android: mWeb Chrome
android-mweb-domain.webm
iOS: Native
Screen.Recording.iPhone.18.Pro.26-11-2026.at.4.41.04.PM.mp4
iOS: mWeb Safari
Screen.Recording.iPhone.18.Pro.26-11-2026.at.1.39.17.PM.mp4
MacOS: Chrome / Safari

Web recording — supplied as “Web”; desktop OS/browser was not specified.

Co-authored-by: Getabalew T <getusha@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team November 16, 2026 15:04
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Nov 16, 2026
@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 4429b32c..e171c1ce 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -2625,7 +2625,7 @@ const translations: TranslationDeepObject<typeof en> = {
         lockAccount: 'アカウントをロック',
         lockMyAccount: 'アカウントをロックする',
         unlockAccount: 'アカウントのロック解除',
-        pendingUnlockRequest: 'ロック解除リクエスト保留中',
+        pendingUnlockRequest: '保留中のロック解除リクエスト',
         findYourSituation: 'ほとんどの問題ではアカウントをロックする必要はありません。以下からご自身の状況をお探しください。',
         lostCardOrCharges:
             '<a href="https://help.expensify.com/articles/expensify-classic/expensify-card/Dispute-Transaction">カードの紛失または身に覚えのない請求</a>:カードを解約し、不明な取引について異議申し立てをするために Concierge へご連絡ください。',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index cacf241a..1a4208fd 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -2641,7 +2641,7 @@ const translations: TranslationDeepObject<typeof en> = {
         lockAccount: 'Account vergrendelen',
         lockMyAccount: 'Account vergrendelen',
         unlockAccount: 'Account ontgrendelen',
-        pendingUnlockRequest: 'Ontgrendelingsverzoek in behandeling',
+        pendingUnlockRequest: 'In behandeling zijnde ontgrendelverzoek',
         findYourSituation: 'Voor de meeste problemen hoef je je account niet te blokkeren. Zoek hieronder jouw situatie:',
         lostCardOrCharges:
             '<a href="https://help.expensify.com/articles/expensify-classic/expensify-card/Dispute-Transaction">Kaart kwijt of onbekende kosten</a>: Annuleer je kaart en neem contact op met Concierge om onbekende transacties te betwisten.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 119207b0..6b1a3ba6 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -2688,7 +2688,7 @@ const translations: TranslationDeepObject<typeof en> = {
         lockAccount: 'Zablokuj konto',
         lockMyAccount: 'Zablokuj moje konto',
         unlockAccount: 'Odblokuj konto',
-        pendingUnlockRequest: 'Oczekująca prośba o odblokowanie',
+        pendingUnlockRequest: 'Oczekujące żądanie odblokowania',
         findYourSituation: 'Większość problemów nie wymaga blokowania konta! Znajdź swoją sytuację poniżej:',
         lostCardOrCharges:
             '<a href="https://help.expensify.com/articles/expensify-classic/expensify-card/Dispute-Transaction">Zgubiona karta lub nieznane obciążenia</a>: Anuluj swoją kartę i skontaktuj się z Concierge, żeby zakwestionować nieznane transakcje.',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 588ff946..3970bd11 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -2547,7 +2547,7 @@ const translations: TranslationDeepObject<typeof en> = {
         lockAccount: '锁定账户',
         lockMyAccount: '锁定我的账户',
         unlockAccount: '解锁账户',
-        pendingUnlockRequest: '解锁请求待处理',
+        pendingUnlockRequest: '待处理解锁请求',
         findYourSituation: '大多数问题都不需要锁定你的账户!请在以下列表中找到与你相符的情况:',
         lostCardOrCharges:
             '<a href="https://help.expensify.com/articles/expensify-classic/expensify-card/Dispute-Transaction">卡片遗失或出现不明扣款</a>:请挂失您的卡片,并联系 Concierge 申诉未知交易。',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

@MelvinBot

MelvinBot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ❌ fail

Testing was blocked: the supplied Android account has no domain, domain-admin access, or new test-member fixture. No member was locked; these results indicate a setup blocker, not a confirmed product defect.

Domains empty state showing the access blocker

Step Status
Open Domains → Domain Members → new test memberBlocked: Domains shows “Enhance your security with domains” and “New domain.” Available tools cannot provision the required fixtures.
Domains empty state showing the access blocker
❌
Tap Report suspicious activityBlocked: no accessible domain or new test member.
❌
Verify warning includes the member’s emailNot reached because of the fixture blocker.
❌
Tap red Report suspicious activity buttonNot reached; no existing members were locked.
❌
Confirm Lock accountNot reached because of the fixture blocker.
❌
Tap Unlock accountNo safely locked new test member was available.
❌
Tap Got it; verify pending label and hourglassNot reached; no unlock request was submitted.
❌
Reopen pending row without duplicate submissionBlocked: no pending-request fixture.
❌
Offline unlock shows centered alert without queuingBlocked: no eligible member fixture.
❌
Failed unlock shows dismissible errors and allows retryBlocked: no domain/member fixture or failure-injection tool.
❌
Verify no JS console errorsUnverified: logging captured no data, and the requested flow could not be exercised.
❌

view run · view recording

@MelvinBot

MelvinBot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ❌ fail

Blocked on web: the account has no configured domain, domain-admin access, or new test member. No accounts were locked or modified; this is a test-setup blocker, not a confirmed PR defect.

Domains empty state blocking member verification

Step Status
Open Domains → Domain Members → new test memberDomains shows “Enhance your security with domains” and “New domain”; no domain is available.
Domains empty state blocking member verification
❌
Click Report suspicious activityBlocked: no domain or new test member.
Domains empty state blocking member verification
❌
Verify account-lock warning includes member emailNot reached due to missing test setup.
Domains empty state blocking member verification
❌
Click red Report suspicious activity buttonNot reached due to missing test setup.
Domains empty state blocking member verification
❌
Confirm Lock accountNot attempted; no new test member was available.
Domains empty state blocking member verification
❌
Click Unlock accountNot reached due to missing test setup.
Domains empty state blocking member verification
❌
Click Got it; verify pending label and hourglassNot reached; no unlock request submitted.
Domains empty state blocking member verification
❌
Reopen pending row without duplicate requestNot reached; no pending request was available.
Domains empty state blocking member verification
❌
Offline unlock shows centered alert without queuingBlocked by missing member; offline control was also unavailable.
Domains empty state blocking member verification
❌
Failed unlock shows dismissible errors, warnings, and retryBlocked by missing test setup; failure injection was also unavailable.
Domains empty state blocking member verification
❌
Verify no JS console errorsUnverified: console inspection was unavailable through the supported web interface.
❌

view run · view recording

@getusha

getusha commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot lets remove test cases that aren't for the core test cases of the fix we have

@getusha

getusha commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot drive test and QA steps from the linked issue, also pull main to resolve conflicts

Co-authored-by: Getabalew T <getusha@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Pushed 85a137b, removing five peripheral test cases while retaining core unlock-flow coverage. Existing tests and production code are unchanged.

All 330 targeted tests passed, along with lint, typecheck, formatting, spelling, and Storybook smoke checks. Full Jest timed out locally; CI verification remains outstanding.


view run

@MelvinBot

MelvinBot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ❌ fail

Updated Tests/QA from the linked issue; main conflicts were resolved locally, but three push attempts timed out, so the remote PR still has conflicts. Web verification was blocked by “Uh-oh, something went wrong!” when opening Workspaces; no members were modified, and post-merge automated-check blockers are documented in the PR.

Error screen after opening Workspaces

Step Status
Open the new test member through DomainsBlocked: Workspaces displayed an error screen.
Error screen after opening Workspaces
❌
Click Report suspicious activityBlocked: member details were inaccessible.
❌
Verify warning identifies the new memberNot reached; wording and email remain unverified.
❌
Click the red Report suspicious activity buttonNot reached; no dedicated test member could be confirmed.
❌
Confirm Lock accountNot reached; no account was locked.
❌
Click Unlock accountNot reached; no dedicated member reached the locked state.
❌
Click Got it; verify pending label and hourglassNot reached; modal closure and pending indicator remain unverified.
❌
Reopen pending row without another requestNot reached; duplicate-request behavior remains unverified.
❌

view run · no recording available

@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot instead of a modal lets just disable the button when offline. also pull main and fix conflicts

@MelvinBot

MelvinBot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ❌ fail

Implemented offline disabling without a modal and resolved main conflicts locally, but three pushes timed out/disconnected—the remote PR remains unchanged and conflicting; all 330 targeted tests passed, while full Jest timed out. Web verification was blocked by “Uh-oh, something went wrong!” opening Account; no members were modified.

Account navigation displays an application error, blocking fixture access

Step Status
Offline Unlock account is disabled without a modal or requestBlocked: domain-admin access and the dedicated locked test member were inaccessible.
Account navigation displays an application error, blocking fixture access
❌
Reconnect, submit, and verify pending label/hourglassNot tested because fixture access was blocked; no request was submitted.
❌
Reopen pending row without duplicate submissionNot tested because no pending-request fixture was available.
❌

view run · no recording available

@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot try again, don't run full jest tests only related/modified ones

MelvinBot and others added 2 commits November 26, 2026 10:00
Co-authored-by: Getabalew T <getusha@users.noreply.github.com>
Co-authored-by: Getabalew T <getusha@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Successfully pushed the main merge and offline-disabled unlock change in 3003d94. GitHub confirms no merge conflicts remain.

All 330 tests across five related suites passed. No full Jest run was started. Lint, typecheck, formatting, compiler, spelling, and Storybook checks also passed.


view run

@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 96.21% <ø> (ø)
src/libs/DomainUtils.ts 95.58% <100.00%> (+0.42%) ⬆️
src/libs/actions/Domain.ts 70.18% <ø> (ø)
...c/pages/domain/Members/DomainMemberDetailsPage.tsx 91.50% <100.00%> (+2.03%) ⬆️
src/selectors/Domain.ts 97.45% <100.00%> (+0.02%) ⬆️
src/libs/actions/User.ts 53.41% <83.33%> (+0.54%) ⬆️
... and 10 files with indirect coverage changes

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ Something went wrong. This may be a transient issue. Try again. If it persists, check status.openai.com.

Run details

@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot this is not saved, it's reset when refresh do we need back end update?

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Not necessarily for a normal refresh. The PR saves the flag in Onyx after success, and domain data isn’t RAM-only or reset at startup, so it should survive refreshing the same browser.

A server response replacing the domain record could erase this client-only field, but I haven’t confirmed that’s happening. The earlier agreement accepted losing it after sign-out/sign-in—not refresh.

For reliable cross-session/device persistence, the backend needs to return the pending status. An internal engineer should check whether that state already exists and can be exposed, or requires a backend change. Refresh resetting it shouldn’t be dismissed as expected behavior.


view run

@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Web:

Screen.Recording.2026-11-26.at.1.35.40.PM.mov

iOS web:

Screen.Recording.iPhone.18.Pro.26-11-2026.at.1.39.17.PM.mp4

Android web:

android-mweb-domain.webm

Android:

android-skjhsdkjfh.webm

iOS:

Screen.Recording.iPhone.18.Pro.26-11-2026.at.4.41.04.PM.mp4

@MelvinBot here are screen recordings include in the checklist.

@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@codex @claude review this for accessibility

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T14:21:19.805679Z 3003d94 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 3003d94973

ℹ️ 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".

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Added all five recordings to the PR’s platform sections and checked the screenshots/videos checklist item. Test-pass checkboxes remain unchanged because I haven’t independently reviewed the recordings.


view run

@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot remove your failures remove AI tests since it's unnecessary after this, and remove anything that's redundant. testing steps should be concise e.g. if QA steps is same as tests it should say "Same as tests" no need to put text wall.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Cleaned up the PR description: removed AI Tests, failed-attempt notes/screenshots, and redundant text. Shortened testing steps and set QA to “Same as tests.” Preserved your five recordings and checklist.


view run

@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot check the items in the checklist, this looks good

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Checked all PR Author Checklist items on your behalf, as requested.


view run

@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot mark it ready

@MelvinBot
MelvinBot marked this pull request as ready for review November 26, 2026 14:18
@MelvinBot
MelvinBot requested a review from a team as a code owner November 26, 2026 14:18
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Marked the PR as ready for review.


view run

@expensify-chore-bot
expensify-chore-bot Bot requested review from dubielzyk-expensify and getusha and removed request for a team November 26, 2026 14:18
@expensify-chore-bot

Copy link
Copy Markdown

@dubielzyk-expensify @getusha One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@expensify-chore-bot
expensify-chore-bot Bot requested review from twisterdotcom and removed request for a team November 26, 2026 14:18
@getusha

getusha commented Nov 26, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-11-26 at 5 06 03 PM > To indicate there's a pending request.

cc @Expensify/design

@dubielzyk-expensify

Copy link
Copy Markdown
Contributor

Videos look good to me 👍

This branch has not been deployed

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

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants