/**
* Stack Visualization Component
* Visual tree/timeline showing stacked PRs with status and navigation
*/
import React from "react";
import {
GitPullRequest,
GitMerge,
CircleDot,
Circle,
FileEdit,
ChevronRight,
Layers,
ArrowUp
} from "lucide-react";
interface StackEntry {
order: number;
pr: {
id: string;
number: number;
title: string;
state: string;
isDraft: boolean;
headBranch: string;
isMerged: boolean;
};
parentPrId: string | null;
}
interface StackVisualizationProps {
stackId: string;
stackName?: string;
baseBranch: string;
entries: StackEntry[];
currentPrId?: string;
owner: string;
repo: string;
onReorder?: (newOrder: string[]) => void;
compact?: boolean;
}
export function StackVisualization({
stackId,
stackName,
baseBranch,
entries,
currentPrId,
owner,
repo,
onReorder,
compact = false,
}: StackVisualizationProps) {
const getStatusIcon = (entry: StackEntry) => {
if (entry.pr.isMerged) {
return
{baseBranch}
{entry.pr.headBranch}