Fix public schedule page to use actual API response schema #206
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/westside-app#206
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
Discovered while seeding
practice_schedulestable (basketball-api#279). API returns 17 practices correctly, but public schedule page renders nothing because field names don't match.Repo
forgejo_admin/westside-landingWhat Broke
The public schedule page at
/schedulewas built against hardcoded fallback data shapes, not the actual/public/scheduleAPI response. With real data in the database, practices and events don't render because the frontend references fields that don't exist in the API response.Repro Steps
/scheduleon westside-appp.groupis undefined so all filter results are emptyField Mismatches
p.group === 'travel'/'local'groupfieldp.team_namep.labelp.day_of_week= "Monday" (string)p.day_of_week= 0 (integer)p.start_time= "7:00 PM"p.start_time= "19:00".replace(':00','')gives "19" not "7 PM"event.nameevent.titleevent.dateevent.start_date/event.end_dateExpected Behavior
Public schedule page renders all 17 practices and any events from the API, with human-readable day names and 12-hour time formatting.
Environment
/public/scheduleendpoint (confirmed returning 17 practices)File Targets
Files the agent should modify:
src/routes/(public)/schedule/+page.svelte— fix field mappings, add day/time formatters, classify travel vs localReference (correct implementation):
src/routes/(app)/admin/schedule/+page.svelte— already uses correct API schema (DAY_NAMES[],p.label,start_date,groupByLabel())Files the agent should NOT touch:
src/lib/public-api.js— API client is correctsrc/lib/api.js— admin API client is correctAcceptance Criteria
Test Expectations
/scheduleshows all Kings practices grouped correctlynpm run build(no build errors)Constraints
DAY_NAMES[]array for day mapping, format times with a helperChecklist
Related
westside-basketball— project this affectsforgejo_admin/basketball-api#279— data seeding ticket that exposed this bugScope Review: READY
Review note:
review-757-2026-04-03All file targets verified — field mismatches confirmed in code exactly as described. Admin reference implementation has correct patterns (DAY_NAMES[], formatTime(), groupByLabel(), start_date). Single-file fix, well under 5-minute agent threshold.
arch-landing-site(non-blocking, does not affect execution)