Commit Graph
856 Commits
Author SHA1 Message Date
Willie 19a27202e8 feat(ui): redesign Select dropdown, add shared DialogShell/IconButton/Pagination/SegmentedControl
- Redesign Select with size variants (sm/md), B/W color scheme,
  dropdown animation, and consistent height with Button/Input
- Extract DialogShell for unified modal styling across all dialogs
- Add IconButton for icon-only actions with ghost/outline variants
- Add Pagination component for table views
- Add SegmentedControl for tab-like toggle groups
- Update Button: add link variant, border-2 for stronger presence
- Migrate all pages to use shared components, remove inline styles
2026-03-12 16:45:02 +08:00
Willie fff0711e36 feat(ui): add table view with pagination, virtualize grouped view, improve audit dialogs
Skills page gains a third "table" view with paginated list (10/25/50),
hover tooltips via createPortal, and localStorage persistence for the
selected view. Grouped view now uses Virtuoso for smooth scrolling with
large skill sets.

Install/audit dialogs refactored to card-based findings with severity
filter badges, structured grouping, and increased max-height. Confirm
dialog buttons bumped to medium size.
2026-03-12 16:45:02 +08:00
Willie 64a4c91c99 fix(ui): refine minimal redesign — dark mode B/W, link style, button polish
- Dark mode: replace blue accent with neutral gray for true B/W inversion
- Brighten dark mode semantic colors (success, warning, danger) for readability
- Links: replace wavy underlines with oMLX-style border-bottom (link-subtle class)
- Buttons: pill radius, outlined danger, subtle secondary/ghost hover
- Replace inline fontFamily monospace with global font-mono class (15+ files)
- Card: add overflow prop instead of global overflow-hidden removal
- ConfirmDialog/ExtrasModal: widen for better readability
- SkillsPage: neutral filter chips and badges (no blue/red in dark mode)
- BlockStamp/RiskMeter: consistent sizing with items-stretch
- Sidebar version: dynamic from API instead of hardcoded
2026-03-12 16:45:02 +08:00
Willie dfaf34215c docs: update website and built-in skill for extras first-class support
- diff.md: add --extras and --all flags
- status.md: add Extras section for sync status display
- doctor.md: add Extras health check section
- quick-reference.md: add Extras Management table and extras path
- project-skills.md: add extras to Mode Restrictions (supported) and directory structure
- sync-modes.md: add Extras Sync Modes section
- declarative-manifest.md: add Extras Configuration section
- SKILL.md: add extras commands to Quick Lookup table
2026-03-12 16:45:02 +08:00
Willie 46265ae2e7 feat(ui): match oMLX style — dark sidebar active, clean borders, 8px btn radius 2026-03-12 16:45:02 +08:00
Willie bcf72d52fc feat(ui): apply oMLX button palette — dark primary, outline secondary 2026-03-12 16:45:02 +08:00
Willie 773ce9ba08 chore(ui): final cleanup — remove CSS stubs and compat shims
- Remove all --color-postit-* and --color-tracked-* stub CSS variables
  from both @theme and .dark blocks in index.css
- Remove `postit` variant and `decoration` prop from Card.tsx
- Replace bg-postit Tailwind classes with bg-paper/bg-surface equivalents
- Replace animate-spin-slow/animate-pulse-gentle with standard animate-spin/animate-pulse
2026-03-12 16:45:02 +08:00
Willie fb34809b2f refactor(ui): rename HandButton→Button, HandInput→Input + remove deprecated aliases
- Rename HandButton.tsx → Button.tsx, export default function Button
- Rename HandInput.tsx → Input.tsx, rename exports: HandInput→Input,
  HandTextarea→Textarea, HandSelect→Select, HandCheckbox→Checkbox
