Repository navigation
Description
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.78-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/13176694/test-cases/41236766
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: MacBook Air 15.7.4 Chrome, iPhone 15 iOS 26.4.2
App Component: Workspace Settings
Action Performed:
- Sign in to ND with a new account, validate the account
- Create a workspace
- Navigate to Workflows > Add bank account > Click "Log into your bank"
- Select "Regions" bank and continue with plaid credentials, select saving option
- Complete the Personal info / DOB / Address step
- Enter company name as "Six Labs" in the Company info, complete the flow
- On the *Let's finish in chat" modal click "Finish in chat"
- Go to the Workspace - Workflows - click the pending bank account
- Click "Continue setup", then "Update details"
- First and last name fields are empty (on Chrome), enter them and click Next
Expected Result:
First and last name fields are not empty, user is able to smoothly navigate to the Company name step
Actual Result:
First and last name fields are empty, user is dropped out of updating details flow after clicking Next on the "What's your legal name" page.
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome Safari
Screenshots/Videos
bandicam.2026-05-20.10-16-57-660.mp4
Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7158497
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022057003664748301386
- Upwork Job ID: 2057003664748301386
- Last Price Increase: 2026-06-17
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
applause-bot commentedon May 20, 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/1e718f32b0f919c65e687ec8a93c4529282088dc0cd0f425e8dfd89978fef7b2
MelvinBot commentedon May 20, 2026
Proposal
What is the root cause of that problem?
There are two bugs, both rooted in how the "Update details" flow interacts with the step-syncing logic in
ReimbursementAccountPage.tsx.1. Empty first/last name fields: When the page mounts,
clearReimbursementAccountDraft()wipes the form draft. TheFullNamesubstep reads defaults fromachData.firstName/achData.lastName, which are not populated by the server response for an account inVERIFYINGstate. Additionally,isBankAccountVerifyingforcesstartFrom=0, so the user always lands on FullName with empty defaults.2. Dropped from flow after clicking Next: When the user clicks Next on FullName,
onNextSubStepfiressubmit(false), callingupdatePersonalInformationForBankAccountwithconfirm=false. The server response returnsachData.currentStepset back toVALIDATION(since the account is inVERIFYINGstate). The step-syncinguseEffectdetects thatachData.currentStep(VALIDATION) differs fromUSDBankAccountStep(REQUESTOR) and overrides it, yanking the user back to theFinishChatCardscreen.What changes do you think we should make in order to solve the problem?
Guard the step-syncing effect against overriding user-initiated step changes during the "Update details" flow. When the user explicitly navigates to REQUESTOR from
FinishChatCard(account inVERIFYINGstate), the effect at line 267 should not syncUSDBankAccountStepback to the server value. A flag or state variable (e.g.,isUpdatingDetails) could be set when "Update details" is clicked and cleared on completion, preventing the sync effect from overriding the local step.Pre-populate the form draft with personal info from
achDatawhen entering the "Update details" flow, soFullNamehas the correct defaults even afterclearReimbursementAccountDraft()runs. This could be done in theFinishChatCardonPress handler by copying relevantachDatafields into the draft before navigating to REQUESTOR.What alternative solutions did you explore? (Optional)
achData.currentStepin the API call's optimistic data: This would prevent the mismatch, butgetVBBADataForOnyxintentionally avoids settingcurrentStepoptimistically to let the server drive step transitions. Changing this broadly could introduce regressions in other flows.submit(false)call on intermediate substeps for VERIFYING accounts: This would avoid the problematic API call but would also skip saving partial progress, which may be needed.Investigation details
Data flow triggering the bug:
clearReimbursementAccountDraft()empties form draft →OpenReimbursementAccountPage(READ) fetches dataachData(withoutfirstName/lastNamefor VERIFYING state) →achData.currentStep = VALIDATIONFinishChatCardUSDBankAccountStepset to REQUESTOR locally →PersonalInfo/FullNamerenders with empty defaultssubmit(false)→UpdatePersonalInformationForBankAccountAPI callachData.currentStepback to VALIDATIONuseEffectdetects mismatch → overridesUSDBankAccountStepto VALIDATION → user seesFinishChatCardagainKey code locations:
ReimbursementAccountPage.tsx:265-269FinishChatCard.tsx:79-84onNextSubStepfiring API:PersonalInfo.tsx:59FullName.tsx:19-22goToWithdrawalAccountSetupStepis client-only:navigation.ts:11-13Possibly related issue: Expensify/App#91077 — "Can't complete bank account verification" — may share the same step-syncing root cause.
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.MobileMage commentedon May 20, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a bank account is in the VERIFYING state and the user clicks "Update details" from the FinishChatCard, the first/last name fields on the "What's your legal name" page are shown empty, and after entering a name and clicking Next, the user is dropped back to the FinishChatCard instead of advancing to the next substep.
What is the root cause of that problem?
There are two intertwined root causes.
Empty name fields:
FinishChatCard's "Update details" button navigates directly toCONST.BANK_ACCOUNT.STEP.REQUESTORby settingUSDBankAccountStepin local state. This rendersPersonalInfo, which reads default values viagetSubStepValues— first fromreimbursementAccountDraft, then fromreimbursementAccount?.achData. InPersonalInfo.tsx, whenisBankAccountVerifyingis true,startFromis forced to0(the FullName substep), ignoring any existing data. TheFullNamesubstep then readsreimbursementAccount?.achData?.firstNameandachData?.lastNamedirectly (not viagetSubStepValues). On re-entry after the "Finish in chat" flow, the draft (REIMBURSEMENT_ACCOUNT_FORM_DRAFT) was cleared when the user left the REQUESTOR step, and the draft is never re-seeded fromachDatabecause thedraftStepuseEffect inReimbursementAccountPage(line 308-310) short-circuits early withif (shouldShowContinueSetupButton) { return; }— preventing theupdateReimbursementAccountDraft(getBankAccountFields(getFieldsForStep(draftStep)))call from ever running whileshouldShowContinueSetupButtonistrue.App/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
Lines 308 to 327 in 42e9c77
User dropped out after clicking Next: After entering the name and submitting,
onNextSubStepfires and callsupdatePersonalInformationForBankAccount(bankAccountID, values, policyID, false). On success, the server responds and may updateachData.currentStepback toVALIDATION. The useEffect at line 265 inReimbursementAccountPagesyncsUSDBankAccountStepwithachData.currentStepwhenever they differ:if (USDBankAccountStep !== null && achData.currentStep !== USDBankAccountStep) { setUSDBankAccountStep(achData.currentStep) }. SinceachData.currentStepisVALIDATIONandUSDBankAccountStepisREQUESTOR, this resetsUSDBankAccountSteptoVALIDATION, re-renderingConnectBankAccountwithFinishChatCard— dropping the user out.App/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
Lines 265 to 269 in 42e9c77
What changes do you think we should make in order to solve the problem?
Fix 1 — Seed the draft before entering "Update details": In
FinishChatCard.tsx, before callingsetBankAccountSubStepandsetUSDBankAccountStep, explicitly callupdateReimbursementAccountDraft(getBankAccountFields(getFieldsForStep(CONST.BANK_ACCOUNT.STEP.REQUESTOR)))to populate the draft with existingachDatavalues. SinceFinishChatCardalready receivesreimbursementAccountas a prop, this data is available. Alternatively, move the draft-seeding logic inReimbursementAccountPage's useEffect so that it runs regardless of whethershouldShowContinueSetupButtonis true — the early return at line 308 should be moved below thedraftStephydration block.Fix 2 — Prevent spurious
USDBankAccountStepresets during "Update details": The sync at line 267 (if (USDBankAccountStep !== null && achData.currentStep !== USDBankAccountStep)) is too aggressive — it fires whenever the serverachData.currentStepdisagrees with the local step, even when the user is intentionally editing a prior step. Introduce a local ref or flag (e.g.,isEditingPersonalInfo) that gets set when the user clicks "Update details" and cleared when they finish the REQUESTOR flow. Guard the sync block with!isEditingPersonalInfoso that intermediateupdatePersonalInformationForBankAccountcalls do not pull the user out of the REQUESTOR substep. The flag should be passed down intoFinishChatCard(set on press) and cleared inPersonalInfo's completion callback.The simplest single-point fix that addresses both symptoms is to move the
if (shouldShowContinueSetupButton) { return; }guard inReimbursementAccountPageto below thedraftStephydration block, and to add anisManuallyEditingStepboolean to the existingUSDBankAccountStepsync guard. No new components are needed.What alternative solutions did you explore? (Optional)
N/A
Abdulloh0109 commentedon May 20, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-05-20 07:49:09 UTC.
Proposal
What is the root cause of that problem?
I traced this as a single race between the user's local step (driven through
FinishChatCard) and the server-driven step-sync useEffect — manifested twice: once as empty inputs, once as the user being yanked back toFinishChatCard.After step 5 of the repro the personal info was already submitted; the bank account moves to
state = VERIFYINGserver-side andachData.currentStepis pinned toVALIDATIONgoing forward — the server treats the account as "you're past Requestor, go validate". TheOPEN_REIMBURSEMENT_ACCOUNT_PAGEresponse that arrives when the user returns from chat carries that state.The "Update details" handler at
FinishChatCard.tsxlines 76–87 is purely a local move backwards — it just callssetUSDBankAccountStep(REQUESTOR)and a client-onlygoToWithdrawalAccountSetupStep. The server is not told. Two effects then collide:Inputs render empty. The draft-rehydration block at
ReimbursementAccountPage.tsxlines 322–327 — the place that callsupdateReimbursementAccountDraft(getBankAccountFields(getFieldsForStep(draftStep)))to seed the form draft fromachData— sits below the early return at line 308. While the user is parked onFinishChatCard,shouldShowContinueSetupButtonis true and that effect bails out before reaching the hydration line. When the user crosses into the local REQUESTOR step via "Update details", the effect's dependency set doesn't includeUSDBankAccountStep, so the hydration line never runs for the REQUESTOR fields — the draft remains the empty object that line 240 wrote at mount.User is "dropped out" on Next. When the user types and submits,
PersonalInfo.submit(false)firesupdatePersonalInformationForBankAccount. The server response is computed againststate = VERIFYINGand returnsachData.currentStep = VALIDATIONagain. The step-sync useEffect atReimbursementAccountPage.tsxlines 265–269 only checks for inequality betweenachData.currentStepand the localUSDBankAccountStep— it does not check direction. PerCONST.BANK_ACCOUNT.STEP,REQUESTORis position 3,VALIDATIONis position 7. The user is intentionally behind the server. The unconditionalsetUSDBankAccountStep(achData.currentStep)blindly pushes them back toVALIDATION, which rendersFinishChatCardagain — that is the "dropped out" symptom.So the underlying bug is not in
FullName's defaults: it is that the existing draft-hydration entry point doesn't fire for a user-initiated backward step transition, and the sync entry point only treats the server step as authoritative.What changes do you think we should make in order to solve the problem?
Two surgical changes, both in the page-level state machine — not in
FullName:Make the step sync direction-aware. At
ReimbursementAccountPage.tsxline 267 change the guard so the local step is only reassigned when the server step is strictly later in theCONST.BANK_ACCOUNT.STEPordering than the local step. A small ordered-step index helper (orObject.values(STEP).indexOf(...)comparison) is enough. The semantic this encodes: "the server can push us forward, but the user is allowed to navigate backwards via the FinishChatCard menu without being overridden". This kills the "dropped out" symptom without introducing any extra flag, ref, or session state.Hydrate the draft at the press, not via the page-level effect. In
FinishChatCard.tsxlines 79–84, beforesetBankAccountSubStep(...).then(...), callupdateReimbursementAccountDraft(getBankAccountFields(getFieldsForStep(CONST.BANK_ACCOUNT.STEP.REQUESTOR)))— reusing the very same helper combination used at line 326. This seeds the draft with whatever the BE returned for the Requestor fields exactly at the moment the user transitions into that step. Because the form provider already reads its defaults fromREIMBURSEMENT_ACCOUNT_FORM_DRAFT,FullName(and its siblings:DateOfBirth,Address,SSN) all pick the values up unmodified — no per-subStep code changes.Together: (1) keeps the user inside Requestor while they edit; (2) makes sure they edit pre-filled values instead of blanks.
What alternative solutions did you explore? (Optional)
shouldShowContinueSetupButtonearly return below the hydration block. This would letupdateReimbursementAccountDraft(...)fire whenever the page-level effect runs, but the effect runs on many re-renders unrelated to the user pressing "Update details" — it can overwrite a draft the user has just edited (e.g. if an unrelated Onyx merge re-fires the effect mid-typing). Targeted hydration at the user's press avoids that footgun.isUpdatingDetailsref to suppress the line-267 sync only during the Update details flow. Works, but the lifetime is ambiguous — when do you clear it? Across re-mounts? On submit success? On any back-button? A direction-aware ordering check is bound to the actual condition that distinguishes "server is ahead of me" from "server is behind me", which is the real invariant.Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
David-2002065 commentedon May 20, 2026
Proposal (updated)
Thanks for the review @QichenZhu — you're right that the legal-name → DOB hand-off in my first proposal is incomplete. The two fixes I had (sync-guard + seeded
firstName/lastName) stop the eject and pre-fill the name inputs, but they leave a third symptom: when the user clicks Next on the legal-name screen, the DOB substep mounts inside the same React Navigation screen (useSubSteponly swapsscreenIndex), so theDatePicker'sautoFocus— which is driven byuseAutoFocusInputon top ofuseFocusEffect/transitionEnd— never fires the real navigation event and the picker stays closed. The picker only ever auto-opens after a real screen transition, which doesn't happen mid-useSubStep.What is the root cause of that problem?
Root cause is the same as before, plus one extra: the "Update details" entry seeds only
firstNameandlastNameinto the draft, andPersonalInfothen forces the user back to the FullName substep regardless of what's already inachData:https://github.com/Expensify/App/blob/main/src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx#L48-L49
Because
isBankAccountVerifyingshort-circuitsgetInitialSubStepForPersonalInfo, the user always starts on FullName even though the BE has every Requestor field for them already. That forces auseSubStep→ DOB substep transition for the Next press, and that's the transition whereDatePicker'sautoFocussilently no-ops (notransitionEndever lands; the 1000msSCREEN_TRANSITION_END_TIMEOUTfallback gets reset by the re-render that theupdatePersonalInformationForBankAccountresponse triggers, sosetIsScreenTransitionEnded(true)never wins the race).What changes do you think we should make in order to solve the problem?
Three changes, all in the two files I already touched:
1. Guard the sync effect against overriding the FE step while the account is verifying (same as before):
https://github.com/Expensify/App/blob/main/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx#L265-L269
2. Seed the entire Requestor draft (not just names) on the "Update details" press — reuse
getFieldsForStep('Requestor')sofirstName,lastName,dob,ssnLast4, and the requestor address all land inREIMBURSEMENT_ACCOUNT_FORM_DRAFTtogether:onPress={() => { + updateReimbursementAccountDraft( + lodashPick(reimbursementAccount?.achData, getFieldsForStep(CONST.BANK_ACCOUNT.STEP.REQUESTOR)), + ); setBankAccountSubStep(CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL).then(() => { setUSDBankAccountStep(CONST.BANK_ACCOUNT.STEP.REQUESTOR); goToWithdrawalAccountSetupStep(CONST.BANK_ACCOUNT.STEP.REQUESTOR); }); }}https://github.com/Expensify/App/blob/main/src/pages/ReimbursementAccount/USD/ConnectBankAccount/components/FinishChatCard.tsx#L76-L87
3. Drop the
isBankAccountVerifying ? 0override inPersonalInfosogetInitialSubStepForPersonalInfo(values)is allowed to do its job — once #2 has filled the draft, that helper returns4(Confirmation) when the BE already has every Requestor field (the case in this repro after step 6), and a smaller index only if a field is genuinely missing:https://github.com/Expensify/App/blob/main/src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx#L48-L49
Together: (1) keeps the user inside Requestor during the API round-trip, (2) hands every saved value back to the form, (3) lets them land on the Confirmation summary where they can
onMove(...)into any individual substep they actually want to edit. The DOB substep then only mounts via an explicit user press (the Confirmation row), which is a freshuseSubStepmount whereDatePicker'sautoFocusreaches the input via the timeout fallback before any racing Onyx merge — the picker pops as expected.What alternative solutions did you explore? (Optional)
startFrom = 0and instead patchDatePickerto open its modal from auseEffecton mount whenautoFocusis true. Rejected:DatePickeris shared across many flows (workspace member profile, expense date, money request, etc.) and they all rely onuseAutoFocusInput's priority-arbiter + window-ready gating; opening the modal from a raw mount effect would bypasstryClaim(Priorities.AUTO)/isWindowReadyToFocus()and could pop the picker mid-screen-transition in unrelated flows. The substep-transition gap is the actual problem, notDatePicker.ReimbursementAccountPageby dropping theif (shouldShowContinueSetupButton) return;early-return above thedraftStephydration block. Rejected: that effect fires on many unrelated Onyx merges; making it run whileshouldShowContinueSetupButtonis true would overwrite a draft the user has just edited (e.g. they typed a new last name and an unrelatedreimbursementAccountmerge re-fires the effect mid-typing). Seeding at the press inFinishChatCardonly runs once at the boundary the user actually crosses.achData.currentStep = 'Requestor'insetBankAccountSubStep's optimistic data. Rejected: it mutates synchronised BE state for a verifying account and would mislead every othercurrentStepconsumer (route resolution,getInitialCurrentStep, validation gating).melvin-bot commentedon May 20, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @QichenZhu (
External)kamronbek04 commentedon May 20, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
wildan-m commentedon May 20, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
[-]dd BA- After clicking "Update details" name is empty, user is dropped out after clicking Next[/-][+][$250] dd BA- After clicking "Update details" name is empty, user is dropped out after clicking Next[/+]44 remaining items
melvin-bot commentedon Jun 10, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon Jun 11, 2026
@QichenZhu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mvtglobally commentedon Jun 13, 2026
Issue not reproducible during KI retests. (First week)
melvin-bot commentedon Jun 15, 2026
@QichenZhu 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
QichenZhu commentedon Jun 16, 2026
melvin-bot commentedon Jun 17, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon Jun 17, 2026
@QichenZhu this issue is now 4 weeks old, please consider:
Thanks!
melvin-bot commentedon Jun 19, 2026
@QichenZhu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mvtglobally commentedon Jun 20, 2026
Issue not reproducible during KI retests. (Second week)