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
[Due for payment 2026-03-19] Expense - App crashes when deleting expense, or blank page opens #84966
Version Number: 9.3.36-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:#82510 Email or phone of affected tester (no customers):sdoisjdnosjiodisoj2@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense.
Right click on the preview > Delete.
Click Refresh.
Open the report.
Click More > Delete.
Expected Result:
In Step 4, app will not crash.
In Step 7, delete modal will open.
Actual Result:
In Step 4, app crashes when trying to delete expense from context menu.
In Step 7, blank page opens.
👋 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: #82510 - "fix: Screen Reader: Many Pages: There is no dialog role and title announced" by @TaduJR (High confidence) Related Issues: None
Recommendation: REVERT
PR #82510 should be reverted. The PR introduces accessibility improvements for screen readers by wrapping RightModalNavigator with DialogLabelProvider and modifying the Header component to register itself with this context. However, the DialogLabelProvider is only available within the RightModalNavigator, while Header components are used throughout the app in many other navigators and pages.
Labels: No label changes needed - issue is only reproducible on staging, not production, so DeployBlockerCash label is appropriate.
Created a new DialogLabelContext with DialogLabelProvider
Wrapped only the RightModalNavigator with DialogLabelProvider (lines 203-435 of RightModalNavigator.tsx)
Modified Header.tsx to ALWAYS call useDialogLabelActions() hook (line 41)
The Problem: Header components are rendered in many places throughout the app:
UpdateRequiredView (src/pages/ErrorPage/UpdateRequiredView.tsx line 30)
Various modal navigators
Full-screen navigators
Central pane screens
Context menus and popovers
When a Header is rendered OUTSIDE of the RightModalNavigator, it tries to use useDialogLabelActions() but the DialogLabelProvider context is not available. While the default context returns isInsideDialog: false (which should work), the Header component now includes:
useEffect hooks that interact with the context (lines 46-55, 57-58, 61-70 in Header.tsx)
Refs (labelIdRef, titleRef) that are managed based on context state
Focus management via useDialogTitleFocus
These additions can cause crashes or rendering issues when:
The context changes unexpectedly during navigation
Cleanup functions run during unmount in non-RHP contexts
Multiple Headers mount/unmount rapidly (as happens during delete flows)
The crash when deleting an expense from the context menu likely occurs because the delete action involves:
Opening a delete confirmation modal (ConfirmModal)
Navigating/updating UI state
Multiple Headers mounting/unmounting in quick succession
Context cleanup functions running in an unexpected order
Please re-state the problem that we are trying to solve in this issue.
The app crashes when trying to delete an expense from the context menu (right-click on expense preview > Delete), and after refreshing, clicking More > Delete on the report shows a blank page instead of a delete confirmation modal.
The Header component is used inside ConfirmContent (src/components/ConfirmContent.tsx:190), which is rendered by ConfirmModal. There are two key places where ConfirmModal is rendered outside the NavigationContainer:
PopoverReportActionContextMenu — rendered in Expensify.tsx at line 296 as a sibling to NavigationRoot, not a child of it. When the user right-clicks an expense and clicks "Delete", the delete confirmation modal shows a Header → calls useDialogTitleFocus → calls useNavigation() → throws "Couldn't find a navigation object" → app crashes.
ModalProvider — renders its modal component (e.g., ConfirmModalWrapper) as a sibling of its children in App.tsxline 132, also outside the NavigationContainer. This is the path for "More > Delete" which uses useConfirmModal, hitting the same crash.
Before PR #82510, Header never called useNavigation(), so rendering it outside the navigation tree was fine. The PR added the call unconditionally, breaking all Header instances that render outside the navigation context.
What changes do you think we should make in order to solve the problem?
In src/hooks/useDialogTitleFocus/index.ts, guard the useNavigation() call so it doesn't throw when Header is rendered outside a navigator. Two approaches:
Option A (preferred): Check the navigation context manually before using it. Replace the direct useNavigation() call with a safe wrapper that returns undefined when no navigation context is available (e.g., read NavigationContext via useContext and only proceed if it's defined). Then guard the useEffect body on navigation being defined.
Option B: Since useDialogTitleFocus already receives isInsideDialog (which is false when outside the DialogLabelProvider), early-return before the useEffect body. However, useNavigation() at line 16 is called unconditionally at the hook's top level regardless of isInsideDialog, so the hook itself needs to stop calling useNavigation() when navigation context is unavailable.
What alternative solutions did you explore? (Optional)
Moving PopoverReportActionContextMenu inside the NavigationContainer — this would be a larger structural change and might have unintended side effects on modal stacking behavior.
Wrapping useNavigation() in a try-catch — this works but is less idiomatic than checking the context directly.
Making useDialogTitleFocus a no-op when isInsideDialog is false — still requires the hook to not call useNavigation() unconditionally, since React hooks can't be called conditionally.
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.
changed the title [-]Expense - App crashes when deleting expense, or blank page opens[/-][+][Due for payment 2026-03-19] Expense - App crashes when deleting expense, or blank page opens[/+]on Mar 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.36-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@amyevans The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Activity
melvin-bot commentedon Mar 11, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82510
melvin-bot commentedon Mar 11, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 11, 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 Mar 11, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #82510 - "fix: Screen Reader: Many Pages: There is no dialog role and title announced" by @TaduJR (High confidence)
Related Issues: None
Recommendation: REVERT
PR #82510 should be reverted. The PR introduces accessibility improvements for screen readers by wrapping RightModalNavigator with DialogLabelProvider and modifying the Header component to register itself with this context. However, the DialogLabelProvider is only available within the RightModalNavigator, while Header components are used throughout the app in many other navigators and pages.
Labels: No label changes needed - issue is only reproducible on staging, not production, so DeployBlockerCash label is appropriate.
Detailed Analysis
Evidence
Root Cause
PR #82510 made the following changes:
DialogLabelContextwithDialogLabelProviderRightModalNavigatorwithDialogLabelProvider(lines 203-435 of RightModalNavigator.tsx)Header.tsxto ALWAYS calluseDialogLabelActions()hook (line 41)The Problem: Header components are rendered in many places throughout the app:
When a Header is rendered OUTSIDE of the RightModalNavigator, it tries to use
useDialogLabelActions()but the DialogLabelProvider context is not available. While the default context returnsisInsideDialog: false(which should work), the Header component now includes:useDialogTitleFocusThese additions can cause crashes or rendering issues when:
The crash when deleting an expense from the context menu likely occurs because the delete action involves:
Verification
MelvinBot commentedon Mar 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The app crashes when trying to delete an expense from the context menu (right-click on expense preview > Delete), and after refreshing, clicking More > Delete on the report shows a blank page instead of a delete confirmation modal.
What is the root cause of that problem?
PR #82510 introduced
useDialogTitleFocusinHeader.tsx(line 58), which internally callsuseNavigation()unconditionally at the top of the hook (src/hooks/useDialogTitleFocus/index.ts:16).The
Headercomponent is used insideConfirmContent(src/components/ConfirmContent.tsx:190), which is rendered byConfirmModal. There are two key places whereConfirmModalis rendered outside theNavigationContainer:PopoverReportActionContextMenu— rendered inExpensify.tsxat line 296 as a sibling toNavigationRoot, not a child of it. When the user right-clicks an expense and clicks "Delete", the delete confirmation modal shows aHeader→ callsuseDialogTitleFocus→ callsuseNavigation()→ throws"Couldn't find a navigation object"→ app crashes.ModalProvider— renders its modal component (e.g.,ConfirmModalWrapper) as a sibling of its children inApp.tsxline 132, also outside theNavigationContainer. This is the path for "More > Delete" which usesuseConfirmModal, hitting the same crash.Before PR #82510,
Headernever calleduseNavigation(), so rendering it outside the navigation tree was fine. The PR added the call unconditionally, breaking allHeaderinstances that render outside the navigation context.What changes do you think we should make in order to solve the problem?
In
src/hooks/useDialogTitleFocus/index.ts, guard theuseNavigation()call so it doesn't throw whenHeaderis rendered outside a navigator. Two approaches:Option A (preferred): Check the navigation context manually before using it. Replace the direct
useNavigation()call with a safe wrapper that returnsundefinedwhen no navigation context is available (e.g., readNavigationContextviauseContextand only proceed if it's defined). Then guard theuseEffectbody onnavigationbeing defined.Option B: Since
useDialogTitleFocusalready receivesisInsideDialog(which isfalsewhen outside theDialogLabelProvider), early-return before theuseEffectbody. However,useNavigation()at line 16 is called unconditionally at the hook's top level regardless ofisInsideDialog, so the hook itself needs to stop callinguseNavigation()when navigation context is unavailable.What alternative solutions did you explore? (Optional)
PopoverReportActionContextMenuinside theNavigationContainer— this would be a larger structural change and might have unintended side effects on modal stacking behavior.useNavigation()in a try-catch — this works but is less idiomatic than checking the context directly.useDialogTitleFocusa no-op whenisInsideDialogis false — still requires the hook to not calluseNavigation()unconditionally, since React hooks can't be called conditionally.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.melvin-bot commentedon Mar 12, 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.
7 remaining items
melvin-bot commentedon Mar 12, 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.
melvin-bot commentedon Mar 12, 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.
melvin-bot commentedon Mar 12, 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.
melvin-bot commentedon Mar 12, 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.
[-]Expense - App crashes when deleting expense, or blank page opens[/-][+][Due for payment 2026-03-19] Expense - App crashes when deleting expense, or blank page opens[/+]melvin-bot commentedon Mar 12, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.36-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-03-19. 🎊
melvin-bot commentedon Mar 12, 2026
@amyevans The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon Mar 12, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)