Skills installed from a non-default branch record that branch in metadata,
but the grouped update path (update --all) cloned the remote default branch,
so the skills were either downgraded or reported as removed upstream and
pruned. The web UI update and check handlers had the same gap, comparing
against the remote HEAD instead of the installed branch.
Group batch updates and web UI checks by URL+branch, pass the branch through
to the clone, and resolve remote tree hashes for that branch as well.
Refs #268
Batch update looks up each skill's subdir in the discovery map, but
discovery deliberately skips target dot-dirs (.claude, .codex, ...) to
avoid counting target-synced copies as source skills. A skill installed
from such a subdir therefore never appears in the map and is falsely
reported as stale (deleted upstream), steering users toward --prune on a
healthy skill. Fall back to a direct SKILL.md stat in the cloned repo --
mirroring the single-skill update path -- before declaring the path
missing.
Fixes#261
Optimize grouped repo updates by skipping reinstall when installed metadata already matches remote state (commit match, or subdir tree-hash match when HEAD moved).
Emit per-skill grouped progress events so the batch progress bar advances continuously instead of appearing stuck at 0%.
When skipping by tree-hash match, best-effort refresh meta.Version to latest commit to keep status/version output current.
Add unit tests covering commit/tree-hash skip behavior and metadata version refresh.
When update --all processes many skills from the same repo, avoid reinstall/copy when installed metadata already matches the fetched repo state.
For root skills, skip when meta.Version matches repo commit. For subdir skills, require both meta.Version and meta.TreeHash to match. Added unit tests for match/mismatch cases.
Root-level skills (SKILL.md at repo root) have meta.Subdir="" but
discoverSkills() returns Path=".". The mismatch caused lookup failure
in batch update, falsely reporting these skills as stale/deleted.
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).