-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] Security - Unable to remove closed account from copilot #53785
Comments
Triggered auto assignment to @VictoriaExpensify ( |
I couldn't reproduce it. Screen.20Recording.202024-12-10.20at.201.mp4 |
@Shahidullah-Muffakir please check again preconditions have been added: |
Thank you, Yes I could reproduce it now. ![]() |
Yeah this is an issue we should fix. |
Job added to Upwork: https://www.upwork.com/jobs/~021866325124686695861 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
I agree this is a BE issue. The ND should send a pusher message to update the The other thing we can do in the ND is, call an API that contains fresh @VictoriaExpensify We might need an internal engineer to choose the right path. |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
we only display the What changes do you think we should make in order to solve the problem?
App/src/libs/actions/Delegate.ts Lines 358 to 362 in 8981081
App/src/pages/settings/Security/SecuritySettingsPage.tsx Lines 144 to 145 in 8981081
can be: const addOrRemoveDelegateErrors = errorFields?.addDelegate?.[email] ?? errorFields?.removeDelegate?.[email];
const error = ErrorUtils.getLatestError(addOrRemoveDelegateErrors);
const isAddError = !!errorFields?.addDelegate?.[email];
onPendingActionDismiss: () => clearDelegateErrorsByField(email, isAddError ? 'addDelegate' : 'removeDelegate'), What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional) |
I believe the issue here is that we fail to display an error message when the API to remove a delegate encounters an error. There are many scenarios where the API might throw an error, and this is just one of them—specifically, when the pusher doesn't update the account.delegates data after closing an account. To address this, we should:
|
@daledah That's a good suggestion to fix the show error message, but I think the issue persists. The user still can't remove the copilot until re-login. The pusher fix only solved the issue when the copilot closed their account. |
Thanks, @mollfpr! Could you tag the relevant internal team here to provide the final decision? In my opinion, we can address the error message display and the pusher issue simultaneously. |
@mollfpr, @VictoriaExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@VictoriaExpensify Could you add the internal label? Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@mollfpr, @VictoriaExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@mollfpr @VictoriaExpensify 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! |
Yup, similar to that or OpenPaymentsPage!
We only have |
Okay so I've made a draft command that the App will be able to call -
Does that feel right? If so, are you up for making an App PR that calls that on opening the security page, and then I can test locally to see if that works out? |
bump on this ^^ when you have a moment @mollfpr - thanks! |
Not overdue, waiting for @mollfpr to chime in |
@dangrous Yeah, the API looks right!
Sure! I'll open up a draft PR for you to test now. |
Perfect, thanks! Looks like BE is working well. Going to clean up that PR and get that merged, then we can move ahead with yours! |
hey @mollfpr! That command is now live on staging, and ready to be tested with your PR |
@dangrous Thank you! I'll try on my PR! |
How's this one looking? |
@dangrous I found a case that make the issue still reproduced. While the account A is open the security page, it will show the account B as the copilot. Open the account B on other device and close the account. In this step the account B is still appear on account A and will fail if try to remove the account B from copilot. I'm thinking to calling the API again when it happen, so it will update the copilot list. What do you think? |
hrm, that's a pretty edge case for the front end... So you're thinking just recall I could potentially update the backend to just "succeed" if the account is closed? Not sure what that would take but might be okay... |
@dangrous Actually, after the remove delegate is failing.
I'm onboard with this idea! |
Cool - backend PR with that change is in review! If a user tries to remove a delegate with a closed account, it won't error, and it'll queue an onyx update sending the updated delegatedaccess |
Okay, that change is live on prod - let me know if we need to adjust anything else, @mollfpr |
@dangrous Thank you! The test looks great and I'll finish the PR now. |
@dangrous On second thoughts, I think we don't need ND PR. There's no error in removing the close account as described in the issue. Screen.Recording.2025-02-12.at.23.25.49.mp4 |
I think we should still update the list on opening the security settings page, though - that'll provide the best experience, since it'll lessen the amount of times people even have to remove a delegate. |
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: 9.0.73-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
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): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Precondition: copilot account B is added to account A. Account B was closed.
Expected Result:
Account B is remover from the list
Actual Result:
Account B is no removed from the list
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6689200_1733770674968.copilot_remove.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mollfprThe text was updated successfully, but these errors were encountered: