Session 42: Player Intelligence System — archetypes, stat strips, player profile, enhanced cards (2011 tests)
Built from the Claude Design "VYNDR Player Intelligence" bundle (10 sections). - Archetypes: src/services/archetypeService.js — 41 archetypes (15 NBA / 5 WNBA-unique / 15 MLB / 6 soccer), classify -> primary+secondary+blend. Frontend visual map web/src/lib/archetypes.js (colors verified == backend). ArchetypeBadge (full/ghost/tint + glyphs) + ArchetypeBlend (DNA bar). - StatStrip (compact/expanded): player name once, horizontal mono stats, inline GradeBadge props, onPlayerClick -> profile. - Stats API: extended src/routes/stats.js with /player/:name, /leaders, /game/:id (rate-limited). Aggregation in playerIntelService.js (sanitizes name param; grades cache; graceful on cold cache). Next proxies added. - Player Profile /player/[name]: all 9 design sections, graceful empty states. - Enhanced GameCard (MLB pitchers + player-grouped StatStrips) + GradeResultCard (archetype strip + stat context + VYNDR intelligence, optional/self-hiding via gradeAdapter.buildIntelFields). Player-name links wired everywhere. - Settings page replaces the S41 redirect (account/subscription/notifications/ display/responsible-play/danger-zone with DELETE-gated delete). LINKS to the real /settings/security MFA page — does not replace it. + BookChip. - Bonus: Stats Explorer /explore (real /api/stats/leaders leaderboard); added Explore + Settings to Nav MORE. Deferred (need data pipelines, Session 43): Team Hub, Offseason Intel, Slate redesign, Stats Explorer sub-panels. Backend 1940 -> 2011 tests (+71), 157 suites. Web build clean (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,10 +24,12 @@ describe('Session 41 — backend MLB stat_type whitelist', () => {
|
||||
});
|
||||
|
||||
describe('Session 41 — broken-route redirects', () => {
|
||||
it('/settings redirects to /profile', () => {
|
||||
// Session 42 — /settings is now a real settings page (replaced the S41
|
||||
// redirect). The 404 it fixed is still fixed; the route just renders content.
|
||||
it('/settings is a real page (no longer a redirect stub)', () => {
|
||||
const src = read('app/settings/page.tsx');
|
||||
expect(src).toContain("from 'next/navigation'");
|
||||
expect(src).toContain("redirect('/profile')");
|
||||
expect(src).not.toContain("redirect('/profile')");
|
||||
expect(src).toContain('DANGER ZONE');
|
||||
});
|
||||
|
||||
it('/report redirects to /blog (THE REPORT link target)', () => {
|
||||
|
||||
Reference in New Issue
Block a user