diff --git a/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx b/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx index 663618b188e5cd64bc612cfd7890ba38268fb63b..b06630f3bd043e9a5ad097fe16b020debe74c10c 100644 --- a/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx +++ b/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx @@ -468,6 +468,18 @@ export function PullRequestSummaryTab({ const hiddenCommentCount = detail.comments.length - recentComments.length; const [commentOrder, setCommentOrder] = useState<"newest" | "oldest">("newest"); const visibleComments = orderPullRequestComments(recentComments, commentOrder); + const showOldestCommentsButton = + hiddenCommentCount > 0 ? ( + + ) : null; // Read from the whole conversation, not the window shown below it: a verdict older than the // last thirty comments still stands. const reviewOutcomes = latestPullRequestReviewOutcomes(detail.comments, detail.commits); @@ -864,22 +876,7 @@ export function PullRequestSummaryTab({

No comments yet.

) : (
- {hiddenCommentCount > 0 ? ( - // Hundreds of comments are hundreds of markdown renders, and the ones worth - // opening a pull request for are the recent ones. The rest are one press away and - // stay rendered once asked for. - - ) : null} + {commentOrder === "oldest" ? showOldestCommentsButton : null} {visibleComments.map((comment) => { const thread = threadByCommentId.get(comment.id); const body = visibleBody(comment.body); @@ -991,6 +988,7 @@ export function PullRequestSummaryTab({ ); })} + {commentOrder === "newest" ? showOldestCommentsButton : null}
)}