From ec7f4e6fec49bb65100f3e043ab0cd899f4014dd Mon Sep 17 00:00:00 2001 From: Willie Date: Wed, 2 Sep 2026 12:50:11 +0800 Subject: [PATCH] fix(ui): label non-GitHub git sources as Remote instead of Local SourceBadge only recognised github/github-subdir metadata types, so skills installed from Gitea, GitLab, self-hosted or SSH git sources fell through to the Local badge. Add a Remote badge for any non-local install source, matching the CLI list view. Refs #270 --- ui/src/components/SourceBadge.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/components/SourceBadge.tsx b/ui/src/components/SourceBadge.tsx index a341fc961..a3dd7fca3 100644 --- a/ui/src/components/SourceBadge.tsx +++ b/ui/src/components/SourceBadge.tsx @@ -1,6 +1,6 @@ import Badge from './Badge'; -type SourceType = 'tracked' | 'github' | 'local'; +type SourceType = 'tracked' | 'github' | 'remote' | 'local'; interface SourceBadgeProps { type?: string; @@ -8,15 +8,19 @@ interface SourceBadgeProps { size?: 'sm' | 'md'; } +// Metadata `type` values: github, github-subdir, git-https, git-ssh +// (optionally -subdir), local, or empty for skills with no install source. function resolveSource(type?: string, isInRepo?: boolean): SourceType { if (isInRepo) return 'tracked'; - if (type === 'github' || type === 'github-subdir') return 'github'; + if (type?.startsWith('github')) return 'github'; + if (type && !type.startsWith('local')) return 'remote'; return 'local'; } const config: Record = { tracked: { label: 'Tracked', variant: 'default' }, github: { label: 'GitHub', variant: 'info' }, + remote: { label: 'Remote', variant: 'info' }, local: { label: 'Local', variant: 'default' }, };