docs: log stats screen Stage D (Records + format-48 debuts)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Lucas Kalil 2026-06-17 00:34:00 -03:00
parent e69ea7bd4d
commit df0958d88a
3 changed files with 14 additions and 4 deletions

View file

@ -83,7 +83,7 @@ data-blocked (graceful-degradation shell lets the UI land dark until JSON arrive
- [x] ~~Stage A — degradation engine + fault-tolerant `loadData` + sticky scrollspy sub-nav + media fallback~~ (2026-06-16) - [x] ~~Stage A — degradation engine + fault-tolerant `loadData` + sticky scrollspy sub-nav + media fallback~~ (2026-06-16)
- [x] ~~Stage B — verdict hero (gated on FINAL finished; aggregate-hero fallback) + goals-by-round chart~~ (2026-06-16) - [x] ~~Stage B — verdict hero (gated on FINAL finished; aggregate-hero fallback) + goals-by-round chart~~ (2026-06-16)
- [x] ~~Stage C — final ranking 148 (phase-reached chain), favorite-row highlight, team record cards~~ (2026-06-17) - [x] ~~Stage C — final ranking 148 (phase-reached chain), favorite-row highlight, team record cards~~ (2026-06-17)
- [ ] Stage D — auto record-cards + "format-48 debuts" band - [x] ~~Stage D — auto record-cards + "format-48 debuts" band~~ (2026-06-17)
- [ ] Stage E — 104-match results archive (accordion by phase, row → modal) - [ ] Stage E — 104-match results archive (accordion by phase, row → modal)
- [ ] Stage F — team comparator (diverging bars) - [ ] Stage F — team comparator (diverging bars)
- [ ] Stage G — Layer 2 cheap data (attendance, `cards`→{y,r} migration, decidedIn, coords) — **SCHEDULE LATE** - [ ] Stage G — Layer 2 cheap data (attendance, `cards`→{y,r} migration, decidedIn, coords) — **SCHEDULE LATE**

View file

@ -4,7 +4,7 @@ Navigation map of the codebase. Use this to find which file owns a concern befor
> **Status 2026-06-12 (all 12 steps + real-data migration done):** everything works with **real World Cup 2026 data** — all views, bracket interactions, simulation, responsive/a11y pass, favorites, time toggle, challenge, share link, `.ics` export. Remaining: keep `results.json` current, fill `thirdPlaceAssignment` after the group stage (~Jun 27), Lighthouse run + GitHub Pages deploy. Spec source of truth: `world-cup-2026-hub-spec-en.md` + `complement-spec-worldcup2026-en.md` (complement **wins on conflict**). > **Status 2026-06-12 (all 12 steps + real-data migration done):** everything works with **real World Cup 2026 data** — all views, bracket interactions, simulation, responsive/a11y pass, favorites, time toggle, challenge, share link, `.ics` export. Remaining: keep `results.json` current, fill `thirdPlaceAssignment` after the group stage (~Jun 27), Lighthouse run + GitHub Pages deploy. Spec source of truth: `world-cup-2026-hub-spec-en.md` + `complement-spec-worldcup2026-en.md` (complement **wins on conflict**).
> >
> **Branch note (2026-06-16):** the full post-Cup Stats screen (`.agents/stats-screen-plan.md`, stages AJ) is being built on **`feature/stats-final-screen`** (merges to `master` at the end of the Cup). **Stages AC done** on that branch (degradation engine + fault-tolerant `loadData` + sticky scrollspy sub-nav + flag monogram fallback; verdict-or-aggregate hero + goals-by-round chart; final ranking 148 by stage-reached + favorite-row highlight + team record cards). `master` keeps the partial Stats tab + daily refreshes. Descriptions below reflect the branch. > **Branch note (2026-06-16):** the full post-Cup Stats screen (`.agents/stats-screen-plan.md`, stages AJ) is being built on **`feature/stats-final-screen`** (merges to `master` at the end of the Cup). **Stages AD done** on that branch (degradation engine + fault-tolerant `loadData` + sticky scrollspy sub-nav + flag monogram fallback; verdict-or-aggregate hero + goals-by-round chart; final ranking 148 by stage-reached + favorite-row highlight + team record cards; Records section = match records + format-48 debuts band). Sub-nav live chips: Overview · Teams · Records. `master` keeps the partial Stats tab + daily refreshes. Descriptions below reflect the branch.
--- ---
@ -70,8 +70,9 @@ worldcup2026/
│ │ ├── stats.js ★ Stats tab: tournament-to-date aggregates (finished │ │ ├── stats.js ★ Stats tab: tournament-to-date aggregates (finished
│ │ │ matches only); verdict-or-aggregate hero + overview + goals-by-stage/round + │ │ │ matches only); verdict-or-aggregate hero + overview + goals-by-stage/round +
│ │ │ 48-team table ranked 148 by stage-reached (sortable, # = canonical rank) + │ │ │ 48-team table ranked 148 by stage-reached (sortable, # = canonical rank) +
│ │ │ favorite-row highlight + auto record cards (biggest win → │ │ │ favorite-row highlight + team record cards (win streak,
│ │ │ modal, win streak, champion path). SECTIONS registry (graceful- │ │ │ champion path) + Records section (biggest win/high-scoring
│ │ │ match → modal, format-48 debuts band). SECTIONS registry (graceful-
│ │ │ degradation gate: section + chip render only if available, │ │ │ degradation gate: section + chip render only if available,
│ │ │ else removed from DOM) + sticky scrollspy sub-nav (anchor │ │ │ else removed from DOM) + sticky scrollspy sub-nav (anchor
│ │ │ chips, hash-safe) + flagImg fallback; imports getBracketTree/getFavorites/openMatchModal. Grows into │ │ │ chips, hash-safe) + flagImg fallback; imports getBracketTree/getFavorites/openMatchModal. Grows into

View file

@ -273,6 +273,15 @@ Static web app showing the FIFA World Cup 2026 (Mexico/USA/Canada, 48 teams) —
- **Deferred (noted):** home/away splits + a per-match W/D/L form column → Stage J/later (the plan's §C "splits"/detailed form). - **Deferred (noted):** home/away splits + a per-match W/D/L form column → Stage J/later (the plan's §C "splits"/detailed form).
- **Next:** Stage D — auto record-cards (match/tournament records not already shown by Stage C) + "format-48 debuts" band (104 matches, R32 as a new round, best-3rd mechanic, first 48-team champion). Awaiting approval. - **Next:** Stage D — auto record-cards (match/tournament records not already shown by Stage C) + "format-48 debuts" band (104 matches, R32 as a new round, best-3rd mechanic, first 48-team champion). Awaiting approval.
### Stats final screen — Stage D: Records section + format-48 debuts (2026-06-17)
- **New `records` sub-nav section is live** (`SECTIONS` `records` flipped to `available: () => true`, `body: recordsSectionHTML`). Sub-nav now shows **Overview · Teams · Records** (players/comparator/archive still dark). The section is always available — its anchor content (the debuts band) is meaningful from match 0.
- **Match-record cards consolidated into Records** (cleaner C/D split): **`biggestWin` moved out of the Teams section into Records**; Teams now holds only team-level cards (win streak, champion path). Records shows **biggest win** (margin) + **highest-scoring match** (most combined goals; tie→bigger margin), both `<button>``openMatchModal`. **Dedup:** the high-score card is suppressed when it's the same match as biggest win (they coincide early, diverge later) — verified (real data: both = GER 71 m9 → 1 card; forcing a 65 → both cards).
- **`computeRecords` gained `highestScoringMatch`.** New render fns `recordsSectionHTML` + `highScoreCardHTML` + `formatDebutsHTML`.
- **"Format debuts" band (`formatDebutsHTML`):** the firsts of the 48-team era — 48 teams, 104 matches (up from 64), 12 groups, "Round of 32" (a new knockout round, via `translatePhase`), 8 best third-placed teams advance, and **first champion of the 48-team era** (lights up post-final from `model.verdict`). Mostly static format facts + the one dynamic champion fact; counts come from `getData()`/model, not hardcoded.
- **New i18n keys** (EN+PT): `stats.recordsTitle`, `stats.highScoreMatch`, `stats.formatDebutsTitle`, `stats.debutTeams/debutMatches/debutGroups/debutR32/debutThird/debutChampion`. **New CSS:** `.stats-subhead`, `.debut-band`/`.debut-fact`/`.debut-value`/`.debut-value-sm`/`.debut-label`.
- **Verified (preview 8126, branch, 19/104 real):** console clean; 3 chips (Overview/Teams/Records); Records = biggest-win card (high-score deduped) + debuts band (48/104/12/R32/8, no champion); Teams record cards now 0 (biggest-win moved). **Faked all-104-finished:** champion fact "Netherlands" appears in the band; forcing a distinct top-scoring match (65) shows both record cards. EN↔PT relabels section/cards/band ("16 avos de final" via translatePhase), survives re-render; mobile 375px band stacks 1-col; real state restored.
- **Next:** Stage E — 104-match results archive in-tab (accordion by phase, filters/sort, row → `openMatchModal`, reusing schedule.js patterns + `resolveBracketTeams` for knockout labels). At the gate I'll confirm full archive vs. keeping the "See all matches → Matches tab" link. Awaiting approval.
### How to update real-world data (scores, schedule) ### How to update real-world data (scores, schedule)
Follow `how-refresh-data.md` (project root). In short: Follow `how-refresh-data.md` (project root). In short:
1. Edit `data/results.json` (scores/status) or `data/matches.json` (schedule, rare). 1. Edit `data/results.json` (scores/status) or `data/matches.json` (schedule, rare).