Summary
Two related UI bugs on the reveal screen: content from challenge rounds (Movie Challenge and Artist Challenge) remains permanently visible in subsequent rounds, even when the next song has no film score or artist challenge at all.
Bug 1 — "The Movie Was" box persists after a movie soundtrack round
Steps to Reproduce
- Play the Movies – 100 Greatest Themes playlist (or any playlist with movie challenge songs)
- A round plays → Reveal correctly shows the box "🎬 The movie was: Titanic"
- Admin clicks Next Round → the next song is a regular song with no movie challenge
- → The "The movie was" box stays visible, still showing the movie title from the previous round
Expected Behavior
The #movie-reveal-section card is hidden when the reveal data for the current round contains no movie_challenge.
Bug 2 — "The Artist Was" box persists after an artist challenge round
Identical behavior: after a round with an Artist Challenge, the section "🎤 The artist was: …" remains visible in all subsequent rounds that have no artist challenge.
Steps to Reproduce
- Play any playlist with Artist Challenge enabled
- A round plays → Reveal correctly shows "🎤 The artist was: …"
- Admin clicks Next Round → next song has no artist challenge
- → The "The artist was" box stays visible from the previous round
Root Cause (Code Analysis)
In player-reveal.js (lines 113–119), renderArtistReveal() and renderMovieReveal() are only called when the challenge data is present. There is no else branch to explicitly hide the sections for rounds without a challenge:
// player-reveal.js — CURRENT (buggy)
if (data.artist_challenge) {
renderArtistReveal(data.artist_challenge, state.playerName);
}
// ❌ No else → artist-reveal-section stays visible from previous round
if (data.movie_challenge) {
renderMovieReveal(data.movie_challenge, state.playerName);
}
// ❌ No else → movie-reveal-section stays visible from previous round
Both renderMovieReveal() and renderArtistReveal() in player-game.js already handle null correctly — they hide the section when called with no data:
// player-game.js — renderMovieReveal() handles null correctly...
export function renderMovieReveal(movieChallenge, currentPlayerName) {
var section = document.getElementById('movie-reveal-section');
if (!section) return;
if (!movieChallenge || !movieChallenge.correct_movie) {
section.classList.add('hidden'); // ✅ logic is correct...
return;
}
// ...but this is never reached because the function is never called with null
}
The same applies to renderArtistReveal() (player-game.js, line 940).
Additional Note: resetSubmissionState() does not clear reveal sections
resetSubmissionState() (player-game.js, line 692) correctly calls resetArtistChallengeState() and resetMovieChallengeState(). However, those functions only clear the player input containers (artist-challenge-container, movie-challenge-container) used during the guessing phase — they do not touch the reveal sections (artist-reveal-section, movie-reveal-section).
Hiding the reveal sections must therefore happen in the reveal handler itself, as described below.
Proposed Fix
player-reveal.js — always call both render functions, passing null as fallback:
// BEFORE (buggy)
if (data.artist_challenge) {
renderArtistReveal(data.artist_challenge, state.playerName);
}
if (data.movie_challenge) {
renderMovieReveal(data.movie_challenge, state.playerName);
}
// AFTER (correct) — one line change per function
renderArtistReveal(data.artist_challenge || null, state.playerName);
renderMovieReveal(data.movie_challenge || null, state.playerName);
Since both render functions already handle null correctly and hide the section in that case, it is sufficient to always call them — passing null as a fallback when no challenge data is present.
Alternative — explicit else branches:
if (data.artist_challenge) {
renderArtistReveal(data.artist_challenge, state.playerName);
} else {
var artistSection = document.getElementById('artist-reveal-section');
if (artistSection) artistSection.classList.add('hidden');
}
if (data.movie_challenge) {
renderMovieReveal(data.movie_challenge, state.playerName);
} else {
var movieSection = document.getElementById('movie-reveal-section');
if (movieSection) movieSection.classList.add('hidden');
}
Affected Files
| File |
Line |
Change |
www/js/player-reveal.js |
113–119 |
Always call renderArtistReveal and renderMovieReveal (with null fallback) |
The logic inside player-game.js (renderMovieReveal, renderArtistReveal) is correct as-is and does not need to be changed.
Impact
- Affects all players on any mixed playlist that combines movie soundtrack songs with regular songs
- The stale box persists for the entire remainder of the game once triggered, until a new movie/artist challenge round refreshes it
- Particularly confusing when the displayed movie/artist title has no relation to the song currently being revealed
Summary
Two related UI bugs on the reveal screen: content from challenge rounds (Movie Challenge and Artist Challenge) remains permanently visible in subsequent rounds, even when the next song has no film score or artist challenge at all.
Bug 1 — "The Movie Was" box persists after a movie soundtrack round
Steps to Reproduce
Expected Behavior
The
#movie-reveal-sectioncard is hidden when the reveal data for the current round contains nomovie_challenge.Bug 2 — "The Artist Was" box persists after an artist challenge round
Identical behavior: after a round with an Artist Challenge, the section "🎤 The artist was: …" remains visible in all subsequent rounds that have no artist challenge.
Steps to Reproduce
Root Cause (Code Analysis)
In
player-reveal.js(lines 113–119),renderArtistReveal()andrenderMovieReveal()are only called when the challenge data is present. There is noelsebranch to explicitly hide the sections for rounds without a challenge:Both
renderMovieReveal()andrenderArtistReveal()inplayer-game.jsalready handlenullcorrectly — they hide the section when called with no data:The same applies to
renderArtistReveal()(player-game.js, line 940).Additional Note:
resetSubmissionState()does not clear reveal sectionsresetSubmissionState()(player-game.js, line 692) correctly callsresetArtistChallengeState()andresetMovieChallengeState(). However, those functions only clear the player input containers (artist-challenge-container,movie-challenge-container) used during the guessing phase — they do not touch the reveal sections (artist-reveal-section,movie-reveal-section).Hiding the reveal sections must therefore happen in the reveal handler itself, as described below.
Proposed Fix
player-reveal.js— always call both render functions, passingnullas fallback:Since both render functions already handle
nullcorrectly and hide the section in that case, it is sufficient to always call them — passingnullas a fallback when no challenge data is present.Alternative — explicit else branches:
Affected Files
www/js/player-reveal.jsrenderArtistRevealandrenderMovieReveal(withnullfallback)The logic inside
player-game.js(renderMovieReveal,renderArtistReveal) is correct as-is and does not need to be changed.Impact