Commit Graph
1010 Commits
Author SHA1 Message Date
Willie 7c533f2012 docs: update sync and doctor pages for .skillignore visibility
- sync: add ignored_count/ignored_skills to JSON example, note about
  .skillignore filtering
- doctor: add Skillignore to environment checks table, update example
  output with skillignore line and visual spacing
2026-03-18 00:19:30 +08:00
Willie 33cc974210 style(doctor): add blank line after config directory info
Visually separate config paths from source/skillignore/git checks
for better readability in the Checking environment section.
2026-03-18 00:19:30 +08:00
Willie e54d469d63 style(doctor): add visual break before skill validation checks
Separate the environment checks (config, source, skillignore, git)
from the skill validation checks (integrity, targets) with a blank
line for better readability.
2026-03-18 00:19:30 +08:00
Willie af143a3330 fix(doctor): add CLI text output for skillignore check
checkSkillignore only wrote to the JSON result but never printed
to the terminal, so skillignore status was invisible in CLI output.
2026-03-18 00:19:30 +08:00
Willie 49cd7c8433 fix(sync): truncate duplicate skill names to first 5 + count
The collision report dumped all 14000+ duplicate names on a single
line, making the sync output unreadable. Show the first 5 names
with "... and N more" so users can see examples without the flood.
2026-03-18 00:19:30 +08:00
Willie 8f19fb098a fix(server): force -g flag on doctor subprocess in global mode
The doctor handler shells out to the CLI binary. In global mode it
did not pass -g, so the subprocess auto-detected project mode when
the server's cwd contained .skillshare/config.yaml. This caused
the doctor to check the project source instead of the global source.
2026-03-18 00:19:30 +08:00
Willie cc68453eb1 feat(sync): pass .skillignore source files in API for accurate UI hints
Add ignore_root and ignore_repos fields to sync/diff/diff-stream API
responses from IgnoreStats. UI now uses real file paths instead of
heuristic (skill name starts with _) to determine ignore source.
2026-03-18 00:19:30 +08:00
Willie d8b1323123 fix(sync): use correct plural for repo-level .skillignore file count 2026-03-18 00:19:30 +08:00
Willie a8dc4972ac fix(sync): show .skillignore source hint in CLI output
Extract printIgnoredSkills helper that shows whether ignores come from
root-level, repo-level, or both .skillignore files. Helps users
understand why skills are excluded when they haven't configured the
root .skillignore.
2026-03-18 00:19:30 +08:00
Willie 9e90b9c30c fix(ui): show correct .skillignore source hint for repo-level ignores
Skills prefixed with _ are from tracked repos and excluded by
repo-level .skillignore (inside the repo), not the root-level one
editable in Config. Show distinct hints for each source.
2026-03-18 00:19:30 +08:00
Willie f17e5c5a9f style(ui): redesign ignored skills section on SyncPage
Replace bare text disclosure with a Card-based collapsible matching
DiffTargetCard style: EyeOff icon, ChevronDown/Right toggle, Badge
count, per-skill rows with icons, and a hint footer linking to Config.
2026-03-18 00:19:30 +08:00
Willie 6d66823f10 feat(ui): show ignored skills badge and collapsible section on SyncPage 2026-03-18 00:19:30 +08:00
Willie 78a4abc9be test(sync): add integration tests for .skillignore ignored skills output
Verify that sync command correctly reports ignored skills in text output,
includes ignored_count and ignored_skills in JSON output, and produces
no ignored output when .skillignore does not exist.
2026-03-18 00:19:30 +08:00
Willie 2b2e119eb2 feat(ui): add ignored skills types to sync and diff API client 2026-03-18 00:19:30 +08:00
Willie 8c7b93eec9 feat(server): include ignored skills in sync and diff API responses
Switch from DiscoverSourceSkills to DiscoverSourceSkillsWithStats so
the sync, diff, and diff-stream endpoints can surface .skillignore
stats (ignored_count, ignored_skills) in their JSON responses.
2026-03-18 00:19:30 +08:00
Willie 071731485e feat(sync): show .skillignore ignored skills in CLI text and JSON output
Switch DiscoverSourceSkills → DiscoverSourceSkillsWithStats at both
global and project sync entry points. Thread IgnoreStats through to
text output (dim-styled list) and JSON output (ignored_count +
ignored_skills fields).
2026-03-18 00:19:30 +08:00
Willie 6698b5f69f style(ui): improve skillignore check details with grouped tag layout
Replace flat bullet list with two labeled sections:
- Patterns: monospace code badges with muted background
- Ignored Skills: warning-tinted tags for visual distinction
Other checks keep the default bullet list rendering.
2026-03-18 00:19:30 +08:00
Willie 4857135550 fix(ui): render --- separator as visual divider in Doctor check details
The skillignore check uses --- to separate patterns from ignored skills
in the details array. Render it as a labeled section divider instead
of a raw bullet point.
2026-03-18 00:19:30 +08:00
Willie 1c15f8baaa fix(ui): invalidate doctor query after saving .skillignore
Without this, the Doctor page shows stale skillignore check data
until its 1-minute staleTime expires or the user refreshes.
2026-03-18 00:19:30 +08:00
Willie 1fca4ce0e4 fix(ui+server): lazy-fetch skillignore tab, use typed response struct
- ConfigPage: add enabled: tab === 'skillignore' to skip unnecessary
  filesystem walk when Config page opens on the config.yaml tab
