From 157fa445c53ed40d0b75423810050ac6a7dd506c Mon Sep 17 00:00:00 2001 From: Lukas May Date: Fri, 6 Mar 2026 11:03:27 +0100 Subject: [PATCH] fix: Show individual discussion threads in review sidebar with navigation Discussions section was showing only aggregate counts (total/resolved/unresolved) with no way to see or navigate to individual threads. Now lists each root comment with file:line location, body preview, resolved status, and reply count. Clicking a discussion scrolls to its file in the diff viewer. --- .../src/components/review/ReviewSidebar.tsx | 77 ++++++++++++++----- 1 file changed, 57 insertions(+), 20 deletions(-) diff --git a/apps/web/src/components/review/ReviewSidebar.tsx b/apps/web/src/components/review/ReviewSidebar.tsx index fe8d383..cc7042e 100644 --- a/apps/web/src/components/review/ReviewSidebar.tsx +++ b/apps/web/src/components/review/ReviewSidebar.tsx @@ -213,29 +213,66 @@ function FilesView({ )} - {/* Comment summary */} + {/* Discussions — individual threads */} {comments.length > 0 && (
-

- Discussions -

-
- - - {comments.length} +

+ Discussions + + {unresolvedCount > 0 && ( + + + {unresolvedCount} + + )} + {resolvedCount > 0 && ( + + + {resolvedCount} + + )} - {resolvedCount > 0 && ( - - - {resolvedCount} - - )} - {unresolvedCount > 0 && ( - - - {unresolvedCount} - - )} +

+
+ {comments + .filter((c) => !c.parentCommentId) + .map((thread) => { + const replyCount = comments.filter( + (c) => c.parentCommentId === thread.id, + ).length; + return ( + + ); + })}
)}