Removing attention request can lead to requesting attention instead
Summary
It was reported on slack (internal) that removing attention request will request an attention instead. This leads to a confusing UX.
Steps to reproduce
From slack message:
- I received an attention request on an MR
- I went to the MR, submitted some comments, and then clicked on the "Remove attention request" button next to my name, thinking it would remove the attention request.
- Later on I looked at the list of MRs that needed my attention, and that MR was still showing. In that MR's system notes, I could see that I requested my own attention.
- What I think happened is that my initial nteractions with the MR after being assigned for review cleared the attention request, but didn't update the Reviewers UI. So, when I clicked the "Remove attention request", it simply toggled the state back to the positive, despite the UI indicating that the attention request was removed.
What is the current bug behavior?
Removing attention request when it's already been removed will result to attention being requested instead.
What is the expected correct behavior?
Removing attention request when it's already been removed should not request attention instead.
Possible fixes
Add an add/remove mutation and let the frontend use those instead of the toggle mutation. This way, when the UI says that the attention request was removed, it'll actually be removed.