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
Error message appears on the work email screen after tapping other company card feed #86907
Version Number: 9.3.51-3 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:#84889 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: iPhone 15 iOS 26.3.1 App Component: Other
Action Performed:
Sign in to ND with a public domain email
Create two workspaces, set up company card for both (Regions bank for one, and Mock bank for the other)
Go to the workspace 1 - open Company cards - tap arrow next to the feed name
Tap the feed in the "From other workspaces" section
Verify the "Add your work email" screen is shown
Expected Result:
No errors appear on the "Add your work email screen" after tapping the feed from the other workspace
Actual Result:
Work email field is outlined in red, the error message under the field reads "This field is required". "Please fix the errors in the form before continuing" error is shown above the Save button
👋 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.
The WorkspaceCompanyCardAddWorkEmailPage (introduced in PR #84889) uses a FormProvider with a TextInput that has autoFocus. When the page mounts during the RHP navigation transition, the TextInput programmatically receives focus. During or immediately after the transition, the input loses focus (blur), which triggers the FormProvider's onBlur handler at FormProvider.tsx:454-485.
The onBlur handler:
Marks the email input as "touched" via setTouchedInput(inputID) (line 471)
Runs onValidate(inputValues, !hasServerError) (line 474), which calls the page's validate function
Since the email field is empty (the user hasn't typed anything yet), validate returns {email: 'This field is required'} (line 110-111 of AddWorkEmailPage)
Because the input is now marked as "touched", the error passes through the touchedInputs filter (line 232) and gets set to state
The FormWrapper detects non-empty errors and shows the "Please fix the errors in the form before continuing" banner (line 192)
This is a cross-platform issue because autoFocus + navigation transitions cause focus/blur cycling on all platforms — the TextInput briefly gains focus from autoFocus and then loses it due to focus management during the screen transition (e.g., FocusTrap, animation, or keyboard avoiding behavior).
What changes do you think we should make in order to solve the problem?
In WorkspaceCompanyCardAddWorkEmailPage.tsx, replace the autoFocus prop on the InputWrapper with a manual focus approach that delays focusing until after the navigation transition completes. Use the ScreenWrapper's onEntryTransitionEnd callback to focus the input ref:
Remove autoFocus from the InputWrapper
Add onEntryTransitionEnd to the ScreenWrapper that calls emailInputRef.current?.focus() after the transition
This is a common pattern used in other form pages in the App (e.g., WorkspaceNamePage, WorkspaceInviteMessagePage) to avoid the focus/blur race condition during navigation transitions.
What alternative solutions did you explore? (Optional)
Adding shouldValidateOnBlur={false} to FormProvider: This would prevent validation on blur but would also disable legitimate blur-triggered validation after the user interacts with the field.
Clearing form errors with useFocusEffect: Could call clearErrors/clearErrorFields when the screen gains focus, but this would mask the symptom rather than fix the root cause (the premature blur event).
Adding disablePressOnEnter: Would only address the Enter key propagation scenario on web, not the cross-platform autoFocus/blur issue.
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.
Can't repro, company card feed from the other workspace is not displayed in the feed, Samsung A52 / Android 14 and iPhone 13 / iOS 26.4, v9.3.51-6 PR:86921 Ad-Hoc
Activity
melvin-bot commentedon Apr 1, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #84889
melvin-bot commentedon Apr 1, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 1, 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:
MelvinBot commentedon Apr 1, 2026
Proposal
What is the root cause of that problem?
The
WorkspaceCompanyCardAddWorkEmailPage(introduced in PR #84889) uses aFormProviderwith aTextInputthat hasautoFocus. When the page mounts during the RHP navigation transition, the TextInput programmatically receives focus. During or immediately after the transition, the input loses focus (blur), which triggers theFormProvider'sonBlurhandler atFormProvider.tsx:454-485.The
onBlurhandler:setTouchedInput(inputID)(line 471)onValidate(inputValues, !hasServerError)(line 474), which calls the page'svalidatefunctionvalidatereturns{email: 'This field is required'}(line 110-111 of AddWorkEmailPage)touchedInputsfilter (line 232) and gets set to stateFormWrapperdetects non-emptyerrorsand shows the "Please fix the errors in the form before continuing" banner (line 192)This is a cross-platform issue because
autoFocus+ navigation transitions cause focus/blur cycling on all platforms — the TextInput briefly gains focus fromautoFocusand then loses it due to focus management during the screen transition (e.g., FocusTrap, animation, or keyboard avoiding behavior).What changes do you think we should make in order to solve the problem?
In
WorkspaceCompanyCardAddWorkEmailPage.tsx, replace theautoFocusprop on theInputWrapperwith a manual focus approach that delays focusing until after the navigation transition completes. Use theScreenWrapper'sonEntryTransitionEndcallback to focus the input ref:autoFocusfrom theInputWrapperonEntryTransitionEndto theScreenWrapperthat callsemailInputRef.current?.focus()after the transitionThis is a common pattern used in other form pages in the App (e.g.,
WorkspaceNamePage,WorkspaceInviteMessagePage) to avoid the focus/blur race condition during navigation transitions.What alternative solutions did you explore? (Optional)
shouldValidateOnBlur={false}toFormProvider: This would prevent validation on blur but would also disable legitimate blur-triggered validation after the user interacts with the field.useFocusEffect: Could callclearErrors/clearErrorFieldswhen the screen gains focus, but this would mask the symptom rather than fix the root cause (the premature blur event).disablePressOnEnter: Would only address the Enter key propagation scenario on web, not the cross-platform autoFocus/blur issue.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.
madmax330 commentedon Apr 1, 2026
@narefyev91 @linhvovan29546 can you look into this?
m-natarajan commentedon Apr 2, 2026
Can't repro, company card feed from the other workspace is not displayed in the feed, Samsung A52 / Android 14 and iPhone 13 / iOS 26.4, v9.3.51-6 PR:86921 Ad-Hoc
company.card.MP4
feed.mp4
melvin-bot commentedon Apr 9, 2026
@narefyev91 Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Apr 13, 2026
@narefyev91 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Apr 15, 2026
@narefyev91 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
melvin-bot commentedon Apr 17, 2026
@narefyev91 10 days overdue. I'm getting more depressed than Marvin.
linhvovan29546 commentedon Apr 20, 2026
@madmax330 Same #86916 (comment)