diff --git a/app/sites/[id]/pagespeed/page.tsx b/app/sites/[id]/pagespeed/page.tsx index 7a7af2a..5463f20 100644 --- a/app/sites/[id]/pagespeed/page.tsx +++ b/app/sites/[id]/pagespeed/page.tsx @@ -247,9 +247,10 @@ export default function PageSpeedPage() { // * Build per-category failing audits, sorted by impact const auditsByGroup: Record = {} + const manualByGroup: Record = {} for (const group of categoryGroups) { auditsByGroup[group.key] = audits - .filter(a => a.category !== 'passed' && a.group === group.key) + .filter(a => a.category !== 'passed' && a.category !== 'manual' && a.group === group.key) .sort((a, b) => { if (a.category === 'opportunity' && b.category !== 'opportunity') return -1 if (a.category !== 'opportunity' && b.category === 'opportunity') return 1 @@ -258,6 +259,7 @@ export default function PageSpeedPage() { } return 0 }) + manualByGroup[group.key] = audits.filter(a => a.category === 'manual' && a.group === group.key) } // * Core Web Vitals metrics @@ -509,7 +511,8 @@ export default function PageSpeedPage() { {categoryGroups.map(group => { const groupAudits = auditsByGroup[group.key] ?? [] const groupPassed = passed.filter(a => a.group === group.key) - if (groupAudits.length === 0 && groupPassed.length === 0) return null + const groupManual = manualByGroup[group.key] ?? [] + if (groupAudits.length === 0 && groupPassed.length === 0 && groupManual.length === 0) return null return (
{/* Category header with gauge */} @@ -532,6 +535,17 @@ export default function PageSpeedPage() { )} + {groupManual.length > 0 && ( +
+ + Additional items to manually check ({groupManual.length}) + +
+ {groupManual.map(audit => )} +
+
+ )} + {groupPassed.length > 0 && (
@@ -629,19 +643,15 @@ function AuditsBySubGroup({ audits }: { audits: AuditSummary[] }) { // * Severity indicator based on audit score (pagespeed.web.dev style) function AuditSeverityIcon({ score }: { score: number | null }) { if (score === null) { - // Empty circle for informative/unscored audits - return + return } if (score < 0.5) { - // Red triangle for poor - return + return } if (score < 0.9) { - // Amber square for needs improvement - return + return } - // Green circle for good - return + return } // * Expandable audit row with description and detail items diff --git a/lib/api/pagespeed.ts b/lib/api/pagespeed.ts index 840b3df..97a45d8 100644 --- a/lib/api/pagespeed.ts +++ b/lib/api/pagespeed.ts @@ -19,7 +19,7 @@ export interface AuditSummary { score: number | null display_value?: string savings_ms?: number - category: 'opportunity' | 'diagnostic' | 'passed' + category: 'opportunity' | 'diagnostic' | 'passed' | 'manual' group?: string // "performance", "accessibility", "best-practices", "seo" sub_group?: string // "a11y-names-labels", "a11y-contrast", etc. sub_group_title?: string // "Names and Labels", "Contrast", etc.