Review: Fix public schedule page to use actual API response schema
Verdict: READY
Scope is solid. All file targets verified, field mismatches confirmed in code exactly as described. Single-file fix within agent capacity. One non-blocking traceability gap (missing arch note).
Template Completeness
- [x] Type — Bug
- [x] Lineage — traced to basketball-api#279
- [x] Repo — forgejo_admin/westside-landing
- [x] What Broke — clear description of field mismatch symptoms with mismatch table
- [x] Repro Steps — 3-step reproduction with expected observations
- [x] Expected Behavior — stated clearly
- [x] Environment — prod, westside-landing frontend, basketball-api
- [x] File Targets — present with modify/reference/don't-touch lists
- [x] Acceptance Criteria — 7 items, all testable
- [x] Test Expectations — visual checks + build command
- [x] Constraints — clear (match admin approach, keep fallback, no backend changes, pure CSS)
- [x] Checklist — present
- [x] Related — project + upstream issue linked
Traceability
- [x] story:WS-S13 label — "As an admin, I want to view and manage the program schedule (practices, tournaments, games) so that I have a single source of truth for all planned activities"
- [x] story note verified — found in project-westside-basketball user-stories section (Admin list)
- [x] arch:landing-site label — public-facing static site component
- [ ] arch note MISSING — [SCOPE] Create architecture note arch-landing-site for the westside-landing public site component (non-blocking)
- [x] Forgejo issue — forgejo_admin/westside-landing#206, open
File Targets
- [x]
src/routes/(public)/schedule/+page.svelte— verified EXISTS. Confirmed field mismatches:p.group === 'travel'/'local'(line 51-52),p.team_name(line 62),event.name(line 115, 191),event.date(line 117, 193). All match ticket's mismatch table. - [x]
src/routes/(app)/admin/schedule/+page.svelte(reference) — verified EXISTS. Confirmed correct patterns:DAY_NAMES[](line 13),dayName()(line 81),formatTime()(line 91),groupByLabel()(line 48),start_date(line 68). - [x]
src/lib/public-api.js(don't-touch) — verified EXISTS.
Repo Placement
OK. Issue filed on forgejo_admin/westside-landing, fix is in westside-landing (local dir ~/westside-app). Single repo, no cross-repo concerns. API is correct — no backend changes needed.
Dependencies
- [x] Board item #739 (Seed practice_schedules table) — done. Upstream that exposed this bug.
- [x] Board item #653 (Public schedule endpoint GET /public/schedule) — done. API returns correct data.
- [x] Board item #649 (Public schedule: API-driven refactor) — done. Original refactor that introduced wrong field mappings.
No blockers. All upstream work is complete.
Acceptance Criteria
7 criteria, all verifiable by an agent:
- [x] AC 1-2 (Kings/Queens practice grouping) — testable via build + visual check. Agent can verify travel/local classification logic uses label pattern.
- [x] AC 3 (day names) — testable by verifying DAY_NAMES[] array and dayName() helper are used.
- [x] AC 4 (time format) — testable by verifying formatTime() helper is used for 12-hour conversion.
- [x] AC 5 (events render) — testable by checking event.title, event.start_date field usage.
- [x] AC 6 (fallback still works) — testable by checking fallback data shape is preserved.
- [x] AC 7 (travel/local classification) — testable by checking label.includes('Local') pattern matching logic.
All criteria are concrete and automatable. Build command provided:
npm run build.Blast Radius
Low. The wrong field names (
p.group, event.name, event.date) are ONLY used in the public schedule page. team_name appears in other files (player profiles, admin pages) but those reference player/coach objects from different API endpoints — unrelated. No downstream consumers of this page's data. Rollback is straightforward (single file revert).Decomposition Assessment
No decomposition needed.
- File targets: 1 file to modify (under 3-thing limit)
- Acceptance criteria: 7, but all are same-category field mapping changes in one Svelte component
- Estimated agent time: 3-4 minutes (under 5-minute rule)
- No independent subtasks that benefit from parallelization — all changes are in one file and interdependent
Recommendation
- [SCOPE] Create architecture note
arch-landing-sitefor the westside-landing public site component. Non-blocking — does not affect this ticket's execution.
No other issues. Ticket is ready for agent dispatch.