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

[Due for payment 2025-02-18] [$250] Workspace room - New line marker is not shown for #admins room system messages #54679

Closed
2 of 8 tasks
IuliiaHerets opened this issue Dec 31, 2024 · 29 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

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 31, 2024

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


Version Number: v9.0.79-5
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: -
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 14.5/ Chrome
App Component: Workspace Settings

Action Performed:

  1. Login with any account
  2. Create a new workspace
  3. Navigate to Workspace settings > Description
  4. Change the description
  5. Navigate to the #admins room of the workspace. Notice a System message "updated the description of this workspace to" is shown
  6. Be Offline
  7. Navigate to Workspace settings > Description > Change the description
  8. Navigate to the #admins room of the workspace.
  9. Return to Online while being in the #admins room

Expected Result:

New Line marker is shown on the new system message when returning back online

Actual Result:

New Line marker is not shown on the new system message when returning back online. New line marker is shown after going to other chat and returning to #admin room

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6704393_1735600002736.Screen_Recording_2024-12-31_at_2.02.38_at_night.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021876070571656090623
  • Upwork Job ID: 1876070571656090623
  • Last Price Increase: 2025-01-13
  • Automatic offers:
    • allgandalf | Reviewer | 105712927
Issue OwnerCurrent Issue Owner: @VictoriaExpensify
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 31, 2024
Copy link

melvin-bot bot commented Dec 31, 2024

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

@FitseTLT
Copy link
Contributor

@ahmedGaber93 Is this also being handled as part of the regression?

@ahmedGaber93
Copy link
Contributor

I think it is not related. I am still able to reproduce it after revert #54233 changes

20241231223803007.mp4

@melvin-bot melvin-bot bot added the Overdue label Jan 2, 2025
Copy link

melvin-bot bot commented Jan 3, 2025

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

@VictoriaExpensify
Copy link
Contributor

Agree we should fix this

@melvin-bot melvin-bot bot removed the Overdue label Jan 6, 2025
@VictoriaExpensify VictoriaExpensify added External Added to denote the issue can be worked on by a contributor Overdue labels Jan 6, 2025
@melvin-bot melvin-bot bot changed the title Workspace room - New line marker is not shown for #admins room system messages [$250] Workspace room - New line marker is not shown for #admins room system messages Jan 6, 2025
Copy link

melvin-bot bot commented Jan 6, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 6, 2025
Copy link

melvin-bot bot commented Jan 6, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Jan 6, 2025
@bernhardoj
Copy link
Contributor

Proposal

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

I think the real problem here is that the LHN title is bold. We can easily repro this by sending a message from user B to user A.

  1. User A open chat with user B
  2. User B send a message to user A
  3. User A observe that the LHN title is bold

What is the root cause of that problem?

The title is bold because lastReadTime is smaller than the lastVisibleActionCreated.

If we see the network tab, as soon as user A receives a new message, it calls ReadNewestAction which updates the lastReadTime to the current time.

App/src/libs/actions/Report.ts

Lines 1340 to 1357 in 4d0472f

const lastReadTime = DateUtils.getDBTime();
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
lastReadTime,
},
},
];
const parameters: ReadNewestActionParams = {
reportID,
lastReadTime,
};
API.write(WRITE_COMMANDS.READ_NEWEST_ACTION, parameters, {optimisticData});

However, the current time itself is still smaller than the lastVisibleActionCreated. So, it might be a BE issue that sets the lastVisibleActionCreated to a bit future time.

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

We can use getDBTimeWithSkew which produces a time bigger than the lastVisibleActionCreated.

const lastReadTime = DateUtils.getDBTime();

OR

We can get the max value of getDBTime with the report.lastVisibleActionCreated.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

@melvin-bot melvin-bot bot added the Overdue label Jan 8, 2025
@VictoriaExpensify
Copy link
Contributor

No overdue

@melvin-bot melvin-bot bot removed the Overdue label Jan 8, 2025
@VictoriaExpensify
Copy link
Contributor

Hey @allgandalf can you please review @bernhardoj's proposal when you have the chance?

Copy link

melvin-bot bot commented Jan 13, 2025

📣 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 Jan 14, 2025

@VictoriaExpensify @allgandalf this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@allgandalf
Copy link
Contributor

I tend to agree with what @bernhardoj has stated the real issue is here, so we can surely proceed with their proposal if the internal engineer agrees with their findings

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot added the Overdue label Jan 15, 2025
Copy link

melvin-bot bot commented Jan 15, 2025

Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added the Overdue label Jan 17, 2025
@VictoriaExpensify
Copy link
Contributor

I'm also unable to reproduce this now - it appears this bug has been fixed

@bernhardoj
Copy link
Contributor

I can repro the root cause of this issue again, specifically, the steps that I mentioned in my proposal, but only on Android/mWeb.

User A open chat with user B
User B send a message to user A
User A observe that the LHN title is bold

aa.mp4

@VictoriaExpensify Can we reopen this issue, please?

@bernhardoj
Copy link
Contributor

PR is ready

cc: @allgandalf

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 11, 2025
@melvin-bot melvin-bot bot changed the title [$250] Workspace room - New line marker is not shown for #admins room system messages [Due for payment 2025-02-18] [$250] Workspace room - New line marker is not shown for #admins room system messages Feb 11, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

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

Copy link

melvin-bot bot commented Feb 11, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.95-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 2025-02-18. 🎊

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

Copy link

melvin-bot bot commented Feb 11, 2025

@allgandalf @VictoriaExpensify @allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 17, 2025
@VictoriaExpensify
Copy link
Contributor

Payment Summary:
Contributor: @bernhardoj owed $250 via NewDot

@allgandalf can you please complete the checklist and I'll post your payment summary 🙏

@bernhardoj
Copy link
Contributor

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

@allgandalf
Copy link
Contributor

allgandalf commented Feb 19, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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: https://github.com/Expensify/App/pull/18637/files#r1961012369

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

  • N/A

Test:

  1. [User A] Open a chat with User B
  2. [User B] Send a message to User A

[User A] Verify the report LHN is not bold (for small screen go back from report to see the LHN)

Do we agree 👍 or 👎

@VictoriaExpensify
Copy link
Contributor

Request to add regression test to TestRail - https://github.com/Expensify/Expensify/issues/472581

@VictoriaExpensify
Copy link
Contributor

Updated payment summary:
Contributor: @bernhardoj paid $250 via NewDot
C+: @allgandalf paid via Upwork

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

No branches or pull requests

9 participants