import Link from "next/link";
import { AgentTimeline } from "@/components/AgentTimeline";
import { ProposalReviewCard } from "@/components/ProposalReviewCard";
import {
Badge,
Button,
EmptyState,
ListItemButton,
Panel,
PanelBody,
PanelHeader,
PanelTitle,
StatusBadge,
Textarea,
} from "@/components/ui/Primitives";
import type { AgentTimelineItem, ApprovalQueueItem } from "@/lib/types";
type ReviewWorkflow = {
id: string;
name: string;
owner: string;
queueCount: number;
sla: string;
status: "healthy" | "at_risk";
};
type ReviewDecision = "approved" | "rejected";
export function ReviewWorkflowNav({ workflows }: { workflows: readonly ReviewWorkflow[] }) {
return (
Operator workflows
{workflows.map((workflow) => (
{workflow.name}
Owner: {workflow.owner}
{workflow.status}
Queue: {workflow.queueCount}
SLA {workflow.sla}
))}
);
}
export function ReviewDecisionBar({
batchMode,
selectedCount,
isSubmitting,
onSelectAll,
onClear,
onBatchDecision,
}: {
batchMode: boolean;
selectedCount: number;
isSubmitting: boolean;
onSelectAll: () => void;
onClear: () => void;
onBatchDecision: (decision: ReviewDecision) => void;
}) {
return (
<>
Approval queue
{batchMode ? (
<>
{selectedCount} selected
>
) : (
)}
status:pending
{batchMode ? (
) : null}
>
);
}
export function ReviewQueueList({
items,
batchMode,
selectedBatchIds,
selectedApprovalId,
onSelectItem,
}: {
items: ApprovalQueueItem[];
batchMode: boolean;
selectedBatchIds: Set;
selectedApprovalId: string | null;
onSelectItem: (id: string) => void;
}) {
if (items.length === 0) {
return (
);
}
return (
{items.map((item) => (
onSelectItem(item.id)}
style={{
display: "flex",
justifyContent: "space-between",
gap: "var(--nl-space-3)",
alignItems: "center",
flexWrap: "wrap",
textAlign: "left",
}}
>
{item.title}
{item.owner}
{batchMode ? (
{selectedBatchIds.has(item.id) ? "selected" : "unselected"}
) : null}
{item.severity}
{item.status}
))}
);
}
export function ReviewNoteField({
value,
onChange,
}: {
value: string;
onChange: (value: string) => void;
}) {
return (
);
}
export function ProposalDiffCard({
proposal,
isSubmitting,
onApprove,
onReject,
}: {
proposal: ApprovalQueueItem | null;
isSubmitting: boolean;
onApprove: () => void;
onReject: () => void;
}) {
if (!proposal) {
return null;
}
return (
);
}
export function ReviewTimeline({ items }: { items: AgentTimelineItem[] }) {
if (items.length === 0) {
return (
Agent activity timeline
);
}
return ;
}