From f362c9a0833aed46c7481a0faa8120a6851d8f53 Mon Sep 17 00:00:00 2001 From: byrongamatos Date: Sun, 12 Jul 2026 21:03:48 +0200 Subject: [PATCH] fix(venue-crowd): don't let null accuracy resets wipe the end-of-song value Codex preflight: Number(null) is 0, so idle HUD resets overwrote _lastAccuracyPct before stats:recorded consumed it, suppressing the end-of-song stinger. Co-Authored-By: Claude Fable 5 --- static/v3/venue-crowd.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/v3/venue-crowd.js b/static/v3/venue-crowd.js index 3d6fc87..eae4d30 100644 --- a/static/v3/venue-crowd.js +++ b/static/v3/venue-crowd.js @@ -322,7 +322,11 @@ if (!_venueActive || !_manifest) return; bindVideosToRenderer(); const d = (e && e.detail) || {}; - if (Number.isFinite(Number(d.accuracyPct))) _lastAccuracyPct = Number(d.accuracyPct); + // Number(null) === 0: HUD reset events (accuracyPct: null) must not + // wipe the value the end-of-song stinger reads via stats:recorded. + if (d.accuracyPct != null && Number.isFinite(Number(d.accuracyPct))) { + _lastAccuracyPct = Number(d.accuracyPct); + } const streak = Number(d.streak) || 0; const sting = stingerForStreak(_prevStreak, streak); _prevStreak = streak;