Commit Graph
847 Commits
Author SHA1 Message Date
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
Willie a80eaddd1a feat(runbook): --fail-fast, verbose (-v/-vv), and --output flags
Three DX improvements for runbook runner:

- --fail-fast: two-layer stop-on-failure (bash __rb_stop flag +
  Go assertion loop) skips remaining steps after first failure,
  reducing noise in long runbooks
- -v/-vv: verbose output showing assertion details (level 1) and
  stdout/stderr snippets (level 2) for easier debugging
- --output/-o: write JSON report to file while still printing
  plain text summary to stdout, useful for CI artifact collection
2026-03-11 04:53:08 +08:00
Willie 8934e876de docs(runbook): document --steps and --from selective execution flags
Add flag descriptions, quick start examples, and a debugging pattern
for selective step execution.
2026-03-11 04:53:08 +08:00
Willie b932ddae78 feat(runbook): selective step execution with --steps and --from flags
Skip re-running unchanged steps when debugging runbooks.
--steps 1,3,5 runs only specified steps; --from N runs from step N onwards.
Filtered steps are marked skipped. Flags are mutually exclusive.
2026-03-11 04:53:08 +08:00
Willie a9053eea11 feat(runbook): regex (?m) default, heredoc-aware parser, remove set -e
Three runbook CLI improvements addressing top pain points from
verification:

- Auto-prepend (?m) to regex assertions so ^/$ match line boundaries
  instead of string boundaries (skip if pattern already has flags)
- Track heredoc delimiters in parser so embedded ``` inside heredocs
  don't prematurely close code blocks
- Remove set -e from step subshells — exit code is now the last
  command's exit code, eliminating need for CMD_EXIT workarounds

Resolves opportunities #103, #105, #106.
2026-03-11 04:53:08 +08:00
Willie ebab63a670 feat(runbook): add build lifecycle hook, verify all 17 runbooks
Add a build hook that runs once before all runbooks, enabling
automatic binary rebuild. Lifecycle is now:
  build (once) → [per runbook: setup → steps → teardown]

Build hook uses os/exec directly (not session executor), outputs
to stderr, and aborts immediately on failure.

Fix all 17 runbooks to pass in devcontainer:
- Adapt to session executor's set -eo pipefail (use cmd || EXIT=$?
  pattern for expected non-zero exits)
- Replace embedded ```bash in heredocs with printf to avoid
  confusing the runbook parser
- Fix negated assertion gotchas (Not FAIL, No such file)
- Remove fragile verify code blocks (multi-block merge issues)
- Fix step number collision (7b → 8, renumber subsequent)
- Use -s flag for batch installs instead of repeated --force
- Add (?m) flag for multi-line regex assertions
2026-03-11 04:53:08 +08:00
Willie 06e9783eb4 fix(runbook): hooks work in TUI mode, show status in plain reporter
Disable TUI when hooks are active (hooks need session executor for
env persistence). Show [setup]/[teardown] status in plain text output.
Fix negative step numbers in marker regex for synthetic steps.
2026-03-11 04:53:08 +08:00
Willie 2657974fbe feat(runbook): lifecycle hooks via --setup/--teardown and runbook.json
Add setup and teardown commands that run before/after each runbook.
Config file (runbook.json) provides persistent defaults; CLI flags
override. Setup env vars persist to all steps via session executor.
Setup failure skips all steps; teardown failure is informational only.

Removed Step 0 from atomgit runbook — init is now in runbook.json.
2026-03-11 04:53:08 +08:00
Willie e589447d70 fix(devcontainer): resolve runbook paths against workspace root
When inside an ssenv isolated shell, HOME changes and relative paths
like ai_docs/tests/ don't resolve. The wrapper now rewrites relative
non-flag arguments to /workspace/<path> when the file exists there.
2026-03-11 04:53:08 +08:00
Willie cdf7263516 feat(devcontainer): add runbook shortcut command
Auto-builds from source on each invocation, same pattern as the
ss/skillshare wrapper. Added to help screen and setup.sh quick
start message. Updated guide to document the shortcut.
2026-03-11 04:53:08 +08:00