Skip to content

Commit 15dba77

Browse files
committed
feat(leaderboard): interactive 're-run' button — visitor experiences variance
Hero hook was 'we re-ran the same agent twice, got 0.0 then 0.7'. Static text. Visitor reads it, moves on. Replaced with a clickable '↻ Re-run claude-code on tool-001' button that cycles through 5 real observed scores from the dev-time runs (0.00 → 0.70 → 0.50 → 0.00 → 0.70). Each click changes the displayed score with a 180ms fade. Color shifts red ↔ yellow ↔ green by score. After 2 clicks the hint text changes from 'click. the number changes. same prompt, same Docker sandbox.' to 'Trial N of 5 observed runs. This is what variance looks like.' Why this matters: visitors who PHYSICALLY re-trigger the score swing internalize the variance message in 3 seconds. Stronger than reading about it. ~30 LOC of vanilla JS, no deps.
1 parent cb26c0f commit 15dba77

1 file changed

Lines changed: 35 additions & 3 deletions

File tree

docs/index.html

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -903,13 +903,45 @@
903903
<span class="pulse"></span> Live Benchmark
904904
</div>
905905
<h1 class="reveal reveal-d1">
906-
We re-ran the same agent twice.<br/>
907-
Got <span style="color: var(--red);">0.0</span> then <span style="color: var(--green);">0.7</span>.
906+
Same agent. Same task.<br/>
907+
Score: <span id="hero-score" style="color: var(--red); transition: color 0.4s;">0.00</span>
908908
</h1>
909909
<p class="subtitle reveal reveal-d2">
910910
Most AI agent leaderboards report a single number. We don't think that's honest.<br/>
911-
This one shows variance.
911+
<button id="hero-rerun" style="margin-top: 14px; padding: 10px 20px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 8px; color: var(--text); font-size: 0.95em; cursor: pointer; font-family: inherit; font-weight: 600; transition: all 0.2s;">↻ Re-run claude-code on tool-001</button>
912+
<span id="hero-rerun-hint" style="display: block; margin-top: 10px; font-size: 0.85em; color: var(--text-secondary);">Click. The number changes. Same prompt, same Docker sandbox.</span>
912913
</p>
914+
<script>
915+
// Real per-trial observed scores from Claude Code on tool-001 (see docs/findings.md)
916+
// Cycling through them shows visitors what "single-trial" leaderboards hide.
917+
(function(){
918+
var trials = [0.00, 0.70, 0.50, 0.00, 0.70];
919+
var idx = 0;
920+
var btn = document.getElementById('hero-rerun');
921+
var score = document.getElementById('hero-score');
922+
var hint = document.getElementById('hero-rerun-hint');
923+
function color(v) {
924+
if (v >= 0.6) return 'var(--green)';
925+
if (v >= 0.3) return 'var(--yellow)';
926+
return 'var(--red)';
927+
}
928+
btn.addEventListener('click', function(){
929+
idx = (idx + 1) % trials.length;
930+
var v = trials[idx];
931+
score.style.opacity = '0.3';
932+
setTimeout(function(){
933+
score.textContent = v.toFixed(2);
934+
score.style.color = color(v);
935+
score.style.opacity = '1';
936+
}, 180);
937+
if (idx >= 2) {
938+
hint.textContent = 'Trial ' + (idx + 1) + ' of 5 observed runs. This is what variance looks like.';
939+
}
940+
});
941+
btn.addEventListener('mouseenter', function(){ btn.style.background = 'var(--accent-glow)'; btn.style.borderColor = 'var(--accent-light)'; });
942+
btn.addEventListener('mouseleave', function(){ btn.style.background = 'var(--bg-card)'; btn.style.borderColor = 'var(--border-light)'; });
943+
})();
944+
</script>
913945
<div class="hero-actions reveal reveal-d3">
914946
<a href="https://github.com/jackjin1997/AgentBench-Live" target="_blank" class="btn btn-primary">
915947
<svg viewBox="0 0 16 16"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>

0 commit comments

Comments
 (0)