-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Three QA guides in mention suggestion list after onboarding with Manage my team's expenses #54563
Comments
Triggered auto assignment to @bfitzexpensify ( |
Not a regression of PR #54147 as the issue is present on production as well and the PR was only deployed on staging, which proves that the issue was present before the PR changes. iOS: mWeb Chrome
We simply did not consider removing the duplicated entries from the mentions list as that wasn't part of the other issue's scope nor mentioned anywhere in the other issue's testing steps / actual behaviour. |
ProposalPlease re-state the problem that we are trying to solve in this issueDuplicated QA guide entries in mention suggestion list after onboarding with Manage my team's expenses. What is the root cause of that problem?Sometimes there's two QA guide entries in the member list after onboarding flow with Manage my team's expenses choice which seems to come from BE. Real example of array with duplicated entries[
{
"text": "[email protected]",
"alternateText": "[email protected]",
"keyForList": "14365522",
"isSelected": false,
"isDisabled": false,
"accountID": 14365522,
"login": "[email protected]",
"icons": [
{
"source": "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_11.png",
"type": "avatar",
"name": "[email protected]",
"id": 14365522
}
],
"reportID": ""
},
{
"text": "[email protected]",
"alternateText": "[email protected]",
"keyForList": "714749267",
"isSelected": false,
"isDisabled": false,
"accountID": 714749267,
"login": "[email protected]",
"icons": [
{
"source": "ƒ SvgFallbackAvatar(props)",
"type": "avatar",
"name": "[email protected]",
"id": 714749267
}
],
"reportID": ""
}
] Since we don't have bandwith to investigate this on BE side as stated in this comment, we should move forward with a FE fix which simply filters out duplicated values based on Similar to issue #53579 where I proposed the fix and implemented it, the mention suggestion list does not have any logic to handle duplicates in this filtering block: App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx Lines 283 to 306 in 918488a
which is separate from Note Note for reviewerIn order for the issue to be reproduced on DEV and subsequently be able to verify and review whether the fix works, it is necessary that Use Staging Server is set to ON in Onyx storage before creating the new account (random email without ) because when we create the workspace via onboarding flow, if we're not on staging server we won't be assigned the To do this we can add What changes do you think we should make in order to solve the problem?Same as the fix implemented in PR #54147, add the following logic to const filteredPersonalDetails = Object.values(personalDetailsParam ?? {}).filter((detail, index, array) => { // <- access `index` and `array` of filter method
// ... existing logic
// on staging server, in specific cases (see issue) BE returns duplicated personalDetails entries with the same login which we need to filter out
return array.findIndex((i) => i?.login === detail?.login) === index;
// return true; <- replaced by the line above
}) as Array<PersonalDetails & {weight: number}>; this will filter out duplicated entries that have the same What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We can add a test in Result video (before / after)MacOS: Chrome
|
Yah, I think it's not the regression from #54147, in this PR, we're trying to fix the duplicated item in as many places as possible. But there are too many places that use |
Not really, I think there are different places in the app where personal details are used and is not always centralized like we had for the recent PR in the utils file. My proposal above suggests to fix the issue where or occurs, since the case of suggestions is isolated to 1 component. |
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.78-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: #54147
Email or phone of affected tester (no customers): applausetester [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Other
Action Performed:
Expected Result:
There will be only one QA guide contact.
Actual Result:
There are three QA guide contacts in the mentioned suggestion list.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6702020_1735119636515.20241225_173701.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: