Skip to content

fix: prefer install_meta.url over enclosing-repo source.url for grouping#76

Merged
RealZST merged 1 commit into
RealZST:mainfrom
SherlockSalvatore:fix/skill-grouping-install-meta-priority
Jun 5, 2026
Merged

fix: prefer install_meta.url over enclosing-repo source.url for grouping#76
RealZST merged 1 commit into
RealZST:mainfrom
SherlockSalvatore:fix/skill-grouping-install-meta-priority

Conversation

@SherlockSalvatore
Copy link
Copy Markdown
Contributor

@SherlockSalvatore SherlockSalvatore commented Jun 3, 2026

Summary

Fixes #75. A skill installed to multiple agents could split into two group rows in the Extensions list when one agent's home directory is kept under the user's own dotfiles git repo.

Root cause

deriveExtensionUrl (the grouping key's developer resolver) used the order source.url β†’ install_meta.url β†’ pack. source.url comes from the scanner walking up to the nearest .git remote. When an agent home such as ~/.claude sits inside a personal backup repo, the scanner stamps the skill with that enclosing remote (the user's own dotfiles repo), which masked the authoritative install_meta.url and forked that copy into its own group β€” even though all copies were installed from the same source.

Fix

Flip the resolution order to install_meta.url β†’ source.url β†’ pack. install_meta.url is written by HK at install time and is not user-editable, so it is the authoritative origin and should win first. source.url stays the fallback for git-cloned skills that carry no install_meta. No DB migration needed β€” grouping is recomputed on every list.

This also makes deriveExtensionUrl consistent with isItemInstalled (marketplace.tsx), which already prefers install_meta over source.url.

Test plan

  • npm test β€” 224 passing (incl. 1 new regression test for the polluted source.url case; verified it fails on the old order and passes on the new)
  • npx tsc --noEmit clean
  • npx biome check src/ clean
  • Manual (cargo tauri dev): a skill deployed across agents collapses from two rows into one, with all agents listed

Before / After

Before (two rows):

image

After (one row):

image

When a user keeps an agent home (e.g. ~/.claude) under their own dotfiles git
repo, the scanner walks up to that enclosing .git and stamps the skill's
source.url with the backup remote. That masked the authoritative
install_meta.url and forked one skill (all installed from tw93/waza) into two
group rows in the Extensions list.

Flip deriveExtensionUrl resolution to install_meta.url -> source.url -> pack so
the explicit install record wins; source.url stays the fallback for git-cloned
skills that carry no install_meta. Add a regression test for the polluted
source.url case.
@RealZST RealZST merged commit 40489d5 into RealZST:main Jun 5, 2026
3 checks passed
@RealZST
Copy link
Copy Markdown
Owner

RealZST commented Jun 5, 2026

Thanks for the PR! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Same skill installed to multiple agents shows as two separate rows in Extensions

2 participants