fix: zero excluded count in fallback, drop debug-icon orphan, align ejs guard (#21)

This commit is contained in:
Samuel Enocsson
2026-05-25 09:44:46 +02:00
parent 0beeb98002
commit f2e30c62aa
4 changed files with 3 additions and 9 deletions
-7
View File
@@ -94,13 +94,6 @@
box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg);
} }
/* ── Debug Icon ───────────────────────────────── */
.debug-icon:hover {
opacity: 1 !important;
color: var(--accent) !important;
}
/* ── Add Player Modal ─────────────────────────── */ /* ── Add Player Modal ─────────────────────────── */
.modal { .modal {
+1
View File
@@ -191,6 +191,7 @@ function calculatePredictedRating(roundRatings) {
debugLog.push(` ✅ Using ${filteredRatings.length} rounds after outlier removal`); debugLog.push(` ✅ Using ${filteredRatings.length} rounds after outlier removal`);
} else { } else {
debugLog.push(` ⚠️ Too few rounds after outlier removal (${filteredRatings.length}), keeping all rounds`); debugLog.push(` ⚠️ Too few rounds after outlier removal (${filteredRatings.length}), keeping all rounds`);
excludedRoundsCount = 0;
} }
} else { } else {
debugLog.push(`⏭️ OUTLIER EXCLUSION SKIPPED (only ${workingRatings.length} rounds, need ≥7)`); debugLog.push(`⏭️ OUTLIER EXCLUSION SKIPPED (only ${workingRatings.length} rounds, need ≥7)`);
+1 -1
View File
@@ -36,7 +36,7 @@ const chartPdgaNumber = hasPlayer ? player.pdgaNumber : pdgaNumber;
<dd><%= player.rating - player.stdDev %><%= player.rating + player.stdDev %></dd> <dd><%= player.rating - player.stdDev %><%= player.rating + player.stdDev %></dd>
</div> </div>
<% } %> <% } %>
<% if (player.excludedRoundsCount != null && player.rating != null) { %> <% if (player.excludedRoundsCount != null && player.rating) { %>
<div> <div>
<dt>Excluded rounds</dt> <dt>Excluded rounds</dt>
<dd><%= player.excludedRoundsCount %></dd> <dd><%= player.excludedRoundsCount %></dd>
+1 -1
View File
@@ -124,7 +124,7 @@ function renderSparkline(values, opts) {
<dd><%= player.rating - player.stdDev %><%= player.rating + player.stdDev %></dd> <dd><%= player.rating - player.stdDev %><%= player.rating + player.stdDev %></dd>
</div> </div>
<% } %> <% } %>
<% if (player.excludedRoundsCount != null && player.rating != null) { %> <% if (player.excludedRoundsCount != null && player.rating) { %>
<div> <div>
<dt>Excluded rounds</dt> <dt>Excluded rounds</dt>
<dd><%= player.excludedRoundsCount %></dd> <dd><%= player.excludedRoundsCount %></dd>