From 18c5a1d2dfbb02856ec51b54edac82952852a58a Mon Sep 17 00:00:00 2001 From: maria Date: Fri, 11 Sep 2026 01:23:45 -0300 Subject: [PATCH] fix(web): simplify pull request summary sections (#10612) --- .../pullRequest/PullRequestDetailPanel.tsx | 4 +- .../pullRequest/PullRequestMarkdown.tsx | 8 +- .../components/pullRequest/PullRequestRow.tsx | 52 ++--- .../pullRequest/PullRequestSummaryTab.tsx | 188 +++++++++--------- .../pullRequest/ThreadPullRequestsPanel.tsx | 23 +-- .../pullRequest/pullRequestPresentation.tsx | 18 +- 6 files changed, 152 insertions(+), 141 deletions(-) diff --git a/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx b/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx index 5b86ef5ee3ba8d3fd705e061ba9c51a2eb214cfa..0284a2e6cdecb6be47b3f563dbc3a926a5e35ab6 100644 --- a/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx +++ b/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx @@ -1654,7 +1654,7 @@ export function PullRequestDetailPanel({ render={ + +
+ {(showChecks ? detail.checks : []).map((check, index) => { + const finding = { kind: "check", check } as const; + const failing = check.status === "failure" || check.status === "cancelled"; + return ( +
- - {check.name} - - {pullRequestCheckStatusLabel(check)} - - - {/* Only where there is something to fix. A passing check has no failure to + + {/* Only where there is something to fix. A passing check has no failure to reproduce, and the button would be an invitation to waste a thread. */} - {onFixFinding && failing ? ( - - ) : null} -
- ); - })} + {onFixFinding && failing ? ( + + ) : null} +
+ ); + })} + )} - +
0 ? ( - - ) : null + } > {activityPending ? ( diff --git a/apps/web/src/components/pullRequest/ThreadPullRequestsPanel.tsx b/apps/web/src/components/pullRequest/ThreadPullRequestsPanel.tsx index c9ef8974ef1318452c05e6b2da5a2504078ce0ea..35a449a3da79befc70fabb2d5ee152da97604640 100644 --- a/apps/web/src/components/pullRequest/ThreadPullRequestsPanel.tsx +++ b/apps/web/src/components/pullRequest/ThreadPullRequestsPanel.tsx @@ -29,6 +29,7 @@ import { pullRequestListLines, type PullRequestListLine } from "./pullRequestLis import { PullRequestActorAvatar, PullRequestDiffStat, + PullRequestApprovalGlyph, PullRequestStateGlyph, pullRequestChecksStatePresentation, } from "./pullRequestPresentation"; @@ -111,27 +112,23 @@ function LinkRow({ {snapshot?.title ?? link.repository} - {/* Right-aligned signals, in the order a reviewer scans them: are checks green, - has someone ruled, how big is it. Each is absent rather than neutral when the + {/* Match the full PR list: review verdict, checks, then diff counts. + Each is absent rather than neutral when the host said nothing, so a row without them reads as unknown, not as fine. */} - {snapshot?.checksState ? : null} {snapshot?.state === "open" && (snapshot.reviewDecision === "approved" || snapshot.reviewDecision === "changes-requested") ? ( - - {snapshot.reviewDecision === "approved" ? "Approved" : "Changes requested"} - + snapshot.reviewDecision === "approved" ? ( + + ) : ( + Changes requested + ) ) : null} {snapshot?.state === "open" && snapshot.mergeability === "conflicting" ? ( Conflicts ) : null} + {snapshot?.checksState ? : null} {snapshot?.updatedAt ? ( - · {formatRelativeTimeLabel(snapshot.updatedAt)} + {formatRelativeTimeLabel(snapshot.updatedAt)} ) : null} diff --git a/apps/web/src/components/pullRequest/pullRequestPresentation.tsx b/apps/web/src/components/pullRequest/pullRequestPresentation.tsx index 9cd3340832ddfe2ccf36209f5ffdc9e7f8260892..890efb67cb9bf027f58dd09076737b860e06ec6f 100644 --- a/apps/web/src/components/pullRequest/pullRequestPresentation.tsx +++ b/apps/web/src/components/pullRequest/pullRequestPresentation.tsx @@ -17,6 +17,7 @@ import { GitPullRequestDraftIcon, GitPullRequestIcon, TriangleAlertIcon, + UserCheckIcon, } from "lucide-react"; import { Children, isValidElement, type ReactNode } from "react"; @@ -32,6 +33,21 @@ interface StatePresentation { readonly Icon: typeof GitPullRequestIcon; } +export function PullRequestApprovalGlyph() { + return ( + + }> + + Approved + + Approved + + ); +} + /** * How a pull request's state reads on this page. Open, closed, merged, and draft use the same * ink as the thread badge in `ThreadStatusIndicators`, so one pull request cannot look like two @@ -173,7 +189,7 @@ const CHECKS_STATE_PRESENTATION = { passing: { label: "All checks have passed", Icon: CircleCheckIcon, - toneClassName: "text-emerald-600 dark:text-emerald-300/90", + toneClassName: CHECK_STATUS_PRESENTATION.success.toneClassName, }, failing: { label: "Some checks were not successful", -- 2.54.0