Skip to content

fix(skills-page): restore per-source pills and category sidebar (stale useMemo deps)#34194

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-346d8e83
May 29, 2026
Merged

fix(skills-page): restore per-source pills and category sidebar (stale useMemo deps)#34194
teknium1 merged 1 commit into
mainfrom
hermes/hermes-346d8e83

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Regression from PR #33809 (lazy-fetch refactor). The live skills page renders only the "All 87,639" source button — no per-source pills (ClawHub, skills.sh, LobeHub, etc.) — and the Category sidebar shows only "All Skills 87,639" with no breakdown. Filtering is unusable.

Root cause: two useMemo blocks that compute their results from allSkillsLocal were missing it from their deps arrays. They ran once at mount when allSkillsLocal was still [], and never recomputed when the fetch resolved.

Changes

website/src/pages/skills/index.tsx:

   const sources = useMemo(() => {
     const set = new Set(allSkillsLocal.map((s) => s.source));
     return SOURCE_ORDER.filter((s) => s === "all" || set.has(s));
-  }, []);
+  }, [allSkillsLocal]);
     return Array.from(map.entries())
       .sort((a, b) => b[1].count - a[1].count)
       .map(([key, { label, count }]) => ({ key, label, count }));
-  }, [sourceFilter]);
+  }, [sourceFilter, allSkillsLocal]);

Validation

Local npm run build green on both en and zh-Hans locales.

Infographic

source-pills-restored

…only

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.
@teknium1 teknium1 merged commit 78a54d2 into main May 29, 2026
17 checks passed
@teknium1 teknium1 deleted the hermes/hermes-346d8e83 branch May 29, 2026 00:11
Bryce-huang pushed a commit to wbkunlun/hermes-agent that referenced this pull request May 29, 2026
…only (NousResearch#34194)

Regression from PR NousResearch#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.
#AI commit#
KKT-OPT pushed a commit to KKT-OPT/hermes-agent that referenced this pull request May 31, 2026
…only (NousResearch#34194)

Regression from PR NousResearch#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.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…only (NousResearch#34194)

Regression from PR NousResearch#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant