You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bank Account - Date picker stays open when navigating with forward arrow #90109
Version Number: 9.3.69-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#86645 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11 / Chrome App Component: User Settings
Action Performed:
Go to staging.expensify.com
Go to Wallet
Click Add bank account
On the Bank Purpose Page choose Make Payments
Choose United States
Go through the flow until confirmation page
Click browser back button to go back to date of birth step
Click browser forward button a few times
Expected Result:
The date picker closes as the next step does not require it.
Actual Result:
The date picker is stuck on screen until clicked.
Same behavior for the date picker in company incorporation date.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #86645 - "[CBN] USD flow refactor" by @koko57 (High confidence) Related Issues: N/A
Recommendation: REVERT
PR #86645 introduced a URL-based sub-page navigation system for the USD bank account setup flow. The refactor changed sub-step navigation to update URL params (subPage) on a single screen rather than pushing/popping full navigation stack entries. This means the DatePicker component's local isModalVisible React state is not reset when a user navigates backward/forward using browser history buttons, causing the calendar picker to remain visible on screen after the date-of-birth or company incorporation date sub-step is no longer the active sub-step.
Assigned: @koko57 (PR author), @dukenv0307@arosiclair (approving reviewers) Labels: No label changes made - DeployBlockerCash is correct; this is a staging-only regression introduced by an App PR.
Detailed Analysis
Evidence
The issue body explicitly links PR [CBN] USD flow refactor #86645 as the associated PR (https://github.com/Expensify/App/pull/86645)
The bug is marked "Reproducible in staging: Yes" and "Reproducible in production: N/A - new feature, doesn't exist in prod", confirming the regression is isolated to this staging PR
The affected component is "User Settings > Wallet > Add bank account > date of birth step", which exactly matches the files modified in PR [CBN] USD flow refactor #86645
Verification
PR [CBN] USD flow refactor #86645 modifies src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx and src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationDateBusiness.tsx - these are precisely the files containing the date picker steps reported in the bug
The PR introduced useSubPage hook-based URL param navigation (navigation.setParams({subPage: ...})) and USDVerifiedBankAccountFlowPage.tsx as a new top-level page wrapper
When the browser back/forward buttons change the subPage URL parameter, useSubPage renders a different sub-step component, but because the parent InteractiveStepWrapper is not unmounted (only the rendered child sub-step changes via a conditional render), the DatePicker's local isModalVisible: true state can persist across sub-step transitions
src/components/DatePicker/index.tsx manages visibility entirely in local React state (useState(false)) with no effect that resets it on URL/route changes
Root Cause
The PR refactored the bank account sub-step navigation from full navigation stack push/pop to URL param updates on a single screen (useSubPage calls navigation.setParams). When the DatePicker is open and the user clicks browser back or forward, the active sub-step switches (via URL param), but the DatePicker component is rendered inside the same React tree without unmounting. Its isModalVisible state (a local useState hook) retains its true value because there is no useEffect listening to route param changes that would call setIsModalVisible(false). The fix or revert should either unmount the date picker on sub-step transition or add a navigation listener to close the date picker when the sub-page route param changes.
What changes do you think we should make in order to solve the problem?
Change the default value of shouldCloseWhenBrowserNavigationChanged in DatePickerModal.tsx:35 from false to true. This enables the existing popstate listener in Popover to close the date picker when browser back/forward navigation occurs.
What alternative solutions did you explore? (Optional)
An alternative would be to pass shouldCloseWhenBrowserNavigationChanged={true} explicitly from DatePicker/index.tsx to DatePickerModal instead of changing the default. However, changing the default is more correct since date pickers should generally close on navigation, and it prevents every caller from needing to remember to pass the prop.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon May 9, 2026
@arosiclair recently merged #86645, but they are OOO right now, so I'll auto-assign someone else.
melvin-bot commentedon May 9, 2026
Triggered auto assignment to @grgia (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon May 9, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 9, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon May 9, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #86645 - "[CBN] USD flow refactor" by @koko57 (High confidence)
Related Issues: N/A
Recommendation: REVERT
PR #86645 introduced a URL-based sub-page navigation system for the USD bank account setup flow. The refactor changed sub-step navigation to update URL params (
subPage) on a single screen rather than pushing/popping full navigation stack entries. This means theDatePickercomponent's localisModalVisibleReact state is not reset when a user navigates backward/forward using browser history buttons, causing the calendar picker to remain visible on screen after the date-of-birth or company incorporation date sub-step is no longer the active sub-step.Assigned: @koko57 (PR author), @dukenv0307 @arosiclair (approving reviewers)
Labels: No label changes made -
DeployBlockerCashis correct; this is a staging-only regression introduced by an App PR.Detailed Analysis
Evidence
https://github.com/Expensify/App/pull/86645)StagingDeployCashchecklist (Deploy Checklist: New Expensify 2026-05-08 #90006) and is not yet checked off (still unresolved)Verification
src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsxandsrc/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/IncorporationDateBusiness.tsx- these are precisely the files containing the date picker steps reported in the buguseSubPagehook-based URL param navigation (navigation.setParams({subPage: ...})) andUSDVerifiedBankAccountFlowPage.tsxas a new top-level page wrappersubPageURL parameter,useSubPagerenders a different sub-step component, but because the parentInteractiveStepWrapperis not unmounted (only the rendered child sub-step changes via a conditional render), theDatePicker's localisModalVisible: truestate can persist across sub-step transitionssrc/components/DatePicker/index.tsxmanages visibility entirely in local React state (useState(false)) with no effect that resets it on URL/route changesRoot Cause
The PR refactored the bank account sub-step navigation from full navigation stack push/pop to URL param updates on a single screen (
useSubPagecallsnavigation.setParams). When theDatePickeris open and the user clicks browser back or forward, the active sub-step switches (via URL param), but theDatePickercomponent is rendered inside the same React tree without unmounting. ItsisModalVisiblestate (a localuseStatehook) retains itstruevalue because there is nouseEffectlistening to route param changes that would callsetIsModalVisible(false). The fix or revert should either unmount the date picker on sub-step transition or add a navigation listener to close the date picker when the sub-page route param changes.MelvinBot commentedon May 9, 2026
Proposal
What is the root cause of that problem?
DatePickerModaldefaultsshouldCloseWhenBrowserNavigationChangedtofalse. ThePopovercomponent has apopstateevent listener that closes popovers on browser back/forward navigation, but it short-circuits whenshouldCloseWhenBrowserNavigationChangedisfalse. SinceDatePickernever overrides this default, the date picker popover is never dismissed by browser navigation events.What changes do you think we should make in order to solve the problem?
Change the default value of
shouldCloseWhenBrowserNavigationChangedinDatePickerModal.tsx:35fromfalsetotrue. This enables the existingpopstatelistener inPopoverto close the date picker when browser back/forward navigation occurs.What alternative solutions did you explore? (Optional)
An alternative would be to pass
shouldCloseWhenBrowserNavigationChanged={true}explicitly fromDatePicker/index.tsxtoDatePickerModalinstead of changing the default. However, changing the default is more correct since date pickers should generally close on navigation, and it prevents every caller from needing to remember to pass the prop.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.lanitochka17 commentedon May 9, 2026
This issue is not repro on all PRs in the current deployment checklist. Could you please double check if it's not introduced by #86645?
grgia commentedon May 11, 2026
This is a blocker.
@MelvinBot please implement the fix
MelvinBot commentedon May 11, 2026
🤖 Draft PR created: #90168
Please mark it as "Ready for review" when it is ready for review.
arosiclair commentedon May 11, 2026
Revert was merged and CP'd. Asking for retest here.
m-natarajan commentedon May 11, 2026
Chrome / v9.3.69-15
RHP closes when click browser back arrow
REC-20260511204527.mp4
melvin-bot commentedon May 30, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.