feat(soccer-app): add insights legend and resilient empty state - #32
Conversation
added 2 commits
August 10, 2026 17:17
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Task-Id: 01KZPAQCJJC32G097DMAYAX1QJ Prompt-Version: 1c9c10e027a2
…QQ/shared-orchestration-context-the-parent-epic-sever' into bgagent/01KZPAQCJJC32G097DMAYAX1QJ/shared-orchestration-context-the-parent-epic-sever
Owner
Author
|
Re-stack update Absorbed the updated predecessor branch ( Verification (run from
No feature/scope changes — maintenance re-stack only. |
Owner
Author
Background agent — COMPLETED
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the existing team insights panel (TG-13) with two improvements:
teamMetrics.ts(performanceLegend) so they stay in sync withperformanceLabel()— a single source of truth. The legend reuses the existinginsight-rating-*accent colours and conveys meaning through text as well as colour.0%win-rate copy orNaN. Instead it renders honest placeholder copy (—, "No matches played yet", "Not rated") and an adjusted summary line.winRate()already guards against divide-by-zero; the component now detectsstats.played <= 0and adapts each card's copy accordingly.Accessibility & responsiveness:
<dl>with anaria-labelledbyheading, semantic term/description pairing.@media (max-width: 768px)block).Task
TG-13: Add insights legend and resilient empty-state behavior (epic: ABCA Jira stacked corrections acceptance round 2).
Build & test results
Run inside
soccer-app(dependencies installed vianpm install):npm run build→ pass (tsc -b && vite build, 22 modules transformed, built cleanly).npm run lint→ pass (oxlint, exit 0, no warnings).No automated test suite exists in this project; changes were validated via the type-checked build and lint. Empty-state logic was reasoned through manually (existing dataset has all teams with
played > 0, so the placeholder path is defensive for future/zero-match data).Decisions
teamMetrics.tsrather than hardcoding it in the component so the descriptions can't drift from the thresholds inperformanceLabel().—) plus explanatory note as the empty-state placeholder rather than hiding cards, keeping the panel layout stable.Agent notes
insight-rating-*accent classes), which made extending it low-risk and consistent.soccer-appdependencies were not installed in the workspace (nonode_modules), sonpm run build/lintinitially failed withtsc: not found/oxlint: not found. Runningnpm installinsidesoccer-appresolved it. Note the repo build/lint runs from within thesoccer-appsubdirectory, not the repo root.soccer-app; dark theme with slate palette; meaning conveyed through both colour and text for accessibility.soccer-appdeps or documenting the install step; there is no test harness, so adding one (e.g. Vitest + Testing Library) would make future changes safer to verify.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.
🤖 Generated with Claude Code