Skip to content

Commit 4a71317

Browse files
committed
Fix circle border to match task bg for active/inactive state
1 parent 21d4d6c commit 4a71317

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

components/pr-check-status.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ interface CheckRun {
1515

1616
interface 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
)

components/task-sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ export function TaskSidebar({ tasks, onTaskSelect, width = 288 }: TaskSidebarPro
401401
{task.prStatus && (
402402
<div className="relative">
403403
<PRStatusIcon status={task.prStatus} />
404-
<PRCheckStatus taskId={task.id} />
404+
<PRCheckStatus taskId={task.id} isActive={isActive} />
405405
</div>
406406
)}
407407
<span className="truncate">

0 commit comments

Comments
 (0)