From 80683e71b473e39f386e3e5a232c276287285ad1 Mon Sep 17 00:00:00 2001 From: Kev Date: Thu, 18 Jun 2026 15:38:06 -0400 Subject: [PATCH] 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) --- BUILD-STATE.md | 72 ++++++++- CLAUDE.md | 31 ++++ src/routes/stats.js | 39 +++++ src/services/adapters/mlbStatsAdapter.js | 63 +++++++- src/services/depthChartService.js | 129 ++++++++++++++++ .../intelligence/analyzeViaEngine1.js | 56 +++++++ src/services/playerIntelService.js | 140 ++++++++++++++++-- tests/unit/depthChartService.test.js | 72 +++++++++ tests/unit/engineIntelFields.test.js | 51 +++++++ tests/unit/navDropdown.test.js | 32 ++++ tests/unit/playerIntelWiring.test.js | 89 +++++++++++ tests/unit/session43Mobile.test.js | 26 ++++ tests/unit/slateAdapterStrips.test.js | 73 +++++++++ web/public/sw.js | 2 +- web/src/app/globals.css | 3 + web/src/app/player/[name]/page.tsx | 4 +- web/src/components/GameCard.tsx | 4 +- web/src/components/Nav.tsx | 12 +- web/src/lib/slateAdapter.js | 60 ++++++++ 19 files changed, 940 insertions(+), 18 deletions(-) create mode 100644 src/services/depthChartService.js create mode 100644 tests/unit/depthChartService.test.js create mode 100644 tests/unit/engineIntelFields.test.js create mode 100644 tests/unit/navDropdown.test.js create mode 100644 tests/unit/playerIntelWiring.test.js create mode 100644 tests/unit/session43Mobile.test.js create mode 100644 tests/unit/slateAdapterStrips.test.js diff --git a/BUILD-STATE.md b/BUILD-STATE.md index 06f03f8..18dac2f 100755 --- a/BUILD-STATE.md +++ b/BUILD-STATE.md @@ -4,9 +4,75 @@ 2026-06-18 ## Current Phase -SHIP BUILD v42.0 — Player Intelligence System (archetypes, stat strips, player -profile, enhanced cards, settings, stats explorer). Built from the Claude Design -"VYNDR Player Intelligence" bundle. +SHIP BUILD v43.0 — Data pipeline wiring + P0 audit fixes + depth chart +foundation. The Session-42 Player Intelligence architecture now flows REAL data. + +## Session 43 (2026-06-18) — SHIPPED ✅ DATA PIPELINE + AUDIT FIXES + +Post-S42 Chrome audit: architecture renders but no real data flowed (every +player `found:false`, leaders empty, grade intel hidden) + a P0 dropdown bug. +Backend 2011 → **2045 tests** (+34), 163 suites. Web build clean (exit 0). + +### Phase 1 — P0 bug fixes +- **Avatar/More dropdown z-index** — the `