-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-05-14] [Due for payment 2025-05-14] [$250] AU - Room Invite - App auto-deselects all members after returning from member details page #59426
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
Comments
Triggered auto assignment to @trjExpensify ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-04-01 10:21:47 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
useEffect(() => {
if (selectedMembers.length === 0 || !canSelectMultiple) {
return;
}
setSelectedMembers((prevSelectedMembers) => {
const updatedSelectedMembers = prevSelectedMembers.filter((accountID) => {
const isInParticipants = participants.includes(accountID);
const pendingChatMember = reportMetadata?.pendingChatMembers?.findLast(
(member) => member.accountID === accountID.toString(),
);
const isPendingDelete = pendingChatMember?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
// Keep the member only if they're still in the room and not pending removal
return isInParticipants && !isPendingDelete;
});
return updatedSelectedMembers;
});
}, [participants, reportMetadata?.pendingChatMembers, canSelectMultiple, selectedMembers.length]);
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None What alternative solutions did you explore? (Optional) |
Please re-state the problem that we are trying to solve in this issue.When a user is removed from a room via the RoomMemberDetailsPage, the selected members count in RoomMembersPage becomes incorrect because the selectedMembers state is not being updated to reflect the removed user. What is the root cause of that problem?The following code resets the selected members when screen is not focused. App/src/pages/RoomMembersPage.tsx Lines 74 to 79 in e79a743
It was added to handle the button count reset upon member deletion. What changes do you think we should make in order to solve the problem?Delete the above logic. Update the selected members' count, if they are deleted on the member's details page. const participants = useMemo(() => getParticipantsList(report, personalDetails, true), [report, personalDetails, isFocusedScreen]);
useEffect(() => {
// Remove any selected members that are no longer in the participants list
setSelectedMembers((prevSelected) => prevSelected.filter((selectedId) => participants.includes(selectedId)));
}, [participants]);
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)N/A |
Proposal updated
|
ProposalPlease re-state the problem that we are trying to solve in this issue.App auto-deselects all members after returning from member details page What is the root cause of that problem?We set App/src/pages/RoomMembersPage.tsx Line 78 in d270267
What changes do you think we should make in order to solve the problem?To resolve this issue, we just need to set 1 Remove this hook App/src/pages/RoomMembersPage.tsx Lines 74 to 79 in d270267
2 Add new logic to handle App/src/pages/RoomMembersPage.tsx Line 276 in d270267 add: useEffect(() => {
const shouldClearSelection = selectedMembers.some((accountID) => {
const pendingChatMember = reportMetadata?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString());
return pendingChatMember?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
});
if (shouldClearSelection) {
setSelectedMembers([]);
}
}, [reportMetadata?.pendingChatMembers, selectedMembers]); expected of PR #48806
Screen.Recording.2025-04-01.at.23.07.01.mp4What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
@Expensify/design I'm cool with this change to persist the selection here? But I've noticed some inconsistencies, so wanted to double check ya'll are cool with this too? I.e I think we should require a full sweep here through the app to make it consistent whichever way we go. |
Yeah, I like the idea of making it persistent all over the app. We have the same on the reports page where you can multi-select, but open an expense and close again. I think that's the desired UX |
Definitely agree with that, let's fix this and make it consistent everywhere. |
+1 from me as well. Let's make it work the same everywhere. |
@trjExpensify @dannymcclain When we remove a member, should we persist the selection or reset it as I proposed? |
@trjExpensify @dannymcclain I believe the behavior in the category page should serve as the source of truth for this implementation, as it offers several key advantages:
In contrast, the current room member page behavior has limitations:
|
Yeah, that feels right to me 👍 |
Yes, but I think we should be consistent in the same case. |
Job added to Upwork: https://www.upwork.com/jobs/~021907487964037532418 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
@daledah Thanks for the proposal. The RCA makes sense and the solution overall looks good to me. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @mountiny, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@codewaseem Thanks for the proposal. RCA is correct but I think the solution is same as @daledah suggested. |
@huult Thanks for the proposal. The root cause is correct but the solution does not align with the expected behaviour i.e. we shouldn't clear the selection. |
This issue has not been updated in over 15 days. @trjExpensify, @s77rt, @mountiny, @daledah 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! |
PR still under review |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.40-7 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 2025-05-14. 🎊 For reference, here are some details about the assignees on this issue:
|
@s77rt @trjExpensify @s77rt The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.41-1 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 2025-05-14. 🎊 For reference, here are some details about the assignees on this issue:
|
@s77rt @trjExpensify @s77rt The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
|
Confirming there was one regression here? |
$75 approved for @s77rt |
Uh oh!
There was an error while loading. Please reload this page.
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: v9.1.21-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5857030
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome
App Component: Workspace Settings
Action Performed:
Expected Result:
The app should retain all selected members after opening the member details page and returning.
Actual Result:
After selecting some members, opening the member details page, and returning, all selected members are deselected.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6788705_1743498007635.Check_box_disappear.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @trjExpensifyThe text was updated successfully, but these errors were encountered: