The skill list endpoint discovers skills with DiscoverSourceSkillsAll
(which includes disabled skills), but the uninstall handler used
DiscoverSourceSkills, which excludes anything listed in .skillignore.
A disabled skill therefore stayed visible in the dashboard yet failed
to uninstall with "skill not found".
Switch handleBatchUninstallSkills to DiscoverSourceSkillsAll so the two
endpoints agree on which skills exist. The CLI was unaffected.
Fixes#190
Make the v0.19.16 sources map actually do something: route all path
reads through Config.EffectiveSkillsSource() / EffectiveAgentsSource() /
EffectiveExtrasSource() so users who set sources.skills / sources.agents /
sources.extras get the configured paths everywhere.
Mechanical changes (~50 files):
- cmd/skillshare/**: replace cfg.Source / cfg.ExtrasSource reads with
cfg.EffectiveSkillsSource() / cfg.EffectiveExtrasSource()
- internal/server/**: replace s.cfg.Source / s.cfg.ExtrasSource reads
with the same helpers; server.skillsSource() / gitignoreDir() use the
global-mode helper
- internal/config/config_validate.go: validate using EffectiveSkillsSource
while still rejecting configs that set neither field explicitly
- internal/config/reconcile.go, registry.go: read via helpers
Behavioral fixes (paired with the migration):
- extras init / extras source / POST /api/extras no longer silently
backfill the legacy extras_source field — the runtime fallback inside
EffectiveExtrasSource() handles it. This stops surprise diffs in users'
config.yaml after running extras commands.
- extras source command writes back to whichever field the user already
configured (sources.extras if set, otherwise legacy extras_source) so
the update is not shadowed.
- source_type in /api/extras and extras list correctly reports "default"
vs "extras_source" by inspecting the raw (unresolved) configured value;
sources.extras counts as configured for this purpose.
UI:
- ui/src/lib/fieldDocs.ts: neutralize sources / sources.* descriptions
so they describe both project and global modes (Phase 5).
Preserved (intentional):
- Direct writes to cfg.Source / cfg.AgentsSource / cfg.ExtrasSource in
init, migrate.go, cloneForSave, and server.reloadConfig — these are
raw-field writes, not path reads.
- Updated test expectations for the removed backfills.
Reorder handleUninstallRepo to move repo to trash before removing the
.gitignore entry, preventing accidental exposure of tracked content
when trashing fails.
ProjectGitignoreTarget now returns empty strings for source paths
outside projectRoot, since parent-relative patterns (../) are invalid
in .gitignore. All six callers guard on empty gitignoreDir and skip
gitignore management for external sources.
reloadConfig now updates s.cfg.Source and s.cfg.AgentsSource from the
refreshed ProjectConfig so project UI handlers see the latest source
directories after a config edit.
Add ProjectGitignoreTarget helper that computes the correct .gitignore
directory and entry prefix based on whether the source path is inside
.skillshare/ or a custom location. All gitignore write and remove
operations (reconcile, install, uninstall, server handlers) now use
this helper instead of hardcoded 'skills/' prefix.
Fix nil projectCfg panics in three server tests that simulate project
mode by setting projectRoot without projectCfg.
- Add agent-mode batch uninstall handler with kind-based routing
in handler_uninstall.go (skill/agent dispatch)
- Add Skills/Agents tab navigation to BatchUninstallPage and TrashPage
with per-tab filtering and scoped empty states
- Extract SourceBadge component to replace duplicated getTypeLabel /
skillTypeLabel helpers across ResourcesPage, ResourceDetailPage,
BatchUninstallPage, and AnalyzePage
- Add kind field to BatchUninstallRequest API type
- Capitalize badge labels for consistency (tracked → Tracked, etc.)
DashboardPage: add Agents stat card with Bot icon and accent color,
linking to /skills?kind=agent.
SkillsPage: add Skills/Agents filter tabs alongside existing filters.
KindBadge displayed on each skill card. matchFilter supports kind-based
filtering with accurate filter counts.
handler_collect: add kind field to localSkillItem response.
handler_uninstall: add kind field to batch request and result structs.
P2-1: handleUninstallRepo and handleBatchUninstall used s.cfg.Source for
gitignore removal, but project-mode installs write to .skillshare/.gitignore
with a "skills/" prefix. Add gitignoreDir() helper that returns the correct
base directory per mode, and prefix entries in project mode.
P2-2: Registry prune used filepath.Base(repoName) to derive the legacy group,
causing sibling nested repos (e.g., org/_team-skills vs dept/_team-skills) to
collide on the same basename. Now uses exact Group match for nested repos and
restricts legacy basename matching to top-level repos only.
Tests added (15 new):
- resolveTrackedRepo: auto _ prefix, nested, already-prefixed, not-found,
basename fallback
- Registry prune: full-path Group, nested members by prefix, sibling isolation
- Project-mode gitignore: single + batch uninstall
- updateSingle: basename fallback, not-found, regular skill priority
- cleanEmptyParents: multi-level, stops at non-empty, stops at boundary
- Fix UI batch uninstall not removing nested skill registry entries:
handler used flat names (__) but registry stores path names (/),
now tracks exact RelPath from discovered skills for matching
- Add stale entry pruning to ReconcileGlobalSkills and
ReconcileProjectSkills using a live set built during disk walk,
so skills deleted from source are removed from registry
- Trigger registry reconcile after sync in both UI handler (via defer
for early-return safety) and CLI (global + project mode), writing
warnings to stderr to avoid corrupting --json output
- UI: fix BatchUninstallPage search treating plain text as exact-match
glob (now substring search when no * or ? present), display nested
skill paths with / instead of __ in confirm and result dialogs
- UI: hide redundant 'X repo(s) and Y skill(s) already up to date'
line on UpdatePage when everything is already current
- Fix test isolation: set XDG_CONFIG_HOME in server test helpers to
prevent host agents dir leaking into test results, skip chmod-based
oplog test when running as root
- Add README badge for Awesome Codex CLI
Eliminates redundant .git/ directory walks on every LoadRegistry call.
SourceRoot() is now computed once in config.Load() and cached in
cfg.RegistryDir. All 11 call sites use the cached value.
- Add SourceRoot() helper to find git repo root from cfg.Source
- Add MigrateRegistryToSource() for one-time migration
- Update all 11 global-mode LoadRegistry/Save call sites
- registry.yaml now lives in skills/ dir and is tracked by git
- Add lazy import and route for BatchUninstallPage in App.tsx
(placed before skills/:name to avoid capturing as dynamic param)
- Add "Batch Uninstall" nav entry with Trash2 icon in Layout.tsx MANAGE group
- Add "Batch Uninstall" secondary button next to "New Skill" in SkillsPage header
Batch uninstall with skip-and-continue semantics, registry cleanup,
config reconciliation, and gitignore batch removal. Supports both
global and project mode.