Review: T6: wire components to render from data
Verdict: READY
Template Completeness
- [x] Type — Feature
- [x] Lineage — sub-ticket of forgejo_admin/westside-contracts#34, wave 3
- [x] Repo — forgejo_admin/westside-contracts
- [x] User Story — "As a parent viewing a contract, I see tournaments, practices, payments, and sections rendered from structured data so that my contract reflects my child's actual deal."
- [x] Context — clear before/after with code examples showing 3-branch collapse to 1 data-driven flow
- [x] File Targets — 2 targets with explicit do-not-touch list
- [x] Acceptance Criteria — 11 criteria covering all rendering paths and specific player contracts
- [x] Test Expectations — npm test + npm run check + manual comparison
- [x] Constraints — fallback parity, Svelte 5 runes, app.css only, variant-driven branding
- [x] Checklist — PR, tests, no unrelated changes, no visual regression, custom contracts
- [x] Related — parent issue #34, board note, dependency links to #35 and #36
Traceability
- [x] story:WS-S20 — "As a parent, I want to sign contracts digitally so that paperwork is handled online"
- [x] story note verified — found in project-westside-basketball user-stories section (Parent stories list)
- [x] arch:contracts — contracts component
- [x] arch note verified — arch-contracts-westside-basketball exists in pal-e-docs (doc, active)
- [x] Forgejo issue — forgejo_admin/westside-contracts#37, state: open
File Targets
- [x]
src/routes/contract/[token]/+page.svelte— verified: file exists, contains the three {#if isLocal/isGirls} branches described in the ticket (lines 171, 214, 389) - [x]
src/lib/components/*.svelte— directory does NOT exist on main yet. Expected: T4 (#35, extract components) is in QA column and must merge first. Dependency correctly documented in the issue.
Repo Placement
OK. Issue filed on westside-contracts, all file targets are in westside-contracts. Single-repo scope. No cross-repo concerns.
Dependencies
- [x] T4 (westside-contracts #35) — extract Svelte components from monolith. Status: QA (pending merge). MUST merge before T6 starts.
- [x] T5 (westside-contracts #36) — data-driven page.server.ts + merge logic. Status: QA (pending merge). MUST merge before T6 starts.
- Both dependencies are explicitly documented in Lineage, Context, and Related sections.
Acceptance Criteria
11 criteria. All are testable:
- AC 1-7: rendering behavior (config present vs null, component-level checks, variant branding) — verifiable by visual inspection and DOM checks
- AC 8-9: specific player contracts (Kiana $100/2 tournaments, Kelsie $200/local) — verifiable against known player data
- AC 10: no regression for standard contracts — verifiable by side-by-side comparison
- AC 11: signing flow works — verifiable via E2E test
Test command
npm test && npm run check is real and executable.Blast Radius
Low. Changes isolated to contract page template layer. Explicitly excludes: signing endpoint, DB queries, MinIO uploads, outbox events, CSS, and utility modules. No other repos consume these components. Fallback path (config=null) ensures existing contracts render identically during rollout. Rollback is straightforward — revert the single PR.
Decomposition Assessment
2 file targets, 1 repo. The 11 ACs are verification variants of a single rendering refactor (collapse 3 hardcoded branches into 1 data-driven flow + null fallback). No independent subtasks that could be parallelized — it is one coherent template change. Estimated agent work: ~5 minutes. No decomposition needed.
Recommendation
No action needed. Scope is solid, traceability complete, file targets verified, dependencies documented. Do not dispatch agent until T4 (#35) and T5 (#36) both pass QA and merge to main.