+ {viewMode === "compact"
+ ? visibleCards.map(({ cfg, idx }) => {
+ const isThis = idx === expandedIdx;
+ const isOther = isExpanding && !isThis;
+ return (
+
+ handleClick(cfg, idx)}
+ onAutopilotOpen={
+ onAutopilotOpen
+ ? () =>
+ onAutopilotOpen(
+ data.insightCards[idx]?.title ?? cfg.content.title,
+ idx,
+ )
+ : null
+ }
+ isAutopilotActive={autopilotActiveIdx === idx}
+ className="h-full"
+ />
+
+ );
+ })
+ : rows.map((row, rowIndex) => {
+ const isRowWithExpanded = rowIndex === expandedRow;
+ const isOtherRow = isExpanding && !isRowWithExpanded;
+ const cols = row
+ .map(({ cfg, idx }) => {
+ if (!isExpanding)
+ return cfg.size === "lg" ? "1fr" : sizeToFr[cfg.size];
+ if (idx === expandedIdx)
+ return phase === "idle"
+ ? cfg.size === "lg"
+ ? "1fr"
+ : sizeToFr[cfg.size]
+ : "1fr";
+ if (isRowWithExpanded)
+ return phase === "idle"
+ ? cfg.size === "lg"
+ ? "1fr"
+ : sizeToFr[cfg.size]
+ : "0fr";
+ return cfg.size === "lg" ? "1fr" : sizeToFr[cfg.size];
+ })
+ .join(" ");
+ return (
+
idx).join("-")}
+ className="grid transition-all duration-300 ease-in-out overflow-hidden min-h-0"
+ style={
+ {
+ gridTemplateColumns: cols,
+ gap: isRowWithExpanded && phase !== "idle" ? 0 : layout.gap,
+ opacity:
+ isOtherRow && (phase === "height" || phase === "full")
+ ? 0
+ : 1,
+ } as React.CSSProperties
+ }
+ >
+ {row.map(({ cfg, idx }) => {
+ const isThis = idx === expandedIdx;
+ const isSibling = isExpanding && !isThis && isRowWithExpanded;
+ return (
+ handleClick(cfg, idx)}
+ onAutopilotOpen={
+ onAutopilotOpen
+ ? () =>
+ onAutopilotOpen(
+ data.insightCards[idx]?.title ??
+ cfg.content.title,
+ idx,
+ )
+ : null
+ }
+ isAutopilotActive={autopilotActiveIdx === idx}
+ style={{
+ opacity: isSibling && phase !== "idle" ? 0 : 1,
+ transform:
+ isSibling && phase !== "idle"
+ ? "scale(0.95)"
+ : "scale(1)",
+ }}
+ />
+ );
+ })}
+
+ );
+ })}
+
+ );
+}
+
+// Re-export for consumers that import these from InsightGrid
+export { DrilldownTabContent, AutopilotPrompts };
+export type { DrilldownTab };
diff --git a/apps/apollo-vertex/templates/dashboard/PromptBar.tsx b/apps/apollo-vertex/templates/dashboard/PromptBar.tsx
new file mode 100644
index 000000000..1df6d34be
--- /dev/null
+++ b/apps/apollo-vertex/templates/dashboard/PromptBar.tsx
@@ -0,0 +1,173 @@
+"use client";
+
+import { useState } from "react";
+import { MessagesSquare, Minimize2 } from "lucide-react";
+import { Badge } from "@/components/ui/badge";
+import { cardBgStyle, type CardConfig } from "./glow-config";
+import { useDashboardData } from "./dashboard-data-context";
+
+export function PromptBar({
+ shared,
+ cards,
+ isExpanded = false,
+ onSubmit,
+ onExpand,
+ onCollapse,
+}: {
+ shared: string;
+ cards: CardConfig;
+ isExpanded?: boolean;
+ onSubmit?: (query: string) => void;
+ onExpand?: () => void;
+ onCollapse?: () => void;
+}) {
+ const { data } = useDashboardData();
+ const [value, setValue] = useState("");
+ const hasInput = value.trim().length > 0;
+
+ const handleSubmit = () => {
+ if (hasInput && onSubmit) {
+ onSubmit(value);
+ }
+ };
+
+ const handleChipClick = (suggestion: string) => {
+ setValue(suggestion);
+ onSubmit?.(suggestion);
+ };
+
+ return (
+
+ {/* Expanded response area */}
+ {isExpanded && (
+
+
+
+

+

+
+ Autopilot
+
+
+ {onCollapse && (
+
+ )}
+
+
+
+ Responses will appear here
+
+
+
+
+ )}
+ {/* Suggestion badges — hidden when expanded */}
+ {!isExpanded && (
+
+
+
+
+ handleChipClick(
+ data.promptSuggestions[0] ?? "Show me top risk factors",
+ )
+ }
+ >
+ {data.promptSuggestions[0] ?? "Show me top risk factors"}
+
+
+ handleChipClick(
+ data.promptSuggestions[1] ?? "Compare Q1 vs Q2 performance",
+ )
+ }
+ >
+ {data.promptSuggestions[1] ?? "Compare Q1 vs Q2 performance"}
+
+
+
+
+ )}
+ {/* Input bar */}
+
+
setValue(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") handleSubmit();
+ }}
+ placeholder={data.promptPlaceholder}
+ className="flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"
+ />
+
+
+
+
+
+
+ );
+}
diff --git a/apps/apollo-vertex/templates/dashboard/chart-stubs.tsx b/apps/apollo-vertex/templates/dashboard/chart-stubs.tsx
new file mode 100644
index 000000000..ee56edb34
--- /dev/null
+++ b/apps/apollo-vertex/templates/dashboard/chart-stubs.tsx
@@ -0,0 +1,94 @@
+"use client";
+
+const sparklinePoints = [4, 7, 5, 9, 6, 8, 12, 10, 14, 11, 15, 13];
+const areaPoints = [3, 5, 4, 8, 6, 9, 7, 11, 10, 14, 12, 16];
+
+export function DonutContent() {
+ return (
+