@@ -15,10 +15,11 @@ interface CheckRun {
1515
1616interface PRCheckStatusProps {
1717 taskId : string
18+ isActive ?: boolean
1819 className ?: string
1920}
2021
21- export function PRCheckStatus ( { taskId, className = '' } : PRCheckStatusProps ) {
22+ export function PRCheckStatus ( { taskId, isActive = false , className = '' } : PRCheckStatusProps ) {
2223 const [ checkRuns , setCheckRuns ] = useState < CheckRun [ ] > ( [ ] )
2324 const [ isLoading , setIsLoading ] = useState ( true )
2425
@@ -55,26 +56,29 @@ export function PRCheckStatus({ taskId, className = '' }: PRCheckStatusProps) {
5556 const hasFailed = checkRuns . some ( ( run ) => run . conclusion === 'failure' || run . conclusion === 'cancelled' )
5657 const allPassed = checkRuns . every ( ( run ) => run . status === 'completed' && run . conclusion === 'success' )
5758
59+ // Determine background color based on active state
60+ const bgColor = isActive ? 'bg-accent' : 'bg-card'
61+
5862 // Render the appropriate indicator
5963 if ( hasInProgress ) {
6064 return (
61- < div className = { `absolute -bottom-0.5 -right-0.5 bg-background rounded-full p-0.5 ${ className } ` } >
65+ < div className = { `absolute -bottom-0.5 -right-0.5 ${ bgColor } rounded-full p-0.5 ${ className } ` } >
6266 < div className = "w-1.5 h-1.5 rounded-full bg-yellow-500 animate-pulse" />
6367 </ div >
6468 )
6569 }
6670
6771 if ( hasFailed ) {
6872 return (
69- < div className = { `absolute -bottom-0.5 -right-0.5 bg-background rounded-full p-0.5 ${ className } ` } >
73+ < div className = { `absolute -bottom-0.5 -right-0.5 ${ bgColor } rounded-full p-0.5 ${ className } ` } >
7074 < div className = "w-1.5 h-1.5 rounded-full bg-red-500" />
7175 </ div >
7276 )
7377 }
7478
7579 if ( allPassed ) {
7680 return (
77- < div className = { `absolute -bottom-0.5 -right-0.5 bg-background rounded-full p-0.5 ${ className } ` } >
81+ < div className = { `absolute -bottom-0.5 -right-0.5 ${ bgColor } rounded-full p-0.5 ${ className } ` } >
7882 < Check className = "w-2 h-2 text-green-500" strokeWidth = { 3 } />
7983 </ div >
8084 )
0 commit comments