App
App copied to clipboard
HIGH: [UX Reliability] New message in new chat isn't appearing in LHN as unread
See discussion here: https://expensify.slack.com/archives/C03SDMF9YJ2/p1714070214690989?thread_ts=1713913891.166219&cid=C03SDMF9YJ2
Problem:
We've had scattered reports of chats not appearing as unread in the LHN when:
- You are signed into desktop web with an active session
- Someone DMs you for the first time this session (ie, it can be an old DM, but it's the first time you talked to them since you signed int)
- You see the Pusher message and receive the email update
- It seems to even apply the incoming ADDCOMMENT to the local Onyx (both
report
andreportAction
appear in Onyx, but noreportMetadata
) - But it's not showing in the LHN.
- Switching manually to that same chat will show the message, even though it's not in the LHN.
Solution:
We haven't really tracked it down, so I would think:
- Attempt to reproduce it a variety of ways
- Whether you can or can't reproduce, look closely at the logic of the LHN to understand what causes something to appear as unread or not -- and then pose questions to a user who is currently experiencing the problem to inspect their Onyx to remotely diagnose the problem
- Whether or not you can reproduce or remotely diagnose with someone who can, theorize what could happen that might cause this behavior, and try to see if that bug might exist.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01c58c2c0489d7b2aa
- Upwork Job ID: 1783644179099836416
- Last Price Increase: 2024-04-25
Job added to Upwork: https://www.upwork.com/jobs/~01c58c2c0489d7b2aa
Triggered auto assignment to @sakluger (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.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (External
)
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
The most important thing we need for this issue is clear reproduction steps, and my advice on that front would be to try to simulate this scenario with automated tests (see UnreadIndicatorsTest
) and try to reproduce the failing scenario.
Otherwise, my guess from my limited understanding of this issue is that most likely we have some over-zealous memoization preventing the new data from re-rendering the LHN and displaying the report.
This is bing discussed here; taking internal. https://expensify.slack.com/archives/C03SDMF9YJ2/p1714160224487959?thread_ts=1713913891.166219&cid=C03SDMF9YJ2
Latest description:
Problem: When you ADDCOMMENT, auth queues an Onyx update that only incrementally updates the report_ object on the client. Specifically, it doesn't update reportMetadata_ on the client. This seems to be fine when you are in Most recent mode. But when in #focus mode, this causes messages in DMs that you haven't loaded before to never appear in the LHN (even though they do get recorded in Onyx and do appear in the Pusher notification).
Solution: Figure out why ADDCOMMENT works for Most recent mode, but not #focus mode.
Current assignee @hungvu193 is eligible for the Internal assigner, not assigning anyone new.
@sakluger, @hungvu193, @roryabraham Whoops! This issue is 2 days overdue. Let's get this updated quick!
Discussion has been continuing in the linked Slack thread above.
closing this in favor of https://github.com/Expensify/App/issues/41019
Er, I mean https://github.com/Expensify/App/issues/41112