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 2023-09-04] Greenline line doesn't appear after the mark of a message as unread (iOS) #25737

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 22, 2023 · 14 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 22, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Navigate to a thread conversation with several messages
  2. Mark a message as unread

Expected Result:

Green line "new" should be appeared. Verify the unread marked is displayed in the conversation history

Actual Result:

Greenline line doesn't appear after the mark of a message as unread

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.56-14

Reproducible in staging?: Yes

Reproducible in production?: No

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6173971_RPReplay_Final1692745969.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Aug 22, 2023
@OSBotify
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.

@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

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

@marcaaron
Copy link
Contributor

Could this be related? @MonilBhavsar @gedu #18637

@marcaaron
Copy link
Contributor

Gonna check to see if relate.

@marcaaron
Copy link
Contributor

Hmm ... reverted that PR locally and it's still broken :suspect:

@marcaaron
Copy link
Contributor

Hmm this is not related to messages being threaded. It seems like the unread won't work with any message. Doesn't matter if it is a thread.

@marcaaron marcaaron changed the title Threaded message - Greenline line doesn't appear after the mark of a message as unread Greenline line doesn't appear after the mark of a message as unread (iOS) Aug 23, 2023
@marcaaron
Copy link
Contributor

Ok so after a somewhat lengthy investigation... I have discovered that when we mark a report as "unread" it sets the lastReadTime to be later than than the last visible created. But only on iOS.

Basically, this logic is not working correctly:

App/src/libs/DateUtils.js

Lines 270 to 279 in 79ea923

/**
* @param {String} dateTime
* @param {Number} milliseconds
* @returns {String}
*/
function subtractMillisecondsFromDateTime(dateTime, milliseconds) {
const date = zonedTimeToUtc(dateTime, 'Etc/UTC');
const newTimestamp = subMilliseconds(date, milliseconds).valueOf();
return getDBTime(newTimestamp);
}

This is the offending PR -> #24446

I am guessing that date fns works differently in react-native or something, but not sure how.

Confirmed by rolling back main to right before it was merged.

@marcaaron
Copy link
Contributor

@allroundexperts @mountiny adding you guys in here in case you have ideas on how to fix this. I gotta jet.

@waterim
Copy link
Contributor

waterim commented Aug 23, 2023

Hello, Im Artem from Callstack.
That was my PR which caused this issue, may I help with fixing this regression?

@mountiny
Copy link
Contributor

@waterim I believe you have found the root cause, can you create a PR with the fix?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Aug 23, 2023
@waterim
Copy link
Contributor

waterim commented Aug 23, 2023

@mountiny My PR is ready for review

@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Aug 23, 2023
@mountiny
Copy link
Contributor

Confirmed this works on ios in staging now, closing

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 28, 2023
@melvin-bot melvin-bot bot changed the title Greenline line doesn't appear after the mark of a message as unread (iOS) [HOLD for payment 2023-09-04] Greenline line doesn't appear after the mark of a message as unread (iOS) Aug 28, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.57-6 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 2023-09-04. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

  • @allroundexperts does not require payment (Eligible for Manual Requests)
  • @waterim does not require payment (Contractor)

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

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 Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants