From e545df579bca4e83bc70b164e4c8fc7af8b2fdfa Mon Sep 17 00:00:00 2001 From: Jonas Pacheco Date: Fri, 27 Mar 2026 16:47:29 -0300 Subject: [PATCH] feat(galeria): add spec detail dialog to Agent Gallery cards Cards now have an Info button that opens a dialog showing the agent's spec content, mode, creation date, and quick Execute/Fork actions. Co-Authored-By: Claude Sonnet 4.6 --- client/src/pages/DevCenter.tsx | 54 ++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/client/src/pages/DevCenter.tsx b/client/src/pages/DevCenter.tsx index cf81299..c8ef688 100644 --- a/client/src/pages/DevCenter.tsx +++ b/client/src/pages/DevCenter.tsx @@ -62,9 +62,11 @@ import { Square, Fingerprint, PanelLeft, - Save + Save, + Info } from "lucide-react"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; +import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog"; import { apiRequest } from "@/lib/queryClient"; import { useToast } from "@/hooks/use-toast"; import DevHistory from "@/components/DevHistory"; @@ -103,8 +105,9 @@ function AgentFactoryTabs() { const [assemblePollingId, setAssemblePollingId] = useState(null); const [assembleTaskStatus, setAssembleTaskStatus] = useState>({}); - // ---- Galeria filter ---- + // ---- Galeria filter + detail ---- const [galFilter, setGalFilter] = useState(""); + const [galDetailDef, setGalDetailDef] = useState<(typeof defs)[0] | null>(null); const { data: defsData, isLoading: defsLoading } = useQuery<{ success: boolean; data: AgentDef[] }>({ queryKey: ["/api/agent-defs"], @@ -659,11 +662,58 @@ function AgentFactoryTabs() { > + ))} )} + + {/* Dialog de detalhes do agente */} + { if (!open) setGalDetailDef(null); }}> + + + + + {galDetailDef?.name} + v{galDetailDef?.version} + + {galDetailDef?.description && ( + {galDetailDef.description} + )} + +
+
+ + {(galDetailDef?.spec as any)?.mode ?? "markdown"} + + ยท + Criado em {galDetailDef ? new Date(galDetailDef.createdAt).toLocaleDateString("pt-BR") : ""} +
+ +
+                  {(galDetailDef?.spec as any)?.content ?? JSON.stringify(galDetailDef?.spec, null, 2)}
+                
+
+
+ + +
+
+
+
);