-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[PAID] [$250] Workspace - Non-admin is not instantly removed from #admins member list after being demoted #53390
Comments
Triggered auto assignment to @strepanier03 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace - Non-admin is not instantly removed from #admins member list after being demoted What is the root cause of that problem?We are neither adding a user to the admin room nor removing them when setting or unsetting a user's role to admin optimistically here App/src/libs/actions/Policy/Member.ts Lines 452 to 466 in 6482913
and although the BE return participants removing the key for the user onyx merge will not be able to remove the existing key for the member hence we need to clear cache to see the member removed from the members of the admin room
What changes do you think we should make in order to solve the problem?We will retrieve the admin room of the policy from allReports with the condition that a report is
on the removing case we should specifically set the participants key for the member to And we will revert on What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?For tests: we currently have tests for App/tests/actions/PolicyMemberTest.ts Lines 107 to 117 in 6482913
but we are only asserting for the employeeList of the policy. Now we can create a policy admin room report (setting explicitly the policyID , 'participantsand chatTypesome how similar to [here](https://github.com/FitseTLT/App/blob/64829131fe962681626b4b016140521d05f7fe52/tests/actions/PolicyMemberTest.ts#L36-L39)) and set in onyx and then we will add more assertions asserting that the admin room of the policy has the correct participants` list accordingly for both cases where admin role is set and unset
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.suggestions for the code that might help address the issue where a non-admin is not immediately removed from the #admins room member list after being demoted. What is the root cause of that problem?A lack of immediate UI synchronization after the user's role is updated in the backend.
using
Use of WebSockets or Event Listeners for Real-Time Updates
Triggering UI Refresh on Role Change (In Vanilla JavaScript or jQuery)
Handle Immediate Role Removal from UI (For Example with API Polling)
Backend Example (Node.js with Socket.IO):
|
@strepanier03 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Job added to Upwork: https://www.upwork.com/jobs/~021866294583392794294 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf ( |
@strepanier03, @allgandalf Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Will review tomorrow |
@strepanier03 @allgandalf this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
okay @FitseTLT your solutions seems plausible, but before moving forward i would love to test it a bit, can you please share a test branch? |
Here it is @allgandalf |
Thanks, i will test and get back |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@strepanier03, @allgandalf Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@allgandalf Bump on this one and @mjasikowski Can you help turn the label back to weekly? Thx |
@FitseTLT done |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.5-5 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-03-05. 🎊 For reference, here are some details about the assignees on this issue:
|
@allgandalf @strepanier03 @allgandalf 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] |
Payment Summary
|
I've paid out and closed the contract for @FitseTLT. @allgandalf I'll check for a reg test later today and pay out if I can. |
Little bump @allgandalf - I'll check again tomorrow. |
I will complete the checklist tomorrow |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalPrecondition:
Test:
verify that : The non-admin should now be removed from #admins room and will not appear in member list in #admins room. Do we agree 👍 or 👎 |
@strepanier03 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
only payment remains |
Reg test created. |
Finished paying and closed the contract. Closing GH now. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.69-1
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: N/A
Email or phone of affected tester (no customers): applausetester+232803@applause.expensifail.com
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The non-admin should now be removed from #admins room and will not appear in member list in #admins room.
Actual Result:
The non-admin still appears in member list in #admins room after being demoted to member.
After resetting the app in Troubleshoot (or relogin), the non-admin is removed from member list in #admins.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
bug.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @strepanier03The text was updated successfully, but these errors were encountered: