From 9d1d2dbb809a2e983766d7b7c690b499ca72bd4d Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Sun, 22 Mar 2026 22:11:49 +0100 Subject: [PATCH] fix(pagespeed): issue count excludes informative/unscored audits Only audits with a real score (non-null) count toward the issue total. Informative audits (score: null) are shown but not counted. --- app/sites/[id]/pagespeed/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/sites/[id]/pagespeed/page.tsx b/app/sites/[id]/pagespeed/page.tsx index 2a5c39b..96e96be 100644 --- a/app/sites/[id]/pagespeed/page.tsx +++ b/app/sites/[id]/pagespeed/page.tsx @@ -520,7 +520,10 @@ export default function PageSpeedPage() { {group.label}

- {groupAudits.length === 0 ? 'No issues found' : `${groupAudits.length} issue${groupAudits.length !== 1 ? 's' : ''} found`} + {(() => { + const realIssues = groupAudits.filter(a => a.score !== null && a.score !== undefined).length + return realIssues === 0 ? 'No issues found' : `${realIssues} issue${realIssues !== 1 ? 's' : ''} found` + })()}