App: HIGH: [UX Reliability] [$500] Random empty chats are showing in LHN in focus mode

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: Reproducible in staging?: needs reproduction Reproducible in production?: needs reproduction If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @davidcardoza Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1709737869001459

Action Performed:

  1. Open app and sign in with an account with preference set focus
  2. Look at the LHN

Expected Result:

Should not display any random emptychats

Actual Result:

10s of random empty state chats in the LHN, with no way to remove the chats from the LHN view Note: They seems to be the members of the workspace room I am in

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence image (1)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011e45e5cf4631d0fd
  • Upwork Job ID: 1768690919242297344
  • Last Price Increase: 2024-04-11
  • Automatic offers:
    • s77rt | Reviewer | 0
    • tienifr | Contributor | 0

About this issue

  • Original URL
  • State: open
  • Created 4 months ago
  • Comments: 49 (33 by maintainers)

Most upvoted comments

PR is ready for merge

Also experiencing this, would love it fixed. Are we sure this isn’t a regression somehow? cc @puneetlath I feel like in the past you had worked on this.

The proposal sounds fine, but why is the API returning these empty chats? Or is it that these empty chats were present locally in Onyx before switching to focus mode?

@flodnv Yes the empty chats were present in Onyx already, there’re a couple of cases where this can happen:

  • A Self DM of the current user (always available but empty initially)
  • User B initiates a chat with User A but didn’t send any message. The empty report with user B will be present in User A’s Onyx report data

That sounds better to me (we can say the chat is empty if it has 0 or 1 reportActions). Maybe we should do this same update in that other spot?

Yes we can

I’m not sure why we named this like that, but seeing as it’s called “focus” mode through the stack, let’s name this to isInFocusMode

Agreed!

Can we close this for now and reopen if this resurface again?

@CortneyOfstad Please help reopen this issue, this is occurring again here https://github.com/Expensify/App/issues/39558

cc @s77rt

Can we close this for now and reopen if this resurface again?

@s77rt Thanks for your feedback!

Proposal updated with revised RCA and solution

I was also experienced this yesterday — getting eyes on this!

Clicking into those blank chats, did remove them, but their creation was unnecessary at least in terms of what I could see in-product