Skip to content

Commit f7f249f

Browse files
committed
Shrink status dot and hide on merged prs; show only for open prs
1 parent 4a71317 commit f7f249f

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

components/pr-check-status.tsx

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

1616
interface PRCheckStatusProps {
1717
taskId: string
18+
prStatus: 'open' | 'closed' | 'merged'
1819
isActive?: boolean
1920
className?: string
2021
}
2122

22-
export function PRCheckStatus({ taskId, isActive = false, className = '' }: PRCheckStatusProps) {
23+
export function PRCheckStatus({ taskId, prStatus, isActive = false, className = '' }: PRCheckStatusProps) {
2324
const [checkRuns, setCheckRuns] = useState<CheckRun[]>([])
2425
const [isLoading, setIsLoading] = useState(true)
2526

@@ -46,6 +47,11 @@ export function PRCheckStatus({ taskId, isActive = false, className = '' }: PRCh
4647
return () => clearInterval(interval)
4748
}, [taskId])
4849

50+
// Only show indicator for open PRs
51+
if (prStatus !== 'open') {
52+
return null
53+
}
54+
4955
// Don't render anything if loading or no check runs
5056
if (isLoading || checkRuns.length === 0) {
5157
return null
@@ -63,23 +69,23 @@ export function PRCheckStatus({ taskId, isActive = false, className = '' }: PRCh
6369
if (hasInProgress) {
6470
return (
6571
<div className={`absolute -bottom-0.5 -right-0.5 ${bgColor} rounded-full p-0.5 ${className}`}>
66-
<div className="w-1.5 h-1.5 rounded-full bg-yellow-500 animate-pulse" />
72+
<div className="w-1 h-1 rounded-full bg-yellow-500 animate-pulse" />
6773
</div>
6874
)
6975
}
7076

7177
if (hasFailed) {
7278
return (
7379
<div className={`absolute -bottom-0.5 -right-0.5 ${bgColor} rounded-full p-0.5 ${className}`}>
74-
<div className="w-1.5 h-1.5 rounded-full bg-red-500" />
80+
<div className="w-1 h-1 rounded-full bg-red-500" />
7581
</div>
7682
)
7783
}
7884

7985
if (allPassed) {
8086
return (
8187
<div className={`absolute -bottom-0.5 -right-0.5 ${bgColor} rounded-full p-0.5 ${className}`}>
82-
<Check className="w-2 h-2 text-green-500" strokeWidth={3} />
88+
<Check className="w-1.5 h-1.5 text-green-500" strokeWidth={3} />
8389
</div>
8490
)
8591
}

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} isActive={isActive} />
404+
<PRCheckStatus taskId={task.id} prStatus={task.prStatus} isActive={isActive} />
405405
</div>
406406
)}
407407
<span className="truncate">

components/tasks-list-client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ export function TasksListClient({ user, authProvider, initialStars = 1056 }: Tas
424424
{task.prStatus && (
425425
<div className="relative">
426426
<PRStatusIcon status={task.prStatus} />
427-
<PRCheckStatus taskId={task.id} />
427+
<PRCheckStatus taskId={task.id} prStatus={task.prStatus} />
428428
</div>
429429
)}
430430
<span className="truncate">

0 commit comments

Comments
 (0)