- Rename internal interface names (ButtonProps, InputProps, etc.)
- Update all 21 import sites across components/ and pages/
- Remove deprecated `wobbly` and `colors` exports from design.ts
2026-03-12 16:45:02 +08:00
Willie e8a850d757 feat(ui): clean all pages — remove hand-drawn decorations
Replace wobbly->radius, colors->palette, animate-sketch-in->animate-fade-in.
Remove all fontFamily var(--font-hand/heading) inline styles, decoration="tape",
variant="postit", and decorative rotate transforms. Rewrite SkillsPage card
components to use uniform surface-background cards with accent border-l for
tracked skills, dropping the postit/trackedColors arrays and getRotation helper.
2026-03-12 16:45:02 +08:00
Willie ef4e51abcf feat(ui): simplify remaining components — remove hand-drawn styling
Replace wobbly→radius, colors→palette, animate-sketch-in→animate-fade-in,
animate-pulse-gentle→animate-pulse across Skeleton, Toast, ConfirmDialog,
EmptyState, ErrorBoundary, StreamProgressBar, FilterTagInput, BlockStamp,
RiskMeter, FileViewerModal, SkillPickerModal, HubManagerModal, InstallForm.
Remove fontFamily overrides (now inherited from body), decoration="tape"
props from Card, dashed borders, rotation transforms, and hard-coded shadows.
BlockStamp simplified to clean inline-flex badge, no rotation.
2026-03-12 16:45:02 +08:00
Willie cf92a221b2 feat(ui): simplify core components — Card, Button, Input, Badge
Replace hand-drawn skeuomorphic styles (wobbly borders, shadow-translate
hover effects, handwriting font) with clean, minimal equivalents using
the updated radius/shadows tokens. Preserve all props and keyboard
navigation for backward compatibility.
2026-03-12 16:45:02 +08:00
Willie 06ca4696e2 feat(ui): rewrite design tokens — radius, palette, clean CodeMirror theme
- design.ts: replace wobbly border-radius with clean radius constants (4-12px),
  add semantic palette export; keep deprecated colors/wobbly aliases for migration
- codemirror-theme.ts: switch font to SFMono stack, replace dashed gutter border
  with 1px solid, swap postit highlights for info-light/warning-light
- audit/helpers.ts: migrate from colors.blue to palette.info
2026-03-12 16:45:02 +08:00
Willie 8f8991382c feat(ui): rewrite CSS tokens — minimal palette, remove hand-drawn effects 2026-03-12 16:45:02 +08:00
Willie 7b6f0e8f09 feat(ui): swap Google Fonts from Inter to DM Sans 2026-03-12 16:45:02 +08:00
Willie 70abe44cd0 test: add E2E runbook for extras refactor (JSON purity, copy, project mode)
18-step runbook covering sync --all --json single-object output, copy mode
file verification, project mode extras lifecycle, auto-migration, and mode
validation via shared helpers.
2026-03-12 16:45:02 +08:00
Willie d97e5a7c33 refactor(extras): consolidate duplicate logic and fix sync --all --json output
- Move checkExtrasSyncStatus to sync.CheckSyncStatus (shared)
- Add sync.EffectiveMode helper to replace inline mode defaults
- Add config.ValidateExtraMode to centralize mode validation
- Fix sync --all --json outputting two separate JSON objects
  by merging extras into the skills JSON output
- Fix swallowed JSON decode error in handleExtrasSync
- Remove dead symlink check in CollectExtraFiles (filepath.Walk
  follows symlinks so the check was unreachable)
