diff --git a/app/views/discussions/_diff_discussion.html.haml b/app/views/discussions/_diff_discussion.html.haml
index c280b5b53b73a7153eec0f3bfad777f2f561e8c2..1411daeb4a69187730403a621f021bbd00d18541 100644
--- a/app/views/discussions/_diff_discussion.html.haml
+++ b/app/views/discussions/_diff_discussion.html.haml
@@ -1,4 +1,4 @@
-- expanded = local_assigns.fetch(:expanded, discussion.expanded?)
+- expanded = local_assigns.fetch(:expanded, true)
 %tr.notes_holder{class: ('hide' unless expanded)}
   %td.notes_line{ colspan: 2 }
   %td.notes_content
diff --git a/app/views/projects/diffs/_line.html.haml b/app/views/projects/diffs/_line.html.haml
index 4082f7bba203079be7937cc0deb23bfd8b544a24..7042e9f1fc97310885b8e8c0cdc7b9b1ea5cd034 100644
--- a/app/views/projects/diffs/_line.html.haml
+++ b/app/views/projects/diffs/_line.html.haml
@@ -30,8 +30,8 @@
         = diff_line_content(line.text, type)
 
 - discussions = local_assigns.fetch(:discussions, nil)
-- discussion_expanded = local_assigns.fetch(:discussion_expanded, false)
 - if discussions && !line.meta?
   - discussion = discussions[line_code]
   - if discussion
+    - discussion_expanded = local_assigns.fetch(:discussion_expanded, discussion.expanded?)
     = render "discussions/diff_discussion", discussion: discussion, expanded: discussion_expanded
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml
index da8e343a1215dff08966b762015fa94fe28b0173..f1d2d4bf2689d3cb3245ca9d4a68d14e2addeaf3 100644
--- a/app/views/projects/diffs/_text_file.html.haml
+++ b/app/views/projects/diffs/_text_file.html.haml
@@ -9,9 +9,7 @@
   = render partial: "projects/diffs/line",
     collection: diff_file.highlighted_diff_lines,
     as: :line,
-    locals: { diff_file: diff_file,
-      discussions: discussions,
-      plain: true }
+    locals: { diff_file: diff_file, discussions: discussions }
 
   - last_line = diff_file.highlighted_diff_lines.last.new_pos
   - if !diff_file.new_file && last_line > 0