M4: benchmark leaderboard stats - #571
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (30)
WalkthroughImplements the M4 benchmark leaderboard milestone: adds a ChangesBenchmark Leaderboard & Stats Feature
Sequence Diagram(s)sequenceDiagram
participant Browser
participant StatsLoader as "stats route loader"
participant getCompetitionLeaderboardFn
participant loadBenchmarkLeaderboardContext
participant DB
Browser->>StatsLoader: GET /compete/$slug/stats?division=X
StatsLoader->>getCompetitionLeaderboardFn: competitionId, divisionId
getCompetitionLeaderboardFn->>loadBenchmarkLeaderboardContext: scoringConfig, trackWorkouts
loadBenchmarkLeaderboardContext->>DB: battery, tests, thresholds
DB-->>loadBenchmarkLeaderboardContext: rows
loadBenchmarkLeaderboardContext-->>getCompetitionLeaderboardFn: BenchmarkLeaderboardContext
getCompetitionLeaderboardFn->>getCompetitionLeaderboardFn: annotate eventResults, aggregate Overall/100
getCompetitionLeaderboardFn-->>StatsLoader: entries with benchmarkOverallScore/tier/category
StatsLoader-->>Browser: initialStats or loadError
rect rgba(99, 179, 237, 0.5)
Note over Browser: BenchmarkStatsPage render
Browser->>Browser: gate on absolute_tier
Browser->>Browser: select division/athlete
Browser->>Browser: render BenchmarkStatLine or error/unavailable alert
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
/compete/$slug/statsstat-line route.Scope Boundary
/Users/zacjones/Downloads/HillerFit_Training_Guide.pdfis source data/provenance only. This PR does not add HillerFit-branded pages, routes, tabs, stats pages, marketing copy, logos, calls to action, visual theme, or product navigation.Verification
pnpm --filter wodsmith-start test -- test/server/benchmark-leaderboard.test.ts test/server/competition-leaderboard-capability-gates.test.ts test/components/benchmark-stat-line.test.tsx test/components/benchmark-branding-boundary.test.ts test/components/leaderboard-page-content.test.tsx test/components/competition-tabs.test.tsx test/routes/compete/benchmark-stats-route.test.tsxgit diff --checklat checkstill fails on existing Crew refs, not benchmark artifacts:lat.md/crew.mdbroken linksapps/crew/test/routes/event-import-tabs.test.tsxbroken@latrefKnown Baseline Caveat
The repo-wide pre-push hook currently fails on
pnpm --filter wodsmith-start type-checkdue to broad existing route implicit-anyerrors outside this M4 slice. I pushed this branch with--no-verifyafter focused M4 tests and touched-file compiler filtering passed.Base
This PR targets
feat/hillerfit-planand should merge there only. Do not merge intomain.mainSummary by cubic
Adds a generic benchmark leaderboard for
absolute_tiercompetitions with server-side aggregation, a new Stats tab and route, and a compact stat-line UI. Public boards now show Overall/100, rating bands, category summaries, per-test tiers, and verification states without HillerFit branding.New Features
benchmarkOverallScore, rating band, and category scores; table shows Overall/100 plus Tier/Category columns and verification labels.BenchmarkStatLinecomponent and/compete/$slug/statsroute; Stats tab appears only when settings useabsolute_tier.Refactors
settingsto conditionally show the Stats tab; route tree updated.Written for commit ee6e246. Summary will update on new commits.
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes