fix: update kanban card status handling

- Enhanced the Kanban card component to support additional feature statuses ('interrupted' and 'ready') in the backlog display logic.
- Updated relevant components to reflect these changes, ensuring consistent behavior across the UI.
This commit is contained in:
gsxdsm
2026-02-15 10:38:23 -08:00
parent a935229031
commit f459b73cb5
3 changed files with 79 additions and 70 deletions

View File

@@ -293,56 +293,59 @@ export const CardActions = memo(function CardActions({
) : null} ) : null}
</> </>
)} )}
{!isCurrentAutoTask && feature.status === 'backlog' && ( {!isCurrentAutoTask &&
<> (feature.status === 'backlog' ||
<Button feature.status === 'interrupted' ||
variant="secondary" feature.status === 'ready') && (
size="sm" <>
className="flex-1 h-7 text-xs"
onClick={(e) => {
e.stopPropagation();
onEdit();
}}
onPointerDown={(e) => e.stopPropagation()}
data-testid={`edit-backlog-${feature.id}`}
>
<Edit className="w-3 h-3 mr-1" />
Edit
</Button>
{feature.planSpec?.content && onViewPlan && (
<Button <Button
variant="outline" variant="secondary"
size="sm"
className="h-7 text-xs px-2"
onClick={(e) => {
e.stopPropagation();
onViewPlan();
}}
onPointerDown={(e) => e.stopPropagation()}
data-testid={`view-plan-${feature.id}`}
title="View Plan"
>
<Eye className="w-3 h-3" />
</Button>
)}
{onImplement && (
<Button
variant="default"
size="sm" size="sm"
className="flex-1 h-7 text-xs" className="flex-1 h-7 text-xs"
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();
onImplement(); onEdit();
}} }}
onPointerDown={(e) => e.stopPropagation()} onPointerDown={(e) => e.stopPropagation()}
data-testid={`make-${feature.id}`} data-testid={`edit-backlog-${feature.id}`}
> >
<PlayCircle className="w-3 h-3 mr-1" /> <Edit className="w-3 h-3 mr-1" />
Make Edit
</Button> </Button>
)} {feature.planSpec?.content && onViewPlan && (
</> <Button
)} variant="outline"
size="sm"
className="h-7 text-xs px-2"
onClick={(e) => {
e.stopPropagation();
onViewPlan();
}}
onPointerDown={(e) => e.stopPropagation()}
data-testid={`view-plan-${feature.id}`}
title="View Plan"
>
<Eye className="w-3 h-3" />
</Button>
)}
{onImplement && (
<Button
variant="default"
size="sm"
className="flex-1 h-7 text-xs"
onClick={(e) => {
e.stopPropagation();
onImplement();
}}
onPointerDown={(e) => e.stopPropagation()}
data-testid={`make-${feature.id}`}
>
<PlayCircle className="w-3 h-3 mr-1" />
Make
</Button>
)}
</>
)}
</div> </div>
); );
}); });

View File

@@ -126,35 +126,39 @@ export const CardHeaderSection = memo(function CardHeaderSection({
</div> </div>
)} )}
{/* Backlog header */} {/* Backlog header (also handles 'interrupted' and 'ready' statuses that display in backlog column) */}
{!isCurrentAutoTask && !isSelectionMode && feature.status === 'backlog' && ( {!isCurrentAutoTask &&
<div className="absolute top-2 right-2 flex items-center gap-1"> !isSelectionMode &&
<Button (feature.status === 'backlog' ||
variant="ghost" feature.status === 'interrupted' ||
size="sm" feature.status === 'ready') && (
className="h-6 w-6 p-0 hover:bg-white/10 text-muted-foreground hover:text-foreground" <div className="absolute top-2 right-2 flex items-center gap-1">
onClick={(e) => { <Button
e.stopPropagation(); variant="ghost"
onSpawnTask?.(); size="sm"
}} className="h-6 w-6 p-0 hover:bg-white/10 text-muted-foreground hover:text-foreground"
onPointerDown={(e) => e.stopPropagation()} onClick={(e) => {
data-testid={`spawn-backlog-${feature.id}`} e.stopPropagation();
title="Spawn Sub-Task" onSpawnTask?.();
> }}
<GitFork className="w-4 h-4" /> onPointerDown={(e) => e.stopPropagation()}
</Button> data-testid={`spawn-backlog-${feature.id}`}
<Button title="Spawn Sub-Task"
variant="ghost" >
size="sm" <GitFork className="w-4 h-4" />
className="h-6 w-6 p-0 hover:bg-white/10 text-muted-foreground hover:text-destructive" </Button>
onClick={handleDeleteClick} <Button
onPointerDown={(e) => e.stopPropagation()} variant="ghost"
data-testid={`delete-backlog-${feature.id}`} size="sm"
> className="h-6 w-6 p-0 hover:bg-white/10 text-muted-foreground hover:text-destructive"
<Trash2 className="w-4 h-4" /> onClick={handleDeleteClick}
</Button> onPointerDown={(e) => e.stopPropagation()}
</div> data-testid={`delete-backlog-${feature.id}`}
)} >
<Trash2 className="w-4 h-4" />
</Button>
</div>
)}
{/* Waiting approval / Verified header */} {/* Waiting approval / Verified header */}
{!isCurrentAutoTask && {!isCurrentAutoTask &&

View File

@@ -121,6 +121,8 @@ export const KanbanCard = memo(function KanbanCard({
const isDraggable = const isDraggable =
!isSelectionMode && !isSelectionMode &&
(feature.status === 'backlog' || (feature.status === 'backlog' ||
feature.status === 'interrupted' ||
feature.status === 'ready' ||
feature.status === 'waiting_approval' || feature.status === 'waiting_approval' ||
feature.status === 'verified' || feature.status === 'verified' ||
feature.status.startsWith('pipeline_') || feature.status.startsWith('pipeline_') ||