'use client'; /** * IssueDetailPanel Component * * Side panel showing issue details (assignee, labels, sprint, etc.) * * @module features/issues/components/IssueDetailPanel */ import { GitBranch, GitPullRequest, Tag, Bot, User } from 'lucide-react'; import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Separator } from '@/components/ui/separator'; import { cn } from '@/lib/utils'; import type { IssueDetail } from '../types'; interface IssueDetailPanelProps { issue: IssueDetail; className?: string; } export function IssueDetailPanel({ issue, className }: IssueDetailPanelProps) { return (
{/* Assignment Panel */} Details {/* Assignee */}

Assignee

{issue.assignee ? (
{issue.assignee.avatar || (issue.assignee.type === 'agent' ? (

{issue.assignee.name}

{issue.assignee.type}

) : (

Unassigned

)}
{/* Reporter */}

Reporter

{issue.reporter.avatar || (issue.reporter.type === 'agent' ? (

{issue.reporter.name}

{/* Sprint */}

Sprint

{issue.sprint || 'Backlog'}

{/* Story Points */} {issue.story_points !== null && (

Story Points

{issue.story_points}

)} {/* Due Date */} {issue.due_date && (

Due Date

{new Date(issue.due_date).toLocaleDateString()}

)} {/* Labels */}

Labels

{issue.labels.map((label) => ( ))} {issue.labels.length === 0 && ( No labels )}
{/* Development */} {(issue.branch || issue.pull_request) && ( Development {issue.branch && (
)} {issue.pull_request && (
)}
)}
); }