- Fix integration test extras paths to use extras/<name>/ layout
2026-03-12 16:45:02 +08:00
Willie 7f5e4650c9 docs: merge v0.16.15 content into v0.17.0 changelog and release notes 2026-03-12 16:45:02 +08:00
Willie 50bc394321 docs: add changelog and release notes for v0.17.0
Covers: first-class extras command group, project mode, TUI wizard,
deep integration with status/doctor/diff/sync, Web UI page, and
auto-migration from flat to nested directory layout.
2026-03-12 16:45:02 +08:00
Willie f6264fc954 test: add integration tests for collect, status, diff, doctor, migration 2026-03-12 16:45:02 +08:00
Willie 9f8970c6c0 docs: add extras command reference and update sidebar 2026-03-12 16:45:02 +08:00
Willie 69038611c3 feat(ui): add Extras page, API client, and Dashboard card
- ExtrasPage with list, sync, remove, and add-extra modal
- API client types and methods for extras endpoints
- Dashboard stat card showing extras count/files/targets
- Nav item and route registration
2026-03-12 16:45:02 +08:00
Willie dae3f502c1 feat(server): add REST API endpoints for extras management
- GET /api/extras — list extras with sync status
- GET /api/extras/diff — per-file diff for extras
- POST /api/extras — create new extra
- POST /api/extras/sync — sync extras (all or by name)
- DELETE /api/extras/{name} — remove extra from config
2026-03-12 16:45:02 +08:00
Willie a786c1fe79 feat(extras): add init TUI wizard, collect command, and sync --json
- extras init TUI: multi-step bubbletea wizard (name → target → mode → confirm)
- extras collect: reverse-sync local files from target back to extras source
  with --from, --dry-run flags and dual-mode (global/project) support
- sync extras --json: structured JSON output for sync extras command
- CollectExtraFiles in internal/sync with tests
2026-03-12 16:45:02 +08:00
Willie 163548a6ee feat(diff): integrate extras into diff TUI with separator and detail panel 2026-03-12 16:45:02 +08:00
Willie 18ee11037d feat(diff): add --extras and --all flags for extras diff
Adds extras diff collection, plain text rendering, and JSON output.
--all implies --extras. Project mode supported via ExtrasSourceDirProject.
2026-03-12 16:45:02 +08:00
Willie 4af609e318 feat(doctor): add extras source/target health checks
Check each configured extra's source directory exists and count its
files; warn when one or more target parent directories are unreachable.
Runs in both global and project mode after the main doctor checks.
2026-03-12 16:45:02 +08:00
Willie d8cc25abd3 feat(status): show extras sync status in status output 2026-03-12 16:45:02 +08:00
Willie f4e54a1810 test: add integration tests for extras init, list, remove, sync 2026-03-12 16:45:02 +08:00
Willie c02b918057 feat(sync): add project mode support for sync extras and sync --all -p
cmdSyncExtras now parses mode args and auto-detects project mode via
projectConfigExists. Global logic is extracted into cmdSyncExtrasGlobal;
new cmdSyncExtrasProject handles project-scoped extras using
config.LoadProject and config.ExtrasSourceDirProject, with relative
target paths resolved against the project root.

sync --all in project mode now defers a cmdSyncExtras("-p", ...) call
instead of printing a warning, so extras are also synced.
2026-03-12 16:45:02 +08:00
Willie 18d54bd293 feat: implement extras init, list, and remove commands
- extras init: create new extra with --target/--mode flags, global + project mode
- extras list: show all extras with sync status detection, --json support
- extras remove: remove extra from config with --force confirmation
2026-03-12 16:45:02 +08:00
Willie f275435d6f feat(schema): add extras definition to config and project-config JSON schemas 2026-03-12 16:45:02 +08:00
Willie 0fcf6d1ee3 feat(sync): update extras source path to extras/<name>/ with auto-migration 2026-03-12 16:45:02 +08:00
Willie 6ece5c3e44 feat(config): add extras directory migration from flat to nested layout
Moves legacy extras dirs (configDir/name/) into configDir/extras/name/.
Idempotent: skips already-migrated dirs, warns on conflicts.
2026-03-12 16:45:02 +08:00
Willie 482778e50c feat(config): add extras name validation with reserved words and regex
ValidateExtraName rejects empty names, reserved words ("skills", "extras"),
and names that don't start with alphanumeric or contain invalid characters
(slashes, dots, spaces, leading dash/underscore). ValidateExtraNameUnique
prevents duplicate extra names in config.
2026-03-12 16:45:02 +08:00
Willie 26529206cb feat(config): add extras source path derivation helpers
Add ExtrasSourceDir, ExtrasSourceDirProject, and ExtrasParentDir to
derive the correct extras directory paths for global and project mode.
2026-03-12 16:45:02 +08:00
Willie 5dac1cabd5 feat(config): add Extras field to ProjectConfig for project-mode extras 2026-03-12 16:45:02 +08:00
Willie 655c22036a docs: add JihuLab auto-detection to changelog and release notes 2026-03-12 16:45:02 +08:00
Willie 2826633eef feat(install): auto-detect JihuLab hosts for nested subgroup support
JihuLab (jihulab.com) is a GitLab distribution that supports nested
subgroups but its hostname doesn't contain "gitlab". Add "jihulab" to
the built-in host detection so URLs like jihulab.com/group/sub/project
are parsed as full-path repos without requiring gitlab_hosts config.
2026-03-12 16:45:02 +08:00
Willie 2769eaa8e8 docs: update changelog, release notes, and E2E runbook for gitlab_hosts
- CHANGELOG/website: add gitlab_hosts config and SKILLSHARE_GITLAB_HOSTS
  env var to New Features section, add HTTPS fallback bug fix
