Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.46k stars 2.82k forks source link

[$500] Web - Chat - User's name/email disappear next to avatar in search panel after going back online #34984

Closed kbecciv closed 8 months ago

kbecciv commented 8 months ago

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: v1.4.30-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4226419&group_by=cases:section_id&group_order=asc&group_id=229067 Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

  1. Navigate to staging.new.expensify.com & log in
  2. Disable the internet connection
  3. Click search icon
  4. Search for a user that you have not opened a conversation with
  5. Select the user
  6. Go back online
  7. Click search icon

Expected Result:

User's name and/or email address should not disappear next in avatar in search list after going back online

Actual Result:

User's name and/or email address disappear next in avatar in search list after going back online . Blank space displayed next to avatar

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

image

https://github.com/Expensify/App/assets/93399543/5f5e11fc-bf90-4a6f-83db-5a7243a5af26

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015bf0d3a7a43fc722
  • Upwork Job ID: 1749866716235669504
  • Last Price Increase: 2024-01-23
melvin-bot[bot] commented 8 months ago

Job added to Upwork: https://www.upwork.com/jobs/~015bf0d3a7a43fc722

melvin-bot[bot] commented 8 months ago

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 8 months ago

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

kbecciv commented 8 months ago

We think that this bug might be related to #vip-vsb CC @quinthar

jeremy-croff commented 8 months ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

When we search for a user without internet, the recent search results do not show the users display name

What is the root cause of that problem?

The accountId never got resolved while offline. This results in a null accountId for the record. Snapshot of the entity is here: Screenshot 2024-01-23 at 10 44 28 PM

We return an empty displayName under this condition: https://github.com/Expensify/App/blob/0efabc2b40fe845b13faa94ec508a6693167ede9/src/libs/ReportUtils.ts#L1608C1-L1611C6 Hence why we render null.

What changes do you think we should make in order to solve the problem?

We can update the displayName logic to fallback to option.text if it doesn't resolve the displayname here: https://github.com/Expensify/App/blob/0efabc2b40fe845b13faa94ec508a6693167ede9/src/libs/ReportUtils.ts#L1645

It already short-circuits to login, but in this error case it's also not present.

Note: After the user refreshes the page or interacts with the User - it fixes the database and will show the correct displayName.

What alternative solutions did you explore? (Optional)

FitseTLT commented 8 months ago

Dupe https://github.com/Expensify/App/issues/34900

lschurr commented 8 months ago

Looks like we've already got this reported elsewhere. Going to close.