fix(baseball): distinct effectiveness-review badges (#498)#643
Conversation
…able reviews as regression (#498) EffectivenessReviewRow treated any non-'improved' direction as a regression, so 'no_change' and null (insufficient sample) rendered as a red "Moved the wrong way" badge — misleading coaches into thinking neutral/inconclusive practice reviews hurt performance. Add an effectivenessPresentation() helper (mirroring verdictPresentation) that maps each direction to distinct copy, tone, and glyph: - improved -> success "Associated improvement" (trending up) - regressed -> danger "Moved the wrong way" (trending down) - no_change -> secondary "Held steady" (minus) - null -> secondary "Not enough data" (help) Only 'regressed' uses danger styling now. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017VUauUXsm9aXegShmpJi5n
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Summary by QodoFix effectiveness-review badges for regressed/no-change/unknown directions
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
🤖 Mission Control — PR summary Changes: Adds |
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
What & why
EffectivenessReviewRowinStaffDecisionRoomClient.tsxtreated any non-improveddirection as a regression, so'no_change'(metric held steady) andnull(insufficient sample) rendered as a red "Moved the wrong way" badge. Coaches were misled into thinking neutral or inconclusive practice-effectiveness reviews had hurt performance.The read model (
effectiveness.ts) already maps DB directions to the honest union'improved' | 'regressed' | 'no_change' | null— the UI just wasn't honoring all four.Fix
Added an
effectivenessPresentation()helper (mirroring the existingverdictPresentation()pattern in the same file) that maps each direction to distinct copy, tone, and glyph:improvedregressedno_changenullOnly
regresseduses danger styling now.Acceptance criteria
improved,regressed,no_change, andnulleach have distinct badge copy/tone.no_change/nullnever use danger styling (both rendersecondary).Scope: single UI file (
StaffDecisionRoomClient.tsx). No migration, no read-model or server-action changes.🤖 Generated with Claude Code