+ {/* Header */}
+
+
+
+ High Scores
+
+
+ Top contributors, fastest mergers, and agent performance metrics
+
+
+
+ {/* Global Stats Overview */}
+
+
+
+ Total PRs
+
+
+ {globalStats.totalPRs}
+
+
+
+
+ Avg Merge Time
+
+
+ {formatTime(globalStats.avgMergeTimeHours)}
+
+
+
+
+ Human Contributors
+
+
+ {globalStats.humanContributors}
+
+
+
+
+ Agent Contributors
+
+
+ {globalStats.agentContributors}
+
+
+
+
+ {/* Main Stats Grid */}
+
+ {/* Top Contributors by PR Count */}
+
+
+ {topContributors.length > 0 ? (
+ topContributors.map((contributor, index) => (
+
+
+
+ {index + 1}
+
+
+
+
+ {contributor.author}
+
+ {contributor.isAgent && (
+
+ )}
+
+
+ {contributor.mergedPRs} merged, {contributor.openPRs} open
+
+
+
+
+ {contributor.totalPRs}
+
+
+ ))
+ ) : (
+
+ No PR data available
+
+ )}
+
+
+
+ {/* Fastest Mergers */}
+
+
+ {fastestMergers.length > 0 ? (
+ fastestMergers.map((contributor, index) => (
+
+
+
+ {index + 1}
+
+
+
+
+ {contributor.author}
+
+ {contributor.isAgent && (
+
+ )}
+
+
+ {contributor.mergedPRs} PRs merged
+
+
+
+
+ {formatTime(contributor.avgMergeTimeHours)}
+
+
+ ))
+ ) : (
+
+ No merged PRs available
+
+ )}
+
+
+
+ {/* Most Productive (by lines changed) */}
+
+
+ {mostProductiveContributors.length > 0 ? (
+ mostProductiveContributors.map((contributor, index) => (
+
+
+
+ {index + 1}
+
+
+
+ {contributor.author}
+
+
+ +{contributor.linesAdded}
+ {" / "}
+ -{contributor.linesRemoved}
+
+
+
+
+ {(contributor.linesAdded + contributor.linesRemoved).toLocaleString()}
+
+
+ ))
+ ) : (
+
+ No human contributor data available
+
+ )}
+
+
+
+ {/* Merge Rate Leaders */}
+
+
+ {contributorStats
+ .filter((s) => s.totalPRs >= 3) // At least 3 PRs to be meaningful
+ .sort((a, b) => b.mergedPRs / b.totalPRs - a.mergedPRs / a.totalPRs)
+ .slice(0, 5)
+ .map((contributor, index) => {
+ const mergeRate = (contributor.mergedPRs / contributor.totalPRs) * 100;
+ return (
+
+
+
+ {index + 1}
+
+
+
+
+ {contributor.author}
+
+ {contributor.isAgent && (
+
+ )}
+
+
+ {contributor.mergedPRs}/{contributor.totalPRs} merged
+
+
+
+
+ {mergeRate.toFixed(0)}%
+
+
+ );
+ })}
+
+
+
+
+ {/* Agent Stats Section */}
+
+
+
+
+ Agent Performance
+
+
+
+
+ {agentStats.length > 0 ? (
+ agentStats.map((agent) => (
+
+
+
+ {agent.agentType}
+
+
+
+
+
+
+
+ PRs Raised
+
+
+ {agent.raised}
+
+
+
+
+
+ PRs Merged
+
+
+ {agent.merged}
+
+
+
+
+
+
+ Merge Rate
+
+ = 75
+ ? "text-green-500"
+ : agent.mergeRate >= 50
+ ? "text-yellow-500"
+ : "text-orange-500"
+ )}
+ >
+ {agent.mergeRate.toFixed(0)}%
+
+
+
+ {/* Progress bar */}
+
+
= 75
+ ? "bg-green-500"
+ : agent.mergeRate >= 50
+ ? "bg-yellow-500"
+ : "bg-orange-500"
+ )}
+ style={{ width: `${agent.mergeRate}%` }}
+ />
+
+
+
+
+ ))
+ ) : (
+
+
+
+ No agent activity detected yet. Agents are identified by branch names or titles containing
+ cursor/, devin/, chatgpt/, codex/, or copilot/.
+
+
+ )}
+
+
+
+