Skip to content

mission control for agent skills

refactor(tui): simplify symlink scope match

Alvin Unrealceca625dd3fb
diff --git a/internal/tui/tui_test.go b/internal/tui/tui_test.go
index e27e864..4c2e559 100644
--- a/internal/tui/tui_test.go
+++ b/internal/tui/tui_test.go
@@ -722,6 +722,12 @@ func TestDeleteBrokenSymlinkRequiresScopedIdentity(t *testing.T) {
if next.actionResult == nil || next.actionResult.ExitCode != -1 || !strings.Contains(next.actionResult.Err, "missing scoped skill identity") {
t.Fatalf("expected empty-scope identity error, got %#v", next.actionResult)
}
+ if _, err := os.Lstat(projectLink); err != nil {
+ t.Fatalf("expected project link to remain after empty-scope action, err=%v", err)
+ }
+ if _, err := os.Lstat(globalLink); err != nil {
+ t.Fatalf("expected global link to remain after empty-scope action, err=%v", err)
+ }
}
func TestDeleteBrokenSymlinkTargetsMatchingScope(t *testing.T) {
diff --git a/internal/tui/update.go b/internal/tui/update.go
index 1f7fbe7..8d3a136 100644
--- a/internal/tui/update.go
+++ b/internal/tui/update.go
@@ -1150,7 +1150,7 @@ func (m appModel) executeAction(action actions.CommandPreview) (tea.Model, tea.C
removed, failed := 0, 0
firstErr := ""
for _, sk := range m.result.Skills {
- if sk.Name != targetName || (targetScope != "" && string(sk.Scope) != targetScope) {
+ if sk.Name != targetName || string(sk.Scope) != targetScope {
continue
}
for _, op := range sk.ObservedPaths {