From e35c533c5b8a3b29b078b46736e2715b5bb478ca Mon Sep 17 00:00:00 2001 From: Dotta Date: Sun, 3 May 2026 18:19:59 -0500 Subject: [PATCH] Add search palette Storybook states Co-Authored-By: Paperclip --- ui/storybook/stories/search.stories.tsx | 154 +++++++++++++++++++++++- 1 file changed, 152 insertions(+), 2 deletions(-) diff --git a/ui/storybook/stories/search.stories.tsx b/ui/storybook/stories/search.stories.tsx index ec779d029a7..40b1bfb2aa8 100644 --- a/ui/storybook/stories/search.stories.tsx +++ b/ui/storybook/stories/search.stories.tsx @@ -7,8 +7,30 @@ import { PageTabBar, type PageTabItem } from "@/components/PageTabBar"; import { MatchSourceChip } from "@/components/search/MatchSourceChip"; import { SearchResultRow } from "@/components/search/SearchResultRow"; import { Tabs } from "@/components/ui/tabs"; -import { Search as SearchIcon } from "lucide-react"; -import { storybookAgents, storybookProjects } from "../fixtures/paperclipData"; +import { + Bot, + CircleDot, + DollarSign, + Hexagon, + History, + Inbox, + LayoutDashboard, + Plus, + Search as SearchIcon, + SquarePen, + Target, +} from "lucide-react"; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, +} from "@/components/ui/command"; +import { StatusBadge } from "@/components/StatusBadge"; +import { storybookAgents, storybookProjects, storybookIssues } from "../fixtures/paperclipData"; const agentsById = new Map(storybookAgents.map((agent) => [agent.id, agent])); const projectsById = new Map(storybookProjects.map((project) => [project.id, project])); @@ -360,6 +382,113 @@ function SearchPagePreview({ ); } +function CommandPaletteWithSearchAll({ + query, + emptyResults = false, +}: { + query: string; + emptyResults?: boolean; +}) { + return ( + + + + {emptyResults ? ( + + + No quick issue matches. Press{" "} + ↵{" "} + to search all or keep typing to refine. + + + ) : null} + + + + + Search all for “{query}” + + + open full search + ↵ + + + + + + + + Create new issue + C + + + + Create new agent + + + + + + + Dashboard + + + + Inbox + + + + Issues + + + + Goals + + + + Agents + + + + Costs + + + + Activity + + + {!emptyResults ? ( + <> + + + {storybookIssues.slice(0, 3).map((issue) => ( + + + {issue.identifier} + {issue.title} + + + ))} + + + ) : null} + + + {storybookProjects.slice(0, 2).map((project) => ( + + + {project.name} + + ))} + + + + ); +} + function SearchStories() { return (
@@ -419,6 +548,27 @@ function SearchStories() {
+
+
+
Cmd+K palette
+

Search-all row with quick results

+
+
+
+
+ With quick issue matches +
+ +
+
+
+ Empty results — Enter routes to /search +
+ +
+
+
+
Search result row