-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 #36378][$500] The member list of a public room shows inconsistent results #37192
Comments
Triggered auto assignment to @kadiealexander ( |
Job added to Upwork: https://www.upwork.com/jobs/~01a589af5940630bea |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi ( |
Reproduced in chrome. |
I believe they are similar #36378 |
ProposalPlease re-state the problem that we are trying to solve in this issue.The member list of a public room shows inconsistent results What is the root cause of that problem?We have not omitted any visible members without personal details on the report detail page. What changes do you think we should make in order to solve the problem?Filter visible members with personal details in getVisibleMemberIDs
Then we can modify this code to optimize loop: App/src/pages/RoomMembersPage.tsx Lines 156 to 161 in 89d5689
Modify to:
We could also add filtering per page in ReportDetailsPage.tsx, similar to what RoomMembersPage did. What alternative solutions did you explore? (Optional)Do we intend to display all members, even if they do not have personal details? If so, we can omit the null check on the personalDetails data. We can remove return and fallback null to empty object in getMemberOptions. Change App/src/pages/RoomMembersPage.tsx Lines 152 to 161 in 89d5689
To:
It will show "Hidden" since the returned value after the invite is an empty object. I believe the room admin/owner should be able to view at least the registered contact (email/number) so they can identify the members (Require backend change). This is a suggestion for the returned object for non-registered users, it has the same structure as optimistic data.
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Member count in a public room's details shows inconsistency when the user enters the "RoomMembersPage" and goes back to the "ReportDetailsPage". What is the root cause of that problem?When user opens a room the client sends an API command called "OpenReport" which returns the report information that is used to display the room's details such as member count. However, when the user navigates to "RoomMembersPage" via clicking "Members" button, the client sends another command called "OpenRoomMembersPage". This new command's response returns new object which has the following properties "participantAccountIDs", "participants", "visibleChatMemberAccountIDs", then this fields gets merged with the existing report via Onyx. The problem is the participantAccountIDs fields between these requests "OpenReport" and "RoomMembersPage" returns different values and that causes "RoomMembersPage" command's response to override these 3 fields. When the fields get overwritten, the following code in "ReportDetailsPage" const participants = useMemo(() => {
console.log("I have RUN" ,report);
return ReportUtils.getVisibleMemberIDs(report)
}, [report]); updates the participant count with the new overwritten values due to report object being updated by "OpenRoomMembersPage" command. Hence the member count changes when the user navigates & go backs from the "RoomMembersPage". Moreover, the code that calls the "OpenRoomMembersPage" command is located at RoomMembersPage and wrapped in useEffect hook that runs only once the component mounts. const getRoomMembers = useCallback(() => {
if (!report) {
return;
}
Report.openRoomMembersPage(report.reportID);
setDidLoadRoomMembers(true);
}, [report]);
useEffect(() => {
getRoomMembers();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []) What changes do you think we should make in order to solve the problem?Assuming that "OpenReport" command returns the true value of the report. The "OpenRoomMembersPage" should either use the same filtration as the "OpenReport" command so that it filters and returns the same number of members to client. What alternative solutions did you explore? (Optional)In my opinion, the "OpenRoomMembersPage" command can also be completely removed or altered since it permanently adds the "participantAccountIDs", "participants", "visibleChatMemberAccountIDs" fields to report object for no apparent reason other then being used in "RoomMembersPage" page . I haven't checked all the code that uses these fields but if these 3 fields are only going to be added once the user enter the "RoomMembersPage " page then they should get disposed and not permanently alter the report object when the user goes back. |
📣 @Emrullah-Akbulak! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Holding for #36378! |
Still on hold. |
Same |
Still on hold. |
Still on hold. |
Asked for a retest here. |
QA team is unable to reproduce it on build 1.4.74.3 Recording.477.mp4Recording.476.mp4 |
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: 1.4.43-14
Reproducible in staging?:
Reproducible in production?:
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/p1708893734376029
Action Performed:
Precondition: Have a public room, users with real accounts and anonymous users without email contact information
Expected Result:
Should show the same number of the members
Actual Result:
It first showing the correct number of people who have signed in with real accounts and when opening the members list and going back it includes anonymous user (who didn't provide any email contact information)
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Recording.2780.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: