Closed lanitochka17 closed 2 weeks ago
Triggered auto assignment to @marcaaron (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: 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:
We think that this bug might be related to #vip-vsp
Leaving from multilevel threads navigates to wrong thread
On leave action we always navigate to the most recent report/the last accessed report here
If parentReportID
exist navigate to the parent report instead of the most recent report
if (report.parentReportID) {
const parentReportRoute = ROUTES.REPORT_WITH_ID.getRoute(report.parentReportID);
Navigation.goBack(parentReportRoute);
}else{
navigateToMostRecentReport(report);
}
When leaving the first level thread app navigates to the parent thread but when leaving the parent thread again the app navigates user back to the first level thread and then after a few seconds "You don't have access to this chat" page is displayed
When leaving room, we always call: https://github.com/Expensify/App/blob/2bb1d002b9dfa7045a5ddbcb7ee99d4ae207948d/src/libs/actions/Report.ts#L2790 That function get the most recent access report based on: https://github.com/Expensify/App/blob/2bb1d002b9dfa7045a5ddbcb7ee99d4ae207948d/src/libs/ReportUtils.ts#L1209-L1214 without filtering the leaved thread, lead to the loop behavior: Assume we have two thread 1 and 2. Access 1 then access 2. Now leave thread 2. User is moved to thread 1. Then leave thread 1. User is moved to thread 2. And then join thread 2. Then leave thread 2. User is moved to thread 1, ...
We should filter the leaved report from above:
function getMostRecentlyVisitedReport(reports: Array<OnyxEntry<Report>>, reportMetadata: OnyxCollection<ReportMetadata>, shouldKeepLeavedThread = true): OnyxEntry<Report> {
const filteredReports = reports.filter((report) => {
const shouldKeep = shouldKeepLeavedThread || !isChatThread(report) || (isChatThread(report) && report?.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN);
return shouldKeep && !!report?.reportID && !!(reportMetadata?.[`${ONYXKEYS.COLLECTION.REPORT_METADATA}${report.reportID}`]?.lastVisitTime ?? report?.lastReadTime);
});
return lodashMaxBy(filteredReports, (a) => new Date(reportMetadata?.[`${ONYXKEYS.COLLECTION.REPORT_METADATA}${a?.reportID}`]?.lastVisitTime ?? a?.lastReadTime ?? '').valueOf());
}
When leaving room, we use shouldKeepLeavedThread : false
to make sure this change does not break other logic.
Thanks for the proposals. Can you identify which PR from the checklist introduced this issue?
Job added to Upwork: https://www.upwork.com/jobs/~01a17100bfa3035f8c
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External
)
Thanks for the proposals everyone!
@daledah's proposal has the correct RCA and fixes the root issue.
@nyomanjyotisa I think your proposal is applying a cosmetic patch, without addressing the actual underlying issue.
π π π C+ reviewed
Current assignee @marcaaron is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
π£ @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing π
@daledah are you available to submit a PR?
We had an issue with the web production deploy that caused the deploy to fail for a few days, but it's fixed now and this issue is now reproducible on production. Going to remove the deploy blocker.
@francoisl I'm opening a PR soon.
@allroundexperts, @marcaaron, @daledah Huh... This is 4 days overdue. Who can take care of this?
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.15-9 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-09. :confetti_ball:
For reference, here are some details about the assignees on this issue:
Issue is ready for payment but no BZ is assigned. @adelekennedy you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
Verify that when leaving the first level thread app navigates user to the parent thread, when leaving from the parent thread app navigates to the Original chat and no "You don't have access to this chat" page is displayed
Do we π or π ?
Payouts due:
Upwork job is here.
Bump @daledah!
Sorry @adelekennedy I don't have any Upwork Connects so I could not apply to the job. Instead, could you send the offer directly to my profile here https://www.upwork.com/freelancers/~0138d999529f34d33f. TY
@allroundexperts, @marcaaron, @adelekennedy, @daledah Whoops! This issue is 2 days overdue. Let's get this updated quick!
hired @daledah!
@adelekennedy I have accepted, thank you
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-0 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): bezawitgebremichael+kkii@gmail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
When leaving the first level thread app navigates user to the parent thread, when leaving from the parent thread app navigates to the Original chat and no "You don't have access to this chat" page is displayed
Actual Result:
When leaving the first level thread app navigates to the parent thread but when leaving the parent thread again the app navigates user back to the first level thread and then after a few seconds "You don't have access to this chat" page is displayed
Workaround:
Unknown
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/e3859a61-2e16-4172-9b2f-cdf66ac49b09
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mananjadhav