Skip to content

fix(compare radar): un-mirror axis labels/arcs from the data polygons - #1664

Merged
leonardmq merged 1 commit into
agi-anyting_goes_intofrom
fix/radar-clockwise-label-mismatch
Aug 11, 2026
Merged

leonardmq merged 1 commit into
agi-anyting_goes_intofrom
fix/radar-clockwise-label-mismatch

Conversation

@leonardmq

Copy link
Copy Markdown
Collaborator

Bug

The Compare V2 Quality Scores radar rendered mirrored: each score's polygon vertex (and its per-axis tooltip data) sat under the label of the axis reflected across the vertical. E.g. answer_matches_data's data plotted under the Tool Call Errored label, and hovering there popped the Answer Matches Data tooltip.

Cause

echarts' radar coordinate system has no clockwise mode — its source carries a literal // TODO clockwise, and the clockwise: true option this chart set is silently ignored. Indicators walk counterclockwise from startAngle, while every hand-drawn layer (bottom-mode axis names, family arcs, and the ring's documented reading order) is laid out clockwise from the top.

Fix

Hand echarts the indicators and each series' values in ring-reversed order (top anchor kept, rest reversed) so its counterclockwise walk renders as the intended clockwise reading order, and map the tooltip's echarts axis index back through the same involution (ringReversed — applying it twice is the identity). The dead clockwise: true option is removed.

Side mode (the older compare page) also benefits: it now reads clockwise as the comments always claimed.

Verification

Playwright against live data on /evolution/906968569024/110041900355:

  • polygon vertices land on their own labels (known values: M1 0.88 on Answer Matches Data lower-right, 0.957 on One At A Time Writes upper-left, 0.56 on Failed Skill Read bottom)
  • per-axis tooltips at two independent vertices show the correct axis name + values, with an empty-tooltip baseline before hover
  • family arcs group the correct labels
  • svelte-check: 0 errors

echarts' radar has no clockwise mode (its source carries a literal 'TODO
clockwise'; the option is silently ignored), so indicators walk
counterclockwise from startAngle while every hand-drawn layer here (bottom-mode
axis names, family arcs) is laid out clockwise from the top. Result: the ring
rendered mirrored - each score's polygon vertex and tooltip sat under the
label of the axis reflected across the vertical, e.g. answer_matches_data
plotted under 'Tool Call Errored'.

Fix: hand echarts the indicators and each series' values in ring-reversed
order (top anchor kept, rest reversed), which renders its counterclockwise
walk as the intended clockwise reading order, and map the tooltip's echarts
axis index back through the same involution. The dead 'clockwise: true'
option is removed.

Verified via Playwright against live data: vertices, per-axis tooltips and
family arcs now agree on every probed axis.
@leonardmq
leonardmq merged commit 42cab0f into agi-anyting_goes_into Aug 11, 2026
11 of 12 checks passed
@leonardmq
leonardmq deleted the fix/radar-clockwise-label-mismatch branch August 11, 2026 12:08
@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e3fc3f1-e5be-4a95-9e21-e1576e44cbbf

📥 Commits

Reviewing files that changed from the base of the PR and between 8c50d3d and a7ba42d.

📒 Files selected for processing (1)
  • app/web_ui/src/lib/components/compare_radar_chart.svelte

Walkthrough

The radar chart now reverses ECharts indicator and series ordering to preserve clockwise display order with the first axis at the top. Tooltip indices map back to the original chart ordering.

Changes

Radar axis ordering

Layer / File(s) Summary
Reverse radar mapping
app/web_ui/src/lib/components/compare_radar_chart.svelte
The chart reverses indicators and series values before passing them to ECharts. It removes the clockwise option and maps tooltip indices back to the original ordering. The axis-angle documentation reflects the new mapping.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: tawnymanticore

Poem

A rabbit nudges axes round,
Reversing rings without a sound.
Values hop in matching rows,
Tooltips find the path it knows.
ECharts now spins just right.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/radar-clockwise-label-mismatch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

📊 Coverage Report

Overall Coverage: 93%

Diff: origin/agi-anyting_goes_into...HEAD

No lines with coverage information in this diff.


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