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-03-29] [$500] [Polish] Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" #38087

Closed
1 of 6 tasks
kbecciv opened this issue Mar 11, 2024 · 22 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

@kbecciv
Copy link

kbecciv commented Mar 11, 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: 1.4.50.2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4416342&group_by=cases:section_id&group_id=229070&group_order=asc
Issue reported by: Applause - Internal Team

Action Performed:

  1. Log in with a new account
  2. Pin "Your space" from search if it's not visible in the LHN

Expected Result:

The message shouldn't be seen.

Actual Result:

"This is the beginning of your chat" message can be seen for "Your space" in the LHN.

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

image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01dd0f2883a58d68d9
  • Upwork Job ID: 1767615221483282432
  • Last Price Increase: 2024-03-12
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 11, 2024
Copy link

melvin-bot bot commented Mar 11, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Mar 11, 2024

@garrettmknight I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@Krishna2323
Copy link
Contributor

Krishna2323 commented Mar 11, 2024

Proposal

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

Web - LHN - "This is the beginning of your chat" message can be seen for "Your space

What is the root cause of that problem?

In the condition below, we don't check for ReportUtils.isSelfDM(report) before assigning lastMessageText.

if (!lastMessageText) {
// Here we get the beginning of chat history message and append the display name for each user, adding pronouns if there are any.
// We also add a fullstop after the final name, the word "and" before the final name and commas between all previous names.
lastMessageText =
Localize.translate(preferredLocale, 'reportActionsView.beginningOfChatHistory') +
displayNamesWithTooltips
.map(({displayName, pronouns}, index) => {
const formattedText = !pronouns ? displayName : `${displayName} (${pronouns})`;
if (index === displayNamesWithTooltips.length - 1) {
return `${formattedText}.`;
}
if (index === displayNamesWithTooltips.length - 2) {
return `${formattedText} ${Localize.translate(preferredLocale, 'common.and')}`;
}
if (index < displayNamesWithTooltips.length - 2) {
return `${formattedText},`;
}
return '';
})
.join(' ');
}
result.alternateText = ReportUtils.isGroupChat(report) && lastActorDisplayName ? `${lastActorDisplayName}: ${lastMessageText}` : lastMessageText || formattedLogin;
}

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

We should check for ReportUtils.isSelfDM(report) and if true we should use Localize.translate(preferredLocale, 'reportActionsView.beginningOfChatHistorySelfDM').

            lastMessageText = ReportUtils.isSelfDM(report)
                ? Localize.translate(preferredLocale, 'reportActionsView.beginningOfChatHistorySelfDM')
                : Localize.translate(preferredLocale, 'reportActionsView.beginningOfChatHistory') +
                  displayNamesWithTooltips
                      .map(({displayName, pronouns}, index) => {
                          const formattedText = !pronouns ? displayName : `${displayName} (${pronouns})`;

                          if (index === displayNamesWithTooltips.length - 1) {
                              return `${formattedText}.`;
                          }
                          if (index === displayNamesWithTooltips.length - 2) {
                              return `${formattedText} ${Localize.translate(preferredLocale, 'common.and')}`;
                          }
                          if (index < displayNamesWithTooltips.length - 2) {
                              return `${formattedText},`;
                          }

                          return '';
                      })
                      .join(' ');

Result

@nkdengineer
Copy link
Contributor

Proposal

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

  • Web - LHN - "This is the beginning of your chat" message can be seen for "Your space"

What is the root cause of that problem?

  • When there is no action in current user's space, the last message text to display is from this logic, that leads to the current behavior

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

  • We can add condition ReportUtils.isSelfDM(report) || to this, then the last message text in case there is no actions will be No activity yet

What alternative solutions did you explore? (Optional)

  • NA

@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

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

@melvin-bot melvin-bot bot changed the title Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" [$500] Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" Mar 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

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

@nkdengineer
Copy link
Contributor

