commit 5c3c05ad19d7ce1a7fa8554e91ffccceddd0ad94
parent df4c7a231597589b50c86b52f1cd3339b6d83f09
Author: Brian Graham <brian@buildingbetterteams.de>
Date: Mon, 6 Apr 2026 06:10:57 +0200
Add directional indicators to correlation matrix
Cost, Turns, and Time columns now show a down arrow to indicate
"lower is better". Other metrics are "higher is better" by default.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dashboard/src/components/CorrelationMatrix.tsx b/dashboard/src/components/CorrelationMatrix.tsx
@@ -25,16 +25,16 @@ const CONFIG_AXES = [
type MetricExtractor = (run: Run) => number | null;
-const OUTCOME_METRICS: Array<{ key: string; label: string; extract: MetricExtractor }> = [
- { key: "overall", label: "Overall", extract: (r) => r.eval_results?.score ?? null },
- { key: "gameplay", label: "Gameplay", extract: (r) => (r.eval_results as Record<string, any>)?.gameplay_bot?.score ?? null },
- { key: "code", label: "Code", extract: (r) => (r.eval_results as Record<string, any>)?.code_analysis?.score ?? null },
- { key: "structural", label: "Structural", extract: (r) => r.eval_results?.structural?.score ?? null },
- { key: "quality", label: "Quality", extract: (r) => r.eval_results?.quality?.score ?? null },
- { key: "transcript", label: "Transcript", extract: (r) => (r.eval_results as Record<string, any>)?.transcript_analysis?.score ?? null },
- { key: "cost", label: "Cost", extract: (r) => r.claude_output?.total_cost_usd ?? null },
- { key: "turns", label: "Turns", extract: (r) => r.claude_output?.num_turns ?? null },
- { key: "time", label: "Wall Time", extract: (r) => r.meta.wall_time_seconds ?? null },
+const OUTCOME_METRICS: Array<{ key: string; label: string; lowerIsBetter: boolean; extract: MetricExtractor }> = [
+ { key: "overall", label: "Overall", lowerIsBetter: false, extract: (r) => r.eval_results?.score ?? null },
+ { key: "gameplay", label: "Gameplay", lowerIsBetter: false, extract: (r) => (r.eval_results as Record<string, any>)?.gameplay_bot?.score ?? null },
+ { key: "code", label: "Code", lowerIsBetter: false, extract: (r) => (r.eval_results as Record<string, any>)?.code_analysis?.score ?? null },
+ { key: "structural", label: "Structural", lowerIsBetter: false, extract: (r) => r.eval_results?.structural?.score ?? null },
+ { key: "quality", label: "Quality", lowerIsBetter: false, extract: (r) => r.eval_results?.quality?.score ?? null },
+ { key: "transcript", label: "Transcript", lowerIsBetter: false, extract: (r) => (r.eval_results as Record<string, any>)?.transcript_analysis?.score ?? null },
+ { key: "cost", label: "Cost \u2193", lowerIsBetter: true, extract: (r) => r.claude_output?.total_cost_usd ?? null },
+ { key: "turns", label: "Turns \u2193", lowerIsBetter: true, extract: (r) => r.claude_output?.num_turns ?? null },
+ { key: "time", label: "Time \u2193", lowerIsBetter: true, extract: (r) => r.meta.wall_time_seconds ?? null },
];
function computeSpread(cells: Cell[], axisKey: string, extract: MetricExtractor): number | null {