Merge Request Approval confusing UI after rebase
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=512116) </details> <!--IssueSummary end--> <!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary Gitlab Merge Request user interface is confusing in situations when a developer other than author of the MR both approves the MR and after that does a rebase in the MR. The user interface shows the approval from this developer but still complains about missing developer approvals. ### Steps to reproduce * Create a project * Make sure the correct merge request settings are enabled * Require at least 1 approval in MRs * Prevent approval by author * Prevent approvals by users who add commits * Prevent editing approval rules in merge requests * When a commit is added: Remove all approvals * Add a developer B to the project * Create an MR with Developer A (main -\> feature-branch) * Make changes to main with Developer A * Switch to Developer B * Approve the MR as Developer B * Rebase the MR with Developer B * Notice how the UI now doesn't show any indication that further approvals are needed. * After a browser refresh, the UI shows the need for approvals, but it still shows the "Approved by you" label. ### Example Project I was able to reproduce this in the following project: * [MR approval rules after rebase](https://gitlab.com/b_freitas_ultimate_group/tests-and-troubleshooting/ticket-592815-mr-approval-rules-after-rebase/-/merge_requests/2) (GitLab Team Members Only - Please ping me if you need access, and I'll add you :blush: ) ### What is the current *bug* behavior? After a rebase, the user interface shows the approval from this developer but still complains about missing developer approvals. ![Screenshot 2024-12-26 at 12.59.57 (After browser refresh) copy.png](/uploads/77e0d709934caa7633c7196bba97a410/Screenshot_2024-12-26_at_12.59.57__After_browser_refresh__copy.png){width=1373 height=884} ### What is the expected *correct* behavior? After a rebase, the user interface should only mention the missing developer approvals.
issue