diff --git a/static/v3/dashboard.js b/static/v3/dashboard.js index 5123535..59e5e7e 100644 --- a/static/v3/dashboard.js +++ b/static/v3/dashboard.js @@ -33,7 +33,8 @@ // Accuracy badge ramp (design/04-badges.md §C): ≥90% good, 50–89% mid, <50% low. function accuracyBadge(acc) { if (acc == null) return ''; - const pct = Math.round(acc * 100); + // Floor, never round: 100% must mean every note hit. + const pct = Math.floor(acc * 100); const color = acc >= 0.9 ? 'bg-fb-good' : (acc >= 0.5 ? 'bg-fb-mid' : 'bg-fb-low'); const text = acc >= 0.5 && acc < 0.9 ? 'text-black' : 'text-white'; return '✓ Passed'; if (st && st.best_accuracy != null && st.best_accuracy > 0) { const acc = st.best_accuracy; - const pct = Math.round(acc * 100); + const pct = Math.floor(acc * 100); const color = acc >= 0.9 ? 'text-fb-good' : (acc >= 0.5 ? 'text-fb-mid' : 'text-fb-low'); return '' + pct + '%'; } diff --git a/static/v3/live-performance-hud.js b/static/v3/live-performance-hud.js index 32b47ed..37d8512 100644 --- a/static/v3/live-performance-hud.js +++ b/static/v3/live-performance-hud.js @@ -21,7 +21,8 @@ function accuracyPct(hits, misses) { const judged = hits + misses; if (judged <= 0) return null; - return Math.round((hits / Math.max(1, judged)) * 100); + // Floor, never round: 100% must mean every judged note was hit. + return Math.floor((hits / Math.max(1, judged)) * 100); } function calculateLivePerformanceState({ hits = 0, misses = 0, streak = 0, bestStreak = 0 } = {}) { diff --git a/static/v3/playlists.js b/static/v3/playlists.js index 2efff61..7684344 100644 --- a/static/v3/playlists.js +++ b/static/v3/playlists.js @@ -73,7 +73,7 @@ ? ' data-play-fn="' + esc(playFn) + '"' + (arrIdx != null ? ' data-play-arr="' + arrIdx + '"' : '') : ''; const acc = (isAlbum && typeof opts.acc === 'number') - ? '' + Math.round(opts.acc * 100) + '%' + ? '' + Math.floor(opts.acc * 100) + '%' : ''; const pin = (isAlbum && s.arrangement) ? '' + esc(s.arrangement) + '' : ''; diff --git a/static/v3/profile.js b/static/v3/profile.js index 71f7cb9..ce79818 100644 --- a/static/v3/profile.js +++ b/static/v3/profile.js @@ -232,7 +232,7 @@ host.innerHTML = '