fix: prefer install_meta.url over enclosing-repo source.url for grouping#76
Merged
RealZST merged 1 commit intoJun 5, 2026
Conversation
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.
Owner
|
Thanks for the PR! Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ordersource.url β install_meta.url β pack.source.urlcomes from the scanner walking up to the nearest.gitremote. When an agent home such as~/.claudesits inside a personal backup repo, the scanner stamps the skill with that enclosing remote (the user's own dotfiles repo), which masked the authoritativeinstall_meta.urland 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.urlis written by HK at install time and is not user-editable, so it is the authoritative origin and should win first.source.urlstays the fallback for git-cloned skills that carry no install_meta. No DB migration needed β grouping is recomputed on every list.This also makes
deriveExtensionUrlconsistent withisItemInstalled(marketplace.tsx), which already prefersinstall_metaoversource.url.Test plan
npm testβ 224 passing (incl. 1 new regression test for the pollutedsource.urlcase; verified it fails on the old order and passes on the new)npx tsc --noEmitcleannpx biome check src/cleancargo tauri dev): a skill deployed across agents collapses from two rows into one, with all agents listedBefore / After
Before (two rows):
After (one row):