Applying suggestion on MR does not show spinner or resolve discussion
Summary
Applying a suggestion on an MR will randomly not show the spinner to indicate progress nor will it show the discussion as resolved (refreshing page will show the discussion as resolved).
When applying two suggestions in a batch, the loading state stops too early and jumps back to the initial buttons. If you wait for another couple of seconds, it will eventually jump to the correct "Applied" state, but the user might have already pressed the "Apply suggestions" button again or navigated completely away from the page, thinking none of his changes were actually applied.
Batch_suggestion_loading_state
Labeling this as severity2 as this could cause users to think that the entire feature is broken and might even push them to press the button multiple times, which would completely mess up their suggestions and actually result in certain suggestions being rolled back and then easily forgotten, as can be seen in this video:
Batch_suggestions_loading_problems
Steps to reproduce
Single suggestion:
- Create and apply suggestion on an MR.
Batch suggestion:
- Create a new merge request in https://gitlab.com/gitlab-com/www-gitlab-com.
- Make 2 suggestions in the Changes tab.
- Add both suggestions to a batch and hit the "Apply suggestions" button.
What is the current bug behavior?
Loading state jumps back to active button state before it eventually finishes.
What is the expected correct behavior?
Loading state should persist until all changes have actually been applied.