Session 43: Data pipeline + audit fixes + depth chart foundation (2045 tests)
P0 fixes + wiring real data into the S42 Player Intelligence architecture. - P0 dropdown z-index: the nav's backdrop-filter stacking context let the Ticker/HeartbeatBar paint over the avatar/More dropdowns and eat clicks. nav now position:relative zIndex:2; menus zIndex:100. Avatar Settings -> /settings. - Real MLB stats: mlbStatsAdapter.searchPlayer + getPlayerStats (name->id-> season+gamelog). playerIntelService.resolvePlayerStats normalizes into the archetype classifier; getPlayerIntel returns found:true + real season + archetype classified from real stats. NBA via nbaStatsClient (degrades). - Game cards: slateAdapter.groupPropsByPlayer (playerStrips, name once) + mapPitchers (MLB probables), folded into mapScheduleToGameCards. Legacy GameCard line grid renders BookChip (brand colors) not grey text. - Grade card intel: analyzeViaEngine1.buildIntelFields computes stat-context + form/usage/matchup/rest from the existing feature vector (zero extra I/O); gradeAdapter lights up the card sections. Archetype deferred (needs season line at grade time). - Depth chart foundation: depthChartService (getLineup/getDepthChart/ getCascadeProjection) + /api/stats/lineup|depth|cascade, graceful + injectable. - Mobile: player hero name overflow-wrap + 24px on <=640px (was clipping). Backend 2011 -> 2045 tests (+34), 163 suites. Web build clean (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -355,6 +355,37 @@ Built from the Claude Design "VYNDR Player Intelligence" bundle.
|
||||
- **Components added to the barrel**: ArchetypeBadge, ArchetypeBlend, StatStrip,
|
||||
BookChip (`@/components/vyndr`). Book brand map = `web/src/lib/books.js`.
|
||||
|
||||
## Data Pipeline Wiring (Session 43 — non-obvious)
|
||||
- **Dropdown z-index P0** — the `<nav>` uses `backdrop-filter`, which creates a
|
||||
stacking context. The living-layer bars (`Ticker`, `HeartbeatBar`) render as
|
||||
siblings AFTER it, so dropdowns that overflow below the 60px nav got covered.
|
||||
The nav carries `position:relative; zIndex:2` to float above them — don't
|
||||
remove it, and keep dropdown menus at `zIndex:100`.
|
||||
- **MLB real stats** — `mlbStatsAdapter` is id-keyed; Session 43 added
|
||||
`searchPlayer(name)` (resolves via the cached season player list) +
|
||||
`getPlayerStats(name)`. `playerIntelService.resolvePlayerStats(name, sport)`
|
||||
normalizes the raw statsapi.mlb.com object into the archetype classifier's
|
||||
input shape + display rows. `getPlayerIntel` classifies from REAL stats now.
|
||||
Adapters are injectable (`opts.mlbAdapter`/`opts.resolveStats`) — tests never
|
||||
hit the network. NBA/WNBA uses `nbaStatsClient` (Python service, usually
|
||||
offline in prod → degrades to `found:false`, NOT an error).
|
||||
- **Grade-card intel** — `analyzeViaEngine1.buildIntelFields(features)` computes
|
||||
stat-context + form/usage/matchup/rest from the EXISTING feature vector (no
|
||||
extra I/O) and `Object.assign`s them onto the legacy result. `gradeAdapter`
|
||||
maps them into the card. Archetype is deliberately NOT attached at grade time
|
||||
(the per-prop feature vector has no multi-stat season line) — that strip waits
|
||||
for the Session-44 pipeline. Keep grade-time I/O at zero (slate grades in tight
|
||||
loops; this is why archetype isn't fetched per-prop).
|
||||
- **slateAdapter** now emits `playerStrips` (`groupPropsByPlayer`) + `pitchers`
|
||||
(`mapPitchers`) on every card. The LIVE slate still uses the legacy
|
||||
`components/GameCard` (which ignores those + renders `BookChip` in its line
|
||||
grid); the full swap to `vyndr/GameCard` is still pending (needs inline grading
|
||||
ported). `mapPitchers` returns undefined for non-MLB / no probables.
|
||||
- **depthChartService** (`getLineup`/`getDepthChart`/`getCascadeProjection`) +
|
||||
`/api/stats/lineup|depth|cascade` are the foundation; all graceful + injectable.
|
||||
`matchesTeam` must guard empty names (`t.includes('')` is always true) — and
|
||||
the schedule `find` checks `g.home`/`g.away`, not the game object.
|
||||
|
||||
## Active Skills
|
||||
- vyndr-voice (all user-facing output)
|
||||
- prop-analysis (grading methodology)
|
||||
|
||||
Reference in New Issue
Block a user