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-02-07] Display Name Appears as "hidden" in Preview Instead of User Email When Searching for New Email #35101

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

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 24, 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.31-1
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:

Action Performed:

1, Sign in to the staging Expensify.
2, Click on the search icon and search for the new email that has never been used before. Observe that the display name is shown as hidden in the preview

Expected Result:

When searching for the new email, the display name should not appear as hidden; instead, it should appear as the user's email in the preview

Actual Result:

When searching for the new email, the display name appears as hidden instead of the user's email in the preview

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

Bug6353674_1706125883510.hidden.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Jan 24, 2024
Copy link

melvin-bot bot commented Jan 24, 2024

Triggered auto assignment to @robertjchen (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
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.

@robertjchen robertjchen added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 24, 2024
@bernhardoj
Copy link
Contributor

Proposal

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

The new user name in search page is shown as Hidden.

What is the root cause of that problem?

This happens after #34362. In getDisplayNameForParticipant, we check whether the personal detail isOptimisticPersonalDetail is true or not.

App/src/libs/ReportUtils.ts

Lines 1620 to 1622 in 0d0b0a8

if (personalDetails.isOptimisticPersonalDetail === true && formattedLogin) {
return formattedLogin;
}

It will be true when the personal detail doesn't exist on Onyx.

App/src/libs/ReportUtils.ts

Lines 1598 to 1603 in 0d0b0a8

return (
allPersonalDetails?.[accountID] ?? {
avatar: UserUtils.getDefaultAvatar(accountID),
isOptimisticPersonalDetail: true,
}
);

Then, we also check whether the personal detail has a login or not, but because getPersonalDetailsForAccountID doesn't contain the login data, it will be empty, and because it's empty, "Hidden" will be shown.

This didn't happen previously and we just return an empty login and if it's empty, we fall back to the search value.

userToInvite.text = userToInvite.text || searchValue;

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

I think we can set shouldFallbackToHidden to false when trying to search a new user that we don't have their personal detail yet.

reportName = ReportUtils.getDisplayNameForParticipant(accountIDs[0]) || LocalePhoneNumber.formatPhoneNumber(personalDetail.login);

ReportUtils.getDisplayNameForParticipant(accountIDs[0], false, false)

What alternative solutions did you explore? (Optional)

Because we know that the user doesn't exist on onyx, we can always use the search value as the value for both login and name.

userToInvite.login = searchValue;
userToInvite.text = userToInvite.text || searchValue;

userToInvite.text = searchValue;

@robertjchen robertjchen added the Bug Something is broken. Auto assigns a BugZero manager. label Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

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

@aimane-chnaif
Copy link
Contributor

@narefyev91 can you please check this?

@narefyev91
Copy link
Contributor

@laurenreidexpensify @aimane-chnaif in case getDisplayNameForParticipant is mostly re-use everywhere - i will just remove && formattedLogin from ReportUtils.ts.
To avoid having issue with empty invited member here
Screenshot 2024-01-25 at 12 57 25
I will just add fallback here inside getAdminRoomInvitedParticipants:

        const name = getDisplayNameForParticipant(id);
        if (name && name?.length > 0) {
            return name;
        }
        return Localize.translateLocal('common.hidden');

@narefyev91
Copy link
Contributor

Will prepare PR shortly

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 25, 2024
@narefyev91
Copy link
Contributor

@aimane-chnaif PR is ready for review #35142 - will add all platforms attachments as well

@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 31, 2024
@melvin-bot melvin-bot bot changed the title Display Name Appears as "hidden" in Preview Instead of User Email When Searching for New Email [HOLD for payment 2024-02-07] Display Name Appears as "hidden" in Preview Instead of User Email When Searching for New Email Jan 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

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

Copy link

melvin-bot bot commented Jan 31, 2024

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

Copy link

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

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

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Feb 6, 2024
@melvin-bot melvin-bot bot added the Daily KSv2 label Feb 6, 2024
Copy link

melvin-bot bot commented Feb 7, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

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

No branches or pull requests

6 participants