From 78a54d2c00f57c3b51218ec053c088e3c1cb3ad8 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 28 May 2026 17:11:40 -0700 Subject: [PATCH] fix(skills-page): source pills and category sidebar collapsed to All only (#34194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regression from PR #33809 (lazy-fetch refactor). The `sources` and `categoryEntries` useMemo blocks were derived from `allSkillsLocal` but had empty/incomplete deps arrays — so they computed once at mount when the catalog was still `[]`, then never recomputed when the fetch resolved. Symptom: live site shows only the "All 87,639" source button and "All Skills 87,639" category — no per-source pills (ClawHub, skills.sh, LobeHub, etc.) and no category breakdown. Filtering by source/category is unusable. Fix: add `allSkillsLocal` to both deps arrays so they recompute when data arrives. Local build green on en + zh-Hans. --- website/src/pages/skills/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/pages/skills/index.tsx b/website/src/pages/skills/index.tsx index a86a0205edf..ea971fdaab7 100644 --- a/website/src/pages/skills/index.tsx +++ b/website/src/pages/skills/index.tsx @@ -500,7 +500,7 @@ export default function SkillsDashboard() { const sources = useMemo(() => { const set = new Set(allSkillsLocal.map((s) => s.source)); return SOURCE_ORDER.filter((s) => s === "all" || set.has(s)); - }, []); + }, [allSkillsLocal]); const categoryEntries = useMemo(() => { const pool = @@ -523,7 +523,7 @@ export default function SkillsDashboard() { return Array.from(map.entries()) .sort((a, b) => b[1].count - a[1].count) .map(([key, { label, count }]) => ({ key, label, count })); - }, [sourceFilter]); + }, [sourceFilter, allSkillsLocal]); const filtered = useMemo(() => { const q = debouncedSearch.toLowerCase().trim();