App icon indicating copy to clipboard operation
App copied to clipboard

Chat - Incorrect number of new messages are shown in green marker badge count

Open kavimuru opened this issue 5 years ago β€’ 13 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue found when executing PR #4773

Action Performed:

  1. Lunch the app
  2. Log in with account A in device 1
  3. Select user you will chat and scroll the chat to 10-30 messages to top
  4. Back to LHN
  5. Log in with account B in device 2
  6. Send 13 messages to account A from device 2
  7. Back to conversation from LHN in device 1 and check the green Marker Badge Count

Expected Result:

I expected to see the same number of messages sent from device 2

Actual Result:

Gives some random number shows as new message count

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • iOS
  • Android
  • mWeb

Version Number: 1.0.88-0 Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/131014149-e82d87b6-5d77-4477-abeb-36aeea466742.mp4

Expensify/Expensify Issue URL:

View all open jobs on GitHub

kavimuru avatar Aug 26 '21 18:08 kavimuru

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

OSBotify avatar Aug 26 '21 18:08 OSBotify

Triggered auto assignment to @alex-mechler (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Aug 26 '21 18:08 MelvinBot

I was able to reproduce on staging only, will look into what might be causing this πŸ‘€

alex-mechler avatar Aug 26 '21 19:08 alex-mechler

Definitely related to https://github.com/Expensify/App/pull/4773. Specifically, this is the offending line. When the LHN is opened, the unread count follows the 1+2+3...+n formula for the badge it shows. When I send 2 messages, the unread is 3, and 3 messages leads to an unread count of 6. When the report is opened, the unread count is correct.

cc @parasharrajat

alex-mechler avatar Aug 26 '21 19:08 alex-mechler

Good catch @alex-mechler. I guess I forgot to check for the case where LHN is opened. In this case, we should save the unread message count instead of adding it to the old count.

Sending the PR shortly.

parasharrajat avatar Aug 26 '21 22:08 parasharrajat

Awesome, thanks! Will assign you to this then!

alex-mechler avatar Aug 26 '21 22:08 alex-mechler

Sorry for missing this in my PR review! Thanks for figuring this out @alex-mechler

roryabraham avatar Aug 27 '21 00:08 roryabraham

Retested this on Android and it was a pass πŸŽ‰ Removing the deploy blocker label.

isagoico avatar Aug 27 '21 20:08 isagoico

I can't close this issue but cc: @roryabraham

parasharrajat avatar Aug 28 '21 01:08 parasharrajat

Issue not reproducible during KI retests (FIxed)

isagoico avatar Aug 30 '21 15:08 isagoico

πŸš€ Deployed to staging by @roryabraham in version: 1.0.88-3 πŸš€

platform result
πŸ€– android πŸ€– cancelled πŸ”ͺ
πŸ–₯ desktop πŸ–₯ cancelled πŸ”ͺ
🍎 iOS 🍎 cancelled πŸ”ͺ
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Aug 30 '21 17:08 botify

πŸš€ Deployed to production by @roryabraham in version: 1.0.88-2 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 failure ❌
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Aug 30 '21 17:08 botify

πŸš€ Deployed to production by @roryabraham in version: 1.0.90-2 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 failure ❌
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 01 '21 01:09 botify