Review: Coach profile page contract (Mismatch 8)

review-745-2026-04-03 Doc

review needs-refinement

Verdict: NEEDS_REFINEMENT

Template Completeness

  • [x] Type — Feature
  • [x] Lineage — References spike #278
  • [x] Repo — forgejo_admin/westside-landing (primary) + optionally forgejo_admin/basketball-api
  • [x] User Story
  • [x] Context
  • [x] File Targets
  • [x] Acceptance Criteria (4 items, 1 optional)
  • [x] Test Expectations
  • [x] Constraints
  • [x] Checklist
  • [x] Related

Traceability

  • [x] story:WS-S12 label — verified in project-westside-basketball user-stories
  • [x] arch:westside-app label — present on board item
  • [ ] arch note MISSING — [SCOPE] Create architecture note arch-westside-app
  • [x] Forgejo issue — forgejo_admin/basketball-api#285, open

File Targets

  • [x] src/routes/(app)/coaches/[id]/+page.svelte (westside-app) — verified: Line 55 uses coach.title which confirms the mismatch. API returns coach.role, frontend reads coach.title. Line 95 already uses coach.teams.
  • [ ] File target path mismatch — [BODY] Issue says src/routes/coaches/[id]/+page.svelte but actual path is src/routes/(app)/coaches/[id]/+page.svelte
  • [x] src/basketball_api/routes/coaches_api.py — verified: CoachProfileResponse at line 59 has id, name, email, phone, role, onboarding_status, teams. No photo_url or bio fields.

Repo Placement

ISSUE: The Forgejo issue is filed on basketball-api (#285) but the primary work is in westside-landing (frontend field mapping fix). The board item has arch:westside-app label, which is correct for the primary work. However, the issue should be filed on westside-landing since that is where the primary fix lives. The optional API enrichment (photo_url, bio) is secondary scope that should be a separate ticket if pursued.

Dependencies

  • [x] No blocking dependencies. API already returns role — frontend just needs to read it.
  • [ ] AC for team_name derivation says use coach.teams[0]?.name — frontend already uses coach.teams array (line 95). Need to verify the exact derivation logic.

Acceptance Criteria

4 AC items (1 optional). The required ACs are clear and testable. The optional API AC (photo_url, bio) adds scope ambiguity — should be in a separate ticket or explicitly marked as out-of-scope.

Blast Radius

Frontend-only fix for the required work. Low blast radius — changing one field reference (title to role) and one derivation. Rollback is trivial.

Decomposition Assessment

If scoped to frontend-only (the required work): 1 file, 2 AC, <5 minutes. No decomposition needed. If the optional API work is included: cross-repo, needs split. Current "optional" framing creates ambiguity for an executing agent.

Recommendation

  • [BODY] Fix frontend file path: src/routes/coaches/[id]/+page.svelte should be src/routes/(app)/coaches/[id]/+page.svelte
  • [BODY] Move this issue to the westside-landing repo (or create a new issue there) since the primary work is a frontend fix. The current issue is filed on basketball-api but arch label is westside-app.
  • [BODY] Remove the "(Optional)" API AC (photo_url, bio) from this ticket. If desired, create a separate basketball-api ticket for coach profile enrichment.
  • [SCOPE] Create architecture note arch-westside-app