"use client"; import { IconGitMerge, IconGitPullRequest } from "@tabler/icons-react"; import Link from "@/components/routing/app-link"; import { useAppStore } from "@/components/state-provider"; import { aggregatePRStatusColor } from "@/components/github/pr-task-icon"; import { aggregateMRStatusColor } from "@/components/gitlab/mr-task-icon"; import { useTaskMRs } from "@/hooks/domains/gitlab/use-task-mr"; import { linkToTask } from "@/lib/links"; import { getTaskStateIcon } from "@/lib/ui/state-icons"; import { formatTaskStateLabel } from "@/lib/ui/state-labels"; import { cn } from "@/lib/utils"; import type { TaskSubtask } from "@/hooks/domains/kanban/use-task-subtasks"; /** * A presentational CI glyph — not PRTaskIcon/MRTaskIcon. Those are Tooltip * roots, and nesting one inside hover-card content is the pattern * apps/web/AGENTS.md warns against (a Tooltip can close and unmount its * parent HoverCard before the pointer reaches it). */ function SubtaskCIGlyph({ taskId }: { taskId: string }) { const prs = useAppStore((state) => state.taskPRs.byTaskId[taskId]) ?? []; const mrs = useTaskMRs(taskId); if (prs.length > 0) { return (