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-01-31] [$500] LHN - Multiline text displayed after a second in the LHN when deleting the last message #34352

Closed
1 of 6 tasks
lanitochka17 opened this issue Jan 11, 2024 · 19 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

@lanitochka17
Copy link

lanitochka17 commented Jan 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.21-4
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: Applause - Internal Team
Slack conversation:

Issue found when executing PR #19539

Action Performed:

  1. Open any chat
  2. Send multiline text
  3. Send one more message
  4. After sending, delete the last message
  5. Notice that LHN displays only first text for a second

Expected Result:

There should not be a delay in displaying the multiline text in LHN

Actual Result:

Multiline text displayed after a second in the LHN when deleting the last message

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

Bug6338883_1704980635224.2024-01-11_18-30-19.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018098a3151fcad32f
  • Upwork Job ID: 1745444475772952576
  • Last Price Increase: 2024-01-11
  • Automatic offers:
    • dukenv0307 | Contributor | 28104896
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 11, 2024
@melvin-bot melvin-bot bot changed the title LHN - Multiline text displayed after a second in the LHN when deleting the last message [$500] LHN - Multiline text displayed after a second in the LHN when deleting the last message Jan 11, 2024
Copy link

melvin-bot bot commented Jan 11, 2024

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

Copy link

melvin-bot bot commented Jan 11, 2024

Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

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

melvin-bot bot commented Jan 11, 2024

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 11, 2024

Proposal

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

Multiline text displayed after a second in the LHN when deleting the last message

What is the root cause of that problem?

When we delete a comment, last message text in optimistic data is updated wrong here. it get the first line

messageText = String(messageText).replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();

messageText = String(messageText).replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();

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

We should use the same way in formatReportLastMessageText to format the last message text. We should check all functions that format the message text to update it accordingly too.

return String(lastMessageText).trim().replace(CONST.REGEX.LINE_BREAK, ' ').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();

messageText = String(messageText).replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot added the Overdue label Jan 13, 2024
@thesahindia
Copy link
Member

@dukenv0307's proposal looks good to me!

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Jan 15, 2024
Copy link

melvin-bot bot commented Jan 15, 2024

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

@trjExpensify
Copy link
Contributor

Over to you @AndrewGable for a secondary review!

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

melvin-bot bot commented Jan 16, 2024

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

@dukenv0307
Copy link
Contributor

@thesahindia The PR is ready for review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 24, 2024
@melvin-bot melvin-bot bot changed the title [$500] LHN - Multiline text displayed after a second in the LHN when deleting the last message [HOLD for payment 2024-01-31] [$500] LHN - Multiline text displayed after a second in the LHN when deleting the last message Jan 24, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 24, 2024
Copy link

melvin-bot bot commented Jan 24, 2024

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

Copy link

melvin-bot bot commented Jan 24, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.30-1 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-01-31. 🎊

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

Copy link

melvin-bot bot commented Jan 24, 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:

  • [@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
  • [@thesahindia] 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:
  • [@thesahindia] 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:
  • [@thesahindia] Determine if we should create a regression test for this bug.
  • [@thesahindia] 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.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jan 30, 2024
@trjExpensify
Copy link
Contributor

👋 checklist time, @thesahindia!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 31, 2024
@trjExpensify
Copy link
Contributor

Bump, @thesahindia!

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
@thesahindia
Copy link
Member

It looks like this was present from a long time. I couldn't find the PR that introduced it.

Here are the steps if we wanna add a regression test case -

  1. Open any report
  2. Send a multiline message
  3. Send another message
  4. Delete the last message
  5. Verify that the multiline message displays in LHN immediately

@trjExpensify
Copy link
Contributor

Payment summary as follows:

@trjExpensify
Copy link
Contributor

On the regression test we have this:

The following tests require using an account that was already set up. PLEASE do not use the account for any other type of testing.

  1. Log in with the following account - applausetester+multiline@applause.expensifail.com (it's already set up for these tests)
  2. Once logged in navigate to each of the conversations available (multiline+1 to multiline+9)
  3. Verify each of the multiline preview messages are displayed correctly in the LHN, only the first line of the message should be visible

I've created an issue for Applause to discuss updating it.

@trjExpensify
Copy link
Contributor

@dukenv0307 - paid

Closing!

@JmillsExpensify
Copy link

$500 approved for @thesahindia

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

6 participants