auto-claude: subtask-1-3 - Update IdeaCard and IdeaDetailPanel to show Go to Task button

- Added ExternalLink icon import to both components
- Updated IdeaCard to destructure onGoToTask prop
- Added Go to Task button in IdeaCard when idea is converted and has taskId
- Updated IdeaDetailPanel to destructure onGoToTask prop
- Added Go to Task button in IdeaDetailPanel when idea is converted and has taskId

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
AndyMik90
2025-12-15 11:06:53 +01:00
co-authored by Claude Opus 4.5
parent 3bc16a5011
commit dbc568a26b
2 changed files with 32 additions and 4 deletions
@@ -1,4 +1,4 @@
import { Play, X } from 'lucide-react';
import { ExternalLink, Play, X } from 'lucide-react';
import { Button } from '../ui/button';
import { Badge } from '../ui/badge';
import { Card } from '../ui/card';
@@ -42,7 +42,7 @@ interface IdeaCardProps {
onDismiss: (idea: Idea) => void;
}
export function IdeaCard({ idea, onClick, onConvert, onDismiss }: IdeaCardProps) {
export function IdeaCard({ idea, onClick, onConvert, onGoToTask, onDismiss }: IdeaCardProps) {
const isDismissed = idea.status === 'dismissed';
const isConverted = idea.status === 'converted';
@@ -137,6 +137,26 @@ export function IdeaCard({ idea, onClick, onConvert, onDismiss }: IdeaCardProps)
</Tooltip>
</div>
)}
{isConverted && idea.taskId && onGoToTask && (
<div className="flex items-center gap-1 ml-2">
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="ghost"
size="sm"
className="h-8 w-8 p-0 text-primary"
onClick={(e) => {
e.stopPropagation();
onGoToTask(idea.taskId!);
}}
>
<ExternalLink className="h-4 w-4" />
</Button>
</TooltipTrigger>
<TooltipContent>Go to Task</TooltipContent>
</Tooltip>
</div>
)}
</div>
</Card>
);
@@ -1,4 +1,4 @@
import { ChevronRight, Lightbulb, Play, X } from 'lucide-react';
import { ChevronRight, ExternalLink, Lightbulb, Play, X } from 'lucide-react';
import { Button } from '../ui/button';
import { Badge } from '../ui/badge';
import {
@@ -31,7 +31,7 @@ interface IdeaDetailPanelProps {
onDismiss: (idea: Idea) => void;
}
export function IdeaDetailPanel({ idea, onClose, onConvert, onDismiss }: IdeaDetailPanelProps) {
export function IdeaDetailPanel({ idea, onClose, onConvert, onGoToTask, onDismiss }: IdeaDetailPanelProps) {
const isDismissed = idea.status === 'dismissed';
const isConverted = idea.status === 'converted';
@@ -103,6 +103,14 @@ export function IdeaDetailPanel({ idea, onClose, onConvert, onDismiss }: IdeaDet
</Button>
</div>
)}
{isConverted && idea.taskId && onGoToTask && (
<div className="flex-shrink-0 p-4 border-t border-border">
<Button className="w-full" onClick={() => onGoToTask(idea.taskId!)}>
<ExternalLink className="h-4 w-4 mr-2" />
Go to Task
</Button>
</div>
)}
</div>
);
}