Add coach_name, team_id, height to parent dashboard AccountPlayerResponse #282

Closed
opened 2026-04-03 16:57:29 +00:00 by forgejo_admin · 1 comment

Type

Feature

Lineage

Related to forgejo_admin/basketball-api#278 (spike: audit API response contract mismatches with westside-landing frontend)

Repo

forgejo_admin/basketball-api

User Story

As an admin/coach/parent, I want the app to display complete player, parent, and coach information so that I can manage the program without missing data.

Context

Spike Mismatch 3: The parent dashboard (/account routes) returns AccountPlayerResponse which is missing coach_name, team_id, and height. Parents need to see their child's coach, team identifier, and height on the dashboard.

File Targets

  • src/basketball_api/routes/account.pyAccountPlayerResponse model + endpoint logic

Acceptance Criteria

  • AccountPlayerResponse includes coach_name: Optional[str]
  • AccountPlayerResponse includes team_id: Optional[int]
  • AccountPlayerResponse includes height: Optional[str]
  • Fields populated from player's team/coach/profile relationships
  • All existing tests pass

Test Expectations

  • Unit test verifying new fields in account player response
  • Test with player not assigned to a team (fields should be null)

Constraints

  • Priority: MEDIUM

Checklist

  • Implementation complete
  • Tests written and passing
  • ruff format and ruff check clean
  • PR submitted
### Type Feature ### Lineage Related to forgejo_admin/basketball-api#278 (spike: audit API response contract mismatches with westside-landing frontend) ### Repo forgejo_admin/basketball-api ### User Story As an admin/coach/parent, I want the app to display complete player, parent, and coach information so that I can manage the program without missing data. ### Context Spike Mismatch 3: The parent dashboard (`/account` routes) returns `AccountPlayerResponse` which is missing `coach_name`, `team_id`, and `height`. Parents need to see their child's coach, team identifier, and height on the dashboard. ### File Targets - `src/basketball_api/routes/account.py` — `AccountPlayerResponse` model + endpoint logic ### Acceptance Criteria - [ ] `AccountPlayerResponse` includes `coach_name: Optional[str]` - [ ] `AccountPlayerResponse` includes `team_id: Optional[int]` - [ ] `AccountPlayerResponse` includes `height: Optional[str]` - [ ] Fields populated from player's team/coach/profile relationships - [ ] All existing tests pass ### Test Expectations - Unit test verifying new fields in account player response - Test with player not assigned to a team (fields should be null) ### Constraints - Priority: MEDIUM ### Checklist - [ ] Implementation complete - [ ] Tests written and passing - [ ] `ruff format` and `ruff check` clean - [ ] PR submitted ### Related - Spike: forgejo_admin/basketball-api#278 (Mismatch 3)
Author
Owner

Scope Review: READY

Review note: review-742-2026-04-03
Single-repo, single-file. AccountPlayerResponse (line 26) confirmed missing coach_name, team_id, height.

  • [SCOPE] Create architecture note arch-basketball-api
## Scope Review: READY Review note: `review-742-2026-04-03` Single-repo, single-file. AccountPlayerResponse (line 26) confirmed missing coach_name, team_id, height. - `[SCOPE]` Create architecture note arch-basketball-api
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/basketball-api#282
No description provided.