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

[$250] Chat - No unread marker when messages are marked unread #47375

Closed
6 tasks done
IuliiaHerets opened this issue Aug 14, 2024 · 30 comments
Closed
6 tasks done

[$250] Chat - No unread marker when messages are marked unread #47375

IuliiaHerets opened this issue Aug 14, 2024 · 30 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Aug 14, 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: v9.0.20-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to chat.
  3. Send a few messages.
  4. Mark any message as unread.

Expected Result:

There will be unread marker.

Actual Result:

There is no unread marker.
In self DM, when marking messages as unread, LHN report is not bolded.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6571535_1723594600338.20240814_081514.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ccdc0ad6595b0550
  • Upwork Job ID: 1823596684825360821
  • Last Price Increase: 2024-08-14
  • Automatic offers:
    • nkdengineer | Contributor | 103518252
Issue OwnerCurrent Issue Owner: @
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to @kevinksullivan (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 melvin-bot bot added the Daily KSv2 label Aug 14, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Aug 14, 2024
Copy link
Contributor

👋 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.

@IuliiaHerets
Copy link
Author

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

Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to @techievivek (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@nkdengineer
Copy link
Contributor

nkdengineer commented Aug 14, 2024

Edited by proposal-police: This proposal was edited at 2024-08-14 05:39:01 UTC.

Proposal

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

There is no unread marker.
In self DM, when marking messages as unread, LHN report is not bolded.

What is the root cause of that problem?

We return early if the report action comes from the current user here. It comes from this PR

const isFromCurrentUser = accountID === (ReportActionsUtils.isReportPreviewAction(reportAction) ? !reportAction.childLastActorAccountID : reportAction.actorAccountID);
if (isFromCurrentUser) {
return false;
}

In the past, we only checked this condition if messageManuallyMarkedUnread is undefined

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

We should bring messageManuallyMarkedUnread back and update the condition to check the unread as we do in the past here

const isFromCurrentUser = accountID === (ReportActionsUtils.isReportPreviewAction(reportAction) ? !reportAction.childLastActorAccountID : reportAction.actorAccountID);
if (isFromCurrentUser) {
return false;
}

What alternative solutions did you explore? (Optional)

I think we can use unreadMarkerTime as messageManuallyMarkedUnread in the past since the aim of this state is the same as messageManuallyMarkedUnread

* This should ONLY be updated when the user
* - switches reports
* - marks a message as read/unread
* - reads a new message as it is received
*/
const [unreadMarkerTime, setUnreadMarkerTime] = useState(report.lastReadTime ?? '');

@hungvu193
Copy link
Contributor

Reviewing shortly

@hungvu193
Copy link
Contributor

I agree with @nkdengineer proposal. Let's bring
messageManuallyMarkedUnread back.

🎀 👀 🎀

Copy link

melvin-bot bot commented Aug 14, 2024

Current assignee @techievivek is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@techievivek techievivek added the External Added to denote the issue can be worked on by a contributor label Aug 14, 2024
@melvin-bot melvin-bot bot changed the title Chat - No unread marker when messages are marked unread [$250] Chat - No unread marker when messages are marked unread Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

📣 @nkdengineer 🎉 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 📖

@nkdengineer
Copy link
Contributor

Thanks, will raise a PR soon.

@techievivek
Copy link
Contributor

CPed the changes to staging, and tested it out and the bug is gone.
Screenshot 2024-08-14 at 3 41 57 PM
Screenshot 2024-08-14 at 3 42 05 PM
Screenshot 2024-08-14 at 3 42 10 PM

@techievivek techievivek removed the DeployBlockerCash This issue or pull request should block deployment label Aug 14, 2024
@iwiznia
Copy link
Contributor

iwiznia commented Aug 15, 2024

PR #47393 caused regression #47481 (comment)

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Sep 6, 2024
Copy link

melvin-bot bot commented Sep 6, 2024

This issue has not been updated in over 15 days. @hungvu193, @kevinksullivan, @techievivek, @nkdengineer eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@hungvu193
Copy link
Contributor

I think this issue is due for payment @kevinksullivan

@kevinksullivan
Copy link
Contributor

@hungvu193 did we get the regression this caused fixed, though?

@kevinksullivan
Copy link
Contributor

Looping in another BZ for your response as I am going OOO.

@kevinksullivan kevinksullivan added Weekly KSv2 and removed Monthly KSv2 labels Sep 12, 2024
@kevinksullivan kevinksullivan removed their assignment Sep 12, 2024
@kevinksullivan kevinksullivan added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to @lschurr (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 melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 12, 2024
@kevinksullivan kevinksullivan self-assigned this Sep 12, 2024
@hungvu193
Copy link
Contributor

hungvu193 commented Sep 13, 2024

@hungvu193 did we get the regression this caused fixed, though?

I think it's fixed, I can't seem to reproduce #47481. I don't think this PR caused that regression.

Screen.Recording.2024-09-13.at.14.22.55.mov

@hungvu193
Copy link
Contributor

little bump @lschurr for the payment summary 😄

@lschurr
Copy link
Contributor

lschurr commented Sep 19, 2024

@iwiznia are you able to weigh in here? Your comment indicates that the PR caused a regression, and that GH is still open: #47481 (comment)

@iwiznia
Copy link
Contributor

iwiznia commented Sep 20, 2024

Applause said:

Issue was found when executing this PR #47393

If it was not that PR, what caused the regression?

Copy link

melvin-bot bot commented Sep 26, 2024

@hungvu193, @kevinksullivan, @lschurr, @techievivek, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@nkdengineer
Copy link
Contributor

@iwiznia The current RCA of #47481 comes from #45797 because we don't return early in shouldDisplayNewMarker if we already have a unread marker.

@hungvu193
Copy link
Contributor

@lschurr Can you please post the payment summary here so we can close this one?

@lschurr
Copy link
Contributor

lschurr commented Oct 7, 2024

Payment summary:

@lschurr lschurr closed this as completed Oct 7, 2024
@garrettmknight
Copy link
Contributor

$250 approved for @hungvu193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

8 participants