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
[HOLD for payment 2024-04-15] [$500] Room - Members added and deleted offline are not crossed out #38821
Version Number: 1.4.56-0 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
@francoisl 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
For example, if we add user A and then delete it, the pendingChatMembers will be:
[{accountID: A_ID, pendingAction: 'add'}, {accountID: A_ID, pendingAction: 'delete'}]
Then, we get the first pending member and get the pending action value,
What alternative solutions did you explore? (Optional)
Change the structure of pendingChatMembers to be an object, so we can only have one accountID in pendingChatMembers
pendingChatMembers: {
123: 'add',
}
and if we merge it with
{
123: 'delete',
}
then it became
pendingChatMembers: {
123: 'delete',
}
and to get the pending action, we just need to do:
report?.pendingChatMembers?.[accountID]
or we can update getPendingChatMembers to remove any duplicate, for example by iterating from the back, keep track of found accountID, and skipping the item that the accountID is already found.
@francoisl I don't think it's a regression of anything, but a missed case to be handled.
Fix/34671: Grey out pending member in report #35883 fixes the issue that the member isn't grayed out when adding it while offline, but at this time, there is another bug, that is when you remove a member while offline, the member completely disappears, so they have no way to test the delete while offline case.
The fix from (2) already works correctly, but because of the imperfect implementation from (1), we get this issue where it fails when we add and delete the same user while offline.
EDIT: updated my proposal to include another alternative
changed the title [-][$500] Room - Members added and deleted offline are not crossed out[/-][+][HOLD for payment 2024-04-15] [$500] Room - Members added and deleted offline are not crossed out[/+]on Apr 8, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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:
[@mollfpr] 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:
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.
[@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@mollfpr] 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:
[@mollfpr] 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:
I think the regression step should be enough.
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.
Create a new room if you don't have one
Go offline
Invite a new user to the room
Verify the user is grayed out
Remove the user from the room
Verify the user is grayed out and strikethrough-ed
Activity
github-actions commentedon Mar 22, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Mar 22, 2024
Triggered auto assignment to @francoisl (
Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.lanitochka17 commentedon Mar 22, 2024
We think that this bug might be related to #vip-vsp
lanitochka17 commentedon Mar 22, 2024
@francoisl 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
francoisl commentedon Mar 22, 2024
This looks related to #35355
cc @tienifr @alitoshmatov.
Can't tell if it's on purpose or not, but regardless it doesn't sound like a blocker. I'll demote for now.
bernhardoj commentedon Mar 23, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The deleted member while offline is grayed out but not strikethrough-ed.
What is the root cause of that problem?
We have a property called
pendingChatMembers. When we add or remove a member, we will push a newpendingChatMembersto the existing one.App/src/libs/ReportUtils.ts
Lines 2846 to 2849 in 191d932
For example, if we add user A and then delete it, the
pendingChatMemberswill be:[{accountID: A_ID, pendingAction: 'add'}, {accountID: A_ID, pendingAction: 'delete'}]
Then, we get the first pending member and get the pending action value,
App/src/pages/RoomMembersPage.tsx
Line 201 in 191d932
App/src/pages/RoomMembersPage.tsx
Line 218 in 191d932
in this case, the pending action add is the first one to be found, that's why we can't see the strikethrough.
this probably happens in ReportParticipantsPage too
What changes do you think we should make in order to solve the problem?
The simplest one is to use
findLastto find the latest pending member.to further improve the UX, we can disable the pending delete member
App/src/pages/RoomMembersPage.tsx
Line 207 in 191d932
What alternative solutions did you explore? (Optional)
Change the structure of
pendingChatMembersto be an object, so we can only have oneaccountIDinpendingChatMembersand to get the pending action, we just need to do:
or we can update
getPendingChatMembersto remove any duplicate, for example by iterating from the back, keep track of found accountID, and skipping the item that the accountID is already found.bernhardoj commentedon Mar 23, 2024
@francoisl I don't think it's a regression of anything, but a missed case to be handled.
The fix from (2) already works correctly, but because of the imperfect implementation from (1), we get this issue where it fails when we add and delete the same user while offline.
EDIT: updated my proposal to include another alternative
tienifr commentedon Mar 25, 2024
@francoisl Yes, it's not my regression
28 remaining items
[-][$500] Room - Members added and deleted offline are not crossed out[/-][+][HOLD for payment 2024-04-15] [$500] Room - Members added and deleted offline are not crossed out[/+]melvin-bot commentedon Apr 8, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 8, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-04-15. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 8, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
laurenreidexpensify commentedon Apr 16, 2024
Payment Summary -
laurenreidexpensify commentedon Apr 16, 2024
@mollfpr pls confirm checklist steps above thank you
mollfpr commentedon Apr 16, 2024
#35883
https://github.com/Expensify/App/pull/35883/files#r1567706303
I think the regression step should be enough.
JmillsExpensify commentedon Apr 18, 2024
$500 approved for @mollfpr