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

[Payment due 8-18][$250] Group - Users with an external domain are displayed as Hidden in the group list #48464

Closed
1 of 6 tasks
lanitochka17 opened this issue Sep 3, 2024 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 3, 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: 9.0.27-0
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/4909728
Email or phone of affected tester (no customers): sustinov@applausemail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open NewExpensify app
  2. Log in to the new HT account
  3. Create a group chat with two users bob@domain.com
    and alice@domain.com
  4. Open the list of members of the created group

Expected Result:

Users with an external domain should be displayed by email or name in a group list

Actual Result:

Users with an external domain are displayed as Hidden in the group list

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

Bug6591417_1725344788657.RPReplay_Final1725280032.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0181038d02cba6971d
  • Upwork Job ID: 1831023091657812719
  • Last Price Increase: 2024-09-03
  • Automatic offers:
    • jjcoffee | Contributor | 103800323
    • nkdengineer | Contributor | 103829257
Issue OwnerCurrent Issue Owner: @jjcoffee
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 3, 2024
Copy link

melvin-bot bot commented Sep 3, 2024

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

@lanitochka17
Copy link
Author

@Christinadobrzyn FYI 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

@brad-isbell
Copy link

Proposal

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

Users with an external domain should be displayed by email or name in a group list

What is the root cause of that problem?

The problem is here. If a participant does not have a displayName it defaults to the text "Hidden".

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

We can simply check if the participant has either a displayName or an email ( eg: login ).
The new version will be :

let displayName = passedPersonalDetails?.displayName ?? passedPersonalDetails?.login ?? '';

What alternative solutions did you explore? (Optional)

Result:
image

@Christinadobrzyn
Copy link
Contributor

I can reproduce this. This Hidden user has been going on for a while. I don't know if we have another GH related to resolving this - I don't see one. I'm assuming this is a BE fix but adding external for a C+ review first.

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Sep 3, 2024
Copy link

melvin-bot bot commented Sep 3, 2024

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

@melvin-bot melvin-bot bot changed the title Group - Users with an external domain are displayed as Hidden in the group list [$250] Group - Users with an external domain are displayed as Hidden in the group list Sep 3, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 3, 2024
@Christinadobrzyn Christinadobrzyn removed the Bug Something is broken. Auto assigns a BugZero manager. label Sep 3, 2024
Copy link

melvin-bot bot commented Sep 3, 2024

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

@Christinadobrzyn Christinadobrzyn added the Bug Something is broken. Auto assigns a BugZero manager. label Sep 3, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 3, 2024
Copy link

melvin-bot bot commented Sep 3, 2024

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

Copy link

melvin-bot bot commented Sep 3, 2024

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

@Christinadobrzyn Christinadobrzyn self-assigned this Sep 3, 2024
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Sep 3, 2024

Side note: I'm going to be ooo 9/4-9/10. Adding a BZ teammate to monitor this - @abekkala this is brand new and I'm not sure if this needs to be external or internal so I first added @jjcoffee to review. TY!

@jjcoffee
Copy link
Contributor

jjcoffee commented Sep 4, 2024

Thanks for the proposal @brad-isbell!

Unfortunately I don't think this will entirely solve the issue here as I think for some reason the BE clears out certain emails from personalDetailsList, so there would be no value for passedPersonalDetails?.login. I see this, for example, if I log out and back in, the list of group members changes so that Bob & Alice are both Hidden with no email at all in their profiles. Weirdly if I invite a new user to the group chat and sign in with that user, I see all the emails displaying normally.

@nkdengineer
Copy link
Contributor

Proposal

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

Users with an external domain are displayed as Hidden in the group list

What is the root cause of that problem?

The hidden is displayed as expected because the personal detail has no login and displayName fields and firstName, lastName are empty strings. But we have a bug in the video of OP that is report participant detail page doesn't display Hidden as we did in ReportParticipantPage

The problem is here we only use details.displayName without falling back to Hidden as we do in here

const displayName = details.displayName ?? '';

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

We should use getDisplayNameOrDefault function as we do in ReportParticipantsPage and also use displayName as the condition to check whether we should show the display name or not. Or we can remove this condition because we always fallback into hidden

const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(details);
{!!(displayName ?? '') && (
    <Text
        style={[styles.textHeadline, styles.pre, styles.mb6, styles.w100, styles.textAlignCenter]}
        numberOfLines={1}
    >
        {displayName}
    </Text>
)}

{!!(details.displayName ?? '') && (

What alternative solutions did you explore? (Optional)

@jjcoffee
Copy link
Contributor

jjcoffee commented Sep 5, 2024

@nkdengineer Do you see these users as hidden immediately? I only see it after signing out and back in, otherwise I see hidden and the email address.

Weirdly if I invite a new user to the group chat and sign in with that user, I see all the emails displaying normally.

I'd also like to see this explained. I'm leaning towards this being a BE issue, as I don't see why these emails specifically should be hidden for the user who added them to the group.

@nkdengineer
Copy link
Contributor

@jjcoffee That because when we search the email, login field is stored in personal detail after the seach API then after BE returns data that doesn't have login field so after merging data, login data still exists until you reset cache or log out.

The bug that I mentioned in my proposal is when we open the participant detail page, empty string is displayed for this user in the step. We can see this in the video of the OP.

@jjcoffee
Copy link
Contributor

jjcoffee commented Sep 5, 2024

@nkdengineer Thanks, I see what you mean now! I agree the participant detail page should be fixed so that it doesn't show an empty string, but I think the BE is also incorrectly removing the email in these cases so I think that needs to be sorted too.

Let's go with @nkdengineer's proposal to fix up the empty name on the participant details page. We also need a potential BE fix if these emails are not supposed to be Hidden.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 5, 2024

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

Copy link

melvin-bot bot commented Sep 5, 2024

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

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 7, 2024
@Christinadobrzyn
Copy link
Contributor

monitoring the PR - #48681

@abekkala abekkala removed their assignment Sep 12, 2024
@Christinadobrzyn Christinadobrzyn changed the title [$250] Group - Users with an external domain are displayed as Hidden in the group list [Payment due 8-18][$250] Group - Users with an external domain are displayed as Hidden in the group list Sep 16, 2024
@Christinadobrzyn Christinadobrzyn added the Awaiting Payment Auto-added when associated PR is deployed to production label Sep 16, 2024
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Sep 16, 2024

PR merged 4 days ago so adding a payment due date to this GH. #48681

Payouts due:

@jjcoffee
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Update the Group Chat creation flow UI and Details page #39639
  • 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: 9dba74f#r146817794
  • 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 - this type of thing would be hard to catch in standard PR testing imo
  • Determine if we should create a regression test for this bug. Yes
  • 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. Create a group chat with two users (bob@domain.com and alice@domain.com)
  2. Open the list of members of the created group
  3. Tap on one of the added users to open the participant details page
  4. Verify that either the user's name, email or Hidden is displayed below the avatar (not an empty space)

Do we agree 👍 or 👎

@jjcoffee
Copy link
Contributor

@Christinadobrzyn Friendly bump for payment 🙇

@Christinadobrzyn
Copy link
Contributor

Ah thanks for the nudge @jjcoffee!

Regression test - https://github.com/Expensify/Expensify/issues/429387
Payment is initiated in Upwork based on this summary - #48464 (comment)

Closing!

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Status: No status
Development

No branches or pull requests

7 participants