Skip to content

[HOLD for payment 2023-09-04] Greenline line doesn't appear after the mark of a message as unread (iOS) #25737

Closed

Description

@lanitochka17

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

Activity

  1. OSBotify commented on Aug 22, 2023

    @OSBotify
    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.
  2. melvin-bot commented on Aug 22, 2023

    @melvin-bot

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

  3. marcaaron commented on Aug 23, 2023

    @marcaaron
    Contributor

    Could this be related? @MonilBhavsar @gedu #18637

  4. marcaaron commented on Aug 23, 2023

    @marcaaron
    Contributor

    Gonna check to see if relate.

  5. marcaaron commented on Aug 23, 2023

    @marcaaron
    Contributor

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

  6. marcaaron commented on Aug 23, 2023

    @marcaaron
    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.

  7. 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)[/+] on Aug 23, 2023
  8. marcaaron commented on Aug 23, 2023

    @marcaaron
    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.

  9. marcaaron commented on Aug 23, 2023

    @marcaaron
    Contributor

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

  10. 2 remaining items

  11. mountiny commented on Aug 23, 2023

    @mountiny
    Contributor

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

  12. waterim commented on Aug 23, 2023

    @waterim
    Contributor

    @mountiny My PR is ready for review

  13. mountiny commented on Aug 23, 2023

    @mountiny
    Contributor

    Confirmed this works on ios in staging now, closing

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Aug 28, 2023
  15. 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)[/+] on Aug 28, 2023
  16. melvin-bot commented on Aug 28, 2023

    @melvin-bot

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

  17. melvin-bot commented on Aug 28, 2023

    @melvin-bot

    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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions