fix(stats): show all downloads without browse-ready filter

Downloads represent real user actions and should not be filtered by
browse-ready criteria. Skills count and contributors remain filtered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-19 16:48:27 +03:30
parent c531db31db
commit 9b2a741179
3 changed files with 16 additions and 8 deletions

View File

@@ -26,11 +26,10 @@ async function getStats() {
.where(sql`${skills.sourceFormat} = 'skill.md' AND ${skills.isBlocked} = false AND ${browseReady}`);
const totalSkills = skillsResult[0]?.count ?? 0;
// Get total downloads (browse-ready only)
// Get total downloads (ALL skills — downloads are real user actions)
const downloadsResult = await db
.select({ sum: sql<number>`coalesce(sum(${skills.downloadCount}), 0)::int` })
.from(skills)
.where(browseReady);
.from(skills);
const totalDownloads = downloadsResult[0]?.sum ?? 0;
// Get total categories