80683e71b4
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>
33 lines
1.4 KiB
JavaScript
33 lines
1.4 KiB
JavaScript
// Session 43 — P0: avatar/More dropdowns must be clickable above the living-layer
|
|
// bars (Ticker + HeartbeatBar). Asserted in source: the nav floats above them
|
|
// and the menus carry an explicit z-index.
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
const WEB = path.join(__dirname, '..', '..', 'web', 'src');
|
|
const nav = fs.readFileSync(path.join(WEB, 'components', 'Nav.tsx'), 'utf8');
|
|
|
|
describe('Nav dropdown z-index (P0 fix)', () => {
|
|
it('the nav element floats above the ticker/heartbeat (position+zIndex on the stacking-context nav)', () => {
|
|
// The nav block carries backdrop-filter; it must also set position+zIndex.
|
|
const navBlock = nav.slice(nav.indexOf('<nav'), nav.indexOf('backdropFilter') + 200);
|
|
expect(navBlock).toMatch(/position: 'relative'/);
|
|
expect(navBlock).toMatch(/zIndex: 2/);
|
|
});
|
|
|
|
it('the dropdown menus declare a high z-index', () => {
|
|
const menuZ = (nav.match(/zIndex: 100/g) || []).length;
|
|
expect(menuZ).toBeGreaterThanOrEqual(2); // More + avatar menus
|
|
});
|
|
});
|
|
|
|
describe('Nav links (Session 42/43)', () => {
|
|
it('MORE includes Explore and Settings -> /settings', () => {
|
|
expect(nav).toContain("label: 'Explore', href: '/explore'");
|
|
expect(nav).toContain("label: 'Settings', href: '/settings'");
|
|
});
|
|
it('avatar dropdown Settings links to /settings (not /settings/security)', () => {
|
|
expect(nav).toContain('href="/settings" role="menuitem"');
|
|
});
|
|
});
|