- handler_skillignore: replace map[string]any with typed structs
  (skillignoreResponse, skillignoreStats) for compile-time safety
2026-03-18 00:19:30 +08:00
Willie 02a5ace7f9 docs: add skillignore visibility features to v0.17.4 changelog
Add .skillignore Visibility section covering status/doctor CLI output,
Config page editor tab, Doctor page SegmentedControl unification,
and new API endpoints.
2026-03-18 00:19:30 +08:00
Willie 6852b0ee14 docs: update doctor/status/ui docs for skillignore visibility
- doctor.md: add skillignore check to JSON example, document info status
- status.md: add skillignore field to JSON schema
- ui.md: update Config page description, add skillignore/doctor API endpoints
2026-03-18 00:19:30 +08:00
Willie fc1b7aa0e3 fix(ui): guard against null ignored_skills in skillignore response
Go nil slices serialize to JSON null. Add null guard in both the
server handler (emit empty arrays) and the UI (null check before
.length access) to prevent crash after editing .skillignore.
2026-03-18 00:19:30 +08:00
Willie c1dc988744 feat(ui): add .skillignore tab to Config page with CodeMirror editor
Add SegmentedControl tabs to switch between config.yaml and .skillignore
editing. The .skillignore tab shows file path, ignored skills count badge,
CodeMirror editor (without YAML extensions), and a summary card listing
all ignored skills. Save button behavior adapts to the active tab.
2026-03-18 00:19:30 +08:00
Willie 9d09e52ea8 feat(ui): unify Doctor filter with SegmentedControl, add info status 2026-03-18 00:19:30 +08:00
Willie 81cb684fb6 feat(server): add GET/PUT /api/skillignore endpoints
GET returns file existence, raw content, and ignore stats (patterns,
ignored skills). PUT accepts raw content to write or deletes the file
when raw is empty. Both endpoints are mode-aware via s.cfg.Source.
2026-03-18 00:19:30 +08:00
Willie f64fffef08 feat(status): show .skillignore info in text and JSON output
Surface .skillignore visibility in the status command so users can
see active patterns and how many skills are being ignored without
needing to run doctor.

Text output shows an indented line under Source when .skillignore
exists; JSON output adds a skillignore object inside source with
active flag, file paths, patterns, and ignored skill details.
2026-03-18 00:19:30 +08:00
Willie 13a82e335e feat(doctor): add info status and skillignore check
Add checkInfo status constant for informational (non-pass/warn/error)
doctor checks. Info checks count toward total but are tracked separately
in the summary.

Add checkSkillignore to doctor: reports .skillignore state as either
info (no .skillignore found) or pass (active with pattern/ignored counts
and details). Switches discovery from DiscoverSourceSkills to
DiscoverSourceSkillsWithStats to collect .skillignore statistics in the
same walk.
2026-03-18 00:19:30 +08:00
Willie b2f5592cdb refactor(discovery): extract shared walk, add DiscoverSourceSkillsWithStats
Unify ~160 lines of duplicated walk logic from DiscoverSourceSkills and
DiscoverSourceSkillsLite into a single discoverSourceSkillsInternal
function controlled by discoverOptions (parseFrontmatter, collectIgnored,
collectTracked).

Add DiscoverSourceSkillsWithStats which returns IgnoreStats populated
with root/repo .skillignore file paths, active patterns, and ignored
skill relPaths. When collectIgnored is true, CanSkipDir is bypassed so
the file-level Match check can record every ignored SKILL.md path.

Add Patterns() method to skillignore.Matcher to expose the original
pattern strings stored during Compile().
2026-03-18 00:19:30 +08:00
Willie 2e9547a8de feat(skillignore): add IgnoreStats struct with Active/PatternCount/IgnoredCount 2026-03-18 00:19:30 +08:00
Willie 4214cb1038 feat(skillignore): upgrade to full gitignore-compatible syntax
Replace the naive string matcher (~40 lines) with a proper gitignore
implementation (~200 lines, no external deps) supporting **, ?, [abc],
!negation, /anchored, pattern/ (dir-only), and \#/\! escapes.

New Matcher API (Compile, ReadMatcher, Match, CanSkipDir, HasRules)
replaces the old Match/ReadPatterns functions (kept as deprecated
wrappers). Call sites in sync.go and install_discovery.go updated.
Also fixes isDir=true for install discovery (skill paths are dirs).

