Skip to content

fix: use unique names for chart series - #40

Open
yonasuriv wants to merge 1 commit into
appwrite:mainfrom
yonasuriv:fix-chart-series-keys
Open

fix: use unique names for chart series#40
yonasuriv wants to merge 1 commit into
appwrite:mainfrom
yonasuriv:fix-chart-series-keys

Conversation

@yonasuriv

Copy link
Copy Markdown

What

Fixes duplicate React key warnings and a radar chart data-loss bug caused by getShortName() collapsing every model in a family to a single name.

key={entry.name} collided when a family had more than one model (Claude ×3, Gemini ×3, MiniMax ×2, Grok ×2), producing "two children with the same key" and dropping points in the radar chart. getShortName() now keeps the full model name for multi-model families ("Claude Opus 4.7" vs "Claude Fable 5") while leaving single-model families untouched.

Also widens the CostEfficiency Y-axis so the longer labels fit.

Test plan

  • pnpm run check and pnpm run build pass
  • All 16 model series in results-with-skills.json and results-without-skills.json map to unique chart names, no duplicates

@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown

Greptile Summary

The PR updates chart naming to preserve distinct series for model families containing multiple models and gives the cost-efficiency Y-axis more room for the resulting labels.

  • Normalizes model names and retains full names for Claude, Gemini, Grok, and MiniMax series.
  • Preserves abbreviated labels for currently single-model families and versioned GPT labels.
  • Widens the cost-efficiency chart’s Y-axis from 60 to 95 pixels.

Confidence Score: 5/5

The PR appears safe to merge, with the current model set producing unique chart identifiers and the wider axis accommodating the longer labels.

The naming change removes existing family-level collisions across all current model inputs, while downstream chart keys and radar data identifiers receive distinct values.

Important Files Changed

Filename Overview
src/components/charts/chartConfig.ts Revises model-name normalization so all current chart series remain unique without introducing a reachable failure in the committed model data.
src/components/charts/CostEfficiencyChart.tsx Widens the Y-axis to accommodate the longer labels produced by the naming fix.

Reviews (1): Last reviewed commit: "fix: use unique names for chart series" | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant