fix(sync): show duplicate skill names in collision message, fix vertical spacing

Display the actual duplicate skill name(s) in the "isolated by target
filters" info message so users can identify which skills collide.

Remove the extra fmt.Println() before backup section — ui.Header()
already includes a leading newline, so the previous blank line created
a double gap.

Also replace VirtualizedGroupedView with native DOM GroupedView using
sticky sub-headers that respect the toolbar height offset.
This commit is contained in:
Willie
2026-03-12 16:45:02 +08:00
parent 5369595bc1
commit 314d6a3dff
+5 -2
View File
@@ -169,7 +169,6 @@ func cmdSync(args []string) error {
// Backup targets before sync (only if not dry-run and there are skills)
if !dryRun && len(discoveredSkills) > 0 && !jsonOutput {
fmt.Println()
backupTargetsBeforeSync(cfg)
}
@@ -568,8 +567,12 @@ func reportCollisions(skills []sync.DiscoveredSkill, targets map[string]config.T
fmt.Println()
} else {
// Global collision exists but filters isolate them — single summary line
names := make([]string, len(global))
for i, c := range global {
names[i] = c.Name
}
fmt.Println()
ui.Info("%d duplicate skill names (isolated by target filters)", len(global))
ui.Info("%d duplicate skill names (isolated by target filters): %s", len(global), strings.Join(names, ", "))
}
}