3.1 KiB
3.1 KiB
id, title, status, type, team, supporting_teams, roadmap_item, priority
| id | title | status | type | team | supporting_teams | roadmap_item | priority | |||
|---|---|---|---|---|---|---|---|---|---|---|
| TASK-182-add-global-ranking-frontend-page | Add global ranking frontend page | pending | frontend | Frontend Senior |
|
foundation | high |
TASK-182-add-global-ranking-frontend-page - Add global ranking frontend page
Goal
Create a dedicated Ranking page/section that displays global top lists by timeframe, server, metric, and limit, consuming the backend support built in TASK-181.
Context
This page must be separated from Stats and focused on list-level ranking discovery (global leaders), while clearly linking to Stats for individual player lookup.
Steps
- Read the listed files first.
- Add
frontend/ranking.htmlwith controls for timeframe, server, metric, and limit. - Implement
frontend/assets/js/ranking.jsto call the global ranking endpoint and render rows. - Update shared styles in
frontend/assets/css/styles.cssas needed, preserving the project visual direction. - Wire ranking access from existing navigation (
frontend/index.html) only if needed. - Add a minimal cross-link to Stats if useful and safe.
- Document covered UI states and fallback behavior when backend is unavailable.
Files to Read First
- AGENTS.md
- ai/repo-context.md
- ai/architecture-index.md
- docs/global-ranking-page-plan.md
- frontend/index.html
- frontend/historico.html
- frontend/stats.html
- frontend/assets/js/stats.js
- frontend/assets/css/styles.css
- backend/app/routes.py
- ai/tasks/done/TASK-181-add-global-ranking-backend-support.md
Expected Files to Modify
- frontend/ranking.html
- frontend/assets/js/ranking.js
- frontend/assets/css/styles.css
- frontend/index.html, only if navigation needs update
- frontend/stats.html, only if minimal cross-link is required
- scripts/run-stats-validation.ps1 or new ranking validation script
- ai/tasks/done/TASK-182-add-global-ranking-frontend-page.md
Constraints
- No backend modifications.
- No new endpoints.
- No database migrations.
- No Elo/MMR reactivation.
- No reintroduction of Comunidad Hispana #03.
- No frameworks; continue with vanilla HTML/CSS/JS.
- Preserve military/Vietnam/tactical/sober visual identity.
- Do not regress Stats behavior.
- Avoid duplicating complex Stats logic; reuse patterns where practical.
Outcome
- Global ranking page created and consumable.
- Endpoint consumed and documented.
- Validation of UI states:
- loading
- backend offline
- no data
- annual snapshot missing
- unsupported metric
- controlled error
- Validation list and known limitations recorded.
- Recommended follow-up tasks (if any).
Validation
- Run
node --check frontend/assets/js/ranking.js. - Run
node --check frontend/assets/js/stats.js. - Run
powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1. - Serve frontend with
python -m http.serverand verify HTTP 200 for:ranking.htmlassets/js/ranking.jsstats.html
- If backend is available, validate ranking calls against live endpoint.
- If backend is unavailable, validate UI offline state.
- Run
git diff --name-onlyand verify scoped changes.