Frontend: fix coach profile field mapping (title→role, team_name derivation) #285
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#285
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Related to forgejo_admin/basketball-api#278 (spike: audit API response contract mismatches with westside-landing frontend)
Repo
forgejo_admin/westside-landing
Note: This issue is filed on basketball-api but the work is entirely in westside-landing. The executing agent should open the PR on westside-landing.
User Story
As an admin/coach/parent, I want the coach profile page to correctly display the coach's role and team name so that information is accurate.
Context
Spike Mismatch 8: The coach profile page has two field mapping bugs:
coach.title(line 55) but the API returnscoach.role. Fix: changecoach.titletocoach.role.team_namefromcoach.teams[0]?.name— the teams array is already available (line 95 usescoach.teams).The API already returns the correct data (
CoachProfileResponsehasrole,teamsarray). This is purely a frontend field-name fix.File Targets
Files to modify:
src/routes/(app)/coaches/[id]/+page.svelte— changecoach.titletocoach.role(line 55). Deriveteam_namefromcoach.teams[0]?.name.Files NOT to touch:
src/basketball_api/routes/coaches_api.py— API already returns correct fieldsAcceptance Criteria
coach.roleinstead ofcoach.titleteam_namefromcoach.teams[0]?.nameTest Expectations
Constraints
Checklist
Related
src/basketball_api/routes/coaches_api.py(CoachProfileResponse already has role + teams)Scope Review: NEEDS_REFINEMENT
Review note:
review-745-2026-04-03Repo placement mismatch and scope ambiguity need resolution.
[BODY]Fix frontend file path:src/routes/coaches/[id]/+page.svelteshould besrc/routes/(app)/coaches/[id]/+page.svelte[BODY]Move issue to westside-landing repo — primary work is a frontend fix (coach.title -> coach.role), but issue is filed on basketball-api.[BODY]Remove "(Optional)" API AC (photo_url, bio) — creates ambiguity for executing agent. Split to separate ticket if desired.[SCOPE]Create architecture note arch-westside-appFix coach profile page: role field mapping + optional photo_url/bioto Frontend: fix coach profile field mapping (title→role, team_name derivation)Scope Review: APPROVED (re-review after refinement)
Review note:
review-745-2026-04-03-v2Issue re-scoped: removed optional API photo_url/bio, fixed file path to include (app) route group, re-typed as Bug (field mapping fix). Issue remains on basketball-api but body explicitly directs PR to westside-landing. 1 file, 3 AC, <5 min.