fix(overlay): show every driver, compact rows beyond 12 (1.42.6)

The overlay page cut the leaderboard at 12 drivers. It now shows all of
them, with compact rows when there are more than 12 so they fit on a TV.
This commit is contained in:
larssand committed 2026-10-25 21:33:36 +01:00
1 parent 2c2b16537e
commit 0cabe1f96f
6 files changed
+29 -5

No files matched your search

+6
View File
@@ -8,6 +8,12 @@ The application version is maintained in `package.json` and displayed in the adm
No changes recorded yet. No changes recorded yet.
## 1.42.6 - 2026-10-25
### Fixed
- **The overlay showed at most 12 drivers.** The Overlay page (menu and stand-alone window, leaderboard and TV modes) cut the list at 12, so in a busy Open Practice drivers 13 and on were missing - and the fastest lap was only looked for among those 12. Every driver is shown now; with more than 12 the rows turn compact (no per-cell labels, sub-line or next-lap bar) so they all fit on a TV that can't scroll. OBS keeps its own rows setting.
## 1.42.5 - 2026-10-25 ## 1.42.5 - 2026-10-25
### Fixed ### Fixed
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "rc-racecore", "name": "rc-racecore",
"version": "1.42.5", "version": "1.42.6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "rc-racecore", "name": "rc-racecore",
"version": "1.42.5", "version": "1.42.6",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"better-sqlite3": "^12.11.1", "better-sqlite3": "^12.11.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rc-racecore", "name": "rc-racecore",
"version": "1.42.5", "version": "1.42.6",
"private": true, "private": true,
"description": "RC RaceCore live timing and race control with AMMC ingest and SQLite persistence", "description": "RC RaceCore live timing and race control with AMMC ingest and SQLite persistence",
"engines": { "engines": {
+3 -1
View File
@@ -176,7 +176,9 @@ export function renderOverlayPageView(deps) {
const { state, dom, t, escapeHtml, formatLap, formatCountdown, formatElapsedClock, formatPredictedLapDelta, getActiveSession, buildLeaderboard, ensureSessionResult, getSessionTiming, getVisiblePassings, resolveEventBranding, buildPracticeStandings, buildQualifyingStandings, buildFinalStandings, getOverlayModeLabel, getStatusLabel, getObsOverlayConfig, buildOverlayPanels, normalizeStartMode, renderPositionGrid, getEventName, getSessionTypeLabel, getStartModeLabel, renderRaceStandingsTableView, renderTeamOverlay, renderObsOverlay, renderOverlayLeaderboard, renderOverlaySidePanel, formatTeamActiveMemberLabel, getSessionGridEntries, getSessionGridOrder, overlayViewMode, overlayMode, publicOverlayMode, overlayEvents, overlayRotationIndex, openOverlayWindow, buildOverlayUrl } = deps; const { state, dom, t, escapeHtml, formatLap, formatCountdown, formatElapsedClock, formatPredictedLapDelta, getActiveSession, buildLeaderboard, ensureSessionResult, getSessionTiming, getVisiblePassings, resolveEventBranding, buildPracticeStandings, buildQualifyingStandings, buildFinalStandings, getOverlayModeLabel, getStatusLabel, getObsOverlayConfig, buildOverlayPanels, normalizeStartMode, renderPositionGrid, getEventName, getSessionTypeLabel, getStartModeLabel, renderRaceStandingsTableView, renderTeamOverlay, renderObsOverlay, renderOverlayLeaderboard, renderOverlaySidePanel, formatTeamActiveMemberLabel, getSessionGridEntries, getSessionGridOrder, overlayViewMode, overlayMode, publicOverlayMode, overlayEvents, overlayRotationIndex, openOverlayWindow, buildOverlayUrl } = deps;
const active = getActiveSession(); const active = getActiveSession();
const leaderboard = active ? buildLeaderboard(active).slice(0, 12) : []; // Every driver: an Open Practice often has more than 12 cars out (OBS has its own row
// setting and cuts the list itself).
const leaderboard = active ? buildLeaderboard(active) : [];
const result = active ? ensureSessionResult(active.id) : null; const result = active ? ensureSessionResult(active.id) : null;
const sessionTiming = active ? getSessionTiming(active) : null; const sessionTiming = active ? getSessionTiming(active) : null;
const overlayClock = sessionTiming?.followUpActive const overlayClock = sessionTiming?.followUpActive
+4 -1
View File
@@ -66,8 +66,11 @@ export function renderOverlayLeaderboard(rows, { t, escapeHtml, formatTeamActive
const sortAttrs = sortable const sortAttrs = sortable
? ` data-sort-id="overlay-leaderboard" data-sort-text-columns="1" data-sort-labels="${sortValuesAttribute([t("table.pos"), t("table.driver"), t("table.laps"), t("table.result"), t("table.gap"), t("table.ahead_gap"), t("table.own_delta"), t("table.best_lap")])}"` ? ` data-sort-id="overlay-leaderboard" data-sort-text-columns="1" data-sort-labels="${sortValuesAttribute([t("table.pos"), t("table.driver"), t("table.laps"), t("table.result"), t("table.gap"), t("table.ahead_gap"), t("table.own_delta"), t("table.best_lap")])}"`
: ""; : "";
// More than 12 cars (a busy Open Practice): compact rows so all of them fit on a TV that
// can't scroll - no per-cell labels (the header names the columns), sub-line or prediction bar.
const compact = rows.length > 12;
return ` return `
<div class="overlay-race-list"${sortAttrs}> <div class="overlay-race-list ${compact ? "overlay-race-list-compact" : ""}"${sortAttrs}>
${rows ${rows
.map((row, idx) => { .map((row, idx) => {
const posClass = idx === 0 ? "pos-1" : idx === 1 ? "pos-2" : idx === 2 ? "pos-3" : ""; const posClass = idx === 0 ? "pos-1" : idx === 1 ? "pos-2" : idx === 2 ? "pos-3" : "";
+13
View File
@@ -4716,3 +4716,16 @@ tr.is-removed td.lap-actions {
/* RaceCore's own overlay: a driver row opens their training stats. */ /* RaceCore's own overlay: a driver row opens their training stats. */
.overlay-race-row.is-linked { cursor: pointer; } .overlay-race-row.is-linked { cursor: pointer; }
.overlay-race-row.is-linked:hover .overlay-race-driver strong { text-decoration: underline; text-underline-offset: 3px; } .overlay-race-row.is-linked:hover .overlay-race-driver strong { text-decoration: underline; text-underline-offset: 3px; }
/* More than 12 cars: compact rows so every driver fits on a TV screen (renderOverlayLeaderboard). */
.overlay-race-list-compact .overlay-race-row {
padding-top: 2px;
padding-bottom: 2px;
}
.overlay-race-list-compact .overlay-race-metric label,
.overlay-race-list-compact .overlay-race-best label,
.overlay-race-list-compact .overlay-race-driver > span,
.overlay-race-list-compact .overlay-prediction,
.overlay-race-list-compact .overlay-decoder-meta {
display: none;
}