- RELEASE_NOTES: expand with EffectiveGitLabHosts design decisions,
  env var merge semantics, and project-mode isolation
- Runbook: extend gitlab_hosts_config_runbook from 10 to 18 steps
  covering env var merge, persistence safety, server parseOpts isolation,
  and CLI-level env var smoke tests (18/18 PASS verified)
2026-03-12 16:45:02 +08:00
Willie b58d37376a test: add regression tests for project-mode gitlab_hosts isolation
- TestParseOpts_ProjectMode_NoFallbackToGlobal: server project mode
  returns empty hosts when project has none, never falls back to global
- TestParseOpts_ProjectMode_MergesEnvVar: env var merges with project
  config, not global
- TestLoadProject_GitLabHosts_EffectiveGitLabHosts: project config
  EffectiveGitLabHosts() merges env var while GitLabHosts stays
  config-file-only
2026-03-12 16:45:02 +08:00
Willie 0890fb3015 fix(config): prevent env var gitlab_hosts from leaking into persisted config
Move SKILLSHARE_GITLAB_HOSTS merge from Load()/LoadProject() to new
EffectiveGitLabHosts() methods so the GitLabHosts field stays config-file-only
and Save() never writes env-only hosts to disk.

Also fix project-mode direct install dropping gitlab_hosts from the
synthetic Config, and server project-mode parseOpts() falling back to
global config when project had no hosts configured.
2026-03-12 16:45:02 +08:00
Willie 8f16a90e5f feat(config): add SKILLSHARE_GITLAB_HOSTS env var and cleanup
Support CI/CD pipelines that need gitlab_hosts without a config file.
The env var is comma-separated and merged (deduplicated) with config
file values in both global and project modes.

Also cleans up from review:
- Extract isValidGitLabHostname to share validation logic
- Remove redundant ToLower before EqualFold in isGitLabHost
- Revert 3 no-opts call sites back to ParseSource()
- Add parseOptsFromProjectConfig helper to reduce inline duplication
- Fix project mode LoadProject missing env var merge
- Add install.md tip about custom GitLab domains
2026-03-12 16:45:02 +08:00
Willie a4d52615f7 feat(config): add gitlab_hosts for custom GitLab domain support
Self-managed GitLab instances on custom domains (e.g., git.company.com)
without "gitlab" in the hostname were parsed with 2-segment owner/repo
split instead of full-path repo. Users can now declare extra GitLab
hostnames in config so the parser treats them like gitlab.com (nested
subgroup support).

- Add `gitlab_hosts` field to both global and project Config structs
- Validate entries at load time (reject scheme, path, port, empty)
- Add `ParseOptions` / `ParseSourceWithOptions` to thread hosts into parser
- Add `isGitLabHost()` helper combining built-in + custom host detection
- Extend `InstallContext` interface with `GitLabHosts()` method
- Update all ParseSource call sites (install, search, update, server)
- Add JSON schemas for both config files
- Add unit tests for config validation and source parsing
- Add E2E runbook for devcontainer verification
- Document in configuration reference and URL formats appendix
2026-03-12 16:45:02 +08:00
Willie e2a8c7da2c fix(install): platform-aware HTTPS fallback to preserve GHE subdir behavior
The initial GitLab subgroup fix treated all multi-segment HTTPS paths as
full repo paths, regressing GHE and generic host subdir installs like
github.mycompany.com/org/repo/path/to/skill.

