Merge pull request #2924 from makeittech/feat/fix-clawhub-label-typo-5c30

Fix ClawHub display name typo in Skills Catalog (#2895)
This commit is contained in:
Serhii Dziupin
2026-08-15 06:43:56 +03:00
committed by GitHub
16 changed files with 94 additions and 35 deletions
@@ -0,0 +1,49 @@
import { beforeEach, describe, expect, mock, test } from 'bun:test';
mock.module('@/lib/opencode/client', () => ({
opencodeClient: {
getDirectory: () => undefined,
},
}));
mock.module('@/stores/useProjectsStore', () => ({
useProjectsStore: {
getState: () => ({
getActiveProject: () => null,
}),
},
}));
mock.module('@/lib/runtime-fetch', () => ({
runtimeFetch: async () => new Response('{}', { status: 500 }),
}));
mock.module('@/stores/useSkillsStore', () => ({
invalidateSkillsLoadCache: () => undefined,
refreshSkillsAfterOpenCodeRestart: async () => undefined,
useSkillsStore: {
getState: () => ({}),
},
}));
mock.module('@/lib/configUpdate', () => ({
startConfigUpdate: () => undefined,
finishConfigUpdate: () => undefined,
updateConfigUpdateMessage: () => undefined,
}));
const { useSkillsCatalogStore } = await import('./useSkillsCatalogStore');
describe('skills catalog ClawHub label', () => {
beforeEach(() => {
useSkillsCatalogStore.setState({
sources: useSkillsCatalogStore.getState().sources,
});
});
test('fallback sources label ClawHub correctly', () => {
const clawhub = useSkillsCatalogStore.getState().sources.find((source) => source.id === 'clawdhub');
expect(clawhub).toBeDefined();
expect(clawhub?.label).toBe('ClawHub');
});
});
@@ -31,7 +31,7 @@ const FALLBACK_SOURCES: SkillsCatalogSource[] = [
},
{
id: 'clawdhub',
label: 'ClawdHub',
label: 'ClawHub',
description: 'Community skill registry with vector search',
source: 'clawdhub:registry',
sourceType: 'clawdhub',