Discussions are not assigned to force-pushed merge requests
Sometimes when you add a discussion and force-push to the branch the discussion won't be rendered on the frontend.
Example MR. Notice that some of the discussions are not rendered on the Changes tab while they are present on the Overview tab.
This happens because of two things at play:
- Backend sends different positions for a discussion:
position,original_positionandpositions. - Frontend expects one of these positions to match a selected
diffPositionexcept for line ranges
The problem arises when none of the discussion positions match available positions on the line:
We need to either adjust the frontend logic or make sure the backend sends correct positions.
The bug was easier to identify because of the refactorings in Unify collapse\expand all unresolved threads ac... (!136034 - merged).
Edited by Stanislav Lashmanov