Add host-based heuristic: hosts containing "gitlab" use full-path-as-repo
behavior; all other hosts retain the original 2-segment owner/repo split
with remainder as subdir. This preserves backward compatibility for GHE,
Gitea, Gogs, and other non-GitLab platforms while correctly handling
GitLab nested subgroups.
2026-03-12 16:45:02 +08:00
Willie bf9eaa5e29 fix(install): support GitLab nested subgroup URLs (#72)
Replace rigid 2-segment HTTPS regex with flexible path parsing that
treats the entire URL path as a repo when no explicit boundary exists.
Use .git suffix as the canonical repo/subdir delimiter, preserving
/-/ (GitLab) and /src/ (Bitbucket) web URL markers.

This fixes install failures for URLs like
onprem.gitlab.internal/org-group/sub1/sub2/project which previously
misinterpreted extra path segments as monorepo subdirectories.
2026-03-12 16:45:02 +08:00
salmonumbrella 1e07a77681 fix(ui): share copy button behavior 2026-03-12 09:38:31 +08:00
salmonumbrella 92bf8b6898 feat(ui): add copy-to-clipboard for skill paths
Add a copy button (overlapping-squares icon) to the skill detail page:
- Next to the "Path" label in the Metadata card, copies the full
  absolute source path
- In the file viewer modal header, copies the full file path

Clicking shows a brief checkmark with "Copied!" confirmation.
2026-03-12 09:38:31 +08:00
Willie 478b4ee336 refactor(runbook): replace built-in runner with mdproof
The in-tree runbook runner (tools/runbook/, 25 Go files, ~4500 LOC)
has been extracted into the standalone mdproof project and is no
longer needed here.

Removed:
- tools/runbook/ — parser, executor, assertions, reporters, tests
- .devcontainer/bin/runbook — wrapper that built from tools/runbook
- ai_docs/runbook-guide.md — docs describing the old runner
- Makefile build-runbook target

The cli-e2e-test skill, runbook.json, and ensure-mdproof.sh already
reference the external mdproof binary for all E2E test execution.
2026-03-11 04:53:08 +08:00
Willie 9c2dcda9e6 feat(runbook): retry/depends directives, remove TUI, add skip reasons
Add #112 step directive framework (retry, delay, depends) via HTML
comment syntax: <!-- runbook: retry=3 delay=5s depends=2 -->

- Parser: applyDirectiveComment() parses retry/delay/depends/timeout
- Executor: retry wraps subshell in for-loop, depends checks
  __rb_status_N, exit code -2 sentinel for depends-skipped
- Fix __rb_rc stale value bug when depends-else + fail-fast interact
- Reporter: show skip reasons (depends/fail-fast) at all verbosity levels

Remove TUI (executor.go, reporter_tui.go) to prepare for independent
extraction. All execution now uses unified session executor path,
eliminating feature parity issues (retry/depends/env were TUI-only gaps).

Tests: +10 new tests covering directive parsing, retry, depends,
fail-fast, env seeding, per-step timeout at both executor and runner
levels.
2026-03-11 04:53:08 +08:00
Willie 65fc6a0458 feat(runbook): per-step timeout directive and env seeding from config
- Per-step timeout: `### Step 5: Build (timeout: 10m)` overrides the
  global timeout for individual steps. Uses `timeout` command + heredoc
  in the session script to avoid quoting issues.
- Env seeding: `runbook.json` `env` field injects environment variables
  into all steps via `export` at the top of the session script.
  Deterministic key ordering via sortedKeys().
2026-03-11 04:53:08 +08:00