Session 51: Complete Team Hub (2234 tests)
Research-depth team view: /team/[abbr] with roster, archetypes, stats, props.
- Team API: mlbStatsAdapter.getTeams/resolveTeam/getTeamRoster (statsapi, abbr→id
+ active roster, cached). teamService.getTeamHub assembles roster → per-player
season stats (bounded concurrency) + archetype (snapshot grade or classify) +
tonight's graded props from grades:{sport}; whole hub cached 15min. MLB real;
NBA/WNBA graceful snapshot roster. GET /api/team/:abbr (404 unknown) + proxy.
- Team Hub page: server page.tsx (generateMetadata) + TeamHub client — header,
sort (archetype/graded/A-Z), archetype filter chips, roster rows (archetype +
player link + position + stats + graded props + parlay "+"), "No active props"
greyed state, loading/error.
- Game cards: team abbreviations are now TeamLinks → /team/:abbr?sport= (green
hover, stops propagation). Team Hub has "← Back to Slate".
Backend 2215 -> 2234 tests (+19), 190 suites. Web build clean (exit 0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+32
-2
@@ -4,8 +4,38 @@
|
||||
2026-06-18
|
||||
|
||||
## Current Phase
|
||||
SHIP BUILD v50.0 — Parlay Lab: correlation-aware combined grading, live slip,
|
||||
"+" on every graded prop, tier-gated panel. The Desk-tier differentiator.
|
||||
SHIP BUILD v51.0 — Team Hub: /team/[abbr] roster with archetypes, season stats,
|
||||
graded props; clickable team abbrs on every game card. Research depth.
|
||||
|
||||
## Session 51 (2026-06-19) — SHIPPED ✅ TEAM HUB
|
||||
|
||||
Backend 2215 → **2234 tests** (+19), 190 suites. Web build clean (exit 0).
|
||||
New routes: `/team/[abbr]`, `/api/team/[abbr]`.
|
||||
|
||||
### Phase 1 — team data API
|
||||
- `mlbStatsAdapter` gained `getTeams()` / `resolveTeam(abbr)` (statsapi
|
||||
`/teams?sportId=1`, cached 24h, abbr→id) + `getTeamRoster(teamId)` (active
|
||||
roster, cached 6h).
|
||||
- `src/services/teamService.js getTeamHub(sport, abbr)` assembles the hub:
|
||||
resolve team → roster → per-player season stats (bounded concurrency 8, reuses
|
||||
playerIntelService mappers) → archetype (from the snapshot grade, else
|
||||
classify) → tonight's graded props (from `grades:{sport}`). Whole result cached
|
||||
15 min. MLB = real; NBA/WNBA = a snapshot-built partial roster (graceful note).
|
||||
- `GET /api/team/:abbr` (public, 404 on unknown MLB team) + Next proxy.
|
||||
|
||||
### Phase 2 — Team Hub page
|
||||
`team/[abbr]/page.tsx` (server, `generateMetadata`) + `TeamHub.tsx` (client):
|
||||
team header + sport badge, sort (archetype / graded / A–Z), archetype filter
|
||||
chips, roster rows (archetype badge + player link + position + horizontal stats
|
||||
+ graded props with grade badges + parlay "+"), "No active props" greyed state,
|
||||
loading/error states.
|
||||
|
||||
### Phase 3 — game card team links + back nav
|
||||
`vyndr/GameCard` team abbreviations are now `TeamLink`s → `/team/:abbr?sport=`
|
||||
(green hover, stops propagation from the open-game handler). Team Hub has
|
||||
"← Back to Slate".
|
||||
|
||||
## Session 50 (2026-06-19) — SHIPPED ✅ PARLAY LAB
|
||||
|
||||
## Session 50 (2026-06-19) — SHIPPED ✅ PARLAY LAB
|
||||
|
||||
|
||||
Reference in New Issue
Block a user