Fix compare chart bar colors to always match legend

Bars now always show their assigned colors (blue for model A, green
for model B) instead of graying out the non-winner. Only the winner's
percentage value is highlighted in green.
This commit is contained in:
AgentSeal 2026-04-24 20:18:33 +02:00
parent 17022433a2
commit 752aaf04c1

View file

@ -273,14 +273,14 @@ function ComparisonResults({ modelA, modelB, rows, categories, workingStyle, onB
<Text color={DIM}>{' '}{cat.category}</Text> <Text color={DIM}>{' '}{cat.category}</Text>
<Text> <Text>
<Text>{' '}</Text> <Text>{' '}</Text>
<Text color={cat.winner === 'a' ? BAR_A : DIM}>{FULL_BLOCK.repeat(Math.max(bwA, 1))}</Text> <Text color={BAR_A}>{FULL_BLOCK.repeat(Math.max(bwA, 1))}</Text>
<Text>{' '.repeat(Math.max(0, BAR_MAX_WIDTH - bwA))} </Text> <Text>{' '.repeat(Math.max(0, BAR_MAX_WIDTH - bwA))} </Text>
<Text color={cat.winner === 'a' ? GREEN : undefined}>{rateA.padStart(6)}</Text> <Text color={cat.winner === 'a' ? GREEN : undefined}>{rateA.padStart(6)}</Text>
<Text color={DIM}> {turnsA}</Text> <Text color={DIM}> {turnsA}</Text>
</Text> </Text>
<Text> <Text>
<Text>{' '}</Text> <Text>{' '}</Text>
<Text color={cat.winner === 'b' ? BAR_B : DIM}>{FULL_BLOCK.repeat(Math.max(bwB, 1))}</Text> <Text color={BAR_B}>{FULL_BLOCK.repeat(Math.max(bwB, 1))}</Text>
<Text>{' '.repeat(Math.max(0, BAR_MAX_WIDTH - bwB))} </Text> <Text>{' '.repeat(Math.max(0, BAR_MAX_WIDTH - bwB))} </Text>
<Text color={cat.winner === 'b' ? GREEN : undefined}>{rateB.padStart(6)}</Text> <Text color={cat.winner === 'b' ? GREEN : undefined}>{rateB.padStart(6)}</Text>
<Text color={DIM}> {turnsB}</Text> <Text color={DIM}> {turnsB}</Text>