You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Room - Members number does not update in real time when user rejoin the room #43293
Version Number: 1.4.80-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: N/A Email or phone of affected tester (no customers):gocemate+a178@gmail.com Issue reported by: Applause - Internal Team
Action Performed:
Create room> Invite a member
Leave the room
Open the room again> Join
Go to header to open details page
Take a look at members section
Expected Result:
Members number should update since there is a new member in the room
Actual Result:
Members number does not update in real time when user rejoin the room. User must open Members page to update the info
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@VictoriaExpensify 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
What changes do you think we should make in order to solve the problem?
Let's make the joinRoom function consistent with the inviteToRoom function by optimistically adding the new participant before updating its notification preference.
Similar to the inviteToRoom function, this change helps with the expected offline behavior.
We can do this by replicating and modifying the code below to be suited for the joinRoom function.
changed the title [-]Room - Members number does not update in real time when user rejoin the room[/-][+][$250] Room - Members number does not update in real time when user rejoin the room[/+]on Jun 9, 2024
@allroundexperts , I believe handling offline case was an edge case for the solution that I had proposed and IMHO, this should have been covered as part of our PR discussion. I had already done the hard work on identifying the root-cause and proposing the right solution for it.
Most of @dominictb 's solution is based on the findings and solution (Toggling the hidden flag) that I had posted above with the slight change that it handles the offline case.
@jainilparikh I don't think that the offline flow is an "edge case". Your solution seems to be different from what the selected proposal mentioned as well.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
melvin-bot commentedon Jun 7, 2024
Triggered auto assignment to @VictoriaExpensify (
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 commentedon Jun 7, 2024
@VictoriaExpensify 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
jainilparikh commentedon Jun 7, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Member count is not immediately updated when the User re-joins the chat. It is updated after the user clicks on 'Members' button.
What is the root cause of that problem?
When we open the side-pane (Which contains
Members,Settings,Private notesetc) the state of a member does not get updated from the server.What changes do you think we should make in order to solve the problem?
Update the number of member's by calling the server using the
OPEN_ROOM_MEMBERS_PAGEaction inReportDetailsPage.tsx(https://github.com/Expensify/App/blob/main/src/pages/ReportDetailsPage.tsx) class by adding the following code:What alternative solutions did you explore? (Optional)
Since, RoomMemberPage is using the same function, create this function in a common file so both classes can use it.
Verified that the above solution updates the member count appropriately.
Video:
screen-recording-2024-06-08-at-35138-pm_BWW7Ctyh.mp4
jainilparikh commentedon Jun 8, 2024
Tony-MK commentedon Jun 9, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Room - Members number does not update in real time when user rejoin the room
What is the root cause of that problem?
The
joinRoomfunction is not consistent with theinviteToRoomfunction.Therefore, the
inviteToRoomfunction adds the new participant to thereport.participantsarray.Unlike when joining a room, when the
getVisibleChatMemberAccountIDsfunction is called, it has one less participant in thereport.participantsarrayApp/src/pages/ReportDetailsPage.tsx
Lines 92 to 100 in f3bb5a5
The
report.participantsarray won't be updated in real-time because the front end has not been synced with the backend.Therefore, there will also be one less active member of the room.
App/src/pages/ReportDetailsPage.tsx
Lines 103 to 107 in f3bb5a5
What changes do you think we should make in order to solve the problem?
Let's make the
joinRoomfunction consistent with theinviteToRoomfunction by optimistically adding the new participant before updating its notification preference.Similar to the
inviteToRoomfunction, this change helps with the expected offline behavior.We can do this by replicating and modifying the code below to be suited for the
joinRoomfunction.App/src/libs/actions/Report.ts
Lines 2718 to 2729 in f3bb5a5
VictoriaExpensify commentedon Jun 9, 2024
Keeping this as a low priority and adding it to the #vip_vsb project
melvin-bot commentedon Jun 9, 2024
Job added to Upwork: https://www.upwork.com/jobs/~017450de92e982e995
[-]Room - Members number does not update in real time when user rejoin the room[/-][+][$250] Room - Members number does not update in real time when user rejoin the room[/+]15 remaining items
allroundexperts commentedon Jun 16, 2024
@jainilparikh I don't think that the offline flow is an "edge case". Your solution seems to be different from what the selected proposal mentioned as well.
dominictb commentedon Jun 17, 2024
PR should be up for review in a few hours.
melvin-bot commentedon Jul 10, 2024
This issue has not been updated in over 15 days. @iwiznia, @allroundexperts, @VictoriaExpensify, @dominictb eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
dominictb commentedon Aug 23, 2024
This should be ready for payment, no?
melvin-bot commentedon Sep 6, 2024
@iwiznia, @allroundexperts, @VictoriaExpensify, @dominictb, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.
allroundexperts commentedon Sep 9, 2024
@VictoriaExpensify This is still pending payment.
VictoriaExpensify commentedon Sep 9, 2024
Payment Summary:
Contributor: @dominictb paid $250 via Upwork
Contributor+: @allroundexperts owed $250 via NewDot
Thanks for your work on this!
JmillsExpensify commentedon Oct 8, 2024
$250 approved for @allroundexperts