import type { Meta, StoryObj } from "@storybook/react-vite"; import type { ReactNode } from "react"; import { SourceResolvedFoldCallout } from "@/components/SourceResolvedFoldCallout"; import { SourceResolvedFoldBadge } from "@/components/SourceResolvedFoldBadge"; import type { SourceResolvedWatchdogFold } from "@/lib/source-resolved-watchdog-fold"; function StoryFrame({ title, description, children }: { title: string; description?: string; children: ReactNode }) { return (
Active-run watchdog · source-resolved fold

{title}

{description ? (

{description}

) : null}
{children}
); } function buildFold(overrides: Partial = {}): SourceResolvedWatchdogFold { return { sourceIssueId: "00000000-0000-0000-0000-000093220000", sourceIssueIdentifier: "PAP-9322", sourceIssueStatus: "done", sameRunEvidenceKind: "activity", sameRunEvidenceId: "f49d4f8b-c2ee-4b3d-9d24-32deadbeef01", sameRunEvidenceAt: "2026-05-12T18:14:33.000Z", silenceStartedAt: "2026-05-12T18:30:00.000Z", silenceAgeMs: 18 * 60_000, evaluationIssueId: null, evaluationIssueIdentifier: null, cleanup: { attempted: true, outcome: "terminated", adapterType: "claude_local", pid: 23912, processGroupId: 23912, error: null, }, ...overrides, }; } const finalizedAt = "2026-05-12T18:48:11.000Z"; function DefaultPanel() { return ; } const meta = { title: "Paperclip/Source-resolved Fold", component: DefaultPanel, parameters: { layout: "fullscreen" }, } satisfies Meta; export default meta; type Story = StoryObj; export const FoldCalloutFullEvidence: Story = { render: () => ( ), }; export const FoldCalloutWithEvaluationIssue: Story = { render: () => ( ), }; export const FoldCalloutCleanupFailed: Story = { render: () => ( ), }; export const FoldCalloutCancelledSource: Story = { render: () => ( ), }; export const RunRowBadgeContext: Story = { render: () => (
Run 7accd7a4 by ClaudeCoder succeeded Completed 3m ago
Run 2606404d by ClaudeCoder succeeded Completed 12m ago
), };