Conversation
The unlock request on a locked bank account is optimistic and queues until reconnect, so the offline gate on the row blocked a flow that works offline everywhere else. This mirrors Settings > Wallet, which has no such gate. Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
|
I created this PR from an upstream branch because I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
|
🤖 Android test steps verification results: Reached Workspace settings → Workflows → Payments on standalone Android NewDot, but the test workspace has no connected bank account (only the "Add bank account" CTA), so the No JS console errors were observed. The airplane-mode toggle round-tripped cleanly and the session was left online. To get live Android proof of this fix, the run needs an account whose workspace has a business bank account already in the |
|
Fixed and pushed — Oxfmt check now passes. What was broken: the new test file I added wasn't oxfmt-formatted. Pushed as Verification+import type * as ReportUserActionsModule from '@userActions/Report';
+
import CONST from '@src/CONST';
...
-import type * as ReportUserActionsModule from '@userActions/Report';
-
import type * as MockReanimatedModalModule from '../utils/mockReanimatedModal';Run locally on the branch after the fix:
One remaining failure, which I left alone: The |
|
🤖 Web test steps verification results: Reached Workspace settings → Workflows → Payments on dev NewDot web (branch No JS console errors were observed. The Force-offline toggle round-tripped cleanly. To actually exercise steps 2–5 on either platform, the run needs a fixture that seeds a workspace with a bank account already in |







Explanation of Change
On Workspace settings → Workflows → Payments, the connected bank account row was gated behind
!isOffline, so while offline the row was greyed out and the Unlock button on aLOCKEDaccount was disabled. The same locked account on Settings → Wallet is tappable offline, becausepressLockedBankAccountonly writes optimistic Onyx data — the realInitiateBankAccountUnlockrequest fires later fromuseBankAccountUnlockEffectas a persistedAPI.writethat queues and sends on reconnect. The gate was blocking a flow that works offline everywhere else.This removes
isOfflinefrom the two places that gate the row:canInteractWithBankAccountRow— feeds the row'sonPressand the Unlock button'sisActionDisabled.disabledprop on the row'sMenuItem— an independent gate that greys the row out.Both had to go:
MenuItemchecksdisabledseparately fromonPress, so changing only one leaves the row either un-greyed but inert, or pressable but still visually disabled with a disabled Unlock button.Every other offline restriction on the tab is untouched, including the "Add bank account" button's own
isOfflinegate, which was explicitly left out of scope.isOfflineis still used elsewhere in the component.AI Tests
Run locally on this branch:
npm run lint-changed— passnpm run typecheck— passnpm run spell-changed— passnpm run react-compiler-compliance-check check src/pages/workspace/workflows/tabs/WorkflowsPaymentsTab.tsx— passnpm test -- --testPathPattern "WorkspaceWorkflows|BankAccount|PaymentMethod|Workflow"— 26 suites / 478 tests pass, including the newtests/ui/WorkspaceWorkflowsLockedBankAccountTest.tsxThe new test renders the Payments tab with a
LOCKEDworkspace bank account while offline and asserts that the reimburser's Unlock press writesINITIATING_BANK_ACCOUNT_UNLOCKand navigates to Concierge, and that a non-reimburser gets no Unlock action. It was confirmed to fail againstmain's version of the component and pass with this change.Not run: interactive browser verification. The automated web session in this run never rendered (blank page, unrelated infra failure), and reproducing this by hand needs a workspace whose connected business bank account is in the
LOCKEDstate, which a standard test account can't reach.Fixed Issues
$ #99082
PROPOSAL: #99082 (comment)
Tests
// TODO: The human co-author must fill out the tests they ran before marking this PR as "ready for review".
// Please describe what tests you performed that validate the change works.
Offline tests
// TODO: The human co-author must fill out the offline test steps before marking this PR as "ready for review".
QA Steps
// TODO: The human co-author must fill out the QA steps before marking this PR as "ready for review".
// Please describe what QA needs to do to validate the change and what areas they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari