diff --git a/.agents/project-map.md b/.agents/project-map.md index d3949d2..fbf4c59 100644 --- a/.agents/project-map.md +++ b/.agents/project-map.md @@ -13,6 +13,8 @@ worldcup2026/ ├── .agents/ ← Internal documentation for AI agents │ ├── project-map.md This file │ ├── project-memory.md Context, decisions, gotchas +│ ├── stats-screen-plan.md Plan for the post-tournament "final stats" screen +│ │ (NOT implemented — planning only, 2026-06-14) │ └── TODO.md 12-step build checklist │ ├── .github/workflows/ @@ -21,7 +23,7 @@ worldcup2026/ │ .gitignore OS/editor junk │ ├── index.html ★ SPA shell — header, nav tabs (Home, Matches, -│ Groups, Knockout, Stadiums), hero, dashboard, +│ Groups, Knockout, Stadiums, Stats), hero, dashboard, │ modal container; loads app.js as ES module │ ├── assets/ @@ -29,6 +31,7 @@ worldcup2026/ │ │ ├── style.css ★ Palette variables, glassmorphism base, layout, │ │ │ components — mobile-first │ │ ├── bracket.css Bracket columns, connectors, highlight states +│ │ ├── stats.css Stats tab: hero "pulse", overview cards, goals-by-stage chart │ │ └── animations.css Entry (fade-in, slide-up/left) + interaction │ │ (hover-scale/glow, pulse, line-draw) │ ├── js/ @@ -43,6 +46,9 @@ worldcup2026/ │ │ ├── modal.js Match detail modal (ARIA dialog) │ │ ├── storage.js localStorage wrapper — wc2026_* keys, auto-JSON │ │ ├── i18n.js EN/PT-BR dicts + t(key), lang toggle +│ │ ├── stats.js ★ Stats tab: tournament-to-date aggregates (finished +│ │ │ matches only), hero pulse + overview + goals-by-stage. +│ │ │ PARTIAL (during-cup) — grows into the post-cup plan. │ │ └── calendar.js .ics export (RFC 5545, CRLF, Blob download) │ └── images/ Team flag SVGs, stadium placeholders │ diff --git a/.agents/project-memory.md b/.agents/project-memory.md index 08acded..d056a81 100644 --- a/.agents/project-memory.md +++ b/.agents/project-memory.md @@ -272,6 +272,27 @@ Follow `how-refresh-data.md` (project root). In short: - **`assets/js/app.js` `loadData()` appends `?v=${DATA_VERSION}`** to every `data/*.json` fetch (`DATA_VERSION` constant near the top of the file, currently `'2026-06-13-rev1'`). Fixes production browsers/Hostinger caching stale `results.json` after a daily refresh — `cache: 'reload'` only helps the developer's own browser, not real visitors. - **Must be bumped on every data refresh** — added as step 4 of the daily routine in `how-refresh-data.md`. Format `YYYY-MM-DD-revN`; increment `revN` for same-day re-edits. +### Stats screen — planning (2026-06-14) +- **Plano completo em `.agents/stats-screen-plan.md`** (pós-Copa "tela de estatísticas finais"). Gerado via workflow de 5 sub-agentes (Times/Individuais/Partidas/Curiosidades/UX). **Nada implementado ainda** — só planejamento, aprovado pelo usuário. +- **Escopo aprovado: as 4 camadas** — ✅ dados existentes · 🟡🧩 acréscimos baratos (attendance, cartões y/r, ranking/wcDebut/confederation em teams.json, coords em stadiums.json, backfill do `stats`) · 🔴 dados de jogadores (`players.json` + log de eventos + `awards.json`) · 📝 editorial (`curiosities.json`). +- **REQUISITO DE 1ª ORDEM — degradação graciosa:** quando um dado não existir, a UI **não pode quebrar nem deixar visível ao usuário final que falta algo**. Regra: dado/seção só renderiza com cobertura completa; senão é **removido do DOM** (não placeholder/"—"/"em breve"); chips de sub-nav de seções vazias também somem; `loadData()` deve tolerar fetch de arquivo novo ausente (default vazio, não exceção). +- **Decisões técnicas planejadas:** novo 6º tab `stats` → `#panel-stats` + `assets/js/stats.js` + `assets/css/stats.css` (segue padrão por-view + import circular com app.js); sub-nav = `
@@ -74,6 +76,11 @@

Stadiums

+ +