Repository navigation
refactor: narrow address mapping and bank validation types - #103220
Conversation
Seatbelt-Operation: d1e2b9ce-2d76-456f-81bf-36f7da7315d2
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Seatbelt-Operation: main-20261030-103220-sign-fe7df993-be69-43cf-8026-f1b0c93a7bd1
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
dylanexpensify
left a comment
There was a problem hiding this comment.
refactor, product input not required
|
@situchan Could you please take a look at this when you get a chance, Thanks! |
Seatbelt-Operation: merge-main-20261106-103220-sign-0e12d4d6-3b46-4e7b-aa35-2a419007f9c3
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-11-09.at.11.47.08.AM.mov |
|
🚧 blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/blimpich in version: 9.5.35-0 🚀
|
|
No FullStory changes needed — this PR only refactors address mapping, state/province enumeration, and bank-validation types with regression tests, without adding user-facing functionality or changing tracking requirements. |
|
No help site update needed — this PR refactors types and adds regression tests without changing user-facing workflows or making any existing article sentence incorrect. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.35-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Replace unsafe assertions in state and province enumeration, address-field mapping, and microdeposit field validation with typed values. The existing option order, country changes, address mapping, and bank-validation payload order are intended to remain the same.
Changed files
src/components/AddressSearch/index.tsxsrc/pages/ReimbursementAccount/AddressFormFields.tsxsrc/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/IncorporationLocation.tsxsrc/pages/ReimbursementAccount/USD/ConnectBankAccount/components/BankAccountValidationForm.tsxsrc/pages/settings/Profile/PersonalDetails/DynamicStateSelectionPage.tsxtests/ui/AddressFormFieldsTest.tsxtests/ui/AddressSearchTest.tsxtests/ui/BankAccountValidationFormTest.tsxtests/ui/DynamicStateSelectionPageTest.tsxtests/ui/IncorporationLocationTest.tsxFixed Issues
$ #94739
PROPOSAL: #94739 (comment)
Tests
CI passed typecheck, ESLint, Oxfmt, spellcheck, React Compiler checks and Jest on this head.
Run the case on Android native, Android Chrome, iOS native, iOS Safari, and macOS Chrome/Safari where the flow is supported. Use a signed-in account and a build containing this candidate.
Profile state selection
Start at Settings → Profile → Personal details → Address with United States selected.
NY. New York appears once with the correct name.No additional manual case covers the other flows because their behavior is unchanged.
AddressFormFieldsTestandIncorporationLocationTestcover the state and province options and country changes,AddressSearchTestcovers the field mapping, andBankAccountValidationFormTestcovers amount validation and the submit payload. The bank test uses a mocked bank action and does not establish bank-service acceptance.Offline tests
N/A for an additional offline case: the diff changes local enumeration, lookup, and validation iteration without changing a network, persistence, retry, or reconnect path.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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
Screenshots/Videos (4)
Profile state selection desktop
PR-103220-C01-D.mp4
Profile state selection phone-sized
PR-103220-C01-M.mp4
Live address suggestion desktop (extra evidence, no matching case)
PR-103220-C02-D.mp4
Live address suggestion phone-sized (extra evidence, no matching case)
PR-103220-C02-M.mp4