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
[$500] Thread - The user remains in the thread conversation after leaving it #80075
Version Number: v9.3.5-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:https://test-management.browserstack.com/projects/2219752/test-runs/TR-3122/folder/13177078/41237908/1138023986?sort=%2Bidentifier Email or phone of affected tester (no customers): n/a Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: iPhone 13 iOS 26.2 Hybrid, Mac 15.4.1 Safari, Chrome App Component: Chat Report View
Action Performed:
Go to https://staging.new.expensify.com
2.Navigate to a conversation
3.Start a thread and send some messages
4.Click on the header of the conversation and hit "Leave thread"
Expected Result:
The user is navigated back to the parent conversation after leaving a thread
Actual Result:
The user remains in the thread conversation after leaving it
changed the title [-]Thread - The user remains in the thread conversation after leaving it[/-][+][$250] Thread - The user remains in the thread conversation after leaving it[/+]on Jan 21, 2026
However, since we are on RHP, the initial targetState will be rootState, and we will pop back to the ReportsSplitNavigator's state. But we do not continue popping inside ReportsSplitNavigator to the target route, so we end up staying on the last route of ReportsSplitNavigator.
What changes do you think we should make in order to solve the problem?
NOTE: We have several different dispatch actions inside goUp, so we also need to check whether those dispatch actions should trigger recursive calls as described above.
What alternative solutions did you explore? (Optional)
Alternatively, we could use the common pattern in the App, which is to call dismissModal before calling goBack.
Restate the problem this issue is trying to solve.
After leaving a thread conversation, the user is not navigated back to the parent conversation and remains in the thread view.
What is the root cause of that problem?
dismissModalWithReport incorrectly assumes the thread is always in a modal (RHP) on wide layouts. On wide layouts, it always calls dismissModal() first, but if the thread is already in ReportsSplitNavigator (not in RHP), dismissing the modal is unnecessary and the subsequent navigation doesn't properly navigate to the parent report, causing the user to remain in the thread view.
When navigating from a thread to its parent report within the same ReportsSplitNavigator, the navigation should update the report route directly without dismissing a modal that doesn't exist.
The earliest incorrect assumption: In dismissModalWithReport at line 642, dismissModal() is always called on wide layouts regardless of whether we're navigating within ReportsSplitNavigator to a different report.
What changes do you think we should make in order to solve the problem?
Only dismiss the modal when we are not navigating inside ReportsSplitNavigator.
If we are moving from one report to another inside ReportsSplitNavigator, use forceReplace: true.
This avoids dismissing a modal that does not exist.
Change only dismissModalWithReport in src/libs/Navigation/Navigation.ts.
🚨 Edited by proposal-police: This proposal was edited at 2026-01-21 06:30:48 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user leaves a thread conversation by clicking the header and hitting "Leave thread", they remain on the thread screen instead of being navigated away. The expected behavior is to return to the parent conversation.
What is the root cause of that problem?
In src/libs/actions/Report.ts, the leaveRoom function (line 3763) calls navigateToMostRecentReport(report) after leaving a thread. This function finds and navigates to the most recently visited report, not the parent conversation.
For threads, report.parentReportID exists and points to the originating conversation, but the navigation logic doesn't use it. The navigateToMostRecentReport may return the same thread report or another unrelated report, leaving the user stranded on the thread they just left.
What changes do you think we should make in order to solve the problem?
Modify src/libs/actions/Report.ts in the leaveRoom function.
After line 3868 (the early return for workspace members), add a check for chat threads:
// For chat threads, navigate to the parent conversation instead of the most recent reportif(isChatThread&&report.parentReportID){constparentReportRoute=ROUTES.REPORT_WITH_ID.getRoute(report.parentReportID);Navigation.goBack(parentReportRoute);return;}
This navigates directly to the parent conversation when leaving a thread, which is the intuitive expected behavior.
No new imports needed - ROUTES, Navigation, and isChatThread are already available in the file.
What alternative solutions did you explore? (Optional)
Considered modifying navigateToMostRecentReport to handle threads specially, but this would add complexity to a general-purpose function. The simpler approach is to handle the thread case explicitly in leaveRoom before calling navigateToMostRecentReport.
@parasharrajat what's payment breakdown here? Quite a bit going on, 100 comments on the post, a merged PR that states a deploy blocker and it feels/seems like something else since there's no payment summary.
Yeah, sure. Technically, it should be 125 each @dmkt9 and me due to a regression. But the root cause of the regression was not our changes, but how it used to work across the app. Now that the issue is fixed, we didn't have to make any changes. So it can be 250 as well.
Contributor: @dmkt9 paid $250 via Upwork
Contributor+: @parasharrajat due $250 via NewDot
@dmkt9 can you please accept the job below? Please reply here and tag me once you have.
If you're not sent an offer in Upwork when you're assigned to an issue, please tag me. If an Upwork job exists, please submit a proposal. https://www.upwork.com/jobs/~022063055667935413263
@dmkt9 can you please accept the job below? Please reply here and tag me once you have. If you're not sent an offer in Upwork when you're assigned to an issue, please tag me. If an Upwork job exists, please submit a proposal. upwork.com/jobs/~022063055667935413263
Activity
melvin-bot commentedon Jan 21, 2026
Triggered auto assignment to @jliexpensify (
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.jliexpensify commentedon Jan 21, 2026
I can reproduce this!
[-]Thread - The user remains in the thread conversation after leaving it[/-][+][$250] Thread - The user remains in the thread conversation after leaving it[/+]melvin-bot commentedon Jan 21, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022013838149837532917
melvin-bot commentedon Jan 21, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)dmkt9 commentedon Jan 21, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The user remains in the thread conversation after leaving it
What is the root cause of that problem?
When we leave the thread, the
Navigation.goBackfunction will be called here to navigate back.App/src/libs/actions/Report.ts
Lines 3685 to 3686 in ca68fdc
The
goUpfunction will be used because we pass thebackToRouteparam.App/src/libs/Navigation/Navigation.ts
Lines 405 to 408 in ca68fdc
In
goUp, we only pop once on thetargetState.App/src/libs/Navigation/Navigation.ts
Line 365 in ca68fdc
App/src/libs/Navigation/Navigation.ts
Lines 372 to 373 in ca68fdc
App/src/libs/Navigation/Navigation.ts
Line 390 in ca68fdc
However, since we are on RHP, the initial
targetStatewill berootState, and we will pop back to theReportsSplitNavigator's state. But we do not continue popping insideReportsSplitNavigatorto the target route, so we end up staying on the last route ofReportsSplitNavigator.What changes do you think we should make in order to solve the problem?
Test branch
If the
targetStateisrootState, then we should recursively call thegoUpfunction to handle the state of the target route.App/src/libs/Navigation/Navigation.ts
Line 390 in ca68fdc
NOTE: We have several different dispatch actions inside
goUp, so we also need to check whether those dispatch actions should trigger recursive calls as described above.What alternative solutions did you explore? (Optional)
Alternatively, we could use the common pattern in the App, which is to call
dismissModalbefore callinggoBack.App/src/libs/actions/Report.ts
Lines 3685 to 3686 in ca68fdc
yatin-italy commentedon Jan 21, 2026
Proposal
Restate the problem this issue is trying to solve.
After leaving a thread conversation, the user is not navigated back to the parent conversation and remains in the thread view.
What is the root cause of that problem?
dismissModalWithReport incorrectly assumes the thread is always in a modal (RHP) on wide layouts. On wide layouts, it always calls dismissModal() first, but if the thread is already in ReportsSplitNavigator (not in RHP), dismissing the modal is unnecessary and the subsequent navigation doesn't properly navigate to the parent report, causing the user to remain in the thread view.
When navigating from a thread to its parent report within the same ReportsSplitNavigator, the navigation should update the report route directly without dismissing a modal that doesn't exist.
The earliest incorrect assumption: In dismissModalWithReport at line 642, dismissModal() is always called on wide layouts regardless of whether we're navigating within ReportsSplitNavigator to a different report.
What changes do you think we should make in order to solve the problem?
ReportsSplitNavigator.ReportsSplitNavigator, useforceReplace: true.dismissModalWithReportinsrc/libs/Navigation/Navigation.ts.What alternative solutions did you explore? (Optional)
none
HiepPP commentedon Jan 21, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-01-21 06:30:48 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user leaves a thread conversation by clicking the header and hitting "Leave thread", they remain on the thread screen instead of being navigated away. The expected behavior is to return to the parent conversation.
What is the root cause of that problem?
In
src/libs/actions/Report.ts, theleaveRoomfunction (line 3763) callsnavigateToMostRecentReport(report)after leaving a thread. This function finds and navigates to the most recently visited report, not the parent conversation.For threads,
report.parentReportIDexists and points to the originating conversation, but the navigation logic doesn't use it. ThenavigateToMostRecentReportmay return the same thread report or another unrelated report, leaving the user stranded on the thread they just left.What changes do you think we should make in order to solve the problem?
Modify
src/libs/actions/Report.tsin theleaveRoomfunction.After line 3868 (the early return for workspace members), add a check for chat threads:
This navigates directly to the parent conversation when leaving a thread, which is the intuitive expected behavior.
No new imports needed -
ROUTES,Navigation, andisChatThreadare already available in the file.What alternative solutions did you explore? (Optional)
Considered modifying
navigateToMostRecentReportto handle threads specially, but this would add complexity to a general-purpose function. The simpler approach is to handle the thread case explicitly inleaveRoombefore callingnavigateToMostRecentReport.104 remaining items
parasharrajat commentedon Jun 2, 2026
I see. Thanks for the clarification. Then I think we can close this issue after processing the payment.
@dmkt9 was previously hired on this. @mallenexpensify
mallenexpensify commentedon Jun 3, 2026
@parasharrajat what's payment breakdown here? Quite a bit going on, 100 comments on the post, a merged PR that states a deploy blocker and it feels/seems like something else since there's no payment summary.
parasharrajat commentedon Jun 3, 2026
Yeah, sure. Technically, it should be 125 each @dmkt9 and me due to a regression. But the root cause of the regression was not our changes, but how it used to work across the app. Now that the issue is fixed, we didn't have to make any changes. So it can be 250 as well.
mvtglobally commentedon Jun 5, 2026
Issue not reproducible during KI retests. (First week)
parasharrajat commentedon Jun 5, 2026
@mallenexpensify #80075 (comment)
mallenexpensify commentedon Jun 6, 2026
Payment Summary
Contributor: @dmkt9 paid $250 via Upwork
Contributor+: @parasharrajat due $250 via NewDot
@dmkt9 can you please accept the job below? Please reply here and tag me once you have.
If you're not sent an offer in Upwork when you're assigned to an issue, please tag me. If an Upwork job exists, please submit a proposal.
https://www.upwork.com/jobs/~022063055667935413263
melvin-bot commentedon Jun 6, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
dmkt9 commentedon Jun 7, 2026
@mallenexpensify Thanks. I've accepted the offer
mallenexpensify commentedon Jun 8, 2026
@dmkt9 paid, summary updated above. Thx.
parasharrajat commentedon Aug 6, 2026
Payment requested as per #80075 (comment)
garrettmknight commentedon Aug 10, 2026
$250 approved for @parasharrajat