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] LHN - Report is not marked as unread in LHN when the IOU is received #38186
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Version Number: 1.4.501 Reproducible in staging?: Y Reproducible in production?: Y 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):sustinov@applausemail.com Issue reported by: Applause - Internal Team
@MitchExpensify 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
changed the title [-] LHN - Report is not marked as unread in LHN when the IOU is received[/-][+][$500] LHN - Report is not marked as unread in LHN when the IOU is received[/+]on Mar 19, 2024
changed the title [-][Hold on#38778] [$500] LHN - Report is not marked as unread in LHN when the IOU is received[/-][+][$500] LHN - Report is not marked as unread in LHN when the IOU is received[/+]on Jul 18, 2024
@kmbcook or @bernhardoj - do you fancy a go at a proposal for this now? @trjExpensify I'm correct in thinking that a new green dot request should be an unread comment right?
But in case the last action is a report preview, the last actor account ID is 0.
What changes do you think we should make in order to solve the problem?
First of all, we should revert #36950 as it doesn't fix the root cause of the issue. The issue that the PR is trying to fix is that when we delete the last message in a room from device A, the lastVisibleActionCreated property of the report isn't updated in device B, so the unread status stays true.
It will be updated once the device B opens the room. So, the problem is in the pusher that doesn't send the update to device B. Instead of patching up the issue, we should fix the pusher.
fyi, when we delete the last message, we set the lastVisibleActionCreated to empty optimistically, that's why the device A doesn't experience the issue. I think it should be set to the CREATED action created value, but I guess that's another topic to discuss
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
melvin-bot commentedon Mar 12, 2024
Triggered auto assignment to @MitchExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.lanitochka17 commentedon Mar 12, 2024
@MitchExpensify 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
MitchExpensify commentedon Mar 14, 2024
@dylanexpensify you've been super close to message unread/read behavior - Should a new IOU show as unread? I think "yes", right?
melvin-bot commentedon Mar 19, 2024
Job added to Upwork: https://www.upwork.com/jobs/~013810a6929404cade
[-] LHN - Report is not marked as unread in LHN when the IOU is received[/-][+][$500] LHN - Report is not marked as unread in LHN when the IOU is received[/+]melvin-bot commentedon Mar 19, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)64 remaining items
twisterdotcom commentedon Jul 17, 2024
@MitchExpensify #38778 is closed. Is there anything else this should be held on?
MitchExpensify commentedon Jul 17, 2024
Ah closed yesterday, nice. No that's all that was holding this up
[-][Hold on#38778] [$500] LHN - Report is not marked as unread in LHN when the IOU is received[/-][+][$500] LHN - Report is not marked as unread in LHN when the IOU is received[/+]melvin-bot commentedon Jul 18, 2024
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
twisterdotcom commentedon Jul 22, 2024
Okay, I see this is still a thing:
38186.mp4
twisterdotcom commentedon Jul 22, 2024
@kmbcook or @bernhardoj - do you fancy a go at a proposal for this now? @trjExpensify I'm correct in thinking that a new green dot request should be an unread comment right?
bernhardoj commentedon Jul 22, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The chat item in LHN doesn't show as bold for the workspace admin/approver when there is an expense preview
What is the root cause of that problem?
#36950 changes the unread logic a bit by checking whether the report has a
lastActorAccountIDor not.App/src/libs/SidebarUtils.ts
Lines 339 to 341 in c2ded1d
But in case the last action is a report preview, the last actor account ID is 0.

What changes do you think we should make in order to solve the problem?
First of all, we should revert #36950 as it doesn't fix the root cause of the issue. The issue that the PR is trying to fix is that when we delete the last message in a room from device A, the
lastVisibleActionCreatedproperty of the report isn't updated in device B, so the unread status stays true.App/src/libs/ReportUtils.ts
Line 4182 in 4e6c52c
It will be updated once the device B opens the room. So, the problem is in the pusher that doesn't send the update to device B. Instead of patching up the issue, we should fix the pusher.
fyi, when we delete the last message, we set the
lastVisibleActionCreatedto empty optimistically, that's why the device A doesn't experience the issue. I think it should be set to the CREATED actioncreatedvalue, but I guess that's another topic to discussbernhardoj commentedon Jul 22, 2024
The issue is actually the same, but because the other issue is closed, I reposted my proposal here
situchan commentedon Jul 22, 2024
@twisterdotcom I can take this back as C+ while @jjcoffee is OOO
trjExpensify commentedon Jul 22, 2024
Go from 1.30 in the video. You were in the chat when the IOU came through. So I wouldn't expect it to be unread in that case, would you?
twisterdotcom commentedon Jul 23, 2024
Ahhh good point. Okay, tested again and this is fixed:
