[comments] align count with displayed kinds + preserve multi-line content

- discussionCountService now counts getAllowedCommentKinds() (NIP-22 kind 1111
  + legacy kind 1) instead of 1111-only, so the discussion badge no longer
  undercounts threads that contain legacy comments. The count filters are
  derived from the same source the thread display uses, so they can't drift.
- Add white-space: pre-wrap to .comment-thread__body so comments with line
  breaks/paragraphs preserve them instead of collapsing into one run-on line
  (long lines still wrap via word-break: break-word).

Test: spec-corrected discussion-count-service to assert the count filters use
getAllowedCommentKinds() (reverting to 1111-only fails the deepEqual).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-06-18 12:15:46 -04:00
1 parent 89747d7290
commit 6f5da76d30
3 files changed
+25 -11

No files matched your search

+4
View File
@@ -2721,6 +2721,10 @@
color: var(--text-primary);
line-height: 1.6;
word-break: break-word;
/* Comment content is inserted as a single text node, so preserve the
author's line breaks/paragraphs instead of collapsing them into one
run-on line. pre-wrap keeps newlines while still wrapping long lines. */
white-space: pre-wrap;
}
.comment-thread__actions {