Skip to content

[HOLD for payment 2024-04-15] [$500] [HIGH] When mentioning a user the "actionable whisper" message shows the full display name  #38079

Closed

Description

@m-natarajan

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.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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1710108211692399

Action Performed:

  1. Open any room
  2. mention someone in the compose box and send
  3. Look at the "actionable whisper" message Heads up, @B B isn't a member of this room.

Expected Result:

This shouldn't show full display name

Actual Result:

Shows full display name

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

Recording.2836.mp4

Screen Shot 2024-03-11 at 2 49 51 PM

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c8171385c92b3a6a
  • Upwork Job ID: 1767266276761448448
  • Last Price Increase: 2024-03-18
  • Automatic offers:
    • ahmedGaber93 | Contributor | 0

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 11, 2024
  2. melvin-bot commented on Mar 11, 2024

    @melvin-bot

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

  3. changed the title [-]When mentioning a user the "actionable whisper" message shows the full display name [/-] [+][HIGH] When mentioning a user the "actionable whisper" message shows the full display name [/+] on Mar 11, 2024
  4. ShridharGoel commented on Mar 11, 2024

    @ShridharGoel
    Contributor

    Proposal

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

    When mentioning a user the "actionable whisper" message shows the full display name.

    What is the root cause of that problem?

    displayName is used here, which leads to the full display name being shown.

    function getEffectiveDisplayName(personalDetail?: PersonalDetails): string | undefined {
    if (personalDetail) {
    return LocalePhoneNumber.formatPhoneNumber(personalDetail?.login ?? '') || personalDetail.displayName;
    }
    return undefined;
    }

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

    firstName should be used.

    function getEffectiveDisplayName(personalDetail?: PersonalDetails): string | undefined {
        if (personalDetail) {
            return LocalePhoneNumber.formatPhoneNumber(personalDetail?.login ?? '') || personalDetail.firstName;
        }
    
        return undefined;
    }
    
  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 11, 2024
  6. changed the title [-][HIGH] When mentioning a user the "actionable whisper" message shows the full display name [/-] [+][$500] [HIGH] When mentioning a user the "actionable whisper" message shows the full display name [/+] on Mar 11, 2024
  7. melvin-bot commented on Mar 11, 2024

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 11, 2024
  9. melvin-bot commented on Mar 11, 2024

    @melvin-bot

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

  10. abzokhattab commented on Mar 11, 2024

    @abzokhattab
    Contributor

    Expected Result:
    This shouldn't show full display name

    what is the correct result then? @sobitneupane @quinthar

  11. whitestar613910 commented on Mar 11, 2024

    @whitestar613910

    Proposal

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

    When mentioning a user the "actionable whisper" message shows the full display name.

    What is the root cause of that problem?

    displayName is used here, which leads to the full display name being shown.

    function getEffectiveDisplayName(personalDetail?: PersonalDetails): string | undefined {
    if (personalDetail) {
    return LocalePhoneNumber.formatPhoneNumber(personalDetail?.login ?? '') || personalDetail.displayName;
    }
    return undefined;
    }

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

    firstName should be used.

    function getEffectiveDisplayName(personalDetail?: PersonalDetails): string | undefined {
        if (personalDetail) {
            return LocalePhoneNumber.formatPhoneNumber(personalDetail?.login ?? '') || personalDetail.firstName;
        }
    
        return undefined;
    }
    

    The problem at hand involves the "actionable whisper" message displaying the full user's display name when mentioning them.

    The root cause of this issue lies in the use of the displayName attribute in the getEffectiveDisplayName function, which results in the presentation of the complete display name instead of the intended behavior. The function relies on LocalePhoneNumber.formatPhoneNumber for formatting or defaults to the firstName of the personal details if available.

  12. 79 remaining items

  13. adelekennedy commented on Apr 15, 2024

    @adelekennedy
    Contributor

    Payouts due:

    Upwork job is here.

  14. adelekennedy commented on Apr 15, 2024

    @adelekennedy
    Contributor

    Payment summary above - just pending checklist if relevant @sobitneupane !

  15. puneetlath commented on Apr 17, 2024

    @puneetlath
    Contributor

    @sobitneupane bump on the checklist.

  16. adelekennedy commented on Apr 22, 2024

    @adelekennedy
    Contributor

    @sobitneupane will you complete the checklist today so we can close?

  17. sobitneupane commented on Apr 24, 2024

    @sobitneupane
    Contributor

    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:

    • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

    #36998

    • [@sobitneupane] 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:

    #36998 (comment)

    • [@sobitneupane] 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:
    • [@sobitneupane] Determine if we should create a regression test for this bug.

    Yes.

    • [@sobitneupane] 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.

    #38079 (comment)

  18. sobitneupane commented on Apr 24, 2024

    @sobitneupane
    Contributor

    Regression Test Proposal:

    1. Open any room
    2. Mention someone who is not the room
    3. Notice the "actionable whisper" message
    4. Verify that login is displayed both in mention and actionable whisper.
  19. adelekennedy commented on Apr 24, 2024

    @adelekennedy
    Contributor
  20. JmillsExpensify commented on May 12, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @sobitneupane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions