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 | done | frontend | Frontend Senior |
|
foundation | high |
TASK-182-add-global-ranking-frontend-page - Add global ranking frontend page
Goal
Create a dedicated Ranking page that displays public top lists by timeframe, server, metric and limit, consuming the backend support built in TASK-181.
Context
Ranking is now separated from Stats in both navigation and interaction model. Stats remains player-centric; Ranking is list-centric and links back to Stats only when a user wants individual lookup.
Files to Read First
AGENTS.mdai/repo-context.mdai/architecture-index.mddocs/global-ranking-page-plan.mdfrontend/index.htmlfrontend/historico.htmlfrontend/stats.htmlfrontend/assets/js/stats.jsfrontend/assets/css/styles.cssbackend/app/routes.pyai/tasks/done/TASK-181-add-global-ranking-backend-support.md
Expected Files Modified
frontend/ranking.htmlfrontend/assets/js/ranking.jsfrontend/assets/css/styles.cssfrontend/index.htmlai/tasks/done/TASK-182-add-global-ranking-frontend-page.md
Constraints Verified
- No backend files were changed in this task.
- No new endpoints were added.
- No database changes were made.
- No Elo/MMR reactivation.
- No Comunidad Hispana #03 reintroduction.
- Stats behavior was left intact.
- Implementation stayed in vanilla HTML/CSS/JS.
Outcome
- Added
frontend/ranking.htmlas a dedicated Ranking page. - Added
frontend/assets/js/ranking.jsto:- check backend health
- request
/api/ranking - switch between weekly, monthly and annual flows
- render loading, offline, no-data, annual-missing and controlled-error states
- Extended shared styling in
frontend/assets/css/styles.cssfor:- ranking filter layout
- ranking metadata cards
- ranking table
- ranking empty state
- Added a minimal
Rankingentry point infrontend/index.html. - Kept cross-linking minimal by linking from Ranking to Stats without modifying
stats.html.
Validation
Executed:
node --check frontend/assets/js/ranking.jsnode --check frontend/assets/js/stats.jspowershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1- Local static serving with
python -m http.server
HTTP checks:
ranking.html->200assets/js/ranking.js->200stats.html->200
Offline-state check:
- Backend was unavailable at
http://127.0.0.1:8000. - A headless Edge DOM capture of
ranking.htmlshowed#ranking-backend-staterendered asBackend no disponible, confirming the intended offline fallback path.
Known limitation:
- Live successful ranking calls could not be verified through a running backend during this task because the backend was not available over HTTP in the environment.
Recommended Follow-up
- Add a dedicated ranking frontend regression script so
ranking.htmlstate coverage is validated alongside existing historical and stats checks.