From 77d758747a628ab3f457e051ab6c11e3ddc63fa2 Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 10 Jul 2026 15:03:02 +0000 Subject: [PATCH] PAP-13409 T3: Storybook coverage for row/card redesign Add a TypeColorsAndDetail showcase (plan-approval violet + confirmation sky side by side, detail lines, project chips, thumbnail stacks) and a DismissUndoToast story wiring the real ToastProvider/ToastViewport. Enrich the existing fixtures with T1 detail blocks and data-URI thumbnails so the queue stories render the new secondary line and image stack. attentionImageUrl now passes data/absolute URLs through unchanged. Co-Authored-By: Claude Opus 4.8 --- .../stories/what-needs-me.stories.tsx | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/ui/storybook/stories/what-needs-me.stories.tsx b/ui/storybook/stories/what-needs-me.stories.tsx index d367770859e..3aa2b13f918 100644 --- a/ui/storybook/stories/what-needs-me.stories.tsx +++ b/ui/storybook/stories/what-needs-me.stories.tsx @@ -1,9 +1,11 @@ -import { useMemo, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import type { Meta, StoryObj } from "@storybook/react-vite"; import { ArrowUpDown, CheckCircle2, Inbox, Layers, ListFilter } from "lucide-react"; import type { AttentionItem, AttentionSourceKind, AttentionSeverity, InboxDismissalKind } from "@paperclipai/shared"; import { AttentionQueueRow } from "@/components/AttentionQueueRow"; import { IssueGroupHeader } from "@/components/IssueGroupHeader"; +import { ToastProvider, useToastActions } from "@/context/ToastContext"; +import { ToastViewport } from "@/components/ToastViewport"; import { Button } from "@/components/ui/button"; import { groupAttentionItems, @@ -466,6 +468,35 @@ export const TypeColorsAndDetail: Story = { args: { items: SHOWCASE, groupBy: "type" }, }; +/** The ~8s undo toast shown after dismissing a row (plan ยง6). */ +function DismissUndoDemo() { + const { pushToast } = useToastActions(); + useEffect(() => { + pushToast({ + id: "attention-dismiss-demo", + title: "Dismissed", + body: "Hire agent: Research Analyst", + tone: "info", + ttlMs: 15000, + action: { label: "Undo", onClick: () => {} }, + }); + }, [pushToast]); + return ( +
+ +
+ ); +} + +export const DismissUndoToast: StoryObj = { + render: () => ( + + + + + ), +}; + export const ZeroState: Story = { args: { items: [] }, };