Open lanitochka17 opened 1 week ago
Triggered auto assignment to @strepanier03 (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.
New message marker shows for update category system message.
This only happens in a one expense report. In a one expense report, when we edit the money request, the edit system message is added to the transaction thread. The one expense report shows a combined report actions between the expense report itself and the transaction thread. For showing the new message marker, we compare the unreadMarkerTime
(report last read time) with the action created value.
https://github.com/Expensify/App/blob/3ebe8520d74c57a2fe9548b7d4307206e2b7c673/src/pages/home/report/ReportActionsList.tsx#L278
Since editing the money request adds the action to the transaction thread, the expense report lastReadTime
is unchanged and the edit system message created
is bigger than the expense report lastReadTime
, thus the new message line is shown.
Why this only happen after reopening the report? It's because we set the unread marker to the report lastReadTime
once and then it gets updated when there is a new message, which is the edit system message in this case.
https://github.com/Expensify/App/blob/3ebe8520d74c57a2fe9548b7d4307206e2b7c673/src/pages/home/report/ReportActionsList.tsx#L346-L351
But when we reopen the report, the unreadMarkerTime
is set with the expense report lastReadTime
.
We should use the transaction thread report lastReadTime
if it's bigger than the expense report lastReadTime
, similar to what we did to lastVisibleActionCreated
.
https://github.com/Expensify/App/blob/3ebe8520d74c57a2fe9548b7d4307206e2b7c673/src/pages/home/report/ReportActionsList.tsx#L358-L361
const lastReadTime =
(transactionThreadReport?.lastReadTime ?? '') > reportLastReadTime
? transactionThreadReport?.lastReadTime
: reportLastReadTime;
const [unreadMarkerTime, setUnreadMarkerTime] = useState(lastReadTime);
useEffect(() => {
setUnreadMarkerTime(lastReadTime);
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, [report.reportID]);
@strepanier03 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@strepanier03 Huh... This is 4 days overdue. Who can take care of this?
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.66-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A 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): applausetester+bg@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Newline marker is not shown
Actual Result:
Newline marker is shown
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/9bfee331-3303-4eae-8a95-41a29240823c
View all open jobs on GitHub