Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-07-10] [$500] critical: Chat is not marked as read when receiving a message being in the chat #40152

Closed
1 of 6 tasks
m-natarajan opened this issue Apr 11, 2024 · 92 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor High Priority

Comments

@m-natarajan
Copy link

m-natarajan commented Apr 11, 2024

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: 1.4.62-3
Reproducible in staging?: y
Reproducible in production?: y
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: @iwiznia
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1711638025134599

Action Performed:

  1. Go to any chat
  2. Open another tab or not having the window on focus
  3. Receive a notification for a new message in the chat
  4. Click on the notification and land on the chat
  5. Chat should be marked since message is read
  6. Go to another chat
  7. Again open the chat where the message is received

Expected Result:

In step 4 or in step 6 LHN should be unbold as the message is read

Actual Result:

Still showing as unread, user has to click back to the chat as in step 7 to show as "read"

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

Chat.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018e5ebea78782ee33
  • Upwork Job ID: 1778874424236658688
  • Last Price Increase: 2024-07-03
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 102764320
    • allgandalf | Contributor | 102884646
Issue OwnerCurrent Issue Owner: @dylanexpensify
Issue OwnerCurrent Issue Owner: @dylanexpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 11, 2024
Copy link

melvin-bot bot commented Apr 11, 2024

Triggered auto assignment to @dylanexpensify (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.

@dylanexpensify
Copy link
Contributor

Yep, could repro, though low value

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Apr 12, 2024
Copy link

melvin-bot bot commented Apr 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~018e5ebea78782ee33

@melvin-bot melvin-bot bot changed the title Chat is not marked as read when receiving a message being in the chat [$250] Chat is not marked as read when receiving a message being in the chat Apr 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 12, 2024
Copy link

melvin-bot bot commented Apr 12, 2024

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

@iwiznia
Copy link
Contributor

iwiznia commented Apr 12, 2024

though low value

I disagree, this is happening to me every day, many times a day. It makes the app look broken as it makes you have to click out and back in to mark as read.

@ShridharGoel
Copy link
Contributor

What is the expected behaviour? Should we quickly mark it as read when the user switches to the tab? Then the user wouldn't be able to know that there are some new messages, and where the new messages start from. Maybe we can have some interval, like mark it as read after 4 seconds (just as an example).

@giorgi17
Copy link

giorgi17 commented Apr 14, 2024

Doesn't show notifications for me like in the video, do I need to activate something? trying to replicate the issue. @dylanexpensify

Copy link

melvin-bot bot commented Apr 14, 2024

📣 @giorgi17! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot melvin-bot bot added the Overdue label Apr 15, 2024
@dylanexpensify
Copy link
Contributor

I disagree, this is happening to me every day, many times a day. It makes the app look broken as it makes you have to click out and back in to mark as read.

happy to move this higher then @iwiznia!

@melvin-bot melvin-bot bot removed the Overdue label Apr 15, 2024
@dylanexpensify
Copy link
Contributor

Doesn't show notifications for me like in the video, do I need to activate something? trying to replicate the issue. @dylanexpensify

@giorgi17 ah make sure your preferences allow for notifications from New Expensify!

@dylanexpensify
Copy link
Contributor

What is the expected behaviour? Should we quickly mark it as read when the user switches to the tab? Then the user wouldn't be able to know that there are some new messages, and where the new messages start from. Maybe we can have some interval, like mark it as read after 4 seconds (just as an example).

@ShridharGoel simple - just if the user clicks on the notification and reads the chat, it's marked as read then and there (aka unbolds instantly when opening the chat).

@ShridharGoel
Copy link
Contributor

simple - just if the user clicks on the notification and reads the chat, it's marked as read then and there (aka unbolds instantly when opening the chat).

@dylanexpensify And what about the "New" marker that we show above the unread messages?

@dylanexpensify
Copy link
Contributor

@ShridharGoel that should disappear at the same rate it does for any new message! cc @Expensify/design not sure if we have a limit distinguished for this

@shawnborton
Copy link
Contributor

I would think the New marker would stay in the chat as long as you are looking at the chat. This way if you do scroll up and down in the chat, you at least have a marker that shows you where the new messages start. If you navigate away and come back, then the new marker would disappear. Is that what you are asking Dylan?

@giorgi17
Copy link

giorgi17 commented Apr 15, 2024

Doesn't show notifications for me like in the video, do I need to activate something? trying to replicate the issue. @dylanexpensify

@giorgi17 ah make sure your preferences allow for notifications from New Expensify!

I did, but still couldn't see notifications, perhaps it's not reproducible on local. However, I've found similar issue, where receiving the message and opening It doesn't unbold the text, it's still seen as "unread". It only works after 1 minute or so. See the footage
My diagnosis is that from frontend, the message creation time is sent correctly, but then the response has the time 1.5 minutes later, because of this, the logic is flawed. Read time is always 1.5 minute earlier if you quickly try to view the new message upon receiving it, you basically need to wait 2 minutes so you can then open the chat and it'll then pick that it's now read, so, for the first 2 minutes, this logic doesn't work. This is why I was trying to find the backend code, it's a huge project, could you tell me where I could see the backend code, or Is there one at all in this project. Maybe i could find the reason there for this time difference.

The same reason could be in the case of notification. Fixing this requires figuring out, why after sending the right message creation time, i receive the time from the database that is 1.5 minutes older.

You can see this difference in this pics:
This is what Is sent from frontend - lastVisibleActionCreated .
image
This is what I got back:
image
About 1.5 minute difference.

This is the line where it's compared:
image

lastReadTime is I believe created in frontend, but the lastVisibleActionCreated is received from backend, which is incorrect by almost 2 minutes, so if chat opened in that timeline, in the first 2 minutes, it won't "unbold" the name and it'll see it as unread.

@melvin-bot melvin-bot bot added the Overdue label Apr 17, 2024
Copy link

melvin-bot bot commented Apr 18, 2024

@abdulrahuman5196, @dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Apr 19, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Apr 22, 2024

@abdulrahuman5196, @dylanexpensify Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Jun 26, 2024

📣 @allgandalf 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@allgandalf
Copy link
Contributor

btw, this is marked critical, the compensation should be $500 right? @dylanexpensify

@dylanexpensify
Copy link
Contributor

Correct, thanks @allgandalf!

@dylanexpensify dylanexpensify changed the title CRITICAL: [$250] Chat is not marked as read when receiving a message being in the chat CRITICAL: [$500] Chat is not marked as read when receiving a message being in the chat Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

Upwork job price has been updated to $500

@melvin-bot melvin-bot bot changed the title CRITICAL: [$500] Chat is not marked as read when receiving a message being in the chat CRITICAL: [$250] Chat is not marked as read when receiving a message being in the chat Jul 3, 2024
@allgandalf
Copy link
Contributor

melvin again changed the price to 250 ;)

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 3, 2024
@melvin-bot melvin-bot bot changed the title CRITICAL: [$250] Chat is not marked as read when receiving a message being in the chat [HOLD for payment 2024-07-10] CRITICAL: [$250] Chat is not marked as read when receiving a message being in the chat Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-10. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jul 3, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@allgandalf] The PR that introduced the bug has been identified. Link to the PR:
  • [@allgandalf] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@allgandalf] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@allgandalf] Determine if we should create a regression test for this bug.
  • [@allgandalf] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@dylanexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@mountiny mountiny changed the title [HOLD for payment 2024-07-10] CRITICAL: [$250] Chat is not marked as read when receiving a message being in the chat [HOLD for payment 2024-07-10] [$250] critical: Chat is not marked as read when receiving a message being in the chat Jul 3, 2024
@mountiny mountiny changed the title [HOLD for payment 2024-07-10] [$250] critical: Chat is not marked as read when receiving a message being in the chat [HOLD for payment 2024-07-10] [$500] critical: Chat is not marked as read when receiving a message being in the chat Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

Upwork job price has been updated to $500

@dylanexpensify
Copy link
Contributor

payment coming up!

@allgandalf
Copy link
Contributor

allgandalf commented Jul 10, 2024

Regression Test Proposal

  1. Sign in with any user in MacOS Web Chrome/Desktop.

  2. In Chrome: Change tab so ND is not focused

  3. Then sign in with any user in Safari, this user must have the user on Chrome as friend or be able to chat

  4. From Safari send a message to Chrome user

  5. Wait for the notification to show up on Chrome, click it

  6. ND should show up, open the right report and on LHN verify that the report title of current user chat isn't bold

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 10, 2024
@dylanexpensify
Copy link
Contributor

Payment summary:

Please apply/request!

@dylanexpensify
Copy link
Contributor

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor High Priority
Projects
Development

No branches or pull requests