Review: custom_notes field on player — renders additional terms on contract page
Verdict: READY
Template Completeness
- [x] Lineage
- [x] Repo (correctly identifies both basketball-api and westside-contracts)
- [x] User Story
- [x] Context (gas stipend players with IDs)
- [x] File Targets
- [x] Acceptance Criteria
- [x] Test Expectations
- [x] Constraints
- [x] Checklist
- [x] Related
File Targets
- [x]
basketball-api/alembic/versions/020_add_custom_notes_to_player.py— verified: migration exists on main, adds TEXT nullable column - [x]
basketball-api/src/basketball_api/models.py— verified:custom_notes: Mapped[str | None]at line 206 on main - [x]
westside-contracts/src/routes/contract/[token]/+page.server.ts— verified: includescustom_notes: player.custom_notesin returned data (line 40) on main - [x]
westside-contracts/src/lib/types.ts— verified:custom_notes: string | nullat line 15 on main - [x]
westside-contracts/src/routes/contract/[token]/+page.svelte— verified: renders "Additional Terms" section at lines 406-413 on main, between contract body and signing section, conditionally onplayer.custom_notes
Repo Placement
OK. Issue is filed on westside-contracts but correctly identifies basketball-api as needing the migration. Both repos are accounted for. The cross-repo nature is documented in the Repo and Checklist sections.
Dependencies
- Phase 14 (Billing Tiers & Contracts) is in_progress on the board — no blocker
- No board item exists yet for this specific issue (westside-contracts #19) — the board item metadata was provided but not yet created on board-westside-basketball
- E2E walkthrough (westside-contracts #7, board item 330) is in next_up and depends on other items but not this one
- No blocking dependencies identified
Acceptance Criteria
All five criteria are testable and verifiable by an agent:
- Column existence — verifiable via
alembic upgrade head - Conditional rendering — verifiable by loading contract page with/without custom_notes
- Section placement — verifiable in template source (confirmed: between contract body div and signing section div)
- No-change for empty — verifiable by Svelte conditional
{#if player.custom_notes} - Build/tests —
npm run build && npm testfor westside-contracts; pytest for basketball-api
Blast Radius
- westside-app: no references to custom_notes — not affected
- The SQL query in +page.server.ts uses
SELECT p.*so new columns are automatically included — no query change needed - basketball-api endpoints that serialize Player objects may expose custom_notes in API responses — low risk since it's nullable and read-only
- Constraint says "no admin UI" and "set via direct DB update" — acceptable for 5 known players
Important Observation
All described work is already implemented and merged to main in both repos. Feature branches
19-add-custom-notes-to-player (basketball-api) and 19-render-custom-notes-on-contract (westside-contracts) exist but are at the same commit as main — indicating the work was completed as part of prior PRs. An agent executing this issue would find nothing to implement.The issue may have been filed retroactively to document work already done, or the work was folded into another PR before this issue was created.
Recommendation
Scope is solid and all file targets are verified. The issue can be closed as already implemented, or the feature branches can be used to add tests specific to the custom_notes rendering. No refinement needed for the spec itself — it accurately describes the implemented behavior.