Coming-up cards and the post-match comparison now use the model's most
likely score ('2-0') instead of decimal goal expectations ('2.3-0.4');
the pre-match model card keeps just the honesty note since the bar's
chip already carries the predicted scoreline.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Scheduler now captures FotMob details for fixtures inside 48h, so the
projected XIs exist before kickoff; the Lineups tab shows the pitch
pre-match under a 'Predicted lineups' header with an honest note
(official lineups ~1h before kickoff), switching to the confirmed
view at kickoff
- Finished matches get their forecast back: the preview falls back to
the prediction frozen <=15min before kickoff (the scoreboard's
no-hindsight snapshot), with the most-likely-score chip rebuilt from
the frozen expected goals; the model card now reads 'Model's
pre-match expected goals: 1.60 - 1.02 · final score 2-1', and the
market-movement chart returns to finished matches too
- Upcoming match cards append the model's expected goals to the hint:
'Model: Brazil 64% · 1.3-0.9 goals'
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- LineupPitch: both XIs on a vertical pitch at FotMob's per-player
formation coordinates — shirt numbers, live ratings, goal badges,
formation + coach labels. Substitutes take over the outgoing player's
slot (paired through ESPN's 'X replaces Y' commentary with a unique
same-minute fallback — the sources romanize names differently), with
a subbed-off strip below; the page's live refetch keeps it current
through the match. Falls back to the list view (and hides predicted
pre-kickoff XIs) when no confirmed lineup is captured.
- /api/match-rich now serves the trimmed FotMob lineup (only complete,
fully-positioned XIs)
- Fix: vs-Market label box was too narrow — the probability bar covered
the end of 'DraftKings'
- Timeline spine no longer runs past the kick-off/full-time pills
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Design handoff steps 4-5:
- LivePage: headline live-match hero (gradient card, live ring, smallcaps
stage/venue + minute, big mono score, 3-segment in-play win-prob bar);
favorite team's live match takes the hero slot
- MatchCard: played matches as stacked team rows with the beaten side
dimmed; scheduled matches as a centered 'vs' pairing (model hint and
venue stay)
- GroupTable: Form column — tiny W/D/L bars (accent/gold/loss) computed
from finished group matches
- BracketPage: one round-selector layout on every screen size (cards in
a 2-col grid, losers dimmed), gold 'Projected champion' banner on the
Final view; what-if mode, advance bars, R32 and the third-place
play-off all unchanged
- Predict title race: leader bar, rank and percentage in gold
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Implements steps 1-3 of the Claude Design handoff:
- MatchTimeline: vertical center spine (home left, away right, minute
pills on the rail), goal cards with parsed scorer/assist/running
score, sub and booking chips, synthetic kick-off/half-time/full-time
dividers; single left rail under the sm breakpoint
- matchEvents: pure ESPN commentary parser (scorer, assist, penalty,
own goal, sub in/out, embedded score) with tests on real feed shapes
- Hero scoreboard: panel gradient + accent glow, smallcaps meta, mono
score, stat chips (xG / POTM / attendance / referee; possession and
shots while live); weather line stays for upcoming matches
- Sticky Summary/Timeline/Stats/Lineups sub-nav; all existing cards
re-bucketed with no feature loss (in-play win prob, swing chart,
xG race, shot map, momentum, odds movement, form, H2H, lineups)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The captured FotMob/FIFA/Open-Meteo data becomes visible. Match pages
now carry: a cumulative xG race with goal dots and team totals, a full-
pitch shot map (each side attacking its own end, dots sized by xG,
goals filled), the 90-minute attack-momentum chart, player-of-the-match
with rating, the official info line (stadium · attendance · referee),
and a kickoff-hour weather line for upcoming matches with an altitude
chip above 1,000m. All hand-rolled SVG on the existing token
conventions — design-ready for the upcoming visual overhaul. EN/DE
included, with an honest 'xG and ratings are FotMob estimates' note.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All twelve third-placed teams ranked by points/GD/goals under the
group grid — top 8 highlighted (they reach the Round of 32), the rest
dimmed. Appears once group play has started.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fully progressive: without VAPID keys in the environment the API says
404, the bell never renders, and the service worker addition (a push
handler via workbox importScripts — no SW strategy change) is inert.
With keys: a bell on each team page requests permission, subscribes
(one team per device) and the server diffs fixture states on every
broadcast to push Kickoff / Goal / Full time to that team's followers.
Dead endpoints (404/410) self-clean. Round-trip verified locally with
dev VAPID keys; disabled mode verified too.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ESPN's keyEvents carry participants[].athlete for goals — no text
parsing needed. The normalizer now extracts scorer/scoring/shootout
(payload versioned, with a boot backfill that re-stores summaries
saved by the old normalizer), /api/goldenboot aggregates per-player
goals (own goals and shootout kicks excluded), and the Teams page
leads with the top-10 race. Verified against tonight's real goals.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When the live connection drops, a slim notice under the header shows
the timestamp of the last snapshot — the page keeps working from it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Methodology page lists each recompute (the finished match that
triggered it) with the biggest title-odds move it caused — the model's
thinking made visible, feeding the openness story.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
/compare (also in the mobile More sheet): pick any two of the 48 —
defaults to the top title favourites — and get the model's
neutral-ground matchup plus the full head-to-head from the historical
archive (wins/draws/goals and the last six meetings).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A compact card up top: yesterday's scores at a glance and the teams
whose championship odds moved most over the last day (from the model's
recompute history), with up/down trends linking through to team pages.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A keyboard-first palette (plus a header button) that jumps to any team
page or match page — arrow keys, enter, esc; flags and kickoff days in
the results. Pure client, searches the snapshot already in memory.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
buildRatings samples each WC team's rating along the full walk (yearly
historically, monthly since 2022) into elohistory.json (~72KB, 48
teams). Team pages plot it as a clean SVG line with year and rating
gridlines — Germany's century, 1908 → today, in one glance.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The scoreboard gains a Biggest surprises card — finished matches whose
actual outcome the frozen model priced under 30%, sorted by shock
value, each linking to its match page. Pure client derivation from
data the scoreboard already had.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Once a group reaches its closing stretch (≤3 open matches), every
remaining win/draw/loss combination is enumerated and ranked with the
real tiebreaker logic. Under each table: Top 2 secured / Top 2 with a
win / Still possible (n of N outcomes) / Can't reach the top 2 — with
an honest footnote that tight cases hinge on goal difference and third
place runs through the cross-group best-thirds race. Pure, tested
enumeration in src/lib/scenarios.ts.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A star on the team page (localStorage, no accounts) pins that team's
next or running match in a My team section at the top of the Live tab.
EN/DE strings + aria-pressed on the toggle.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A wand toggle turns the bracket interactive: tap a side to send that
team through; W/L placeholders resolve down the tree (pure, tested
logic in src/lib/whatif.ts). Real results always override picks; picks
that stop making sense after an upstream change are pruned. Each open
pairing shows the model's advance probability (ratings.json fetched
lazily), and once your final resolves, a summary banner names your
champion with the model's chance of exactly that run. EN/DE included.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The odds history we have been capturing every 3h finally gets a face:
de-vigged DraftKings probabilities drift as solid lines toward
kickoff, with the model's numbers as dashed references — the honest
benchmark framing, right on the match page. Renders only when at least
two pre-kickoff lines exist. EN/DE copy included.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
While a match runs, every poll records the in-play model probability
per game state (insert-if-new on minute+score) into inplay_history.
The match page draws it as a stacked area chart — home fills from the
bottom, away from the top, the gap is the draw — with minute ticks and
a 50% guide. Shows live (under the win-probability bar) and after full
time as its own card. EN/DE strings included.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A tiny typed i18n layer (no library): en.ts is the single source of UI
copy and the clarity rewrite lives there — shorter sentences, plain
words, the dense Methodology/Scoreboard copy untangled. de.ts mirrors
its shape exactly, enforced by the compiler, with placeholder parity
covered by tests. Every page now reads from the dictionary via useT();
dates flip locale through useFormat() (en-GB/de-DE); raw server values
(status, outcome, stage) map through total records.
The header gains an EN/DE toggle (persisted, defaults from the
browser language); <html lang> stays in sync.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>