100% test coverage on skillignore package (~150 table-driven cases).
Added 7 sync discovery tests and 5 install integration tests covering
**, !negation, pattern/, [Tt] char class, and combined patterns.
2026-03-18 00:19:30 +08:00
Willie 0df114decb docs: add quieter integrity checks to v0.17.4 changelog 2026-03-18 00:19:30 +08:00
Willie e04a36df85 docs(doctor): update integrity check docs to match new behavior
Local skills without meta are silently skipped. Only installed skills
with incomplete metadata show warnings with skill names listed.
2026-03-18 00:19:30 +08:00
Willie 9c0a13734c fix(doctor): skip local skills silently, only warn on incomplete meta
Skills without .skillshare-meta.json are local/manual — silently skip
instead of warning. Only warn when meta exists but file_hashes is
missing (old installs). List affected skill names in the warning.
2026-03-18 00:19:30 +08:00
Willie ad3b60067e fix(skillignore): strip trailing slash from patterns to fix directory matching
Patterns like "demo/" failed to match because Match() compared
"demo" == "demo/" (false) and HasPrefix("demo", "demo//") (false).
Now ReadPatterns strips trailing slashes at parse time.

Fixes #83
2026-03-18 00:19:30 +08:00
Willie bc790bdcea docs: add #83 .skillignore bug fix to v0.17.4 changelog
Add missing bug fix entry for .skillignore not being respected in source
discovery, which caused false doctor warnings. Synced to website changelog.
2026-03-18 00:19:30 +08:00
Willie 63370dfdea refactor(doctor): extract finalizeDoctorJSON helper and add status constants
- Extract 14-line duplicated JSON output block from cmdDoctorGlobal and
  cmdDoctorProject into shared finalizeDoctorJSON() function
- Define checkPass/checkWarning/checkError constants replacing 42 string
  literals across all addCheck() call sites
- Add TODO comment in server handler noting intent to move check logic
  into internal/ package
2026-03-18 00:19:30 +08:00
Willie a46227c009 fix(ui): remove unused imports in DoctorPage to fix TypeScript build
Remove unused DoctorResponse type import, statusBadgeVariant function,
and useQueryClient — all flagged by tsc strict mode in CI.
2026-03-18 00:19:30 +08:00
Willie d882a1ec28 docs: add v0.17.4 changelog
- CHANGELOG.md: doctor --json, Health Check UI page, root-level .skillignore
- Website changelog synced
2026-03-18 00:19:30 +08:00
Willie df58b74b7b docs(skill): add .skillignore usage to built-in skill recipes
Add root-level and repo-level .skillignore patterns to the
"Controlling Where Skills Go" section with gitignore syntax note.
2026-03-18 00:19:30 +08:00
Willie df39eda5ed docs(skill): add doctor --json to built-in skill recipes and fix Quick Lookup table
- Add doctor --json to Scripting & CI/CD section
- Fix Quick Lookup: doctor now supports --json (remove "except doctor" note)
2026-03-18 00:19:30 +08:00
Willie a50ff861dc docs: add doctor --json documentation and quick-reference entry
- Add JSON Output section to doctor.md with structure, exit codes, CI examples
- Add doctor --json to quick-reference utilities table
- Website build: PASS (no broken links)
2026-03-18 00:19:30 +08:00
Willie ed7722b5ef fix(ui): convert doctor check names to human-readable labels
Replace raw snake_case identifiers (source, symlink_support, etc.) with
friendly labels (Source Directory, Symlink Support, etc.). Remove redundant
status badge — the icon already conveys pass/warning/error.
2026-03-18 00:19:30 +08:00
Willie 8a46e85672 feat(ui): add Doctor Health Check page with status dashboard
Add /doctor route with a health check dashboard that displays:
- Summary cards for pass/warning/error counts
- "All checks passed" success banner
- Filter toggles to narrow by status
- Expandable check rows with detail lists
- Version info with update-available badge

Wired to GET /api/doctor via the typed API client.
2026-03-18 00:19:30 +08:00
Willie 5514f84246 docs: add ipruning to contributors 2026-03-18 00:19:30 +08:00
Willie a9972fb671 test(doctor): add integration tests for --json output
Cover 6 scenarios: all-good, with-errors, with-warnings, project mode,
version field presence, and backup/trash check presence.
2026-03-18 00:19:30 +08:00
Willie ce707455fa feat(doctor): add --json structured output for CI pipeline consumption
Add `--json` flag to `skillshare doctor` that outputs structured JSON with
per-check results, summary counts, and version info. Errors produce exit 1,
warnings exit 0. Uses suppressUIToDevnull() to silence text output in JSON mode.
2026-03-18 00:19:30 +08:00
Willie 81f043c105 feat(server): add GET /api/doctor handler that proxies CLI --json output 2026-03-18 00:19:30 +08:00
Willie 483c98a6d2 test: add root-level .skillignore steps to E2E runbook 2026-03-18 00:19:30 +08:00
Willie a2b408003f docs: update .skillignore docs with root-level support and all-commands scope 2026-03-18 00:19:30 +08:00