-
- Tracked Repositories ({updatableRepos.length})
-
-
- {selectedRepos.size === updatableRepos.length ? 'Deselect All' : 'Select All'}
-
+ {/* Update results panel */}
+ {phase !== 'idle' && (
+
+ {/* Summary bar */}
+
+
+
+ {phase === 'updating' && (
+
+
+ Updating...
+
+ )}
+ {phase === 'done' && (
+ <>
+ {successCount > 0 && {successCount} updated}
+ {skippedCount > 0 && {skippedCount} skipped}
+ {blockedCount > 0 && {blockedCount} blocked}
+ {errorCount > 0 && {errorCount} failed}
+ >
+ )}
-
- {updatableRepos.map((repo) => (
-
+ Done
+
+ )}
+
+
+
+ {/* Per-item status cards */}
+
+ {itemStatuses.map((item, i) => (
+
+
+
+
+ {item.name}
+
+ {item.message && (
+ {item.message}
+ )}
+
+
+ {item.auditRiskLabel && item.auditRiskLabel !== 'clean' && (
+
+
+ {item.auditRiskLabel}
+
+ )}
+
+
+
+ ))}
+
+
+ )}
+
+ {/* Idle state content */}
+ {phase === 'idle' && (
+ <>
+ {!hasUpdates ? (
+
+
+
+
+
+
+ Everything is up to date
+
+
+ All tracked repositories and skills are at their latest versions.
+
+
+ queryClient.invalidateQueries({ queryKey: queryKeys.check })}
+ disabled={checkQuery.isFetching}
>
- toggleRepo(repo.name)} />
-
- {repo.name}
-
- {repo.behind} commit(s) behind
-
- ))}
+
+ Check Again
+
+
+ ) : (
+ <>
+ {updatableRepos.length > 0 && (
+
+
+
+ Tracked Repositories ({updatableRepos.length})
+
+
+ {selectedRepos.size === updatableRepos.length ? 'Deselect All' : 'Select All'}
+
+
+
+ {updatableRepos.map((repo) => (
+
+
toggleRepo(repo.name)} />
+
+
+ {repo.name}
+
+ {repo.message && (
+ {repo.message}
+ )}
+
+ {repo.behind} commit(s) behind
+
+ ))}
+
+
+ )}
+
+ {updatableSkills.length > 0 && (
+
+
+
+ Skills with Updates ({updatableSkills.length})
+
+
+ {selectedSkills.size === updatableSkills.length ? 'Deselect All' : 'Select All'}
+
+
+
+ {updatableSkills.map((skill) => (
+
+
toggleSkill(skill.name)} />
+
+
+ {skill.name}
+
+
+ {[skill.source, skill.installed_at && formatRelativeTime(skill.installed_at)]
+ .filter(Boolean)
+ .join(' ยท ')}
+
+
+ Update available
+
+ ))}
+
+
+ )}
+ >
)}
- {updatableSkills.length > 0 && (
-
-
-
- Skills with Updates ({updatableSkills.length})
-
-
- {selectedSkills.size === updatableSkills.length ? 'Deselect All' : 'Select All'}
-
-
-
- {updatableSkills.map((skill) => (
-
-
toggleSkill(skill.name)} />
-
-
- {skill.name}
-
- {skill.source && (
- {skill.source}
- )}
-
- Update available
-
- ))}
-
+ {(upToDateRepos + upToDateSkills > 0) && (
+
+
+ {upToDateRepos} repo(s) and {upToDateSkills} skill(s) already up to date.
+
)}
>
)}
-
- {(upToDateRepos + upToDateSkills > 0) && (
-
-
- {upToDateRepos} repo(s) and {upToDateSkills} skill(s) already up to date.
-
-
- )}
);
}
+
+function StatusIcon({ status }: { status: ItemUpdateStatus['status'] }) {
+ switch (status) {
+ case 'pending':
+ return
;
+ case 'in-progress':
+ return
;
+ case 'success':
+ return
;
+ case 'error':
+ return
;
+ case 'blocked':
+ return
;
+ case 'skipped':
+ return
;
+ }
+}
+
+function StatusBadge({ status }: { status: ItemUpdateStatus['status'] }) {
+ switch (status) {
+ case 'pending':
+ return
Pending;
+ case 'in-progress':
+ return
Updating;
+ case 'success':
+ return
Updated;
+ case 'error':
+ return
Failed;
+ case 'blocked':
+ return
Blocked;
+ case 'skipped':
+ return
Skipped;
+ }
+}