commit 5e6a1d04950a4355252486add7a6f766dd9cb1de
parent 9af3176d11f2f6295abfc41ecc2807dc37c29dd7
Author: Brian Graham <brian@buildingbetterteams.de>
Date: Mon, 6 Apr 2026 06:27:28 +0200
Sort model bar chart: haiku, sonnet, opus
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dashboard/src/components/Charts.tsx b/dashboard/src/components/Charts.tsx
@@ -141,7 +141,12 @@ function aggregateByModel(runs: Run[]): ModelScore[] {
byModel[cell.model].push(cell);
}
- return Object.entries(byModel).map(([model, modelCells]) => {
+ const MODEL_ORDER: Record<string, number> = { haiku: 1, sonnet: 2, opus: 3 };
+ const sortedEntries = Object.entries(byModel).sort(([a], [b]) =>
+ (MODEL_ORDER[a] || 99) - (MODEL_ORDER[b] || 99)
+ );
+
+ return sortedEntries.map(([model, modelCells]) => {
const scores = modelCells.map((c) => Math.round(c.avgScore * 100));
const costs = modelCells.map((c) => c.avgCost);
const avgScore = scores.length > 0