Stop recreating all suggestion when the diff note is edited

The following discussion from gitlab-ce!23147 should be addressed:

  • DouweM started a discussion: (+3 comments)

    If the comment holding this suggestion is later edited, we lose the applied flag; does that matter? Could/should we somehow preserve it by not just deleting all existing suggestions, but updating them as appropriate if it's determined that the same suggestions still exist in the note body?

Currently we delete all suggestions of a note upon editing. That is, if one suggestion was already applied we lose this tracking.

Ideally we should have a comparison solution which would be used upon diff notes updating:

  • If a new suggestion markdown is added, we should create this suggestion and reorder the note.suggestions
  • If a suggestion markdown edited, we should update the correct suggestion record and reorder the note.suggestions
  • If a suggestion markdown deleted, we should delete the correct suggestion record and reorder the note.suggestions
Edited Jun 26, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading