Skip to content

Fix: physical-address error persists after selecting a valid address#94528

Merged
justinpersaud merged 7 commits into
mainfrom
claude-fixPhysicalAddressErrorPersists
Jul 20, 2026
Merged

Fix: physical-address error persists after selecting a valid address#94528
justinpersaud merged 7 commits into
mainfrom
claude-fixPhysicalAddressErrorPersists

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

On the bank account address steps, typing po box 123 into the Street field and then selecting a valid (non-PO-box)
address from the suggestion list left the A physical address is required. PO boxes and mail drops are not accepted. error showing, even though the field now held a valid address.

Root cause: When a suggestion is tapped, two things happen almost at once:

  1. The selection fills the Street field with the clean address and re-validates → the error clears correctly.
  2. The Street input blurs. FormProvider's onBlur schedules a delayed validation (VALIDATE_DELAY = 200ms) that called onValidate(inputValues, …) using the inputValues captured in the closure at blur time — which still held "po box 123".

Because that timeout fires ~200ms after the selection already cleared the error — and it also marks the field touched — it re-ran validation against the stale "po box 123" value and re-applied the error. The error therefore briefly cleared and then came back.

This lives in shared form machinery (FormProvider), not in the address validation added in #92289 — the PO box check already existed before that PR (under the older "Please enter a valid street address" copy), so the same persistence affects the emoji "valid street address" error too.

Fix: Make the delayed blur validation read the latest committed form values instead of the closure-captured ones, using the same functional-state-read pattern already used by onInputChange in this file. Now if a suggestion is selected after the blur is scheduled, the validation runs against the selected (valid) value and the error stays cleared.

Fixed Issues

$ #94519
PROPOSAL: #94519 (comment)

Tests

  1. Go to Workspace settings > Workflows > Add bank account > Connect manually.
  2. Enter the bank account numbers, name, date of birth and SSN, then Continue.
  3. On the Street address field, type po box 123 and wait for the physical-address error to appear.
  4. Select any valid (non-PO-box) address from the suggestion list.
  5. Verify the A physical address is required… error disappears and does not reappear.
  6. Repeat with an emoji-only street value to confirm the "Please enter a valid street address" error also clears on selecting a valid address.
  • Verify that no errors appear in the JS console

Offline tests

Same as Tests.

QA Steps

Same as Tests.

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • 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 followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and 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 followed the guidelines as stated in the Review Guidelines
  • 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 a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • 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.
  • 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.
  • I verified that similar component doesn't exist in the codebase
  • I verified that all props are defined accurately and each prop has a /** comment above it */
  • I verified that each file is named correctly
  • I verified that each component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
  • I verified that the only data being stored in component state is data necessary for rendering and nothing else
  • In component if we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
  • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
  • I verified that component internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
  • I verified that all JSX used for rendering exists in the render method
  • I verified that each 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

Screenshots/Videos

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

…oes not reappear

Co-authored-by: Justin Persaud <justinpersaud@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team June 25, 2026 03:05
@melvin-bot

melvin-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers!

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/components/Form/FormProvider.tsx 65.66% <25.00%> (+1.87%) ⬆️
... and 6 files with indirect coverage changes

@justinpersaud
justinpersaud marked this pull request as ready for review June 25, 2026 03:13
@justinpersaud
justinpersaud requested a review from a team as a code owner June 25, 2026 03:13
@melvin-bot
melvin-bot Bot requested review from heyjennahay, justinpersaud and thelullabyy and removed request for a team June 25, 2026 03:13
@melvin-bot

melvin-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

@thelullabyy @justinpersaud One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed the request for review from a team June 25, 2026 03:13
@justinpersaud
justinpersaud removed the request for review from thelullabyy June 25, 2026 03:14
@justinpersaud

Copy link
Copy Markdown
Contributor

@marufsharifi this is a regression from #92289

I had Melvin fix it here if you can help test

cc @samranahm

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@marufsharifi

marufsharifi commented Jun 25, 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 proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and 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 that this PR follows the guidelines as stated in the Review Guidelines
  • 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 and each prop has a /** comment above it */
    • The file is named correctly
    • 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
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • 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 any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • 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.
  • 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
