Skip to content

fix(viewer): drop meaningless '0' label on compare level bars#17

Merged
aktasbatuhan merged 1 commit into
mainfrom
fix/compare-level-label
Jun 3, 2026
Merged

fix(viewer): drop meaningless '0' label on compare level bars#17
aktasbatuhan merged 1 commit into
mainfrom
fix/compare-level-label

Conversation

@aktasbatuhan

Copy link
Copy Markdown
Member

Spotted while reviewing the viewer. The compare page reused svg.hbar — which was built for integer count breakdowns ("AI models used") and prints int(value) at the bar's end — to draw a continuous score-gap magnitude bar. int(0.07) rendered a stray "0" next to every level bar, even though the exact gap is already shown in the adjacent vs best column.

Fix: hbar gains show_label (default True, unchanged for the models breakdown). compare passes show_label=False, so the magnitude bar carries no orphan label and reclaims the label's width.

Test: test_hbar_label_toggle asserts count bars keep <text> and magnitude bars omit it. Verified on the live viewer — zero orphan 0 labels on /compare.

🤖 Generated with Claude Code

The compare page reused svg.hbar — built for integer *count* breakdowns
(it prints int(value) at the bar's end) — to draw a continuous score-gap
magnitude bar. int(0.07) rendered a stray '0' next to every bar, while
the exact gap was already in the adjacent 'vs best' column.

Add hbar(show_label=...): default keeps the count label (AI-models
breakdown); compare passes show_label=False so the magnitude bar carries
no orphan label and uses the reclaimed width.
@aktasbatuhan aktasbatuhan merged commit 71d9332 into main Jun 3, 2026
1 check passed
@aktasbatuhan aktasbatuhan deleted the fix/compare-level-label branch June 3, 2026 21:14
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