Commit Graph
29 Commits
Author SHA1 Message Date
Willie 459c322308 feat(audit): add category breakdown to summary across all output channels
Surface per-category finding counts (e.g., injection:3 exfiltration:2)
in CLI summary, TUI footer, markdown report, JSON output, and web API.
Adds Result.CountByCategory(), formatCategoryBreakdown() with compact
mode for TUI, and byCategory field to all audit summary structs.
2026-03-03 16:08:11 +08:00
Willie 0d04399ba9 feat(audit): surface Phase 2 fields (ruleId, analyzer, category) across all output channels
Previously the Phase 2 finding fields (ruleId, analyzer, category,
confidence, fingerprint) were only emitted in JSON and SARIF output.
This propagates them to CLI text, TUI detail panel, Markdown reports,
Server API responses, and the React frontend — each channel showing
the subset most useful for its audience.

- Server API: all 5 fields (omitempty) in auditFindingResponse
- CLI text: dim [ruleID / analyzer] line between severity and snippet
- TUI: cyan ruleID / analyzer / category line + search index
- Markdown: Rule ID and Category table columns
- Frontend: ruleId · analyzer · category dim metadata line
2026-03-03 16:08:11 +08:00
Willie dbe759ecfe feat(audit): add CLI rules subcommand, severity override, reset, and redesign Web UI
- Add `audit rules` CLI subcommand with list, enable, disable, severity,
  and reset commands for managing audit rules without editing YAML
- Add SetSeverity/SetPatternSeverity/ResetRules mutations in audit package
- Redesign TUI with severity tabs, two-level pattern→rule navigation,
  inline severity picker (1-5 keys), and reset-all support
- Add compiled rules API endpoints (GET /api/audit/compiled, PATCH toggle)
- Redesign AuditRulesPage with severity-colored stripes, stat cards,
  expand/collapse, toggle switches, and dark-mode-aware CSS variables
- Redesign LogPage with status-colored row stripes, reusable PillButton,
  improved stats cards with left border stripes, default 10 entries/page
- Remove system-writes audit pattern (noisy, low value)
- Fix dark mode contrast across both pages by replacing hardcoded
  design.ts colors with var(--color-*) CSS variable references
2026-03-03 16:08:11 +08:00
Willie ba7752f85d feat(ui): enhance install skill picker with descriptions and into-dir field
Include skill description from SKILL.md frontmatter in the discover API
response, add the optional description field to the DiscoveredSkill
TypeScript interface, and render it inline in the SkillPickerModal.
Filter search also matches against descriptions. The --into directory
input already existed in InstallForm, so no change was needed there.
2026-02-28 20:56:34 +08:00
Willie 18cfaa984c feat(ui): add sync mode selector to targets page 2026-02-28 20:56:34 +08:00
Willie fbab56f86b feat(ui): add log stats bar with success rate and command breakdown
Wire up the new GET /api/log/stats endpoint in the frontend:
- api.getLogStats() + CommandStats/LogStatsResponse types in client.ts
- logStats query key in queryKeys.ts
- LogStatsBar component on Log page showing success rate, top 4
  commands with ok/error/partial counts, and last operation badge
- Stats bar respects tab (ops/audit) and active filters
- Refresh and clear actions invalidate both log and log-stats queries
2026-02-26 22:27:23 +08:00
Willie 0af62f5aaa feat(ui): add validateRestore API type and function 2026-02-25 07:02:54 +08:00
Willie a0ebbde1de refactor(ui): use raw bytes in backup API and extract shared formatSize
Return sizeBytes (int64) instead of sizeMB (float64) from backup API
so the frontend controls display formatting. CLI backup commands now
use the existing formatBytes() helper for human-friendly output.