Screen.Recording.2026-06-27.at.1.32.12.AM.mov
Android: mWeb Chrome
Screen.Recording.2026-06-27.at.1.41.51.AM.mov
iOS: HybridApp
Screen.Recording.2026-07-17.at.11.06.35.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-06-27.at.1.57.03.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-06-27.at.12.27.25.AM.mov

@justinpersaud

Copy link
Copy Markdown
Contributor

@mitarachim can you please retest the regression reported in #94519 over here using https://94528.pr-testing.expensify.com/

It works for me

@justinpersaud

Copy link
Copy Markdown
Contributor

bump @mitarachim @marufsharifi

@marufsharifi

Copy link
Copy Markdown
Contributor

@justinpersaud, should this PR cover this?

RF-5.mp4

@samranahm

Copy link
Copy Markdown
Contributor

@marufsharifi I can still reproduce the reported bug with these PR changes.

Kapture.2026-06-30.at.05.58.32.mp4

@marufsharifi

Copy link
Copy Markdown
Contributor

The issue doesn't seem to be fixed. I will check this tomorrow.

@marufsharifi

Copy link
Copy Markdown
Contributor

@MelvinBot, the original issue is still reproducible. Could you please find the root cause?

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Issue Analysis

Root cause: This fix can't reliably work because it's racing an asynchronous network call. Selecting a Google Places suggestion doesn't write the clean street synchronously — with fetchDetails enabled, tapping a suggestion fires an XHR for place details, and the clean address is only written (via saveLocationDetailsonInputChange) inside that request's success callback. Meanwhile FormProvider's blur validation is a fixed 200 ms setTimeout (VALIDATE_DELAY = 200). When the details fetch takes longer than 200 ms, the blur validation fires before the selection has committed — so "the latest committed value" the fix reads (FormProvider.tsx:471-474) is genuinely still "po box 123", and the physicalAddressRequired error gets re-applied on top of the just-selected valid address.

This is why it reproduces intermittently — justinpersaud sees it work (fast/cached fetch < 200 ms) while samranahm and marufsharifi still reproduce it (slower fetch > 200 ms). A pure logic bug would fail for everyone; a network-timing race fails for some. This also matches samranahm's note that it's not a #92289 regression — the PO-box check and this blur/select race predate that PR.

