3.2 KiB
3.2 KiB
TASK-248 - Add real KPM to public tables and fix kills per match labels
Summary
This task extends the already validated real historical KPM to the main player table in historico-partida.html and removes misleading public KPM labels that were actually rendering kills_per_match.
It does not change the real KPM formula already validated in production.
Files Read First
frontend/historico-partida.htmlfrontend/assets/js/historico-partida.jsfrontend/assets/css/historico.cssfrontend/historico.htmlfrontend/assets/js/historico.jsfrontend/stats.htmlfrontend/assets/js/stats.jsfrontend/ranking.htmlfrontend/assets/js/ranking.jsbackend/app/rcon_historical_read_model.pydocs/HISTORICAL_MATCH_KILLS_PER_MINUTE_ANALYSIS.md
Problem
The repository already exposed real KPM at player level in /api/historical/matches/detail, but the public UI still had two problems:
historico-partidaonly showed real KPM in the expanded player panel, not in the main table.- Several public surfaces were calling
kills_per_matchby the visible labelKPM, which is incorrect.
Decision
Keep the validated real KPM model unchanged:
- only
kpm_status = readyrenders a visible value - no total-match-duration fallback
- no
event_span_fallbackas ready KPM
Apply two UI rules:
- historical match detail main table gets a real
KPMcolumn - any visible
kills_per_matchlabel becomesKills/partida
Do not add public aggregated weekly/monthly/annual real KPM yet. That would need a separate backend and snapshot coverage contract so mixed datasets do not produce misleading results.
Implementation
Historical match detail
- Added a sortable
KPMoption in the player table. - Added a
KPMcolumn in the main player list. - The cell stays empty unless
kpm_status == "ready". - The expanded panel keeps its existing real KPM chip.
Historical weekly/monthly tables
- Renamed the last leaderboard metric from
KPMtoKills/partida. - Kept the underlying
kills_per_matchmeaning unchanged.
Stats and ranking
- Annual stats table now labels
kills_per_matchasKills/partida. - Weekly/monthly comparison cards now label the same metric as
Kills/partida semanalandKills/partida mensual. - Ranking already used
Kills/partida, so no semantic rename was needed there.
Validation
Executed:
node --check frontend/assets/js/historico-partida.jsnode --check frontend/assets/js/historico.jsnode --check frontend/assets/js/stats.jsnode --check frontend/assets/js/ranking.js
Static validation performed:
- confirmed
historico-partida.htmlmain table now showsKPM - confirmed expanded player panel still shows real KPM
- confirmed rows with
insufficient_active_timekeep the main table cell empty - confirmed historical weekly/monthly tables no longer show
KPMforkills_per_match - confirmed annual stats no longer show
KPMforkills_per_match - confirmed ranking still uses
Kills/partida
Notes
- No backend changes were required for this task.
- No scheduler, RCON or server configuration changes were made.
- Public aggregated real KPM for weekly/monthly/annual remains pending a dedicated coverage-safe snapshot design.