Deleting all comments does not delete the discussion

Summary

I started a discussion on a diff and decided to delete it, so I deleted the comment under it. Now with no comments left, the discussion is always expanded.

Steps to reproduce

  1. Create a Merge Request
  2. Comment on a line in the diff. This starts a discussion
  3. Delete the comment

Example Project

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23098

There are 2 "deleted" discussions here that are always expanded.

What is the current bug behavior?

Discussion is still shown with no comments

What is the expected correct behavior?

Discussion is removed

Relevant logs and/or screenshots

Screenshot_2018-11-20_Add_group_milestones_in_upcoming_filter___23098____Merge_Requests___GitLab_org_GitLab_Community_Edition

Output of checks

This bug happens on GitLab.com

Possible fixes

Not sure, but maybe this is due to the discussion having a system-generated comment (Changed in new diff). The icon on the system comment is also misaligned for some reason.

Edited by Heinrich Lee Yu