Skip to content

Build coach team-readiness dashboard with global metrics and athlete score table#12

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/build-team-dashboard-ui
Draft

Build coach team-readiness dashboard with global metrics and athlete score table#12
Copilot wants to merge 5 commits into
mainfrom
copilot/build-team-dashboard-ui

Conversation

Copilot AI commented May 18, 2026

Copy link
Copy Markdown

Implemented the main supervisor/coach dashboard to surface team readiness at a glance: a responsive global metrics view and an athlete-level readiness table with threshold-based severity cues. The UI now works even before backend integration by falling back to mock readiness data.

  • Dashboard scope rewritten to team readiness

    • Replaced the previous mixed map/chat/route layout in Dashboard.jsx with a coach-focused readiness dashboard.
    • Added a responsive top metrics grid for:
      • Team Average Score (circular indicator)
      • Critical Alerts (count of athletes with score < 50%)
  • Athlete readiness table

    • Added a clean data table of athletes with latest calculated score.
    • Applied required score bands:
      • Green: > 80%
      • Orange: 50–80%
      • Red: < 50%
  • Data integration + fallback behavior

    • Added polling for GET /team-readiness.
    • Added normalization/guardrails for incoming athlete records and scores.
    • If API data is unavailable/invalid, the dashboard falls back to local mock athletes to keep the UI functional.
  • Operational and accessibility refinements

    • Extracted score thresholds and conversion constants to avoid duplicated magic values.
    • Made polling interval configurable via env (VITE_TEAM_READINESS_POLL_MS).
    • Added proper progress semantics (role="progressbar" with ARIA values) and keyboard-visible row focus states.
const criticalAlerts = athletes.filter((a) => a.latestScore < CRITICAL_THRESHOLD).length;
const teamAverageScore = athletes.length
  ? Math.round(athletes.reduce((sum, a) => sum + a.latestScore, 0) / athletes.length)
  : 0;

Copilot AI linked an issue May 18, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Create team dashboard UI component for displaying global metrics Build coach team-readiness dashboard with global metrics and athlete score table May 18, 2026
Copilot AI requested a review from unoursmarin May 18, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Team Dashboard UI Component

2 participants