[$250] Group - Users with an external domain are displayed as Hidden in the group list
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: 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): [email protected] Issue reported by: Applause - Internal Team
Action Performed:
- Open NewExpensify app
- Log in to the new HT account
- Create a group chat with two users [email protected] and [email protected]
- 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
- [x] iOS: Native
- [ ] iOS: mWeb Safari
- [ ] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/52a75928-874e-4436-9e93-c634b093af07
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 Owner
Current Issue Owner: @jjcoffee
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.
@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
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:
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.
Job added to Upwork: https://www.upwork.com/jobs/~0181038d02cba6971d
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)
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.
π£ @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 π
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!
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.
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
https://github.com/Expensify/App/blob/562d7b48226247253625b9ac1fd45266cb53eda8/src/pages/ReportParticipantDetailsPage.tsx#L56
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>
)}
https://github.com/Expensify/App/blob/562d7b48226247253625b9ac1fd45266cb53eda8/src/pages/ReportParticipantDetailsPage.tsx#L94
What alternative solutions did you explore? (Optional)
@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.
@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.
@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.
:ribbon::eyes::ribbon: C+ reviewed
Triggered auto assignment to @Gonals, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @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 π
monitoring the PR - https://github.com/Expensify/App/pull/48681
PR merged 4 days ago so adding a payment due date to this GH. https://github.com/Expensify/App/pull/48681
Payouts due:
- [x] Contributor: $250 @nkdengineer (Paid in Upwork - https://www.upwork.com/nx/wm/workroom/38330876/overview)
- [x] Contributor+: $250 @jjcoffee (Paid in Upwork - https://www.upwork.com/nx/wm/workroom/38275996/overview)
- The PR that introduced the bug has been identified. Link to the PR: https://github.com/Expensify/App/pull/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: https://github.com/Expensify/App/commit/9dba74f24da04664948197aaca3681c85a236216#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
- Create a group chat with two users ([email protected] and [email protected])
- Open the list of members of the created group
- Tap on one of the added users to open the participant details page
- Verify that either the user's name, email or
Hiddenis displayed below the avatar (not an empty space)
Do we agree π or π
@Christinadobrzyn Friendly bump for payment :bow:
Ah thanks for the nudge @jjcoffee!
Regression test - https://github.com/Expensify/Expensify/issues/429387 Payment is initiated in Upwork based on this summary - https://github.com/Expensify/App/issues/48464#issuecomment-2354023086
Closing!