Extract duplicate formatSize() from CollectPage and TrashPage into
shared ui/src/lib/format.ts utility.
2026-02-25 07:02:54 +08:00
Willie bd76ec9aa5 feat: surface audit risk score in update API and UI
Return auditRiskScore and auditRiskLabel in update results so the
dashboard can show security posture after both tracked-repo and
regular-skill updates. auditGateTrackedRepo now returns the audit
result alongside the blocked indicator.
2026-02-23 04:18:01 +08:00
Willie a0bfe9958a fix: batch update error propagation, skip-audit passthrough, and security hardening (#39)
- P1: Batch/all update now returns non-zero when repos are blocked by
  security audit (fail-closed for CI pipelines)
- P2: Pass --skip-audit to regular skill update via InstallOptions
- P2: Add path containment check in content integrity to prevent
  directory traversal via crafted file_hashes keys
- P3: Switch git diff parsing to NUL-delimited (-z) for safe handling
  of special filenames
2026-02-23 04:18:01 +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 0b03a4e2fc fix(search): remove 20-result cap for hub search and add scroll-to-load
Hub search was capped at 20 results because it shared the same
normalizeLimit() path as GitHub search. Hub indexes are static JSON
(~100 entries), so returning all results is expected.

- Remove normalizeLimit() from hub search path; limit=0 means no limit
- Backend defaults to limit=0 for hub requests, 20 for GitHub
- CLI uses limit=0 when --hub is set without explicit --limit
- Frontend searchHub() no longer sends a limit parameter
- Replace IIFE rendering with useMemo for stable filter results
- Add IntersectionObserver-based scroll-to-load (20 items per batch)
2026-02-13 14:21:37 +08:00
Willie 0bd79a438e feat: add hub persistence to config for CLI and Web UI
Hub sources are now saved in config.yaml (both global and project),
replacing the Web UI's localStorage-based approach. This allows CLI
and UI to share the same hub list.

- Add HubConfig/HubEntry types and helper methods (resolve, add, remove)
- Add CLI subcommands: hub add/list/remove/default
- Search --hub now resolves saved labels (e.g. --hub team)
- Add REST API endpoints for hub CRUD (GET/PUT/POST/DELETE /api/hub/saved)
- Migrate SearchPage from localStorage to server API calls
2026-02-13 14:21:37 +08:00
Willie 6253099d7d fix: correct hub help text, gofmt alignment, and missing tags type
- Fix --index-url → --hub in hub index help text
- Fix gofmt struct field alignment in SearchResult after adding Tags
- Add missing tags field to frontend SearchResult TypeScript interface
2026-02-13 14:21:37 +08:00
Willie 88847ea3ae feat: add skill field to hub schema for multi-skill repo support
Hub JSON entries can now specify a `skill` field to target a specific
skill within a multi-skill repo. CLI auto-passes -s flag, Web UI
skips the picker modal when skill is specified.

Also adds Community Hub section to search docs with link to
runkids/skillshare-hub.
2026-02-13 14:21:37 +08:00
Willie cd81a01f99 docs: add hub index guide, command reference, and rename to skillshare-hub.json
Rename default output from index.json to skillshare-hub.json for
uniqueness. Add website docs for hub command and hub index guide.
Update search command docs with --index-url section. Add hub and
hub-index to sidebar.
2026-02-13 14:21:37 +08:00
Willie d2854ed621 feat(ui): add private index search with multi-index management
Add /api/hub/index endpoint and index_url support to /api/search.
SearchPage now has GitHub/Private Index mode tabs with localStorage
persistence. Built-in "Current Skills" index plus user-managed
custom indexes with URL dedup and add/delete flow.
2026-02-13 14:21:37 +08:00
Willie 9ee5324689 feat: enhance security audit thresholds, logging, and UI 2026-02-13 14:21:36 +08:00
Willie aa43f94892 feat: add --into flag for skill install command
Allow installing skills into subdirectories for organized folder
structures. Works with all install modes (direct, discovery, tracked)
in both global and project mode.

- Add Into field to InstallOptions and IntoPath() validation
- Update 4 dest-path construction points in CLI with destWithInto()
- Update InstallTrackedRepo for --into prefix in dest and gitignore
- Rewrite ReconcileProjectSkills to use filepath.WalkDir (recursive)
- Add --into to Web UI install handler, API client, and form
- Add 5 integration tests covering local, multi-level, validation,
  project mode, and no-source rejection
2026-02-13 14:21:36 +08:00
Willie 927bad707e feat: add audit rules Web UI page with create/edit support
Add REST API (GET/PUT/POST /api/audit/rules) for managing custom
audit-rules.yaml through the web dashboard. Extract template and
validation logic from CLI into reusable audit package functions
(ValidateRulesYAML, InitRulesFile, DefaultRulesTemplate). Frontend
provides CodeMirror YAML editor with dirty tracking, file creation
flow, and mode-aware path display. Sidebar nav gains overflow scroll.
2026-02-11 04:36:58 +08:00
Willie 84ba16802d feat: add log filtering, improve log UX, and custom dropdown
- Add --cmd, --status, --since, --json flags to CLI log command
- Auto-skip irrelevant log section when --cmd narrows to one file
- Add blank line separator between log entries for readability
- API returns totalAll and commands for smarter frontend filtering
- Custom HandSelect dropdown matching hand-drawn design system
- Empty state distinguishes "no matching entries" from "no entries"
- Update website docs and built-in skill reference with new flags
2026-02-11 03:40:54 +08:00
Willie 5a65993304 feat: add operation log — JSONL-based persistent audit trail for CLI, API, and web UI
Add oplog package (internal/oplog) that records every mutating command
(install, uninstall, sync, push, pull, collect, backup, restore, update,
audit) as a JSONL entry with timestamp, status, duration, and args.

- CLI: `skillshare log` with --audit, --tail, --clear, --project flags
- API: GET/DELETE /api/log endpoints with type and limit params
- Web UI: LogPage with ops/audit tabs, table view, clear and refresh
- Instrumentation across 12 command handlers (CLI + server)
2026-02-10 02:56:59 +08:00
Willie 4d17ff5d57 feat: add security audit — scan engine, CLI, install hooks, web UI, and docs
Scan skills for prompt injection, data exfiltration, credential access,
destructive commands, obfuscation, and suspicious URLs. CRITICAL findings
block installation by default; HIGH/MEDIUM shown as warnings.

- Scan engine: internal/audit with regex-based pattern matching
- CLI: `skillshare audit [name]` with per-skill progress and summary
- Install hooks: auto-scan after copy, block on CRITICAL unless --force
- Web UI: AuditPage with run/rescan, InstallForm shows ConfirmDialog
  for audit blocks (force-retry) and warning details
- ConfirmDialog: add `wide` prop, hide cancel when cancelText is empty
- Reduced false positives: rm -rf only flags root/glob, skip localhost
  URLs, exclude `fetch` as English word, hidden-unicode downgraded to HIGH
- README: add audit section, update screenshots, unify image sizes,
  add audit to Why/Comparison/Daily Commands
- Docs: audit command page, install security scanning section, FAQ,
  common errors, daily workflow, sidebar, landing page, intro
- Blog specs: add audit sections to Dev.to and Medium drafts
2026-02-10 01:53:55 +08:00
Willie d4290307ca feat: add sync drift detection to status, doctor, and web UI
Detect when targets have fewer linked skills than source and surface
warnings across CLI (status, doctor) and web UI (Dashboard, Targets).
Helps users notice unsynced skills after installing new ones.
2026-02-10 00:10:10 +08:00
Willie 8604ab278e feat(ui): add Trash page, trash API handlers, and CLI delete/empty commands
- Add Web UI Trash page with list, restore, delete, and empty actions
- Add 4 server handlers (handler_trash.go) with dual-mode support
- Fix handleUninstallSkill/handleUninstallRepo to use trash.MoveToTrash
  instead of os.RemoveAll (bug fix: uninstall via UI now soft-deletes)
- Add trash delete/empty CLI subcommands with integration tests
- Show Uninstall button for all skills in SkillDetailPage (not just
  tracked/installed ones)
- Update confirm dialog wording to reflect soft-delete behavior
- Update docs with new trash subcommands
2026-02-09 23:19:28 +08:00
Willie 0c49860d63 feat: add project mode labels, privacy-first messaging, and UI polish
- Add (project) labels to status, sync, collect, target, and uninstall
  headers for clear mode distinction (matching list/target list pattern)
- Add ui.WithModeLabel() helper for shared functions that run in both modes
- Update uninstall confirmation prompt: "from the project?" in project mode
- Add "Privacy-first" to README Why section and website homepage
- Replace "Unified Source" card with "Privacy-First" card on website
- Unify Quick Actions card heights with h-full in DashboardPage
- Add frontend rebuild note to Docker sandbox docs
2026-02-09 21:08:03 +08:00
Willie 14bd568b9a feat: add project mode support to web dashboard (skillshare ui -p)
The web dashboard now fully supports project-level skills. When launched
with `-p` or when `.skillshare/config.yaml` is auto-detected, the UI
adapts: Git Sync and Backup pages are hidden, Config edits the project
config, Install reconciles ProjectConfig.Skills[], and targets resolve
from project-level definitions.

Server: add NewProject constructor, IsProjectMode/configPath/saveConfig/
reloadConfig helpers, branch all handlers for project mode.

Frontend: AppContext propagates isProjectMode, Layout filters nav items,
Git/Backup pages show unavailable message, Config/Dashboard adapt.

Extract ReconcileProjectSkills to internal/config for reuse by both CLI
and server. Add unit tests and integration tests for project UI.

Update docs, README, and Docker playground with project mode demo project
and skillshare-ui-p alias.
2026-02-08 17:15:59 +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