Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ export const KanbanCard = memo(function KanbanCard({
});

// Make the card a drop target for creating dependency links
// Only backlog cards can be link targets (to avoid complexity with running features)
const isDroppable = !isOverlay && feature.status === 'backlog' && !isSelectionMode;
// All non-completed cards can be link targets to allow flexible dependency creation
// (completed features are excluded as they're already done)
const isDroppable = !isOverlay && feature.status !== 'completed' && !isSelectionMode;
const { setNodeRef: setDroppableRef, isOver } = useDroppable({
id: `card-drop-${feature.id}`,
disabled: !isDroppable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { Button } from '@/components/ui/button';
import { ArrowDown, ArrowUp, Link2, X } from 'lucide-react';
import type { Feature } from '@/store/app-store';
import { cn } from '@/lib/utils';
import { StatusBadge } from '../components';
import type { FeatureStatusWithPipeline } from '@automaker/types';

export type DependencyLinkType = 'parent' | 'child';

Expand Down Expand Up @@ -57,7 +59,10 @@ export function DependencyLinkDialog({
<div className="py-4 space-y-4">
{/* Dragged feature */}
<div className="p-3 rounded-lg border bg-muted/30">
<div className="text-xs text-muted-foreground mb-1">Dragged Feature</div>
<div className="flex items-center justify-between mb-1">
<span className="text-xs text-muted-foreground">Dragged Feature</span>
<StatusBadge status={draggedFeature.status as FeatureStatusWithPipeline} size="sm" />
</div>
<div className="text-sm font-medium line-clamp-3 break-words">
{draggedFeature.description}
</div>
Expand All @@ -71,7 +76,10 @@ export function DependencyLinkDialog({

{/* Target feature */}
<div className="p-3 rounded-lg border bg-muted/30">
<div className="text-xs text-muted-foreground mb-1">Target Feature</div>
<div className="flex items-center justify-between mb-1">
<span className="text-xs text-muted-foreground">Target Feature</span>
<StatusBadge status={targetFeature.status as FeatureStatusWithPipeline} size="sm" />
</div>
<div className="text-sm font-medium line-clamp-3 break-words">
{targetFeature.description}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ export function useBoardDragDrop({
const targetFeature = features.find((f) => f.id === targetFeatureId);
if (!targetFeature) return;

// Only allow linking backlog features (both must be in backlog)
if (draggedFeature.status !== 'backlog' || targetFeature.status !== 'backlog') {
// Don't allow linking completed features (they're already done)
if (draggedFeature.status === 'completed' || targetFeature.status === 'completed') {
toast.error('Cannot link features', {
description: 'Both features must be in the backlog to create a dependency link.',
description: 'Completed features cannot be linked.',
});
return;
}
Expand Down