Recommended fix: Stop relying on the blur timer reading the "latest" value (it can't, because the selection commit is async). Instead make the selection authoritative:

  1. Cancel the pending blur validation when a suggestion is selected. In AddressSearch onPress, clear the scheduled blur-validation timeout for the street input before/after saveLocationDetails runs, so the stale 200 ms re-validation never fires. This requires exposing a "cancel pending blur validation" hook from FormProvider/registerInput.
  2. And/or re-validate after the async commit. saveLocationDetails already calls onInputChange per field (AddressSearch/index.tsx:281-288); ensure that path is the last writer so validation runs against the selected value once details resolve.

Option 1 is the most targeted — it removes the racing re-validation entirely rather than trying to out-time the network.

Evidence & timeline

The async gate (library): react-native-google-places-autocomplete's _onPress — when fetchDetails === true (enabled here) — issues an XMLHttpRequest and only calls props.onPress(rowData, details) inside request.onreadystatechange on readyState === 4 && status === 200. So the App's onPresssaveLocationDetailsonInputChange(cleanStreet) (the only thing that clears the error) runs after a network round-trip, not on tap.

Timeline (slow fetch > 200 ms):

  1. Type po box 123 → field touched + invalid → physicalAddressRequired shown.
  2. Tap a valid suggestion → input blurs → FormProvider schedules blur validation at t = 200 ms; XHR for place details starts.
  3. t = 200 ms: blur validation fires. Even with this PR's "read latest values" change, inputValues.street is still "po box 123" because the selection hasn't returned yet → error re-applied.
  4. XHR resolves later → clean street written. Depending on ordering (and, because shouldSaveDraft is on here, an async Onyx draft merge at FormProvider.tsx:154-157 that can re-feed the typed value), the error is left showing.

Fast fetch (< 200 ms): clean street commits first, blur at 200 ms reads it → stays cleared. This is the "works for me" path — and exactly what the current fix improves, which is why it looks fixed in some environments.

Confirmed not the cause: the inputID key mapping is correct (typed and selected values share inputKeys.street), shouldValidateOnChange defaults true, and the displayed error is the validation-driven errors[street], not an out-of-band errorText prop — so a genuine value change would clear it. The blocker is purely that the blur re-validation wins the race against the async selection commit.

Confidence: Medium — the async-fetch-vs-fixed-200 ms-timer race is verified from code and cleanly explains the intermittent "works for me / still repros" split. The exact tail behavior (whether the late commit or a draft re-merge leaves the error showing) is timing-dependent; the recommended fix (cancel the pending blur validation on selection) is robust regardless of which tail dominates. Worth cross-checking against the root cause samranahm mentioned finding.


Next Steps: Reply with @MelvinBot implement this to draft a fix, or @MelvinBot <feedback> to refine this analysis.

@marufsharifi

Copy link
Copy Markdown
Contributor

@MelvinBot, based on your root cause, what is the best appraoch to fix this, please don't implement, just explain your approach to me

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Recommended approach

Don't try to out-time the network — stop the blur timer from validating the address input at all when a suggestion is being selected, and let the selection be the single source of truth.

The core constraint from the root cause is that VALIDATE_DELAY is a fixed 200 ms while the clean address commits only after a variable-latency Google details XHR (fetchDetailsonPress/saveLocationDetailsonInputChange). No delay value or "read latest value" tweak can order those reliably — that's why the current fix works only when the fetch beats 200 ms. So the fix has to remove the race, not re-tune it.

The blur re-validation is redundant here: selecting a suggestion already runs onValidate on change, which is the correct, authoritative validation of the selected value. The blur timer only ever competes with it and re-applies a stale error. Suppress it for this case.

Primary — suppress the blur validation when focus moves into the suggestion list. FormProvider's blur handler already skips the delayed validation for specific relatedTarget IDs (overlay/back buttons, lines 450–463). Extend that same mechanism so a blur whose focus is moving into the address autocomplete list is treated the same way — skip the setTouchedInput + onValidate timer. The selection flow then owns validation end-to-end. This is synchronous (decided inside the blur event, well before the 200 ms fires) so it works regardless of how slow the fetch is.

Fallback (if relatedTarget isn't reliable on a target platform) — make selection cancel the pending timer. Store the blur-validation setTimeout handle in a ref keyed by inputID, expose a "cancel pending validation" hook from registerInput/context, and have AddressSearch call it the moment a row press starts (synchronously, not in the post-fetch onPress). The catch: AddressSearch's onPress fires only after the XHR, which can be past the 200 ms — so canceling there is too late. This is why the relatedTarget approach is preferred: it fires at blur time. If you go this route, the cancel signal must come from the synchronous press, not onPress.

Complementary — guarantee the async commit is the last validation. saveLocationDetails's per-field onInputChange already re-validates via shouldValidateOnChange; just confirm that path isn't short-circuited (e.g. the address_components-missing early return at AddressSearch/index.tsx:161-174 only calls onPress, not onInputChange) so the selected value always drives a final validation.

I'd implement the primary alone first — it's the smallest change that removes the race — and keep the current PR's "validate against latest committed values" edit too, since it's still correct for the fast-fetch ordering.

Testing note: reproduce the slow path deterministically by throttling the network (DevTools → Slow 3G, or add latency to the Proxy_GooglePlaces request) so the details fetch exceeds 200 ms — that's the environment where samranahm/marufsharifi reproduce and justinpersaud doesn't. Add a unit test covering "blur schedules validation, then a valid selection commits after the delay → error stays cleared."


Next Steps: Reply with @MelvinBot implement this to draft the fix, or @MelvinBot <feedback> to refine the approach.

@marufsharifi

Copy link
Copy Markdown
Contributor

@MelvinBot, could you validate my RCA for this issue

Root Cause
onValidate in FormProvider.tsx captures errors in a useCallback closure, so it compares against a stale snapshot instead of the latest state.

On the first interaction:

The form starts with errors = {}.
Entering a PO Box schedules setErrors({ requestorAddressStreet: "error" }).
Before React re-renders, selecting a valid address triggers onBlur.
onValidate still sees the stale errors = {}.
Since touchedInputErrors is also {}, deepEqual returns true, setErrors is skipped, and the PO Box error is never cleared.

This only happens the first time because later renders capture the updated error state, causing deepEqual to detect the change and clear the error.

@marufsharifi

Copy link
Copy Markdown
Contributor

@justinpersaud, the reviewer checklist was already done by me. I used Melvin to complete the PR author checklist.

…ressErrorPersists

Co-authored-by: Maruf Sharifi <marufsharifi@users.noreply.github.com>

# Conflicts:
#	src/components/Form/FormProvider.tsx
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Merged latest main into this branch and pushed (58c9141).

There was one merge conflict, in src/components/Form/FormProvider.tsx:264 — the onValidate useCallback dependency array:

  • This branch removed errors from the deps (the whole point of this PR — it switched to the functional setErrors((prevErrors) => …) form so it no longer reads errors from the closure).
  • main independently added errors, hasServerError, and hasServerErrorFields to the deps.

I resolved it to match exactly the reactive values the merged callback body references:

[shouldTrimValues, formID, validate, translate, allowHTML, shouldUseStrictHtmlTagValidation, hasServerError, hasServerErrorFields]

i.e. main's list minus errors — keeping the new hasServerError/hasServerErrorFields (now used at lines 202 & 205) while preserving this PR's intent of not depending on errors.

npm run lint-changed passed (which enforces react-hooks/exhaustive-deps). Please re-run your test steps to confirm nothing regressed after the merge.

@marufsharifi marufsharifi 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.

LGTM

@marufsharifi

Copy link
Copy Markdown
Contributor

@justinpersaud, it's done from my side, all yours. Thanks.

@justinpersaud

Copy link
Copy Markdown
Contributor

Going to need a new reviewer on this one

@justinpersaud
justinpersaud requested a review from a team July 17, 2026 16:45
@melvin-bot
melvin-bot Bot requested a review from marufsharifi July 17, 2026 16:45
@melvin-bot

melvin-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

@marufsharifi Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed the request for review from a team July 17, 2026 16:45
@justinpersaud
justinpersaud requested review from a team and removed request for justinpersaud July 17, 2026 16:45
@melvin-bot
melvin-bot Bot requested a review from justinpersaud July 17, 2026 16:46
@melvin-bot

melvin-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

@justinpersaud Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed the request for review from a team July 17, 2026 16:46
@samranahm

Copy link
Copy Markdown
Contributor

@marufsharifi We're still getting the same error here.

Kapture.2026-07-18.at.00.11.24.mp4

Should I post my root cause analysis and core solution to let the melvin implement that or I can open a PR real quick.

cc: @justinpersaud

@marufsharifi

Copy link
Copy Markdown
Contributor

@marufsharifi We're still getting the same error here.

Kapture.2026-07-18.at.00.11.24.mp4
Should I post my root cause analysis and core solution to let the melvin implement that or I can open a PR real quick.

cc: @justinpersaud

@samranahm, this is expected, and the error disappears after selection.

@marufsharifi

Copy link
Copy Markdown
Contributor

@justinpersaud, could you please take a look at this when you get a chance. thanks.

@justinpersaud

Copy link
Copy Markdown
Contributor

I tested it out and it works for me but we need another reviewer here

@justinpersaud
justinpersaud merged commit 04ba761 into main Jul 20, 2026
44 checks passed
@justinpersaud
justinpersaud deleted the claude-fixPhysicalAddressErrorPersists branch July 20, 2026 19:21
@OSBotify

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

Copy link
Copy Markdown
Contributor

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/justinpersaud in version: 9.4.41-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Docs review: no help site changes required.

I reviewed the changes in this PR against the articles under docs/articles.

What this PR changes: a bug fix in shared form machinery (src/components/Form/FormProvider.tsx). The delayed blur validation now reads the latest committed form values, so the "A physical address is required. PO boxes and mail drops are not accepted." error no longer lingers after a valid address is selected.

Why no docs update is needed:

  • No user-facing feature, flow, tab, setting, or button label was added or renamed — this is an internal correctness fix to how a validation error is cleared.
  • The documented rule is unchanged: PO boxes and mail drops are still not accepted, and a physical address is still required. The existing help article already states this correctly in Connect-a-Business-Bank-Account.md (e.g. "Must be a physical US address. PO boxes and mail drops are not accepted, so you'll need to enter a physical address before you can continue.").

Since the article already reflects the current, correct behavior, there's nothing to add or amend. No draft docs PR was created.

@justinpersaud, please confirm you agree no help site changes are required here. If you'd like me to document anything additional (e.g. add a note to the address step), reply with @MelvinBot and I'll open a draft PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.4.41-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.

6 participants