App icon indicating copy to clipboard operation
App copied to clipboard

HIGH: [UX Reliability] New message in new chat isn't appearing in LHN as unread

Open quinthar opened this issue 10 months ago • 9 comments

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:

  1. You are signed into desktop web with an active session
  2. 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)
  3. You see the Pusher message and receive the email update
  4. It seems to even apply the incoming ADDCOMMENT to the local Onyx (both report and reportAction appear in Onyx, but no reportMetadata)
  5. But it's not showing in the LHN.
  6. 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:

  1. Attempt to reproduce it a variety of ways
  2. 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
  3. 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

quinthar avatar Apr 25 '24 19:04 quinthar

Job added to Upwork: https://www.upwork.com/jobs/~01c58c2c0489d7b2aa

melvin-bot[bot] avatar Apr 25 '24 23:04 melvin-bot[bot]

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.

melvin-bot[bot] avatar Apr 25 '24 23:04 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (External)

melvin-bot[bot] avatar Apr 25 '24 23:04 melvin-bot[bot]

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

MelvinBot avatar Apr 25 '24 23:04 MelvinBot

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.

roryabraham avatar Apr 25 '24 23:04 roryabraham

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.

roryabraham avatar Apr 25 '24 23:04 roryabraham

This is bing discussed here; taking internal. https://expensify.slack.com/archives/C03SDMF9YJ2/p1714160224487959?thread_ts=1713913891.166219&cid=C03SDMF9YJ2

quinthar avatar Apr 27 '24 21:04 quinthar

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.

quinthar avatar Apr 27 '24 21:04 quinthar

Current assignee @hungvu193 is eligible for the Internal assigner, not assigning anyone new.

melvin-bot[bot] avatar Apr 28 '24 09:04 melvin-bot[bot]

@sakluger, @hungvu193, @roryabraham Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Apr 29 '24 18:04 melvin-bot[bot]

Discussion has been continuing in the linked Slack thread above.

sakluger avatar Apr 30 '24 20:04 sakluger

closing this in favor of https://github.com/Expensify/App/issues/41019

quinthar avatar May 02 '24 02:05 quinthar

Er, I mean https://github.com/Expensify/App/issues/41112

quinthar avatar May 02 '24 02:05 quinthar