Commit Graph
8 Commits
Author SHA1 Message Date
Willie 2f6dd42695 perf(sync): cache discovery + add progress UI for sync operations
DiscoverSourceSkills was called 1+2N times (N = number of targets),
each doing a full filepath.Walk + SKILL.md frontmatter parsing.
Now discovered once and passed to all targets via WithSkills variants.

Changes:
- Add SyncTargetMergeWithSkills, PruneOrphanLinksWithSkills (PruneOptions struct)
- Add SyncTargetCopyWithSkills with onProgress callback, PruneOrphanCopiesWithSkills
- Discovery spinner + per-target reporting + summary line in CLI
- Copy mode shows per-skill spinner progress during slow checksum+copy
- Collision report uses dim gray text to avoid confusion with sync results
- Server handlers (handleSync, handlePull) use single discovery pass
- Fix pre-existing TestLog_StatsOutput assertion ("Success rate" → "OK:")
2026-02-26 22:27:23 +08:00
Willie 3b8c681bb2 feat: auto-inject auth tokens for hub search and Web UI git operations
Add token auto-injection for private repo support across all platforms:
- Hub search (--hub): normalize web URLs to raw-content URLs and apply
  platform-specific auth headers (GitLab, GitHub, Bitbucket)
- Web UI push/pull/update: use *WithAuth variants for git operations
- Export ResolveTokenForURL and DetectPlatformForURL from install/auth
2026-02-22 15:13:10 +08:00
Willie 76e1f6e3a9 fix: prune broken external symlinks after data migration (#28)
After data migration (e.g. XDG path change), target symlinks still
point to old source path. PruneOrphanLinks treated these as "external"
and always preserved them, even with --force.

- Auto-remove broken external symlinks (target no longer exists)
- Pass force flag to PruneOrphanLinks; force removes valid external symlinks
- Use utils.PathHasPrefix for Windows case-insensitive path comparison
2026-02-16 15:23:03 +08:00
Willie a29e198725 feat: add target filter CLI, skill-level targets field, and Web UI support
- CLI: `target <name> --add-include/--add-exclude/--remove-include/--remove-exclude`
- SKILL.md `targets` frontmatter restricts sync to specified targets
- Cross-mode matching (e.g. "claude" matches "claude-code" project target)
- Web UI: inline filter editor on Targets page, target badges on Skills pages
- API: PATCH /api/targets/{name} for filter updates
- Fix drift detection in doctor/status/handler to account for skill-level targets
- `check` warns about unknown target names in skill-level targets field
- Docs: update skill-format, target command, configuration, creating-skills
2026-02-15 23:29:30 +08:00
Willie bd75ef8939 feat: support target include/exclude filters across sync, UI, and docs 2026-02-14 00:21:48 +08:00
Willie d8699762ad fix: use deep skill count in init and prevent null files in git status API
- init: replace shallow os.ReadDir count with DiscoverSourceSkills()
  to correctly count nested skills by SKILL.md presence
- handler_git: guard against nil slice from GetDirtyFiles() overwriting
  the initialized empty slice, which serialized as JSON null
- GitSyncPage: add optional chaining on status.files for defense
2026-02-13 14:21:36 +08:00
Willie e5813cc7e0 feat: add oplog instrumentation to all API handlers, improve audit/log/sync CLI
- Add oplog write helpers to server (oplog_helper.go) and instrument
  all handler_*.go endpoints with ops/audit logging
- Improve audit CLI with structured auditRunSummary and severity counts
- Enhance log CLI with richer filtering and detail display
- Improve sync CLI with drift detection summaries in oplog
- Reorder web UI sidebar nav by user workflow (core → acquire → distribute → maintain → monitor)
- Enhance LogPage with better formatting and filtering
- Add server oplog unit tests (logging_test.go, log_test.go)
- Update docs for log command and quick-reference
2026-02-10 03:50:03 +08:00
Willie 092fb14f8a feat: add web dashboard with embedded React SPA (skillshare ui)
Single-binary web UI for visual skill management — React 19 + Vite
frontend embedded via go:embed, Go net/http REST API backend (30+
endpoints). Includes dashboard, skills browser, targets, sync, collect,
search, install, config editor, backup/restore, and git sync pages.

Also adds Bitbucket/GitLab URL parsing for install, git operations
library, skill version checking, CI frontend build steps, Docker
sandbox support, and website docs for the ui command.
2026-02-08 05:08:30 +08:00