diff --git a/platform/src/app/[tenant]/repos/[repoName]/charts.tsx b/platform/src/app/[tenant]/repos/[repoName]/charts.tsx index bf24b46..22f041f 100644 --- a/platform/src/app/[tenant]/repos/[repoName]/charts.tsx +++ b/platform/src/app/[tenant]/repos/[repoName]/charts.tsx @@ -696,13 +696,38 @@ function CommitMixChart({ ); if (!hasData) return null; + // Share of total commits across the whole window, by origin — same + // "headline percentage above the timeline" pattern as the org dashboard's + // AIvsHuman commit mix (dashboard/sections/AIvsHuman.tsx). + const totalHuman = data.reduce((sum, p) => sum + (p.commits_human ?? 0), 0); + const totalAi = data.reduce((sum, p) => sum + (p.commits_ai ?? 0), 0); + const totalCommits = totalHuman + totalAi; + const humanPct = totalCommits > 0 ? (totalHuman / totalCommits) * 100 : null; + const aiPct = totalCommits > 0 ? (totalAi / totalCommits) * 100 : null; + return ( {title} {description} - + + {humanPct !== null && aiPct !== null && ( +
+
+ + {humanLabel} + + {humanPct.toFixed(0)}% +
+
+ {aiLabel} + + {aiPct.toFixed(0)}% + +
+
+ )}