From 034dfd1aafa8a958564ca3c9f90a124c5a674d6a Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Mon, 23 Mar 2026 21:42:35 -0400 Subject: [PATCH] feat: integrate Agent Scorecards panel into Mission Control dashboard Adds an Agent Scorecards section to the mission_control.html that embeds agent performance metrics (daily/weekly) directly on the system overview page. The panel loads all agent scorecards via /scorecards/all/panels with a period toggle (Daily/Weekly) and refreshes every 5 minutes. A "Full View" link navigates to the standalone /scorecards page for detailed analysis. Fixes #929 Co-Authored-By: Claude Sonnet 4.6 --- src/dashboard/templates/mission_control.html | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/dashboard/templates/mission_control.html b/src/dashboard/templates/mission_control.html index a090ff5b..0d6428a0 100644 --- a/src/dashboard/templates/mission_control.html +++ b/src/dashboard/templates/mission_control.html @@ -186,6 +186,24 @@

Loading sovereignty metrics...

{% endcall %} + +
+
+

Agent Scorecards

+
+ + Full View +
+
+
+

Loading scorecards...

+
+
+
@@ -502,6 +520,20 @@ async function loadSparkStatus() { } } +// Load agent scorecards +async function loadMcScorecards() { + var period = document.getElementById('mc-scorecard-period').value; + var container = document.getElementById('mc-scorecards-content'); + container.innerHTML = '

Loading scorecards...

'; + try { + var response = await fetch('/scorecards/all/panels?period=' + period); + var html = await response.text(); + container.innerHTML = html; + } catch (error) { + container.innerHTML = '

Scorecards unavailable

'; + } +} + // Initial load loadSparkStatus(); loadSovereignty(); @@ -510,6 +542,7 @@ loadSwarmStats(); loadLightningStats(); loadGrokStats(); loadChatHistory(); +loadMcScorecards(); // Periodic updates setInterval(loadSovereignty, 30000); @@ -518,5 +551,6 @@ setInterval(loadSwarmStats, 5000); setInterval(updateHeartbeat, 5000); setInterval(loadGrokStats, 10000); setInterval(loadSparkStatus, 15000); +setInterval(loadMcScorecards, 300000); {% endblock %} -- 2.43.0