Add next Stats improvement tasks
This commit is contained in:
@@ -0,0 +1,71 @@
|
|||||||
|
---
|
||||||
|
id: TASK-175-add-stats-regression-validation-script
|
||||||
|
title: Add Stats regression validation script
|
||||||
|
status: pending
|
||||||
|
type: platform
|
||||||
|
team: PM
|
||||||
|
supporting_teams:
|
||||||
|
- Backend Senior
|
||||||
|
- Frontend Senior
|
||||||
|
roadmap_item: foundation
|
||||||
|
priority: high
|
||||||
|
---
|
||||||
|
|
||||||
|
# TASK-175-add-stats-regression-validation-script - Add Stats regression validation script
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Add a small, repeatable validation for the existing Stats frontend/backend surfaces that protects current endpoints and assets, without changing behavior.
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The Stats section already has public-facing pages, JS assets, and backend endpoints that can regress independently. This task should add a lightweight executable validation flow (script-based) that is tolerant to envs with no local data and can still verify expected behavior and error states.
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
1. Read the listed files first.
|
||||||
|
2. Define a focused Stats validation workflow without changing any application behavior.
|
||||||
|
3. Add/update a script that checks key assets and endpoints, including supported and empty/missing states.
|
||||||
|
4. Ensure the validation outputs clear status and actionable next steps when backend is unavailable.
|
||||||
|
5. Document endpoint behavior, known environment limits, and the recommended follow-up task.
|
||||||
|
|
||||||
|
## Files to Read First
|
||||||
|
|
||||||
|
- AGENTS.md
|
||||||
|
- ai/repo-context.md
|
||||||
|
- ai/architecture-index.md
|
||||||
|
- docs/stats-section-functional-plan.md
|
||||||
|
- docs/annual-ranking-snapshot-runbook.md
|
||||||
|
- frontend/stats.html
|
||||||
|
- frontend/assets/js/stats.js
|
||||||
|
- backend/app/routes.py
|
||||||
|
- scripts/run-integration-tests.ps1
|
||||||
|
|
||||||
|
## Expected Files to Modify
|
||||||
|
|
||||||
|
- scripts/run-stats-validation.ps1 (or equivalent repo-preferred validation script)
|
||||||
|
- scripts/run-integration-tests.ps1 only if a safe integration point is justified
|
||||||
|
- ai/tasks/done/TASK-175-add-stats-regression-validation-script.md
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
- No behavior change in Stats.
|
||||||
|
- No UI redesign.
|
||||||
|
- No ranking logic changes.
|
||||||
|
- No database schema changes.
|
||||||
|
- Do not re-enable Elo/MMR.
|
||||||
|
- Do not reintroduce Comunidad Hispana #03.
|
||||||
|
- Keep validation tolerant to environments without positive local data.
|
||||||
|
- If backend is unavailable, document the expected validation behavior instead of failing with ambiguous output.
|
||||||
|
|
||||||
|
## Validation
|
||||||
|
|
||||||
|
- Run `node --check frontend/assets/js/stats.js`.
|
||||||
|
- Run `powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1`.
|
||||||
|
- Run the new Stats validation script.
|
||||||
|
- Run `git diff --name-only` and verify scope is within the task plan.
|
||||||
|
|
||||||
|
## Outcome
|
||||||
|
|
||||||
|
Document validated endpoints, controlled limitations, and the immediate next task recommendation.
|
||||||
|
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
---
|
||||||
|
id: TASK-176-add-stats-player-comparison-cards
|
||||||
|
title: Add stats player comparison cards
|
||||||
|
status: pending
|
||||||
|
type: frontend
|
||||||
|
team: Frontend Senior
|
||||||
|
supporting_teams:
|
||||||
|
- Experto en interfaz
|
||||||
|
- Backend Senior
|
||||||
|
roadmap_item: foundation
|
||||||
|
priority: high
|
||||||
|
---
|
||||||
|
|
||||||
|
# TASK-176-add-stats-player-comparison-cards - Add stats player comparison cards
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Improve the Stats UI with comparison cards that help a selected player quickly understand personal metrics and weekly/monthly position, using already available backend data and without creating new endpoints.
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The Stats page already exposes player lookup and detail payloads. This task should improve clarity and trust by surfacing key performance values in cards, while preserving empty/loading/error behavior and the existing visual identity.
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
1. Read the listed files first.
|
||||||
|
2. Add UI card components in the existing Stats section for selected-player context.
|
||||||
|
3. Consume existing fields from current responses only, without changing API contracts.
|
||||||
|
4. Show explicit states for missing ranking, insufficient ranking depth, or missing player in weekly/monthly snapshots.
|
||||||
|
5. Keep design aligned with military/Vietnam/tactical sober style and keep existing empty/loading/error states intact.
|
||||||
|
|
||||||
|
## Files to Read First
|
||||||
|
|
||||||
|
- AGENTS.md
|
||||||
|
- ai/repo-context.md
|
||||||
|
- ai/architecture-index.md
|
||||||
|
- docs/stats-section-functional-plan.md
|
||||||
|
- frontend/stats.html
|
||||||
|
- frontend/assets/js/stats.js
|
||||||
|
- frontend/assets/css/styles.css
|
||||||
|
- backend/app/rcon_historical_player_stats.py
|
||||||
|
- ai/tasks/done/TASK-172-polish-stats-section-empty-states-and-copy.md
|
||||||
|
|
||||||
|
## Expected Files to Modify
|
||||||
|
|
||||||
|
- frontend/stats.html
|
||||||
|
- frontend/assets/js/stats.js
|
||||||
|
- frontend/assets/css/styles.css
|
||||||
|
- ai/tasks/done/TASK-176-add-stats-player-comparison-cards.md
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
- No backend modifications.
|
||||||
|
- No new endpoints.
|
||||||
|
- No database changes.
|
||||||
|
- Do not change existing API contracts.
|
||||||
|
- Do not re-enable Elo/MMR.
|
||||||
|
- Do not reintroduce Comunidad Hispana #03.
|
||||||
|
- Do not introduce frameworks.
|
||||||
|
- Keep vanilla HTML/CSS/JS implementation.
|
||||||
|
- Keep military/Vietnam/tactical/sober visual identity.
|
||||||
|
- Preserve existing empty/loading/error states and avoid regressions.
|
||||||
|
|
||||||
|
## Validation
|
||||||
|
|
||||||
|
- Run `node --check frontend/assets/js/stats.js`.
|
||||||
|
- Run `powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1`.
|
||||||
|
- Serve frontend with `python -m http.server` and verify HTTP 200 for `stats.html` and `assets/js/stats.js`.
|
||||||
|
- If possible, visually validate with local backend.
|
||||||
|
- Run `git diff --name-only` and verify scope is limited to this task.
|
||||||
|
|
||||||
|
## Outcome
|
||||||
|
|
||||||
|
Document which comparison cards were added, payload fields consumed, behavior with no data, and any remaining follow-up improvements.
|
||||||
|
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
---
|
||||||
|
id: TASK-177-harden-annual-ranking-snapshot-operations
|
||||||
|
title: Harden annual ranking snapshot operations
|
||||||
|
status: pending
|
||||||
|
type: backend
|
||||||
|
team: Backend Senior
|
||||||
|
supporting_teams:
|
||||||
|
- Arquitecto de Base de Datos
|
||||||
|
- PM
|
||||||
|
roadmap_item: foundation
|
||||||
|
priority: medium
|
||||||
|
---
|
||||||
|
|
||||||
|
# TASK-177-harden-annual-ranking-snapshot-operations - Harden annual ranking snapshot operations
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Improve annual ranking snapshot reliability for production use without recalculating on public requests or changing visible frontend behavior.
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The annual snapshot flow is implemented and documented, but edge cases around missing data, empty years, unsupported years/metrics, and limit normalization should be hardened with small, verifiable backend improvements.
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
1. Read the listed files first.
|
||||||
|
2. Review generation and read flow for annual ranking snapshots.
|
||||||
|
3. Apply small validation and response consistency improvements in backend code.
|
||||||
|
4. Ensure snapshot behavior remains stable for ready/empty/missing and unsupported metric states.
|
||||||
|
5. Document any follow-up work that should remain a separate task instead of broadening this one.
|
||||||
|
|
||||||
|
## Files to Read First
|
||||||
|
|
||||||
|
- AGENTS.md
|
||||||
|
- ai/repo-context.md
|
||||||
|
- ai/architecture-index.md
|
||||||
|
- docs/stats-section-functional-plan.md
|
||||||
|
- docs/annual-ranking-snapshot-runbook.md
|
||||||
|
- backend/app/routes.py
|
||||||
|
- backend/app/rcon_annual_rankings.py
|
||||||
|
- backend/app/rcon_historical_leaderboards.py
|
||||||
|
- ai/tasks/done/TASK-171-validate-stats-section-with-backend-data.md
|
||||||
|
- ai/tasks/done/TASK-173-add-annual-ranking-snapshot-runbook.md
|
||||||
|
|
||||||
|
## Expected Files to Modify
|
||||||
|
|
||||||
|
- backend/app/rcon_annual_rankings.py
|
||||||
|
- backend/app/routes.py only if endpoint mapping/validation requires changes
|
||||||
|
- docs/annual-ranking-snapshot-runbook.md only if documented operations change
|
||||||
|
- ai/tasks/done/TASK-177-harden-annual-ranking-snapshot-operations.md
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
- No frontend modifications unless a strict critical backend-related bug requires it (and document the reason).
|
||||||
|
- No new architecture.
|
||||||
|
- No major migrations.
|
||||||
|
- Do not re-enable Elo/MMR.
|
||||||
|
- Do not reintroduce Comunidad Hispana #03.
|
||||||
|
- Do not use public scoreboard as primary source.
|
||||||
|
- Do not recalculate annual ranking in each public request.
|
||||||
|
- Keep changes small and independently verifiable.
|
||||||
|
|
||||||
|
## Validation
|
||||||
|
|
||||||
|
- Run `powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1`.
|
||||||
|
- Test annual ranking endpoint for:
|
||||||
|
- current year with `metric=kills`
|
||||||
|
- past year with no data
|
||||||
|
- future year missing snapshot
|
||||||
|
- unsupported metric
|
||||||
|
- low limit, e.g. `3`
|
||||||
|
- high limit, verifying normalization if applicable
|
||||||
|
- Run `git diff --name-only` and verify scoped files only.
|
||||||
|
|
||||||
|
## Outcome
|
||||||
|
|
||||||
|
Document applied hardening, validated responses, known limits, and whether a future task is needed for scheduled/hardening automation.
|
||||||
|
|
||||||
Reference in New Issue
Block a user