Review: Public schedule: API-driven refactor (re-review)
Verdict: APPROVED
Re-review of board item #649. Previous review (
review-649-2026-03-28) returned NEEDS_REFINEMENT due to a missing GET /public/schedule endpoint on basketball-api. That blocker is now resolved (PR #241 merged 2026-03-29). Issue body has been updated to fix all flagged inaccuracies.Previous Findings Resolution
- [x] BLOCKER resolved:
GET /public/scheduleendpoint merged in basketball-api PR #241 (board item #653, done) - [x] File reference fixed: Issue body now correctly references
src/lib/public-api.jswithpublicFetch()instead of the incorrectsrc/lib/api.js - [x] Prerequisite ticket created: Board item #653 (Public schedule endpoint) completed and merged
Template Completeness
- [x] Type — Feature
- [x] Lineage — Follow-up from basketball-api#230, backend merged (#232, #233), public endpoint merged (#239, PR #241)
- [x] Repo —
forgejo_admin/westside-landing - [x] User Story — Clear who/what/why for prospects and parents viewing schedule
- [x] Context — Thorough, correctly identifies data source and existing public API client
- [x] File Targets — Specific files with modify/reference/do-not-touch categories
- [x] Acceptance Criteria — 5 testable criteria including progressive enhancement
- [x] Test Expectations — Visual verification, toggle test, offline/error test, build command
- [x] Constraints — Auth requirement, API client choice, design preservation, progressive enhancement
- [x] Checklist — PR, no unrelated changes, mobile+desktop testing
- [x] Related — Links to basketball-api PRs #239, #232 and project page
All required sections present per
template-issue-feature.Traceability
- [x] story:WS-S13 label — "As a prospect or parent, I want to see the current schedule on the public website so that I know when practices and tournaments are, without the data being stale from a previous deploy."
- [x] arch:westside-app label — westside-landing SvelteKit app (public site)
- [x] Forgejo issue —
forgejo_admin/westside-landing#172, open
File Targets
- [x]
src/routes/(public)/schedule/+page.svelte— verified: exists (5.8k), contains hardcoded HTML with Kings tournaments, practice times for travel and local teams, Queens schedule. Kings/Queens toggle viaprogramStore. Confirmed refactor target. - [x]
src/routes/(public)/teams/+page.svelte— verified: exists, importspublicFetchfrom$lib/public-api.js, usesonMount+$statepattern. Valid pattern reference. - [x]
src/lib/public-api.js— verified: exists, exportspublicFetch(path)with graceful null-on-error. Returnsnullon failure, enabling progressive enhancement fallback. - [x]
src/routes/(app)/admin/schedule/+page.svelte— verified: exists, usesapiFetch('/admin/schedule')with loading/error states. Correctly listed as do-not-touch. - [x]
src/lib/api.js— verified: exists. Correctly listed as do-not-touch (authenticated client, not needed). - [~]
src/routes/(public)/coaches/+page.svelte— does NOT exist. Issue references it as a pattern example alongside teams page. Non-blocking: the teams page alone is a sufficient pattern reference. Nit only.
Repo Placement
Issue filed on
forgejo_admin/westside-landing — correct. Local checkout at ~/westside-app maps to this Forgejo repo (confirmed via git remote -v). Cross-repo dependency on basketball-api is now resolved (PR #241 merged). Single-repo scope for execution.Dependencies
- [x] Board item #653 (Public schedule endpoint GET /public/schedule) — done, PR #241 merged 2026-03-29. Previous blocker resolved.
- [x] Board item #629 (Schedule data model + migration + seed) — done, PR #234 merged
- [x] Board item #630 (Schedule API endpoints CRUD) — done, PR #236 merged
- [x] Board item #648 (Admin nav: add Schedule link) — done, PR #175 merged
- [x] Board item #639 (Admin schedule view read-only) — done, PR #168 merged
- [x] Board item #627 ([DECOMPOSED] Schedule data model + API #230) — parent, decomposed, all children done
- [i] Board item #664 (in_progress, arch:landing-site, story:WS-S13) — related but not blocking. Different arch target (landing-site vs westside-app).
No blocking dependencies remain. All prerequisite work is complete.
Acceptance Criteria
5 acceptance criteria — all testable. The
publicFetch() function returns null on error, directly enabling the progressive enhancement AC (fallback to hardcoded data). Build command (npm run build) is standard. Kings/Queens toggle uses existing programStore. An agent can verify all criteria via visual inspection + build.Blast Radius
Low. Only 1 file modified (
schedule/+page.svelte). The publicFetch() pattern is already established by the teams page — schedule follows the identical approach. No other consumers of the hardcoded schedule data. The programStore toggle is shared across public pages and unaffected. Rollback = revert single file.Decomposition Assessment
1 file target, 5 AC, single repo. Well within the five-minute rule. No decomposition needed.
Nit
Issue body references
src/routes/(public)/coaches/+page.svelte as a pattern reference, but this file does not exist in the repo. Only the teams page exists as a public API consumer. Non-blocking — the teams page is sufficient as a pattern reference. Could be corrected in the issue body for accuracy.Recommendation
No action needed. Ticket is ready for execution.