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
Task Report - App remains on deleted task instead of redirecting to parent chat #80725
Version Number: 9.3.10-3 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#77948 Email or phone of affected tester (no customers):applausetester+ap3@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11 App Component: Other
Action Performed:
1.Open a group chat
2.Open a task report
3.Click the report header
4.Select Details
5.Click Delete
6.Confirm deletion
Expected Result:
User is redirected back to the parent group chat after deleting the task report.
Actual Result:
User remains on the deleted task report screen after confirming deletion. The task no longer exists but the UI stays on the task view, leaving the user in an invalid report context. Other delete flows redirect correctly, making this behavior inconsistent.
Please re-state the problem that we are trying to solve in this issue.
When a user deletes a task report from the Details page (Group chat > Task > Header > Details > Delete), they remain on the deleted task report screen instead of being redirected back to the parent group chat. The task no longer exists but the UI stays on the task view, leaving the user in an invalid report context.
What is the root cause of that problem?
The root cause is that the navigateToTargetUrl function in ReportDetailsPage.tsx does not handle navigation for task report deletions.
Looking at the navigation logic in ReportDetailsPage.tsx:
The navigateToTargetUrl function only handles navigation for expense/money request deletions when requestParentReportAction is not empty:
For task reports (caseID === CASES.DEFAULT), requestParentReportAction is not relevant to tasks, so the condition fails and urlToNavigateBack remains undefined. This results in Navigation.dismissModal() being called, which doesn't properly navigate back to the parent report.
Additionally, while deleteTask in Task.ts does compute the correct URL using getNavigationUrlOnTaskDelete:
It only calls Navigation.goBack() which goes back in the navigation stack, not to the specific parent report. If the user navigated to the task Details page (Task > Header > Details), goBack() would return to the task report, not the parent group chat.
What changes do you think we should make in order to solve the problem?
Update the navigateToTargetUrl function in ReportDetailsPage.tsx to handle task report deletions by using getNavigationUrlOnTaskDelete:
+import {getNavigationUrlOnTaskDelete} from '@userActions/Task';+
const navigateToTargetUrl = useCallback(() => {
let urlToNavigateBack: string | undefined;
++ // Handle task deletion navigation+ if (caseID === CASES.DEFAULT) {+ urlToNavigateBack = getNavigationUrlOnTaskDelete(report);+ if (urlToNavigateBack) {+ navigateBackOnDeleteTransaction(urlToNavigateBack as Route);+ return;+ }+ Navigation.dismissModal();+ return;+ }+
// Only proceed with navigation logic if transaction was actually deleted
if (!isEmptyObject(requestParentReportAction)) {
// ... existing expense navigation logic ...
}
// ... rest of function
-}, [requestParentReportAction, route.params.reportID, moneyRequestReport, iouTransactionID, iouReport, chatIOUReport, isChatIOUReportArchived, isSingleTransactionView]);+}, [caseID, report, requestParentReportAction, route.params.reportID, moneyRequestReport, iouTransactionID, iouReport, chatIOUReport, isChatIOUReportArchived, isSingleTransactionView]);
Additionally, the navigation logic in deleteTask function can be simplified since navigation is now handled by navigateToTargetUrl:
- const urlToNavigateBack = getNavigationUrlOnTaskDelete(report);- if (urlToNavigateBack) {- Navigation.goBack();- return urlToNavigateBack;- }+ // Navigation is handled by the caller (ReportDetailsPage)
What alternative solutions did you explore? (Optional)
An alternative would be to fix the navigation in deleteTask function itself by replacing Navigation.goBack() with a proper navigation to the parent report:
🚨 Edited by proposal-police: This proposal was edited at 2026-01-28 10:30:35 UTC.
Proposal
Restate the problem this issue is trying to solve.
When a task report is deleted from the Details page, the task is removed but the app stays on the deleted task screen. The UI does not move back to the parent group chat. This leaves the user on an invalid report. Other delete flows already redirect correctly, so this behavior is inconsistent.
What is the root cause of that problem?
The root cause is a wrong assumption in navigateToTargetUrl() inside src/pages/ReportDetailsPage.tsx. The function assumes that deletion navigation is only needed for money requests and checks only requestParentReportAction. For tasks, this value is empty, so the function does not compute a navigation URL and dismisses the modal. This happens before deleteTask() runs, so task deletion navigation never occurs.
What changes do you think we should make in order to solve the problem?
Move all task deletion navigation out of the action layer and into the component layer, same as money requests.
Handle task deletion inside navigateToTargetUrl() using the existing helper.
File: src/libs/actions/Task.ts
Remove navigation from deleteTask() so it does not try to navigate after deletion.
API.write(WRITE_COMMANDS.CANCEL_TASK,parameters,{optimisticData, successData, failureData});notifyNewAction(report.reportID,currentUserAccountID);// Navigation is handled by the caller (ReportDetailsPage or HeaderView)
File: src/pages/ReportDetailsPage.tsx
Add task handling to navigateToTargetUrl().
Please re-state the problem that we are trying to solve in this issue.
When a user deletes a task report from the Report Details screen, the app closes the right-hand panel but lands on the deleted task report instead of redirecting back to the parent group chat.
What is the root cause of that problem?
The delete task flow does figure out the right place to go (the parent chat), but it never actually uses that route. In src/libs/actions/Task.ts,
the computed back route is returned, yet the function previously only performed a simple Navigation.goBack().
Instead, it just does a simple “go back one screen.” That closes the panel, but the next screen is still the deleted task report. On the caller side, src/pages/ReportDetailsPage.tsx:
doesn’t apply the standard “dismiss RHP + go back to parent chat” helper.
What changes do you think we should make in order to solve the problem?
return the computed back route from task deletion without doing internal navigation, and then use navigateBackOnDeleteTransaction from ReportDetailsPage to dismiss the RHP and navigate to the parent chat.
We should remove the Navigation.goBack() in src/libs/actions/Task.ts
⚠️@marufsharifi Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
Activity
melvin-bot commentedon Jan 28, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @linhvovan29546 (
External)melvin-bot commentedon Jan 28, 2026
Triggered auto assignment to @lydiabarclay (
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.daledah commentedon Jan 28, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user deletes a task report from the Details page (Group chat > Task > Header > Details > Delete), they remain on the deleted task report screen instead of being redirected back to the parent group chat. The task no longer exists but the UI stays on the task view, leaving the user in an invalid report context.
What is the root cause of that problem?
The root cause is that the
navigateToTargetUrlfunction inReportDetailsPage.tsxdoes not handle navigation for task report deletions.Looking at the navigation logic in
ReportDetailsPage.tsx:App/src/pages/ReportDetailsPage.tsx
Lines 922 to 988 in 04bfa3e
The
navigateToTargetUrlfunction only handles navigation for expense/money request deletions whenrequestParentReportActionis not empty:For task reports (
caseID === CASES.DEFAULT),requestParentReportActionis not relevant to tasks, so the condition fails andurlToNavigateBackremainsundefined. This results inNavigation.dismissModal()being called, which doesn't properly navigate back to the parent report.Additionally, while
deleteTaskinTask.tsdoes compute the correct URL usinggetNavigationUrlOnTaskDelete:App/src/libs/actions/Task.ts
Lines 1186 to 1190 in 04bfa3e
It only calls
Navigation.goBack()which goes back in the navigation stack, not to the specific parent report. If the user navigated to the task Details page (Task > Header > Details),goBack()would return to the task report, not the parent group chat.What changes do you think we should make in order to solve the problem?
Update the
navigateToTargetUrlfunction inReportDetailsPage.tsxto handle task report deletions by usinggetNavigationUrlOnTaskDelete:Additionally, the navigation logic in
deleteTaskfunction can be simplified since navigation is now handled bynavigateToTargetUrl:What alternative solutions did you explore? (Optional)
An alternative would be to fix the navigation in
deleteTaskfunction itself by replacingNavigation.goBack()with a proper navigation to the parent report:yatin-italy commentedon Jan 28, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-01-28 10:30:35 UTC.
Proposal
Restate the problem this issue is trying to solve.
When a task report is deleted from the Details page, the task is removed but the app stays on the deleted task screen. The UI does not move back to the parent group chat. This leaves the user on an invalid report. Other delete flows already redirect correctly, so this behavior is inconsistent.
What is the root cause of that problem?
The root cause is a wrong assumption in
navigateToTargetUrl()insidesrc/pages/ReportDetailsPage.tsx. The function assumes that deletion navigation is only needed for money requests and checks onlyrequestParentReportAction. For tasks, this value is empty, so the function does not compute a navigation URL and dismisses the modal. This happens beforedeleteTask()runs, so task deletion navigation never occurs.What changes do you think we should make in order to solve the problem?
navigateToTargetUrl()using the existing helper.File:
src/libs/actions/Task.tsRemove navigation from
deleteTask()so it does not try to navigate after deletion.File:
src/pages/ReportDetailsPage.tsxAdd task handling to
navigateToTargetUrl().Add import:
Update callback:
File:
src/pages/home/HeaderView.tsxHandle navigation when deletion starts from the header.
Add imports:
Update confirm handler:
What alternative solutions did you explore? (Optional)
deleteTask(). This was not chosen because component cleanup already runs first, so navigation there is too late and unreliable.marufsharifi commentedon Jan 28, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user deletes a task report from the Report Details screen, the app closes the right-hand panel but lands on the deleted task report instead of redirecting back to the parent group chat.
What is the root cause of that problem?
The delete task flow does figure out the right place to go (the parent chat), but it never actually uses that route. In
src/libs/actions/Task.ts,App/src/libs/actions/Task.ts
Lines 1188 to 1192 in dc827a9
the computed back route is returned, yet the function previously only performed a simple
Navigation.goBack().Instead, it just does a simple “go back one screen.” That closes the panel, but the next screen is still the deleted task report. On the caller side,
src/pages/ReportDetailsPage.tsx:App/src/pages/ReportDetailsPage.tsx
Lines 866 to 871 in dc827a9
doesn’t apply the standard “dismiss RHP + go back to parent chat” helper.
What changes do you think we should make in order to solve the problem?
return the computed back route from task deletion without doing internal navigation, and then use
navigateBackOnDeleteTransactionfromReportDetailsPageto dismiss the RHP and navigate to the parent chat.We should remove the
Navigation.goBack()insrc/libs/actions/Task.tsconst urlToNavigateBack = getNavigationUrlOnTaskDelete(report); if (urlToNavigateBack) { - Navigation.goBack(); return urlToNavigateBack; }and in
src/pages/ReportDetailsPage.tsxWhat alternative solutions did you explore? (Optional)
github-actions commentedon Jan 28, 2026
39 remaining items
mallenexpensify commentedon May 26, 2026
Retest requested
m-natarajan commentedon May 27, 2026
Not repro, Windows 11 / Chrome, v9.3.83-0
27.05.2026_10.11.56_REC.mp4
mallenexpensify commentedon May 27, 2026
Payment Summary
Contributor: @linhvovan29546 paid $250 via Upwork
Contributor+: @daledah due $250 via NewDot
@linhvovan29546 can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022059672194106395024
melvin-bot commentedon May 27, 2026
Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.
linhvovan29546 commentedon May 27, 2026
@mallenexpensify I've accepted the offer
mallenexpensify commentedon May 29, 2026
@linhvovan29546 paid, summary updated above. Thx.
quinthar commentedon May 30, 2026
Approved $250 to @daledah