From 71a010d75ab2f638ea4a7d18913833bf255a26fc Mon Sep 17 00:00:00 2001 From: Christopher Kevin Date: Mon, 16 Nov 2026 17:09:40 +0000 Subject: [PATCH] fix(report): keep Steps per Eval Case chart readable with long case IDs Signed-off-by: Christopher Kevin --- CHANGELOG.md | 1 + .../reporting/templates/report.html.j2 | 13 +++++++++++-- .../reporting/test_tier3_baseline_trial_views.py | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e392fcacf..1ee7acbdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -405,6 +405,7 @@ All notable changes to SkillEvaluator are documented in this file. ### Fixed +- Keep Steps per Eval Case chart labels readable for long case IDs while preserving full IDs in hover tooltips. - Failed Tier 3 arms retain scored and errored trial activation diagnostics without restoring aggregate quality or lift, or double-counting token usage. - Budget-limited Tier 3 coverage checks retain admitted attempt ordinals, avoiding false missing/excess errors when a denied slot leaves a gap. - HTML reports retain budget context for fully budget-denied runs without diff --git a/src/skillevaluator/reporting/templates/report.html.j2 b/src/skillevaluator/reporting/templates/report.html.j2 index f814a7ae7..6d657b853 100644 --- a/src/skillevaluator/reporting/templates/report.html.j2 +++ b/src/skillevaluator/reporting/templates/report.html.j2 @@ -4659,8 +4659,17 @@ data: stepsData, options: chartOptions({ responsive: true, - scales: { x: { ticks: { color: colors.tick, maxRotation: 45 }, grid: { color: colors.grid } }, y: { ticks: { color: colors.label }, grid: { display: false } } }, - plugins: { legend: { labels: { color: colors.label } } } + scales: { x: { ticks: { + color: colors.tick, maxRotation: 0, + callback: function(value) { + var label = this.getLabelForValue(value); + return label.length > 24 ? (Number(value) + 1) + " · " + label.slice(0, 20) + "…" : label; + } + }, grid: { color: colors.grid } }, y: { ticks: { color: colors.label }, grid: { display: false } } }, + plugins: { + legend: { labels: { color: colors.label } }, + tooltip: { callbacks: { title: function(items) { return items.length ? items[0].label : ""; } } } + } }) }); } diff --git a/tests/reporting/test_tier3_baseline_trial_views.py b/tests/reporting/test_tier3_baseline_trial_views.py index a28321088..0a5d55762 100644 --- a/tests/reporting/test_tier3_baseline_trial_views.py +++ b/tests/reporting/test_tier3_baseline_trial_views.py @@ -207,6 +207,22 @@ def test_trial_charts_include_agent_condition_series() -> None: } +@pytest.mark.parametrize("case_ids", [[], ["short-case"], ["same-prefix-" + "a" * 84, "same-prefix-" + "b" * 84]]) +def test_steps_chart_bounds_ticks_without_changing_case_ids(case_ids: list[str]) -> None: + payload = _payload(include_baseline=False) + payload["trials"] = [{"agent": "codex", "entry_id": case_id, "steps": 7} for case_id in case_ids] + html = _render(payload) + + assert _steps_chart(html)["labels"] == case_ids + config = html.split('var stepsChart = document.getElementById("tier3-steps-chart");', 1)[1].split( + "window.rebuildTier3Charts();", 1 + )[0] + assert "maxRotation: 0" in config + assert "var label = this.getLabelForValue(value);" in config + assert 'label.length > 24 ? (Number(value) + 1) + " · " + label.slice(0, 20) + "…" : label' in config + assert 'return items.length ? items[0].label : "";' in config + + def test_drilldown_renders_with_skill_and_baseline_rows() -> None: html = _render(_payload()) table = _drilldown_table(html)