@@ -68,30 +68,38 @@ function ChecksBody({
6868 const { attention, running, completed } = groupPullRequestChecks ( checks ) ;
6969 const canCollapse = attention . length + running . length > 0 && completed . length > 0 ;
7070 const visibleChecks = [ ...attention , ...running , ...( showAll || ! canCollapse ? completed : [ ] ) ] ;
71+ const hasDetails = visibleChecks . some ( ( check ) => check . url !== null ) ;
7172 if ( checks . length === 0 ) {
7273 return < p className = "text-muted-foreground text-xs" > No checks reported</ p > ;
7374 }
7475 return (
7576 < >
7677 < ScrollArea className = "max-h-64" >
77- < ul className = "flex flex-col gap-1" >
78- { }
78+ < ul
79+ className = { cn (
80+ "grid gap-x-2 gap-y-1" ,
81+ hasDetails
82+ ? "grid-cols-[auto_minmax(0,1fr)_auto_auto]"
83+ : "grid-cols-[auto_minmax(0,1fr)_auto]" ,
84+ ) }
85+ >
7986 { visibleChecks . map ( ( check , index ) => (
80- < li key = { `${ index } :${ check . name } ` } className = "flex items-center gap-2 text-xs" >
87+ < li
88+ key = { `${ index } :${ check . name } ` }
89+ className = "col-span-full grid grid-cols-subgrid items-center text-xs"
90+ >
8191 < PullRequestCheckStatusIcon status = { check . status } />
8292 < Tooltip >
83- < TooltipTrigger
84- render = { < span className = "min-w-0 flex-1 truncate" > { check . name } </ span > }
85- />
93+ < TooltipTrigger render = { < span className = "min-w-0 truncate" > { check . name } </ span > } />
8694 < TooltipPopup side = "top" > { check . description ?? check . name } </ TooltipPopup >
8795 </ Tooltip >
88- < span className = "shrink-0 text-muted-foreground" >
96+ < span className = "justify-self-end whitespace-nowrap text-muted-foreground" >
8997 { pullRequestCheckStatusLabel ( check ) }
9098 </ span >
9199 { check . url === null ? null : (
92100 < button
93101 type = "button"
94- className = "shrink-0 text-primary hover:underline"
102+ className = "text-primary hover:underline"
95103 onClick = { ( ) => {
96104 if ( ! check . url ) return ;
97105 void openLink ( check . url ) . catch ( ( error : unknown ) => {
@@ -143,7 +151,9 @@ export function PullRequestChecksPopover({
143151 render ?: React . ReactElement ;
144152} ) {
145153 const presentation = pullRequestChecksStatePresentation ( checksState ) ;
146- const runningCount = checks ?. filter ( ( check ) => check . status === "pending" ) . length ?? 0 ;
154+ const incompleteCount =
155+ checks ?. filter ( ( check ) => check . status === "pending" || check . status === "action-required" )
156+ . length ?? 0 ;
147157 const failedCount =
148158 checks ?. filter ( ( check ) => check . status === "failure" || check . status === "cancelled" ) . length ??
149159 0 ;
@@ -176,9 +186,9 @@ export function PullRequestChecksPopover({
176186 < presentation . Icon aria-hidden className = { cn ( "size-3.5" , presentation . toneClassName ) } />
177187 { variant === "count" ? (
178188 < >
179- { checks !== undefined && runningCount > 0 ? (
189+ { checks !== undefined && incompleteCount > 0 ? (
180190 < span className = "tabular-nums" >
181- { runningCount } /{ checks . length }
191+ { checks . length - incompleteCount } /{ checks . length }
182192 </ span >
183193 ) : failedCount > 0 ? (
184194 < span className = "tabular-nums" > { failedCount } failed</ span >
0 commit comments