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
Chat-Compose box is not focused when starting a brand new chat #81609
Version Number: 9.3.15-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:https://test-management.browserstack.com/projects/2219752/folder/13176933/test-cases/41237724 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: MacBook Air 15.7.3 Chrome App Component: Chat Report View
Action Performed:
Sign in to ND
Click FAB - Start chat - enter email address of a user who you never interacted with
When navigated to a new chat, observe the compose box
Expected Result:
Compose box is focused in a new chat
Actual Result:
Compose box is not focused when creating a new chat
👋 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: #80478 - "fix: update RNKC and RNPV to latest versions" by @kirillzyusko (High confidence) Related Issues: None directly linked
Recommendation: REVERT
The causing PR updated react-native-keyboard-controller from 1.18.5 to 1.20.6 and react-native-pager-view from 7.0.2 to 8.0.0. These are significant version jumps in libraries that directly control keyboard behavior and focus management. The timing matches perfectly - PR merged Feb 3, 2026, and the bug appeared in staging (9.3.15-0) but is NOT reproducible in production, confirming the issue was introduced in this deploy cycle.
The keyboard controller update changed the underlying focus behavior that this logic depends on
Root Cause
The react-native-keyboard-controller library (updated from 1.18.5 to 1.20.6 - a ~12 minor version jump) likely changed how it handles automatic focus when navigating to new screens. This broke the expected auto-focus behavior when creating a brand new chat with a user you have never interacted with.
The MacOS Chrome/Safari specificity suggests a web platform regression in the new keyboard controller version.
Classification: Frontend bug Causing PR: #80606 - "Fix navigation race condition when closing Wide RHP after the deletion of last transaction" by @collectioneur (High confidence) Related Issues: None directly linked
Recommendation: REVERT
The causing PR modified the web Modal component to delay when onModalHide() is called - it now waits for the popstate event after window.history.back() instead of calling it immediately. This timing change creates a race condition where the composer tries to auto-focus before the modal hide callback completes, causing areAllModalsHidden() to return false and preventing auto-focus.
The issue is staging-only (not in production), confirmed by the version number 9.3.15-0, and specifically affects MacOS Chrome/Safari (web platforms), which aligns perfectly with PR #80606 modifying the web-specific Modal component (src/components/Modal/index.tsx).
Labels: Keeping DeployBlockerCash (affects App frontend), will remove DeployBlocker if present (not a backend issue)
const hideModal = () => {
- onModalHide();
if ((window.history.state as WindowState)?.shouldGoBack && shouldHandleNavigationBack) {
+ // Wait for history.back() to complete before calling onModalHide to prevent navigation race conditions+ window.addEventListener('popstate', onModalHide, {once: true});
window.history.back();
+ } else {+ onModalHide();
}
};
Root Cause
When creating a new chat on web, the user flow involves:
Click FAB > Start chat (opens RHP/modal interface)
Enter email and navigate to the new chat
Modal/RHP begins to close, triggering hideModal()
Navigation to new chat report happens
Composer mounts and checks shouldAutoFocus
Before PR #80606: onModalHide() was called immediately, so by the time the composer checked areAllModalsHidden(), it returned true, allowing auto-focus.
After PR #80606: onModalHide() is deferred until after the popstate event, creating a timing window where the composer checks areAllModalsHidden() while the modal is still registered in the closeModals array, causing it to return false and preventing auto-focus.
The PR intended to fix a race condition for RHP closing after transaction deletion, but inadvertently created a new race condition affecting composer auto-focus when navigating to new chats.
Activity
melvin-bot commentedon Feb 5, 2026
Triggered auto assignment to @greg-schroeder (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Feb 5, 2026
Triggered auto assignment to @mjasikowski (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Feb 5, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Feb 5, 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 Feb 5, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #80478 - "fix: update RNKC and RNPV to latest versions" by @kirillzyusko (High confidence)
Related Issues: None directly linked
Recommendation: REVERT
The causing PR updated
react-native-keyboard-controllerfrom 1.18.5 to 1.20.6 andreact-native-pager-viewfrom 7.0.2 to 8.0.0. These are significant version jumps in libraries that directly control keyboard behavior and focus management. The timing matches perfectly - PR merged Feb 3, 2026, and the bug appeared in staging (9.3.15-0) but is NOT reproducible in production, confirming the issue was introduced in this deploy cycle.Labels: Keeping
DeployBlockerCash(affects App), removingDeployBlocker(not a backend issue)Detailed Analysis
Evidence
Verification
ReportActionCompose.tsxwhich uses keyboard controller featuresRoot Cause
The react-native-keyboard-controller library (updated from 1.18.5 to 1.20.6 - a ~12 minor version jump) likely changed how it handles automatic focus when navigating to new screens. This broke the expected auto-focus behavior when creating a brand new chat with a user you have never interacted with.
The MacOS Chrome/Safari specificity suggests a web platform regression in the new keyboard controller version.
2 remaining items
OSBotify commentedon Feb 5, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #80606 - "Fix navigation race condition when closing Wide RHP after the deletion of last transaction" by @collectioneur (High confidence)
Related Issues: None directly linked
Recommendation: REVERT
The causing PR modified the web Modal component to delay when
onModalHide()is called - it now waits for thepopstateevent afterwindow.history.back()instead of calling it immediately. This timing change creates a race condition where the composer tries to auto-focus before the modal hide callback completes, causingareAllModalsHidden()to return false and preventing auto-focus.The issue is staging-only (not in production), confirmed by the version number 9.3.15-0, and specifically affects MacOS Chrome/Safari (web platforms), which aligns perfectly with PR #80606 modifying the web-specific Modal component (
src/components/Modal/index.tsx).Labels: Keeping
DeployBlockerCash(affects App frontend), will removeDeployBlockerif present (not a backend issue)Detailed Analysis
Evidence
Verification
The auto-focus logic in
ComposerWithSuggestions.tsxline 277-278:The
areAllModalsHidden()function insrc/libs/actions/Modal.tsline 102-104:PR #80606 changed
src/components/Modal/index.tsx(web only):const hideModal = () => { - onModalHide(); if ((window.history.state as WindowState)?.shouldGoBack && shouldHandleNavigationBack) { + // Wait for history.back() to complete before calling onModalHide to prevent navigation race conditions + window.addEventListener('popstate', onModalHide, {once: true}); window.history.back(); + } else { + onModalHide(); } };Root Cause
When creating a new chat on web, the user flow involves:
hideModal()shouldAutoFocusBefore PR #80606:
onModalHide()was called immediately, so by the time the composer checkedareAllModalsHidden(), it returnedtrue, allowing auto-focus.After PR #80606:
onModalHide()is deferred until after thepopstateevent, creating a timing window where the composer checksareAllModalsHidden()while the modal is still registered in thecloseModalsarray, causing it to returnfalseand preventing auto-focus.The PR intended to fix a race condition for RHP closing after transaction deletion, but inadvertently created a new race condition affecting composer auto-focus when navigating to new chats.
mountiny commentedon Feb 6, 2026
Testing this revert #81617
mountiny commentedon Feb 6, 2026
retest request here https://expensify.slack.com/archives/C09V78U42D8/p1770337553483369
m-natarajan commentedon Feb 6, 2026
Unable to repro, Win 11/Chrome, v9.3.15-0 PR:81617
Recording.2356.mp4
mountiny commentedon Feb 6, 2026
Thanks cping the revert
mountiny commentedon Feb 6, 2026
cc @collectioneur we had to revert the pr due to this bug
Confirmed in staging this is fixed
collectioneur commentedon Feb 9, 2026
@mountiny Understood 😔. I'm investigating the root cause and will prepare a fix.