Skip to content

[Wise][Release 1] Business - UI - Form Saving (Wire in the API Command) - #105278

Merged
grgia merged 32 commits into
Expensify:mainfrom
software-mansion-labs:wojtekboman/wise-intake-form-saving
Nov 2, 2026
Merged

grgia merged 32 commits into
Expensify:mainfrom
software-mansion-labs:wojtekboman/wise-intake-form-saving

Conversation

@WojtekBoman

@WojtekBoman WojtekBoman commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Saves each Wise business onboarding intake page with UpdateWiseOnboardingAdditionalData as the user leaves it, and resumes from what the server holds. A typed SSN stays out of the persisted queue and logs; a saved one shows as a mask cleared only with X. Next waits for a connection, Confirm waits for saves, and a failed save reopens on its page.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/696839
PROPOSAL: N/A

Tests

Precondition: an account with the Wise reimbursements beta and a USD business bank account eligible for global reimbursements.

Save and resume

  1. Go to Settings > Wallet, open the bank account and start Wise global reimbursements.
  2. Fill in the representative page, including an SSN and an ID document, and tap Next.
  3. Verify in the network tab that one UpdateWiseOnboardingAdditionalData request is sent with step=representative, the answers in inputs, ssn, and the file as idDocument[0], and that no console log line contains the SSN digits.
  4. Fill in the business page and tap Next. Verify a request with step=business and no ssn.
  5. Close the flow and open it again. Verify it opens on the confirmation page and the SSN row shows "On file".
  6. Tap the SSN row. Verify the input shows •••• ••••, typing does not change it, and tapping Next sends no ssn.

Replace or drop a saved SSN

  1. From the confirmation page, open the representative page and tap the X in the SSN input.
  2. Verify the input is empty and focused, and Next shows a required error until an SSN is typed.
  3. Tap Back without saving and reopen the page. Verify the mask is back.
  4. Switch the representative to having no SSN and tap Next. Close the flow, open it again, switch back to having an SSN and verify the SSN input is empty and required, with no mask.

Pending and failed saves

  1. In Chrome DevTools, set network throttling to Slow 3G. On the business page tap Next, then tap Confirm while the save is running.
  2. Verify Confirm shows a spinner and does not move on, and that it opens the terms page once the save finishes.
  3. In DevTools, block request URLs matching UpdateWiseOnboardingAdditionalData. Open the representative page, tap the X in the SSN input, type a new SSN and tap Next.
  4. Verify the confirmation page shows an error and Confirm does not move on.
  5. Unblock the request, close the flow and open it again. Verify it opens on the representative page, and that after typing the SSN again and tapping Next the error is gone and Confirm opens the terms page.
  • Verify that no errors appear in the JS console

Offline tests

  1. Open the flow online and go offline.
  2. Verify Next is disabled on every page and the offline indicator shows, on wide screens too.
  3. Sign out and back in, go offline before opening the flow, then open it.
  4. Verify the page shows the offline blocking view instead of an empty form, and loads once back online.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@melvin-bot

melvin-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@codecov

codecov Bot commented Oct 28, 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 95.96% <ø> (ø)
src/ONYXKEYS.ts 100.00% <ø> (ø)
...micForm/components/DynamicFormConfirmationPage.tsx 100.00% <100.00%> (+100.00%) ⬆️
...s/DynamicForm/components/DynamicFormFieldsPage.tsx 95.12% <100.00%> (+9.75%) ⬆️
...amicForm/components/DynamicFormOnFileTextInput.tsx 100.00% <100.00%> (ø)
...onents/DynamicForm/components/DynamicFormShell.tsx 100.00% <100.00%> (ø)
src/components/DynamicForm/index.tsx 92.34% <100.00%> (+0.21%) ⬆️
...components/DynamicForm/renderers/textRenderers.tsx 97.05% <100.00%> (+0.18%) ⬆️
...mponents/DynamicForm/utils/getConfirmationItems.ts 95.74% <100.00%> (+0.09%) ⬆️
...ponents/DynamicForm/utils/getDynamicFieldErrors.ts 94.77% <100.00%> (+0.07%) ⬆️
... and 13 more
... and 11 files with indirect coverage changes

@WojtekBoman WojtekBoman changed the title Save Wise intake pages with UpdateWiseOnboardingAdditionalData [Wise][Release 1] Business - UI - Form Saving (Wire in the API Command) Oct 29, 2026

@grgia grgia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Context: Reviewed against https://github.com/Expensify/Expensify/issues/696839

Summary

  • Blocks: 1
  • NAB: 1

The shape, keys, file split and resume all match the server. One thing keeps the SSN from ever being saved.

See inline comments for details.

Comment thread src/libs/actions/WiseOnboarding.ts Outdated
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
value: {isSavingWiseOnboardingPage: true, errors: null},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB

an admin whose representative page failed to save, then edits the business page and taps Next, gets through Confirm with the representative details never saved to Wise.

is it intended that errors: null in getOnyxData clears the error from another page's failed save? the Confirm gate only reads saveError, so the failed page is never resent.

Comment thread src/libs/actions/WiseOnboarding.ts Resolved

@mikolajpochec mikolajpochec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Left a few comments

Comment thread src/libs/actions/WiseOnboarding.ts Resolved
Comment thread src/libs/actions/WiseOnboarding.ts Resolved
@github-actions

Copy link
Copy Markdown
Contributor

🚧 joekaufmanexpensify has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

BUG: adding an additional document from the business representative confirmation page fails

I'm able to successfully upload the document on the business representative page. However, when I click Save to go back to the confirmation page, the number of files changes from two back to one. When I reopen the business representative page, the second file is no longer shown.

2026-10-29_11-24-15.mp4

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

BUG: generic error when trying to edit SSN offline

I'm thinking this might be different than standard pattern A offline handling, given SSN is sensitive data. Is that right?

2026-10-29_11-31-26.mp4

@dariusz-biela dariusz-biela left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments on code quality.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚧 joekaufmanexpensify has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

Both of the issues I previously reported are working on the latest build. One very minor issue I notice: when we're showing the masked SSN, there are only 8 asterisks when the SSN is a 9-digit number. Can we show 9 asterisks here? Otherwise, I feel like this might be confusing to someone who sees this.

Also, I'm not sure having a space in the middle of the number makes sense. SSN is not formatted that way typically.

image

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

Otherwise, this looks good to me 👍

@grgia

grgia commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Sorry this was my bad @WojtekBoman i misguided you 🙃

•••-••-••••

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

Nice. Yep, that updated mask is what I would expect.

@WojtekBoman

Copy link
Copy Markdown
Contributor Author

Nice. Yep, that updated mask is what I would expect.

I've already changed that! Now it should display the correct mask :)

@joekaufmanexpensify joekaufmanexpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for me 👍

@grgia

grgia commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

one more merge main?

# Conflicts:
#	src/components/DynamicForm/utils/getConfirmationItems.ts
@grgia

grgia commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • 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 verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

@grgia
grgia merged commit 0dd2fa7 into Expensify:main Nov 2, 2026
37 of 39 checks passed
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@OSBotify OSBotify mentioned this pull request Nov 3, 2026
99 tasks done
@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/grgia in version: 9.5.31-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed — these form-saving changes remain behind the Wise reimbursements beta and do not make existing help articles incorrect.

@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/grgia in version: 9.5.31-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@albertodege

Copy link
Copy Markdown

Deploy Blocker #105851 was identified to be related to this PR.

@OSBotify

OSBotify commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants