[Due for payment 2026-11-16] BA - Industry classification code is not saved when user updates details of BA connection
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: 9.4.63-0 Reproducible in staging?: Yes Reproducible in production?: Unable to validate in Prod - Provide reasoning. If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/71240654/folder/54018436/41236766/1704262149?sort=%2Bidentifier Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: MacOS 26.6.2 / Chrome, Safari. iPhone 17 Pro / 26.6. Google Pixel 5 / Android 14 App Component: Workspace Settings
Action Performed:
- Log in with a new applause.expensifail account
- Create a new workspace and default currency as "US"
- Go to Workflows > Payments > Add bank account
- Click "Log into your bank"
- Select "Regions" bank and follow the flow
- Enter "Six Labs" on company name page
- Select "Finish via chat" on Verification page
- Go to Workflows > Payments > Payment Account > Select "Six Labs"
- Select "Continue setup" > "Update details"
- Follow the flow verifying that all previously entered details have been saved
- Change "Six Labs" to "Alberta Bobbeth Charleson" on company name page
- On the "Industry classification code" page verify that the previously entered number has been saved.
Expected Result:
The previously entered Industry classification code number is saved when user updates details of BA connection.
Actual Result:
The previously entered Industry classification code number is NOT saved when user updates details of BA connection. All other details of the BA connection were saved.
Workaround:
Unknown
Platforms:
- [x] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/47d01f34-0fe5-493d-ba90-4b807f0a248a
Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7244920
Issue Owner
Current Issue Owner: @phuchoang23
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/399a0a5a44f89a19a57c202701642a68c72cb08860820c2e7f9519d037cde313
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External)
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
Issue Analysis
Root Cause: A key mismatch. When you reopen Update details, the App reads the industry classification code from achData.industryCode, but the backend returns that field under a different key — so achData.industryCode is empty and the field renders blank. Every other business-info field prefills through the exact same mechanism, and their input ID matches their achData key, which is why only this one field comes back empty.
The App is internally consistent — it sends and reads the field as industryCode — so the persistence/return key lives on the backend. A tell-tale sign is in the App itself: the input-ID constant is named INCORPORATION_CODE but its value is 'industryCode' (ReimbursementAccountForm.ts:41), a fingerprint of a frontend rename (incorporationCode → industryCode) that the backend's returned key didn't follow. The App never reads incorporationCode anywhere.
This fix requires backend investigation outside the App repo. An internal engineer needs to confirm which key the backend actually returns the industry/NAICS classification code under in the reopened bank-account achData payload. Once confirmed, the fix is one of:
- Backend: return the value under
achData.industryCode(or alias it), matching what the App reads; or - App: update the read at
IncorporationCode.tsx:62(and the generic prefill ingetSubStepValues.ts:18-20) to fall back to the backend's actual key — mirroring the documented send-key/save-key pattern already handled for other fields inReimbursementAccountForm.ts:81-83.
Option 2 shouldn't be implemented until the backend key is confirmed, since guessing the wrong key would silently keep the field empty.
Investigation details & evidence
Confidence: High that this is a industryCode key mismatch on reopen; Medium on the exact backend key being incorporationCode (inferred from the constant name and the sibling-field naming pattern — not confirmed against backend source/logs).
The field's read path (why it's blank):
IncorporationCode.tsx:62—defaultValue={isEditing ? reimbursementAccount?.achData?.industryCode : ''}getSubStepValues.ts:18-20— generic prefill:draft[key] ?? achData[key] ?? achData.corpay[key] ?? ''. ForindustryCode, the draft is empty on reopen andachData.industryCodeis missing, so it collapses to''.
Why other fields work but this one doesn't: sibling business-info fields (companyName, incorporationType, incorporationDate, incorporationState, address, etc.) all have inputID === achData key, so the same generic prefill finds them. industryCode is the sole field whose input ID does not match the key the backend returns.
Rename fingerprint: ReimbursementAccountForm.ts:41 — INCORPORATION_CODE: 'industryCode'. The constant name still carries the legacy incorporationCode name while the value is industryCode; incorporationCode no longer appears as a data read anywhere in the App.
Alternative explanations considered: (a) the field not being submitted — ruled out; industryCode is part of INPUT_IDS.BUSINESS_INFO_STEP, which is what BusinessInfo submits (BusinessInfo.tsx:51,84). (b) A rendering bug in the selector — ruled out; the selector just displays whatever value the Form provides.
Not verified: production achData payload on reopen (VictoriaLogs was not queryable in this run) and Web-Expensify source (not accessible). Those would confirm the exact backend key.
Next Steps for Contributor+ team:
To accept: confirm the backend key first (internal engineer), then @MelvinBot implement [this](https://github.com/Expensify/App/issues/99755) for the App-side fallback if that's the chosen path.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's analysis.
@hoangzinh Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Proposal
Please re-state the problem that we are trying to solve in this issue.
BA - Industry classification code is not saved when user updates details of BA connection
What is the root cause of that problem?
IncorporationCode https://github.com/Expensify/App/blob/00031d0f122db0b25f0b750f1edbcca151d2901d/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx#L62
prefills only isEditing ? achData.industryCode : '' and never checks reimbursementAccountDraft or waits for Onyx load. Siblings (IncorporationStateBusiness, TypeBusiness) guard with isLoadingOnyxValue.FormProvider caches '' on first mount when achData is still loading and never updates it.
Second, getSubStepValues.ts
https://github.com/Expensify/App/blob/00031d0f122db0b25f0b750f1edbcca151d2901d/src/pages/ReimbursementAccount/utils/getSubStepValues.ts#L18
uses draft ?? achData - '' ?? achData keeps '' and shadows a valid achData.industryCode, so Confirmation and BusinessInfo submit an empty code.
What changes do you think we should make in order to solve the problem?
- IncorporationCode.tsx - add loading guard and draft fallback:
const [reimbursementAccount, result] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
const isLoading = isLoadingOnyxValue(result);
const [draft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
const hasSaved = !!reimbursementAccount?.achData?.industryCode;
const isUpdating = reimbursementAccount?.achData?.state !== CONST.BANK_ACCOUNT.STATE.SETUP; // hasInProgressUSDVBBA could be used too.
const defaultValue = (isEditing || (hasSaved && isUpdating)) ? (achData.industryCode ?? draft.industryCode ?? '') : '';
if (isLoading) return <ActivityIndicator />;
<InputWrapper defaultValue={defaultValue} shouldSaveDraft={!isEditing} />
- getSubStepValues.ts - treat '' as missing:
const draftVal = reimbursementAccountDraft?.[value];
hasDraft = draftVal !== undefined && draftVal !== ''
acc[value] = hasDraft ? draftVal : hasAch ? achValue : ...
code can be improved after.
What alternative solutions did you explore? (Optional)
@hoangzinh Huh... This is 4 days overdue. Who can take care of this?
@hoangzinh Eep! 4 days overdue now. Issues have feelings too...
@hoangzinh Huh... This is 4 days overdue. Who can take care of this?
This issue is interesting. Let me determine whether it's a front-end or back-end issue.
This issue is interesting. Let me determine whether it's a front-end or back-end issue.
@hoangzinh I think this is FE bug. at least I did live run:
- Onyx had
achData.industryCode = "541511", draft empty, account VERIFYING. /bank-account/new/us/company/code(forward walk) → input""./bank-account/new/us/company/code/edit→ input"541511".
Same data, same page, only the route's action segment differs. So the value IS in the payload, the page just refuses to read it: defaultValue={isEditing ? achData.industryCode : ''} and isEditing is params.action === 'edit', which "Update details" never sets.
Yes, after testing this issue again, I believe it is possible a FE issue. Since it's not straightforward, I would like to add HW to open it for proposals.
🆘 C+ Help Wanted
Proposal
What is the root cause of that problem?
I found that the “Update details” flow navigates through the full setup route without an edit action:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/USD/ConnectBankAccount/components/FinishChatCard.tsx#L97-L111
useSubPage only sets isEditing when that route action equals edit, so isEditing remains false in this flow:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/hooks/useSubPage/index.tsx#L15-L20
IncorporationCode incorrectly uses isEditing to decide whether to load the saved achData.industryCode. Consequently, Update details passes an empty default and saves it into the draft:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx#L58-L63
The draft then takes precedence over the saved achData value when the business information is collected, which explains why the code is blank while the other saved details remain populated:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/utils/getSubStepValues.ts#L12-L23
The conditional was introduced while fixing the opposite problem, an industry code being prefilled during initial bank-account setup:
https://github.com/Expensify/App/commit/bab6594b5697507a2d9a0077e1e964d18feec903
It distinguished the flows using confirmation-page edit mode, but missed that Update details is a full walkthrough without that route flag. The business flow already has the correct distinction available: a verifying bank account is intentionally restarted from its first business substep.
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/USD/BusinessInfo/BusinessInfo.tsx#L105-L106
What changes do you think we should make in order to solve the problem?
I think we should update IncorporationCode to prefill the saved industry code when either the user is editing from the confirmation page or the bank account is in the VERIFYING state:
+ const shouldPrefillIndustryCode =
+ isEditing || reimbursementAccount?.achData?.state === CONST.BANK_ACCOUNT.STATE.VERIFYING;
- defaultValue={isEditing ? reimbursementAccount?.achData?.industryCode : ''}
+ defaultValue={shouldPrefillIndustryCode ? reimbursementAccount?.achData?.industryCode : ''}
I would add coverage for all three cases: initial setup remains blank, confirmation-page editing remains prefilled, and Update details on a verifying account is now prefilled.
This keeps the earlier fix intact because a new account in SETUP state still receives an empty default. It also leaves draft saving, validation, selection, and submission unchanged. Other business fields are unaffected; for comparison, the incorporation-state substep already loads its saved achData value independently of confirmation-page edit mode:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationStateBusiness.tsx#L33-L45
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationStateBusiness.tsx#L67-L73
What alternative solutions did you explore? (Optional)
I considered adding action: 'edit' to the Update details route. That flag controls substep navigation as well as defaults, however, so it would make each submitted field jump to the confirmation page instead of continuing through the requested full verification walkthrough. Using the existing bank-account state keeps the change local to the incorrect default-value decision.
Proposal
What is the root cause of that problem?
IncorporationCode is the only business info sub page that gates its prefill on isEditing:
https://github.com/Expensify/App/blob/09f662acc2306467fe3fbfb648ed90ae107863b1/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx#L58-L63
isEditing only means the route has action=edit, which is set when you open a row from the confirmation page:
https://github.com/Expensify/App/blob/09f662acc2306467fe3fbfb648ed90ae107863b1/src/hooks/useSubPage/index.tsx#L18-L20
Update details walks forward with Next, so action is never there and the page hands FormProvider an empty string. While the bug was live I watched this happen:
- VERIFYING account,
achData.industryCode=541511, draft empty. - At
company/code, the route Next produces, the input was"". - At
company/code/edit, with the same Onyx data, it was541511.
So the value is in achData. The page just refuses to read it.
The gate came from #89660. In #88504 the backend seeded industryCode during personal info, and a brand new setup showed a code nobody picked. Hiding it behind isEditing was the workaround. It never matched the rest of the step, though. The resume logic and the confirmation row both read achData.industryCode with no gate:
https://github.com/Expensify/App/blob/09f662acc2306467fe3fbfb648ed90ae107863b1/src/pages/ReimbursementAccount/USD/utils/getInitialSubStepForBusinessInfo.ts#L47-L51
https://github.com/Expensify/App/blob/09f662acc2306467fe3fbfb648ed90ae107863b1/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/ConfirmationBusiness.tsx#L131-L137
The input page was the one reader out of step.
What changes do you think we should make in order to solve the problem?
The backend no longer seeds industryCode, so the workaround has nothing left to protect against. I think we should remove the gate and read the saved value the same way NameBusiness does:
- defaultValue={isEditing ? reimbursementAccount?.achData?.industryCode : ''}
+ defaultValue={reimbursementAccount?.achData?.industryCode ?? ''}
shouldSaveDraft, validation and submit stay as they are. A fresh setup has no code in achData anymore, so the field still starts empty and #88504 stays fixed. Any code that's there now got there because the user submitted it.
I checked the backend change on production today with a new bank account:
ConnectBankAccountManually, thenUpdatePersonalInformationForBankAccountwithconfirm: true: the returnedachDatahas noindustryCode. This is the step that used to seed115116.- A company submit without a code still left it empty. It only became
541511after I submitted that code. - With the change, the forward
company/coderoute showed541511for that account (""before), and the code page on a brand new setup stayed empty.
I added a test that renders the sub page with four cases: VERIFYING forward walk, SETUP with a saved code, no saved code, and the edit route. On current main the first two fail with Expected "541511", Received "". With the change all 4 pass.
What alternative solutions did you explore? (Optional)
I first gated on isEditing || state === VERIFYING. It fixes the QA repro, but I ran it against the same test and the SETUP case still fails. That case is a user who picked a code, left, and came back. The resume logic lands them on confirmation, and pressing back to the code page shows it empty. With the seed gone there's no reason to keep any gate.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user opens Update details on an already-connected USD business bank account and pages through the Business Info steps, every previously-saved field (company name, address, phone, website, tax ID, incorporation type/date/state) is correctly pre-filled — except the Industry classification code, which shows up empty even though it was entered and saved earlier.
What is the root cause of that problem?
IncorporationCode.tsx is the substep that renders the Industry Classification Code field:
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx#L24-L33
It reads reimbursementAccount straight from useOnyx and renders FormProvider/InputWrapper immediately, with:
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx#L58-L63
Every other numbered Business Info substep in the same folder (AddressBusiness, TaxIdBusiness, WebsiteBusiness, PhoneNumberBusiness, IncorporationDateBusiness, IncorporationStateBusiness, TypeBusiness) instead destructures the Onyx metadata and blocks rendering of the form until the data has actually loaded, e.g.:
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationStateBusiness.tsx#L36-L54
IncorporationCode.tsx never captures reimbursementAccountResult/isLoadingOnyxValue, so it can mount before the fresh achData for this bank account has finished loading. That refetch is real: entering "Update details" explicitly clears the local draft and re-requests the account from the server:
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx#L338-L341
This matters because FormProvider's registerInput only ever seeds a field's value from defaultValue once, the first time the input is registered while its value is still undefined — it never re-applies defaultValue on later renders once a value has been set:
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/components/Form/FormProvider.tsx#L425-L441
So if IncorporationCode.tsx mounts before achData.industryCode is available, the field gets permanently locked to '' for that page visit, even after the real value streams in a moment later — nothing re-triggers the assignment.
That empty snapshot doesn't stay contained to the UI, either. Continuing (or even just tapping “Confirm”) submits the step, and useReimbursementAccountStepFormSubmit writes the (now empty) value into the shared ReimbursementAccountForm draft because shouldSaveDraft: isEditing is true while editing:
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/hooks/useReimbursementAccountStepFormSubmit.ts#L23-L30
From then on, every place that resolves this step's values (the confirmation summary, and the final "confirm" submission) prioritizes the draft over achData:
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/utils/getSubStepValues.ts#L17-L23
Since '' is not undefined/null, the ?? fallback chain stops right there — the correct achData.industryCode is never consulted again, the confirmation screen shows it blank, and the final submit persists the blank value.
Every other Business Info field is protected from this class of bug by a second safety net that industryCode is missing from. Whenever any Company-step field is submitted while editing (including the intermediate submits fired on every substep transition via BusinessInfo.tsx's onPageChange), the backend-confirmed achData is round-tripped back into the draft so a stale/incorrect draft value gets corrected:
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx#L437-L441
but the whitelist of fields that gets pulled back from achData is missing industryCode (compare to CompanyStepProps, which does include it):
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/USD/utils/getFieldsForStep.ts#L12-L25
So industryCode is the one Company-step field that, once an empty value slips into the draft, can never be silently repaired by this resync — exactly matching the report that every other detail was saved correctly and only the industry code was lost.
What changes do you think we should make in order to solve the problem?
Two small, targeted changes, mirroring exactly what the sibling substeps already do — no new abstractions needed.
1. Guard IncorporationCode.tsx against rendering before reimbursementAccount has loaded, the same way IncorporationStateBusiness.tsx does.
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx#L24-L33
- Import
isLoadingOnyxValuefrom@src/types/utils/isLoadingOnyxValueandActivityIndicator/CONST(already used the same way inIncorporationStateBusiness.tsx). - Change
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);to also capture the result metadata, e.g.const [reimbursementAccount, reimbursementAccountResult] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);and deriveconst isLoadingReimbursementAccount = isLoadingOnyxValue(reimbursementAccountResult);. - Before the
return (<FormProvider ...>), add the same early-return loading state used inIncorporationStateBusiness.tsx#L48-L54, soFormProvider/InputWrapper(and therefore the one-timedefaultValueseeding) only mounts onceachData.industryCodeis actually available.
This directly removes the trigger: the field can no longer lock in an empty value before the real data has arrived.
2. Add industryCode to the Company-step field whitelist so the field gets the same defense-in-depth protection as every other field in this step.
https://github.com/Expensify/App/blob/3f72d85ebec474b3304e2a99f5621e5fe4a56714/src/pages/ReimbursementAccount/USD/utils/getFieldsForStep.ts#L12-L25
case CONST.BANK_ACCOUNT.STEP.COMPANY:
return [
'companyName',
'addressStreet',
'addressZipCode',
'addressCity',
'addressState',
'companyPhone',
'website',
'companyTaxID',
'incorporationType',
'incorporationDate',
'incorporationState',
'industryCode',
];
This keeps the draft's industryCode synced with the backend-confirmed achData value after every Company-step submission, exactly like companyName/incorporationState/etc. already are, so even if a bad value were ever momentarily written to the draft by some other path, it would self-correct the next time a Company-step field is submitted — it would no longer be able to permanently mask the real backend value.
Edge cases covered:
- Offline: the resync in
getFieldsForStep/updateReimbursementAccountDraftonly runs from the write'ssuccessData, so nothing changes about offline queuing behavior — the draft simply isn't refreshed until the request actually succeeds, same as today for every other field. - Loading state: the new guard only affects the very first render of this one substep; once
achDatais loaded (which happens quickly, matching the existing behavior of the other guarded substeps), the form renders exactly as before. - First-time (non-editing) setup flow:
isEditingisfalsein that flow, soachDatais empty/new andisLoadingReimbursementAccountresolves the same way it does for the other guarded substeps today (brieflytrueon first paint, thenfalse); the field still starts blank as expected for a brand-new bank account. - Web / iOS / Android: the fix only touches shared React logic (Onyx hook usage and a plain array literal) with no platform-specific code, so behavior is identical across platforms.
- Existing callers:
getFieldsForStephas a single call site (ReimbursementAccountPage.tsx), andIncorporationCode.tsxhas a single caller (BusinessInfo.tsx'spagesarray); neither the loading guard nor the added array entry changes either component's external props/contract, so no other callers are affected. hasNoConnectionToCannabisis intentionally left out ofgetFieldsForStep, since it's a fresh legal attestation re-confirmed on every visit to the confirmation page rather than a value that should be pre-filled fromachData.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user goes back through an existing bank account connection via Continue setup > Update details, every previously entered business detail is pre-filled on its page — company name, tax ID, website, phone, address, incorporation type, incorporation date and incorporation state — except the Industry classification code. That page opens empty, so the previously saved code is lost and the user has to pick it again.
What is the root cause of that problem?
The industry classification code sub-step is the only Business Info sub-step that refuses to pre-fill its saved value unless the page was opened in "edit" mode.
In IncorporationCode, the defaultValue passed to the input is gated on isEditing, so whenever isEditing is false the saved reimbursementAccount.achData.industryCode is deliberately thrown away and an empty string is used instead:
https://github.com/Expensify/App/blob/203c807379ecc2607344b8259b72e2822029b1d2/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx#L58-L63
isEditing is only true when the user jumps to a sub-step from the confirmation screen. In the Update details flow the user walks forward through the sub-steps one by one, so isEditing is false on every page — which is exactly why the code appears blank while everything else is filled in.
Every sibling sub-step reads the same achData value unconditionally, with no isEditing gate, which is why they all pre-fill correctly. IncorporationStateBusiness is the closest structural match — same FormProvider + InputWrapper shape, same shouldSaveDraft={!isEditing} — and it simply reads the value:
https://github.com/Expensify/App/blob/203c807379ecc2607344b8259b72e2822029b1d2/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationStateBusiness.tsx#L67-L74
The same unconditional pattern is used by the company name sub-step:
https://github.com/Expensify/App/blob/203c807379ecc2607344b8259b72e2822029b1d2/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/NameBusiness.tsx#L23-L26
So this is not a data problem — achData.industryCode is present and correct (the step-resume helper relies on it to decide where the flow should start):
https://github.com/Expensify/App/blob/203c807379ecc2607344b8259b72e2822029b1d2/src/pages/ReimbursementAccount/USD/utils/getInitialSubStepForBusinessInfo.ts#L47-L49
The value is simply discarded at render time by the isEditing condition, so the page opens blank and the required-field validation then forces the user to pick the industry classification code again before they can move on, even though it was already saved.
What changes do you think we should make in order to solve the problem?
In the industry classification code sub-step, stop conditioning the pre-filled value on isEditing and always seed the input from the saved bank account data, falling back to an empty string when nothing has been saved yet — exactly the way every other Business Info sub-step already does it.
Concretely, in src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx:
- Derive the default value once from the saved account data, defaulting to an empty string when it is missing, mirroring
defaultCompanyIncorporationStateinIncorporationStateBusinessanddefaultCompanyNameinNameBusiness. - Pass that value straight to the
InputWrapperasdefaultValue, removing theisEditing ?condition.
Nothing else changes: shouldSaveDraft={!isEditing} keeps its current behaviour, validation is untouched, and the submit handler is untouched. For a brand-new bank account the saved value is absent, so the default resolves to an empty string and the first-time flow still starts blank exactly as it does today. For the Update details flow the saved code is now seeded, so the page opens with the previously chosen code selected and the user can simply confirm it or change it, instead of having to look it up again.
Compare branch: https://github.com/Expensify/App/compare/main...wildan-m:App:wildan/99755-industry-code-prefill?expand=1
Result
Driven from the same saved Business Info, with achData.industryCode set to 541511 and the bank account in the VERIFYING state that forces startFrom = 0 and walks the sub-steps forward.
The first clip is the control: on main at f81eae4e9a1 the same sub-step reached from the confirmation screen (.../company/code/edit, isEditing true) shows the saved code, so the value is in Onyx. The second is the same build on the reported route (.../company/code), where the field opens blank. The third is the fix branch at f4cba55ba0f on that same route with the same state, where the code is shown and the button still reads Next, so it is still the walk-forward path rather than the edit path.
https://github.com/user-attachments/assets/252d88b9-3d3c-41bc-9a7f-04c8558c77d6
What alternative solutions did you explore? (Optional)
I considered seeding the value from the reimbursement account draft as well, the way IncorporationDateBusiness does with its achData.incorporationDate ?? draft.incorporationDate ?? '' chain. I did not go with it because the draft is already the primary source consulted by the form layer before defaultValue is used, so the extra fallback would be redundant here and would introduce an inconsistency with the neighbouring sub-steps that read achData alone.
I also considered forcing isEditing to be true throughout the update-details flow so that the existing condition would resolve correctly. I rejected this because isEditing legitimately means "the user jumped here from the confirmation screen" and it also drives the submit button label and the draft-saving behaviour, so changing its meaning would have side effects across every sub-step instead of fixing the one page that is actually wrong.
🚨 Edited by proposal-police: This proposal was edited at 2026-09-04 15:21:15 UTC.
Proposal
What is the root cause of that problem?
The blank field is rendered by IncorporationCode, the Business info sub-page that wraps IndustryCodeSelector. Its seed value is gated on the route rather than on the data:
isEditing is params?.action === 'edit' (useSubPage/index.tsx#L20). "Update details" walks the sub-pages with nextPage(), which never puts an action segment on the route, so the seed is ''.
Nothing else can repair it afterwards. FormProvider.registerInput fills an input from the draft first and from defaultValue second, and every branch is guarded by inputValues[inputID] === undefined, so the first seed is final (FormProvider.tsx#L430-L441). And the draft is empty on a reopen, because ReimbursementAccountPage calls clearReimbursementAccountDraft() when it unmounts (ReimbursementAccountPage.tsx#L183-L193). So on a reopened account achData is the only possible source and the gate is exactly what blocks it — which is also why adding a ?? reimbursementAccountDraft fallback restores nothing here.
Now the part that decides the fix: that gate is one third of an approved fix that was only partly merged. The approved proposal on #88504 named two prefill paths and changed three lines — shouldSaveDraft={false} on the input, shouldSaveDraft: true on the submit hook, and the defaultValue gate. PR #89660's entire merged diff is the defaultValue line. The two shouldSaveDraft lines — the ones that stop unconfirmed input from being persisted and that save the confirmed value "so the flow can still be resumed correctly", in the PR's own words — never landed.
So the leak they were meant to close is still open today. IndustryCodeSelector fires onInputChange on every keystroke (L82-L86) and every row tap (L100-L104); FormProvider turns each one into setDraftValues because shouldSaveDraft={!isEditing} is true on the walk-through (FormProvider.tsx#L560-L562); and BusinessInfo persists that draft-first value to the backend on every page change — onPageChange: () => submit(false) (BusinessInfo.tsx#L121) → getSubStepValues reads draft ?? achData (getSubStepValues.ts#L18-L20) → updateCompanyInformationForBankAccount. Type 11, press Back, then walk forward again and achData.industryCode is 11 — a code nobody confirmed. I have a test that fails on main on exactly that write.
What changes do you think we should make in order to solve the problem?
Merge the missing half, and the route gate stops being load-bearing.
useReimbursementAccountStepFormSubmit({
fieldIds: STEP_FIELDS, onNext,
- shouldSaveDraft: isEditing,
+ shouldSaveDraft: true, // the confirmed code is what gets persisted
});
<InputWrapper ...
- shouldSaveDraft={!isEditing}
- defaultValue={isEditing ? reimbursementAccount?.achData?.industryCode : ''}
+ shouldSaveDraft={false} // keystrokes and row taps no longer leak into the draft
+ defaultValue={reimbursementAccount?.achData?.industryCode ?? ''}
/>
Layer: the sub-page's form wiring. The read and both draft writes live in this one file, and it is the write side that makes the unconditional read safe. This is race-free rather than race-narrowing — industryCode can now only enter the draft after validate has passed and the user pressed Next, so achData.industryCode is by construction a code the user confirmed. That is a structural invariant, not a heuristic that has to guess which lifecycle state the account is in.
Edit mode is byte-for-byte unchanged: on action=edit the input's shouldSaveDraft is already false and the submit hook's is already true.
Verification. New suite tests/ui/IncorporationCodePrefillTest.tsx, 4 cases. On main 2 of them fail: the VERIFYING reopen renders '' instead of 541511, and an unconfirmed selector value lands in reimbursementAccountDraft.industryCode. With the patch, 4/4 pass. The existing suites around this code (ConfirmationStepTest, ReimbursementAccountUtilsTest, BankAccountPurposeCountrySelectionTest, BankAccountSelectorTest, RulesRequireReceiptsPageTest, IOURequestStepDescriptionTest, WorkspaceInvoiceVBASectionTest, WorkspaceWorkflowsPayerRowTest) all stay green — 43 existing + 4 new = 47/47. npm run typecheck and ESLint are clean. Boundary cases asserted: action=edit still prefills, an account with no saved code still opens empty, and a first-time setup still cannot show a code the user never confirmed.
One thing I would handle in the PR: moving the draft write to submit means the submit(false) that fires immediately on Next reads Onyx one tick old, so the intermediate save lags a page (the authoritative submit(true) on Confirm is correct). The clean fix is to forward useStepFormSubmit's stepValues through onPageChange — useSubPage already receives them as nextPage(finishData) and drops them at useSubPage/index.tsx#L92. I left it out of the main fix because it widens a hook shared by ~118 screens; happy to fold it in if that is preferred here.
I could not drive the real VBBA flow end to end locally (it needs a live bank-account backend), so the evidence above is the test suite rather than a before/after recording.
What alternative solutions did you explore? (Optional)
Add industryCode to the COMPANY list in getFieldsForStep. It is the one company field missing from that list (L12-L25), so the backend-to-draft sync never carries it. Rejected: that sync only runs when the route's step differs from the account's current step (L425, L438-L440), so it never fires while the user is sitting on the code page. A real gap, but the wrong lever for this bug.
Read the value from a different achData key. Rejected: the same line 62 reads achData.industryCode on the action=edit route and the field does prefill there, so the key is correct and the payload already carries the value.
Gating the prefill on the bank account's lifecycle state instead fixes the reported repro, but leaves the field blank when a user returns to this page while the account is still in SETUP.
Proposal
What is the root cause of that problem?
The industry-classification input is the only Business-info sub-step that gates its prefill on isEditing:
defaultValue={isEditing ? reimbursementAccount?.achData?.industryCode : ''}
isEditing is only true when the route carries action=edit — useSubPage/index.tsx#L20 (params?.action === 'edit'), i.e. when you jump to a single field from the confirmation summary. In the reported flow you walk the pages: each is opened via nextPage → navigateToPage(pageName) with no edit action, so isEditing is false and the field collapses to ''. And because "Finish via chat" leaves the account in VERIFYING, BusinessInfo forces startFrom = 0 (BusinessInfo.tsx#L105-L106), so you always hit the non-editing branch.
Every sibling reads its default unconditionally — NameBusiness.tsx#L25 (achData?.companyName ?? ''), IncorporationDateBusiness.tsx#L50 (achData?.incorporationDate ?? draft ?? ''), etc. That is exactly why "all other details were saved" but this one field comes back empty.
The value is not missing — the App just hides it here. The confirmation page renders the same field from getSubStepValues and shows the saved code: ConfirmationBusiness.tsx#L143 (title={values[INCORPORATION_CODE]}), where values comes from getSubStepValues.ts#L17-L21 reading achData.industryCode. Two consumers of achData.industryCode: the confirmation row shows it, the input hides it behind isEditing. If the value lived under a different backend key, the confirmation row would be blank too — it isn't. achData.industryCode is also the App's declared home for this value: ACHData = Partial<… & CompanyStepProps & …> (ReimbursementAccount.ts#L152) and CompanyStepProps[INCORPORATION_CODE] = industryCode: string (ReimbursementAccountForm.ts#L211).
So this is entirely front-end; no backend change is needed.
What changes do you think we should make in order to solve the problem?
Render layer, one line in IncorporationCode.tsx. Drop the isEditing gate so the field prefills from Onyx exactly like every sibling:
defaultValue={reimbursementAccount?.achData?.industryCode ?? ''}
FormProvider already restores an in-progress value from the form draft by inputID, so the achData fallback is all the default needs — identical shape to NameBusiness. On a brand-new setup achData.industryCode is undefined → '', so forward setup is unchanged.
Why this layer: the selector, the getSubStepValues prefill and the achData payload are all correct — only this input's readiness gate is wrong. It is race-free: the value is read synchronously from achData whenever present, and ?? '' covers the not-yet-loaded frame (render empty, then re-render with the value on the next Onyx tick, exactly like the siblings). No timer or ordering is involved.
Verification: I added tests/unit/IncorporationCodePrefillTest.tsx, which renders IncorporationCode with achData.industryCode set and asserts the input's display value for three cases — (1) isEditing=false → the bug (empty on main, filled after the fix), (2) isEditing=true → edit path still prefills (guards against regressing the edit case), (3) nothing saved → stays empty (guards fresh setup). One honest caveat: my checkout has no dependencies installed, so I couldn't run jest/tsc in it; the test is written to fail on main and pass with the one-line change, and I'll attach the run output on the PR.
What alternative solutions did you explore? (Optional)
- Refactor
IncorporationCodeto consume the sharedgetSubStepValuesresult (asConfirmationBusinessdoes) instead of readingachDatainline. Rejected: every other sub-step also readsachDatainline and works fine, so the inline read isn't the defect — theisEditinggate is; this would be a larger change for the same result. - Add an explicit draft fallback (
achData?.industryCode ?? draft?.industryCode ?? '', likeIncorporationDateBusiness). Rejected as unnecessary:FormProvideralready hydrates the input from the form draft byinputID, which is whyNameBusinessdoesn't do this either. - On the automated backend-key analysis above: routing this to a backend change would ask the backend to move a field the App already receives and already displays on the confirmation summary, so no backend change is warranted.
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user reopens a US business bank account via Continue setup → Update details and walks back through Business info, every previously entered field is prefilled (company name, tax ID, address, incorporation type/date/state, ...) except the Industry classification code, which opens blank and must be re-selected.
What is the root cause of that problem?
IncorporationCode is the only Business-info sub-step that gates its prefill on isEditing:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx#L62
isEditing does not mean "the user is updating a saved account". It is purely the action=edit URL segment:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/hooks/useSubPage/index.tsx#L20
That segment is set only when you open a single field from the Confirmation summary. Update details drops the user at the first business sub-step and they walk forward with Next, so action is never present and isEditing is false on every page. The default then collapses to '' and the saved achData.industryCode is discarded at render time. Every sibling reads achData with no gate, e.g. company name:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/NameBusiness.tsx#L25
which is exactly why "all other details were saved" but this one field comes back blank.
The value is present under industryCode. On the same reopened account the .../company/code/edit route (where isEditing is true) renders the saved code, while the forward-walk .../company/code route renders empty. Same Onyx data, same page, only the action segment differs. So this is not a backend key mismatch: a differently named or missing key would blank the edit route and the confirmation row too, and it does not.
Why the gate exists, and why it targets the wrong signal. It was added to fix the opposite bug, a classification code prefilling during a brand new setup (#88504), in commit 22e728f2c42:
https://github.com/Expensify/App/commit/22e728f2c42
That fix is load-bearing: on a fresh setup achData.industryCode can be a backend seed the user never chose (#88504 reported it prefilling 115116), so the field must stay empty there. Simply dropping the gate reverts to the pre-#88504 behaviour and reintroduces that bug. The defect is not that a gate exists, it is that the gate keys on isEditing (a navigation flag) instead of on whether the account has moved past initial setup. BusinessInfo already draws that exact line. A verifying account is intentionally re-walked from its first sub-step:
https://github.com/Expensify/App/blob/1b39932d5a7f8e8070be8c83cadf1b25743a4693/src/pages/ReimbursementAccount/USD/BusinessInfo/BusinessInfo.tsx#L105-L106
What changes do you think we should make in order to solve the problem?
Prefill when the user is editing from Confirmation or the account is already verifying, which is the same signal BusinessInfo uses to decide it should re-walk the step. In src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationCode.tsx:
// "Update details" re-walks the sub-steps without action=edit, so isEditing is false here.
// A verifying account has already submitted the company step, so achData.industryCode is a value the user confirmed.
// A SETUP account may still carry a backend seed, so it stays blank there and #88504 remains fixed.
const isBankAccountVerifying = reimbursementAccount?.achData?.state === CONST.BANK_ACCOUNT.STATE.VERIFYING;
...
defaultValue={isEditing || isBankAccountVerifying ? reimbursementAccount?.achData?.industryCode : ''}
This cannot regress #88504: Update details is reachable only for a verifying account (FinishChatCard is rendered by ConnectBankAccount only when the state is VERIFYING), while a fresh setup sits in SETUP, where the field keeps starting empty. shouldSaveDraft, validation and submit are untouched, and FormProvider still hydrates any in-progress draft value by inputID, so no draft fallback is needed here. This also stops the empty value being written to the draft on the walkthrough, which is what otherwise propagates the blank to the confirmation summary through getSubStepValues.
Compare branch: https://github.com/Expensify/App/compare/main...dilshodmackbook-sketch:App:fix/99755-industry-code-prefill?expand=1
What specific scenarios should we cover in automated tests to prevent this regression from happening again?
Render IncorporationCode and assert the input's displayed value:
- VERIFYING account with
achData.industryCodeset, empty draft,isEditing=false(the reported flow): the input shows the saved code. Fails onmain(renders''), passes with the change. - SETUP account with
achData.industryCodeset,isEditing=false: the input stays empty, so #88504 stays covered. isEditing=true: the input prefills, so the confirmation-edit path is unchanged.
I added tests/unit/IncorporationCodePrefillTest.tsx (in the compare branch) covering all three. It renders IncorporationCode, mocks the selector to surface the resolved value, and asserts the prefill decision. Result on main vs with the fix:
main (source reverted, test kept):
✕ prefills the saved code on the Update details walkthrough (verifying account, isEditing=false)
Expected element to have text content: 541511
Received: (empty)
✓ keeps the field blank during a fresh setup so #88504 stays fixed (setup account, isEditing=false)
✓ prefills when editing a single field from the confirmation page (isEditing=true)
with the fix:
✓ prefills the saved code on the Update details walkthrough (verifying account, isEditing=false)
✓ keeps the field blank during a fresh setup so #88504 stays fixed (setup account, isEditing=false)
✓ prefills when editing a single field from the confirmation page (isEditing=true)
Tests: 3 passed, 3 total
Case 1 is the reported bug and is the only one that flips, which pins the fix to exactly this flow.
What alternative solutions did you explore? (Optional)
- Drop the gate entirely (
achData?.industryCode ?? ''). Rejected: this is exactly the pre-#88504 code, so the fresh SETUP case would render the seeded code again and reintroduce #88504. The account state is the only thing separating the two flows. - Backend returns the code under a different key and the App reads an alias. Rejected: the
.../company/code/editroute reads the sameachData.industryCodeand shows the saved value on the same account, so the value is present underindustryCode; an alias would not change the blank on the forward walk. - Add an Onyx loading guard (the pattern some sibling sub-steps use). Rejected: with
achDatafully loaded the forward walk still renders blank, because the gate supplies''regardless of when the data arrives, so waiting for load changes nothing on this flow. - Force
action=editthroughout Update details. Rejected: that flag also drives per-field navigation, so each submit would jump to Confirmation instead of continuing the requested full walkthrough. Keying on account state keeps the change confined to the single incorrect default-value decision.