nkdengineer commented Mar 12, 2024

@garrettmknight Can you confirm the expected behavior? (What text should be displayed in LHN instead of "This is beginning of your chat"). Currently, there are two suggestions from contributors are, "No activity yet" and "This is your personal space. Use it for notes, tasks, drafts, and reminders."

@melvin-bot melvin-bot bot added the Overdue label Mar 14, 2024
@garrettmknight
Copy link
Contributor

@nkdengineer I think it should be "This is your personal space. Use it for notes, tasks, drafts, and reminders." since that's the default in the room to start.

@melvin-bot melvin-bot bot removed the Overdue label Mar 14, 2024
@getusha
Copy link
Contributor

getusha commented Mar 17, 2024

@Krishna2323's proposal looks good to me
🎀 👀 🎀 C+ Reviewed.

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

melvin-bot bot commented Mar 17, 2024

❌ There was an error making the offer to @getusha for the Reviewer role. The BZ member will need to manually hire the contributor.

Copy link

melvin-bot bot commented Mar 17, 2024

❌ There was an error making the offer to @Krishna2323 for the Contributor role. The BZ member will need to manually hire the contributor.

@Krishna2323
Copy link
Contributor

@getusha, PR ready for review.

@melvin-bot melvin-bot bot added the Overdue label Mar 18, 2024
Copy link

melvin-bot bot commented Mar 19, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Mar 19, 2024
@quinthar
Copy link
Contributor

@getusha what is the ETA for review?

@Krishna2323
Copy link
Contributor

@quinthar, PR is merged and deployed to staging.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 22, 2024
@melvin-bot melvin-bot bot changed the title [$500] Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" [HOLD for payment 2024-03-29] [$500] Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" Mar 22, 2024
Copy link

melvin-bot bot commented Mar 22, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 22, 2024
Copy link

melvin-bot bot commented Mar 22, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.55-3 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-03-29. 🎊

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

  • @getusha requires payment (Needs manual offer from BZ)
  • @Krishna2323 requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Mar 22, 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:

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

@quinthar quinthar changed the title [HOLD for payment 2024-03-29] [$500] Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" [HOLD for payment 2024-03-29] [$500] [Reliability] Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" Mar 25, 2024
@quinthar quinthar changed the title [HOLD for payment 2024-03-29] [$500] [Reliability] Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" [HOLD for payment 2024-03-29] [$500] [Polish] Web - LHN - "This is the beginning of your chat" message can be seen for "Your space" Mar 25, 2024
@garrettmknight
Copy link
Contributor

Sorry for the wait - @getusha @Krishna2323 offers out to you both.

@garrettmknight garrettmknight added Daily KSv2 and removed Weekly KSv2 labels Mar 28, 2024
@Krishna2323
Copy link
Contributor

@garrettmknight, accepted. Thanks!

@getusha getusha mentioned this issue Mar 29, 2024
56 tasks
@getusha
Copy link
Contributor

getusha commented Mar 29, 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:

  • [@getusha] The PR that introduced the bug has been identified. Link to the PR: Track expense/self dm #37165 Not exactly a regression but a missed case.
  • [@getusha] 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: Track expense/self dm #37165 (comment)
  • [@getusha] 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: N/a
  • [@getusha] Determine if we should create a regression test for this bug. Yes
  • [@getusha] 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.

Regression Test Proposal

  1. Open search page
  2. Search for your account
  3. Open it and make sure it is visible on the LHN
  4. Make sure there are no previous messages
  5. Verify that the LHN text is "This is your personal space. Use it for notes, tasks, drafts, and reminders." below the email/name.

Do we agree 👍 or 👎

@garrettmknight
Copy link
Contributor

Paid out, closing.

@github-project-automation github-project-automation bot moved this from HIGH to CRITICAL in [#whatsnext] #vip-vsb Mar 29, 2024
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
No open projects
Status: CRITICAL
Development

No branches or pull requests

7 participants