Open IuliiaHerets opened 2 hours ago
Triggered auto assignment to @joekaufmanexpensify (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.
Workspace - "Closed this report" briefly displayed when opening deleted WS chat first time
We already hide closed this report
report actions here
https://github.com/Expensify/App/blob/63c8dd2bb44deb2d62e223530fa0d734f1cfba5c/src/pages/home/report/ReportActionsList.tsx#L193
https://github.com/Expensify/App/blob/63c8dd2bb44deb2d62e223530fa0d734f1cfba5c/src/libs/ReportActionsUtils.ts#L653
But we haven't applied the condition to check if the report action is visible for mostRecentReportAction in report screen here
https://github.com/Expensify/App/blob/63c8dd2bb44deb2d62e223530fa0d734f1cfba5c/src/pages/home/ReportScreen.tsx#L704-L709
hence it appears briefly via ReportScreen for shouldShowSkeleton
case and disappears when ReportActionList is displayed as it filters it out.
We should apply the same logic we use to filter out invisible report actions in ReportActionsList for mostRecentAction in ReportScreen as we want only to show most recent action if it is going to be visible inside report action list.
const isVisible =
!!mostRecentReportAction &&
(isOffline ||
ReportActionsUtils.isDeletedParentAction(mostRecentReportAction) ||
mostRecentReportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ||
mostRecentReportAction.errors) &&
ReportActionsUtils.shouldReportActionBeVisible(mostRecentReportAction, mostRecentReportAction.reportActionID);
const shouldShowMostRecentReportAction =
!!mostRecentReportAction &&
!isSingleExpenseReport &&
!isSingleInvoiceReport &&
!ReportActionsUtils.isActionOfType(mostRecentReportAction, CONST.REPORT.ACTIONS.TYPE.CREATED) &&
!ReportActionsUtils.isDeletedAction(mostRecentReportAction) &&
!!isVisible;
We can obviously create a util function to re-use it in both instance to make it DRY
We can also remove isDeletedAction
check as the check already exists in shouldReportActionBeVisible
To easily reproduce it you can Troubleshoot > clear cache and immediately open the archive expense chat 👍
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.63-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
When opening a deleted workspace chat, no "Closed this report" message should be displayed and the #Admins room should remain on LHN when opened.
Actual Result:
When a deleted workspace chat is opened for the first time, a "Closed this report" message is displayed for some seconds, and when #Admins room of that workspace is opened, it disappears from LHN and reappears when app is reopened.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/72d5baa9-26df-486c-8319-f640e2c92f2d
View all open jobs on GitHub