From 28c6682f11ae04ce4512890b9a84ceab1c112654 Mon Sep 17 00:00:00 2001 From: Horus AI Date: Tue, 24 Mar 2026 18:45:53 +0100 Subject: [PATCH] fix: Categories UI - click to view, not all expanded at once --- app/mission-control/clawhub/page.tsx | 74 ++++++++++++++-------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/app/mission-control/clawhub/page.tsx b/app/mission-control/clawhub/page.tsx index d5aba94..b628a4e 100644 --- a/app/mission-control/clawhub/page.tsx +++ b/app/mission-control/clawhub/page.tsx @@ -48,6 +48,7 @@ export default function ClawHubMarketplace() { const [skillDetails, setSkillDetails] = useState<{description?: string; triggers?: string} | null>(null); const [selectedAgents, setSelectedAgents] = useState(["horus"]); const [view, setView] = useState<"popular" | "categories" | "search">("popular"); + const [categoryView, setCategoryView] = useState(null); const [action, setAction] = useState<"install" | "delete" | "sync" | "push" | null>(null); const [output, setOutput] = useState(""); const [installedSkills, setInstalledSkills] = useState>({}); @@ -359,51 +360,50 @@ export default function ClawHubMarketplace() { {/* Categories View */} - {view === "categories" && ( -
- {CATEGORIES.map((cat) => ( -
-
-

{cat.name}

-

{categorySkills[cat.id]?.length || 0} skills

-
-
- {(categorySkills[cat.id] || []).map((skill) => { - const installed = isInstalled(skill.slug); - return ( - - ); - })} -
-
- ))} + {view === "categories" && !categoryView && ( +
+
+ {CATEGORIES.map((cat) => ( + + ))} +
)} - {/* Popular/Search View */} - {(view === "popular" || view === "search") && ( + {view === "categories" && categoryView && ( +
+ +
+ {CATEGORIES.find(c => c.id === categoryView)?.icon} +

{CATEGORIES.find(c => c.id === categoryView)?.name}

+
+
+ )} + + {/* Popular/Search/Category View */} + {(view === "popular" || view === "search" || (view === "categories" && categoryView)) && (
{/* Skills List */}

- {view === "popular" ? "🔥 Popular Skills" : "Search Results"} + {view === "popular" ? "🔥 Popular Skills" : view === "categories" ? CATEGORIES.find(c => c.id === categoryView)?.name || "Category" : "Search Results"}

{skills.length} skills found