Open lanitochka17 opened 1 month ago
Triggered auto assignment to @garrettmknight (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.
We think that this bug might be related to #wvip-vsp
@garrettmknight FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Thread - Back button in the main chat reopens main chat after leaving thread
We are navigating to last accessed report after leaving room here https://github.com/Expensify/App/blob/a79189f2294a07a737bebbf5423f7d19ebf9d467/src/libs/actions/Report.ts#L2790-L2791 Which is the main chat from which the thread was created. Therefore, when we navigate back we navigate to main chat once again as it existed in the navigation route state even before leaving thread.
This behaviour is expected for leaving room but for leaving chat thread we should only goBack
, so change
https://github.com/Expensify/App/blob/a79189f2294a07a737bebbf5423f7d19ebf9d467/src/libs/actions/Report.ts#L2790-L2791
if (isChatThread) {
Navigation.goBack();
} else {
navigateToMostRecentReport(report);
}
App reopens the main chat
After leaving the thread, we call navigateToMostRecentReport
In the detail implementation of navigateToMostRecentReport
, we trigger goBack
with fallbackRoute
.
In this case, fallbackRoute
is the last route, so it's duplicated.
We should call goBack to remove the current route, then go to the correspond lastAccessedReportRoute
like what we already did in here
if (lastAccessedReportID) {
const lastAccessedReportRoute = ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID ?? '-1');
Navigation.goBack();
Navigation.navigate(lastAccessedReportRoute)
} else {
Pressing the back button after leaving a thread shows the main chat again.
When we leave a thread, we already call dismiss modal to close the RHP first, https://github.com/Expensify/App/blob/98eb1bbf99bfc0e0c0f7f5a4bc1c84c510924504/src/pages/ReportDetailsPage.tsx#L219-L227
the leaveChat then calls navigateToMostRecentReport to perform goBack with a fallback route of the main chat report. https://github.com/Expensify/App/blob/98eb1bbf99bfc0e0c0f7f5a4bc1c84c510924504/src/libs/actions/Report.ts#L2660-L2663
In an ideal case, the RHP is already closed and the goBack with the fallback route will pop every report screen until it's arrived at the fallback route. https://github.com/Expensify/App/blob/98eb1bbf99bfc0e0c0f7f5a4bc1c84c510924504/src/libs/Navigation/Navigation.ts#L230-L239
However, in this case, the RHP is still in the nav state stack, so the goBack will replace the RHP with the main chat report. https://github.com/Expensify/App/blob/98eb1bbf99bfc0e0c0f7f5a4bc1c84c510924504/src/libs/Navigation/Navigation.ts#L222-L225
We need to delay the navigation like we did in https://github.com/Expensify/App/pull/44537.
Navigation.dismissModal();
Navigation.isNavigationReady().then(() => // leaveRoom / leaveGroupChat);
or use setTimeout/InteractionManager/useWaitForNavigate hook
Job added to Upwork: https://www.upwork.com/jobs/~014c369a294716b5b5
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
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 I'm headed out until August 5th. I'll pick this back up when I'm back. Thanks for your help in the meantime!
No worries! Bumping @eVoloshchak for reviews please.
@garrettmknight, @eVoloshchak, @jliexpensify Huh... This is 4 days overdue. Who can take care of this?
Bumping @eVoloshchak for reviews! Also bumping on Slack.
I think we should proceed with @bernhardoj's proposal, this is the easiest and most reliable approach
๐๐๐ C+ reviewed!
Triggered auto assignment to @jasperhuangg, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@eVoloshchak Did you test the selected solution? It didn't work on my side. After leaving room, user is redirected to LHN (it's incorrect)
https://github.com/user-attachments/assets/0d15f716-bc10-49a8-ba12-6d32f238f6bf
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
Waiting on @eVoloshchak to address the most recent comment
@garrettmknight, @eVoloshchak, @jliexpensify, @jasperhuangg Eep! 4 days overdue now. Issues have feelings too...
After leaving room, user is redirected to LHN (it's incorrect)
@dominictb, this seems to be the expected result
Yep I just double-checked and it seems like @bernhardoj's solution has the correct behavior, assigning them.
@eVoloshchak @jasperhuangg I don't know why you said it's expected behavior. App will return to LHN if
But if you check my video above with the selected solution, after leaving room, app returns to LHN without tapping back button
PR is ready
cc: @eVoloshchak
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.23-0 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-08-29. :confetti_ball:
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Garrett is back! Unassigning myself
Payment summary looks right to me:
Requested in ND.
Regression Test Proposal
Do we agree ๐ or ๐
Dropping to weekly while @eVoloshchak request payment.
$250 approved for @eVoloshchak
$250 approved for @eVoloshchak
@JmillsExpensify did you get the request from @bernhardoj too?
If you havenโt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.11-2 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4760347 Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
App will return to LHN
Actual Result:
App reopens the main chat
Workaround:
Unknwon
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/d50d81eb-31b3-419e-a49c-7b7540fac878
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @garrettmknight / @jliexpensify