Files
skillshare/tests/integration
Willie 4c6d152abf refactor(uninstall): run the CLI and dashboard through one operation
The uninstall sequence (move-out check, dirty check, move to trash,
.gitignore cleanup, metadata prune) lived in the CLI and in three
dashboard handlers, and the copies had drifted: three different prune
rule sets, no dirty check on DELETE /api/repos, and no metadata prune
at all on DELETE /api/resources, which left the removed skill's entry
and target overrides in .metadata.json.

internal/uninstall now owns the sequence for resolved items. Callers
keep name resolution, prompts, output, HTTP status and oplog.
MetadataStore.RemoveByNames is the single prune rule set: an entry goes
when it is a removed path or lies below one, by key or by Group, plus
the tracked legacy group of a top-level repo.

Behaviour changes, all intended:
- DELETE /api/repos/{name} refuses a dirty tracked repo, or one whose
  git status cannot be read, with 409 unless ?force=true.
- DELETE /api/repos/{name} refuses a followed link whose folder is
  itself a skill, like every other uninstall path.
- DELETE /api/resources/{name} prunes the skill's metadata.
- Removing top-level "foo" no longer prunes "frontend/foo" (CLI), and
  removing repo "_team" no longer prunes the untracked group "team"
  (dashboard batch); both dropped metadata of skills still installed.

Refs #442
2026-10-07 00:13:47 +08:00
..