handleGitInstall has two single-skill paths (subdir and non-subdir)
that always printed "✓ Installed: <name>" even in dry-run mode.
Branch on opts.DryRun to show "[dry-run] Would install: <name>" instead,
matching the multi-skill path behavior.
Fixes failing CI tests: TestInstall_Auth_HTTPSPublicWithToken,
TestInstall_RemoteGitHubSubdir_DryRun.
Grow the detail panel from 12 to 16 reserved lines so more metadata is
visible. Description now word-wraps to terminal width (up to 3 lines
with trailing "..." when truncated) and is followed by a blank line for
visual separation. Also display the license field from SKILL.md
frontmatter when present.
Remove all survey/v2 dependency (7 call sites) and fuzzy direct usage:
- search.go: survey.Input → bufio.NewReader for simple text prompts
- init.go: survey.Select → inline numbered prompt for sync mode
- init.go: survey.MultiSelect → checklist TUI for target/agent selection
- init_project.go: survey.MultiSelect → checklist TUI for project targets
- install_prompt.go: survey.Select → checklist TUI for orchestrator mode
- install_prompt.go: delete dead promptSearchSelect function
- install_prompt.go: fuzzy → strings.Contains for filterSkillsByName
Add generic checklist_tui.go supporting both multi-select and single-select,
reusing the existing bubbletea/bubbles styling. Sync mode uses a simple
inline prompt (no alt-screen) for smoother init flow, with a copy-mode
hint when non-copy is selected. TUI selections now print confirmation
after exit so users see what they chose.
Single-skill check now shows the same tree-structured header (Source,
Items, Skill name, Source URL) and uses a spinner + StepResult instead
of a progress bar, consistent with how `update` renders single targets.
The // subdir syntax (e.g., repo//skills/foo) stores meta.Subdir with
a leading "/". git rev-parse and ls-tree paths never have leading
slashes, causing tree hash lookups to fail silently.
Strip leading "/" in getSubdirTreeHash(), resolveSkillStatuses(), and
handler_check.go. Add LeadingSlash unit test and E2E runbook.
Progress bar total was `len(repoInputs) + len(urlInputs)` which showed
"2/2" for 46K skills from 2 URLs — meaningless to users. Now uses actual
skill count so the bar shows "46321/46321" instead.
Previously `skillshare check` compared repo-level commit hashes, causing
all skills from a registry repo to show "update_available" whenever any
commit was pushed — even if the individual skill's files were unchanged.
Now each skill records its git tree hash (subdir-level SHA) at install
time. During check, a three-tier comparison is used:
1. Fast path: commit hash matches → up_to_date (zero extra cost)
2. Tree hash path: blobless fetch (~150KB) + batch ls-tree → per-skill
comparison; unchanged subdirs stay up_to_date
3. Fallback: no tree hash (old installs) → commit comparison (unchanged)
Also fixes pterm progress bar printing twice when it auto-stops at 100%.
Replace the single-select survey.Select prompt in `search` with a
bubbletea-based multi-select TUI, enabling batch installation of
search results. The new TUI supports space/a toggle, `s` for search
again, `/` filter, and esc to cancel — consistent with the existing
skill select TUI pattern from install.
Add batchInstallFromSearch() for sequential multi-skill installation
with per-skill error reporting.
- Replace promptMultiSelect's survey.MultiSelect with a full bubbletea
TUI (space toggle, a select-all, enter confirm, / filter, esc cancel)
- Unify TUI styling across all screens: brand yellow (#D4D93C) for
active item border+text, bright white for normal items
- Fix infinite loop when selecting (root) group in dir picker
- Compact single-line items with SetHeight(1) + SetSpacing(0)
- Pre-compute location strings and maintain selCount counter for
better toggle performance with large skill sets
- Remove inline ANSI from Title() to prevent filter highlighting corruption
- List TUI: single-line items with [tracked]/[local] badges, no description
Replace redundant "Updating N skill(s)" header + separator with the
same tree layout used by check: Header → StepStart("Source") →
StepContinue("Items") with repo/skill counts. Removes duplicate
"Updating" label that overlapped with the progress bar title.
groupSkillsByDirectory() used filepath.Dir() which always returned the
same parent regardless of recursion depth. Add a prefix parameter so
each level strips already-navigated directories before grouping.
Also fix stale assertion in TestCheck_RegularSkill_ShowsMeta to match
the summarized local-skill output introduced in 37f3425.
Introduce InstallContext interface to abstract global/project behavioral
differences, push config-based install logic down to internal/install,
and merge the nearly-identical Git discovery/subdir handlers.
- Add InstallContext interface (SourcePath, ConfigSkills, Reconcile,
PostInstallSkill, Mode) with SkillEntryDTO to avoid circular imports
- Add globalInstallContext and projectInstallContext implementations
- Extract InstallFromConfig() to internal/install/install_config.go,
replacing the 90%-identical installFromGlobalConfig/installFromProjectConfig
- Merge handleGitDiscovery + handleGitSubdirInstall into handleGitInstall,
branching on source.HasSubdir() for the few differences
Suppress per-item output for up_to_date repos/skills and local skills,
showing counts in the summary instead. This prevents terminal flooding
when checking hundreds of skills (e.g. 920+).
- Extract shared renderCheckResults() to deduplicate runCheck/runCheckFiltered
- Full check (no args): hide up_to_date + local, show counts in summary
- Filtered check (names/groups): hide up_to_date, still show local individually
- JSON output unchanged
Replace serial checkTrackedRepo/checkRegularSkill loop in
runCheckFiltered() with the same parallel batch pattern used by
runCheckAll(): partition targets into repo/skill names, call
collectCheckItems for URL deduplication, then fan out via
ParallelCheckRepos and ParallelCheckURLs with a progress bar.
Remove now-dead checkTrackedRepo and checkRegularSkill functions
and the unused git import they required.
logUpdateOp now captures mode, all, force, dry_run, skip_audit, threshold,
and diff flags. Dedicated formatUpdateLogPairs/Detail formatters replace the
generic fallback in both the TUI log viewer and the web UI LogPage.
Add 256-color palette ID constants (SeverityIDCritical, etc.) and
SeverityColorID() to ui package as single source of truth for severity
colors. Refactor log_tui.go colorizeSeverityBreakdown, colorizeThreshold,
and colorizeRiskValue to use shared IDs instead of hardcoded values.
Add ui.SeverityColor() and ui.Colorize() as shared helpers for consistent
severity coloring across the codebase. Apply colored severity labels to
the batch audit summary line (HIGH=150, MEDIUM=511, etc). Refactor
audit.go to use shared helpers instead of local duplicates.
Replace cfg *config.Config with sourcePath string in updateTrackedRepo and
updateRegularSkill. Add projectRoot param for mode-aware audit scanning.
Delete updateSingleProjectSkill and updateProjectTrackedRepo from
update_project.go — project mode now uses the same shared handlers.
All three duplicated 3-phase batch loops (tracked repos → grouped skills →
standalone skills) are now unified through executeBatchUpdate(). This
eliminates the local `target` struct in updateAllProjectSkills and ~160
lines of duplicated orchestration code.
Add updateContext struct with mode-aware auditScanFn() and makeInstallOpts().
Unify updateTrackedRepoQuick (add scanFn param) and updateSkillFromMeta
(accept InstallOptions) between global/project modes. Delete
updateProjectTrackedRepoQuick and updateProjectSkillFromMeta.
Delete parseProjectInstallArgs (identical copy) and projectInstallArgs type
from install_project.go. Both modes now share parseInstallArgs. The "no source
→ reject flags" check moved from parser to cmdInstall caller. Project mode
gains --audit-verbose support for free.
Move ~360 lines of skill selection UI functions (promptMultiSelect,
promptLargeRepoSelection, fuzzy filtering, etc.) to a dedicated file.
Pure structural move with no behavior changes.
Move ~820 lines of audit-related types, vars, and 30 functions from the
2608-line install.go monolith into a dedicated file. Pure structural move
with no behavior changes — same package, identical signatures.
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.
On TTY, `skillshare log` now launches a bubbletea TUI (same pattern as
`list`) with fuzzy filtering by timestamp/command/status/source/detail,
keyboard navigation, and a colorized detail panel showing structured
args per entry. Operations and audit entries are merged and sorted by
time in the combined view.
Also refactors the 979-line log.go into three focused files:
- log.go (303) — entry, dispatch, help
- log_format.go (495) — data→string conversion, logArg* helpers
- log_render.go (189) — TTY/non-TTY terminal output
Other changes:
- --no-tui flag to skip TUI and print plain text
- Shared applyTUIFilterStyle() for cyan filter cursor in both TUIs
- Update website docs and built-in skill references
Allow users to trigger audit, update, or uninstall directly from
the interactive list TUI via Shift-key shortcuts (A/U/X), avoiding
the need to exit and manually type commands.
Replace basic text output with bubbletea-based interactive TUI for the
list command. Falls back to plain text with --no-tui or non-TTY output.
- Bubbletea TUI: fuzzy filtering, keyboard navigation, detail panel
- Detail panel: description (SKILL.md), disk path, files, synced targets
- Search: `skillshare list <pattern>` filters by name/path/source
- Filter: `--type git|local` to filter by installation type
- Sort: `--sort name|date|type` with mode-specific defaults
- JSON: `--json` for CI/scripting consumption
- Pager: less/more wrapper for --no-tui plain text output
- 29 integration tests covering all new functionality
UpdateSkillsFromRepo was using filepath.Join(sourceDir, meta.Subdir) to
derive the local destination, but meta.Subdir is the repo-internal path
(e.g. "skills/foo") which may differ from the local install path ("foo/").
This created leaked copies at sourceDir/skills/foo/ alongside the correct
sourceDir/foo/, doubling the skill count on subsequent scans.
Change skillTargets from []string to map[string]string where key is the
repo subdir (for discovery lookup) and value is the local absolute path
(provided by the caller who already knows where the skill is installed).
Grouped skills batch path calls UpdateSkillsFromRepo which clones the
repo via DiscoverFromGitWithProgress — but OnProgress was nil so the
progress bar froze during clone then jumped on completion.
Wire OnProgress callback to forward git transfer lines into the
progress bar title, and add a 50ms render delay in the inner per-skill
loop so pterm can flush each step to the terminal. Both guarded by
IsTTY() to avoid overhead in CI/pipe contexts.
Remove hardcoded preferredModeHintTargets list that only suggested copy
mode for specific targets (cursor, antigravity, copilot, opencode).
Instead, show a generic symlink compatibility hint whenever any target
uses merge or symlink mode — guiding users to switch to copy mode if
their tool cannot read symlinked skills.
standardized the command-line interface to ensure professional visual
consistency, accurate path reporting, and synchronized audit logic across
all modes.
Visual and UX Enhancements:
- Adaptive Skill Cards: Redesigned the bulky summary box into a compact card
that correctly reports relative installation paths and handles missing
descriptions with fallback messaging.
- Connected Hierarchical Trees: Implemented a standardized tree layout
(StepStart, StepContinue, StepResult) for all single-item tasks, integrating
success status and execution duration as final nodes.
- Intelligent Audit UI: Optimized 'Audit Findings' headers to perfectly align
with risk results, ensuring no empty sections appear on CLEAN results.
- Ephemeral Progress Tracking: Configured spinners to auto-indent within the
hierarchical structure and disappear completely upon completion to maintain
clean terminal logs.
Logic and Reliability Fixes:
- Path Parity: Fixed a bug where the '--into' flag was not accurately
reflected in the UI cards during installation.
- Audit Completeness: Restored missing security scans for certain Git-based
installation paths.
- Code Parity: Unified recursive discovery and display logic between Global
and Project update modes.
Validation:
- Successfully verified with 'make check' (all 150+ unit and integration
tests passing).
Refactor updateAllProjectSkills to use filepath.Walk, ensuring nested
skills (e.g. 'frontend/react-best-practices') are correctly discovered
and updated.
Changes:
- Discovery: Implement recursive scanning for both tracked repos and
regular skills with metadata.
- Logic: Unified target collection ensures consistent counting and
execution between single and batch update paths.
- Test: Sync TestSkillshareWrapper_ProjectModeRedirectsFromWorkspaceRoot
to match the updated redirection message.
- Validation: Verified with 'make check' (all unit and integration
tests passing).
Batch update (>1 target) now always uses a progress bar with the
current skill name displayed, replacing per-item spinners that
produced excessive output. Audit results are collected during the
batch and summarised after the progress bar completes.
Also adds UpdateTitle to install's progress bar loop so large
batch installs show which skill is being processed.
Clarify audit blocking output for tracked repository installs and updates.
Changes:
- update tracked install audit block errors to state findings were detected in tracked repository
- update tracked update audit block and rollback messages with tracked repository context
- when tracked install is blocked by audit, show spinner state as Blocked by security audit instead of Failed to clone
- enhance blocked audit summary rendering to append in tracked repository when the error context indicates a tracked repo
- add unit test coverage for tracked repository context in blocked audit rendering
Verification:
- go test ./cmd/skillshare ./internal/install -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY=/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare go test ./tests/integration -run TestInstall_Track_BlocksCritical -count=1
Implement remaining Issue 46 optimizations and developer experience fixes.
Install and update optimization:
- optimize install --track for subdirectory sources by attempting sparse checkout first while preserving git metadata
- fallback to existing tracked clone strategy on sparse capability or sparse path errors
- clean sparse created destination before fallback clone to avoid destination already exists failures
- improve tracked install spinner wording for subdir sources
- add tracked subdir unit tests for sparse success and sparse to full clone fallback
Progress user experience:
- normalize git progress lines by stripping volatile transfer rate suffix
- dedupe and throttle spinner and tree spinner update frequency to reduce tty flicker
- add unit tests for spinner progress normalization and throttling behavior
GitHub API messaging:
- improve rate limit guidance to suggest setting token env vars or using gh auth login
Devcontainer isolation:
- make ssenv enter command mode run from isolated environment cwd
- fix setup global init detection to use skillshare status global mode
- add auto mode hint in devcontainer wrapper when workspace project config takes precedence
E2E and tests:
- expand Issue 46 runbook with install, install track, update, no token fallback, sparse paths, and isolation checks
- update compact warning output test expectations to match current grouped warning rendering
Verification:
- go test internal install package
- go test internal install sparse and tracked subdir tests
- go test internal ui package
- go test cmd skillshare package
- go build skillshare binary and run integration TestInstall_Subdir
- run tracked subdir tests inside devcontainer
Implement Issue #46 across install/update paths to reduce perceived hangs and improve subdir installation performance on large repositories.
Main changes:
- Add git progress streaming primitives in internal/install/git_progress.go.
- runGitCommandWithProgress supports stderr streaming callbacks in TTY mode.
- scanGitProgress handles both CR and LF progress delimiters.
- Thread InstallOptions.OnProgress through clone/pull/discovery/install/update paths.
- Keep non-TTY behavior quiet to avoid noisy logs.
- Add TreeSpinner.Update for live message updates.
- Add progress-aware git update APIs in internal/git/info.go:
- PullWithProgress and ForcePullWithProgress (keep PullWithEnv/ForcePullWithEnv for compatibility).
- Introduce shared GitHub client utilities in internal/github/client.go.
- Centralize token lookup, request construction, and rate-limit handling.
- Refactor internal/search/search.go to use shared client while preserving compatibility aliases.
- Add GitHub/GHE API subdir fast path in internal/install/github_download.go.
- github.com => api.github.com
- github-like enterprise hosts => https://<host>/api/v3
- On API failure, emit warning and fallback to git-based flows.
- Add sparse checkout fallback for non-GitHub subdir sources in internal/install/sparse_checkout.go.
- Use filter+no-checkout+depth=1 then sparse-checkout set + checkout.
- Extend discovery/install metadata plumbing.
- DiscoveryResult now includes CommitHash and Warnings.
- install/discover subdir paths preserve warnings and commit hashes from API/sparse/full-clone flows.
- Preserve compatibility and UX expectations.
- Keep existing action strings (for tests/UI stability).
- Keep legacy discover/pull APIs as wrappers around new progress-aware variants.
- Improve --track download efficiency.
- Track clone now attempts --filter=blob:none --depth 1 --single-branch first.
- Falls back to full clone only on remote capability mismatch, not on auth/not-found errors.
CLI wiring:
- cmd/skillshare/install.go
- TTY handlers now pass progress callbacks and use with-progress discover APIs.
- Subdir handler shows API-vs-clone stage messages and renders discovery fallback warnings.
- cmd/skillshare/update.go and cmd/skillshare/update_project.go
- Use PullWithProgress/ForcePullWithProgress for tracked repos.
- Ensure reinstall/update install flows forward progress callbacks.
Tests added/updated:
- internal/install/git_progress_test.go
- internal/install/github_download_test.go
- internal/install/sparse_checkout_test.go
- internal/install/tracked_clone_test.go
- internal/install/source_test.go (GitHubOwner/GitHubRepo coverage)
- internal/git/info_test.go (PullWithProgress/ForcePullWithProgress)
- tests/integration/install_subdir_optimization_test.go
- tests/integration/install_online_test.go (GitHub API subdir case)
Validation performed:
- go test ./internal/install -count=1
- go test ./internal/git -run 'Test.*Pull.*' -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY="/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare" go test ./tests/integration -run 'TestInstall_Subdir|TestUpdate_' -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY="/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare" go test ./tests/integration -run 'TestInstall_Track_|TestUpdate_TrackedRepo' -count=1
- go test -tags online ./tests/integration -run TestInstall_GitHubSubdirViaAPI -count=1
- make lint
- make test
MatchesTargetName now falls back to path comparison when name-based
matching fails, so targets sharing the same project_path (e.g. codex
and universal both using .agents/skills) correctly match in
FilterSkillsByTarget.
PruneOrphanLinks records user-created directories in LocalDirs instead
of emitting misleading "unknown directory" warnings, and syncMergeMode
counts them toward the local skill total.
Single-item paths (tracked repo, regular skill) now use StepStart/StepContinue
for a flowing style consistent with install. Batch paths use ui.Header for a
simple one-line title. HeaderBox is retained only for audit and log commands
where a bordered report frame is appropriate.