feat: add registration type selector (tryout $30 / remote eval $40) #167
No reviewers
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!167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "165-registration-type-selector"
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?
Summary
Adds a registration type selector (radio buttons) to the registration form, allowing players to choose between "Tryout Registration ($30)" and "Remote Evaluation ($40)". All price displays update dynamically based on selection.
Changes
src/routes/(app)/register/+page.svelte— AddedregistrationType,price, andpriceCentsstate/derived variables. Added radio button group for registration type before payment method selector. Updated price note, "Pay Online" label, and submit button text to use derivedprice. Addedregistration_typeto the API payload. Remote evaluation option shows explanatory note when selected.Test Plan
/register— verify "Tryout Registration ($30)" is selected by defaultReview Checklist
payment-optionstyling — no new CSS neededrole="radiogroup"witharia-labelledbyregistration_typeincluded in API payloadRelated
Related Notes
N/A — no pal-e-docs notes for this change.
QA Review — PR #167
Scope: 1 file changed, 22 additions, 3 deletions (after fix: 21 additions, 4 deletions).
Findings
priceCentsvariable —priceCentswas declared as a$derivedbut never referenced in the template or payload. Removed in follow-up commite89618c.Checklist
svelte-checkpasses with 0 errorsregistrationType,price) correctly wired with$state/$derivedbind:group— standard Svelte 5 patternregistration_typesent in API payloadrole="radiogroup"witharia-labelledbyon registration type selectorpayment-optionCSS class — no style drift{issue}-{slug}conventionVERDICT: APPROVED
PR #167 Review
DOMAIN REVIEW
Stack: SvelteKit (Svelte 5 runes), vanilla CSS, Stripe integration.
Correctness verified:
registrationTypestate defaults to'tryout'-- correctpriceis$derivedfromregistrationType(30 vs 40) -- reactive, correctgetSubmitText()(line 81) -- confirmedregistration_typeincluded in API payload (line 122) -- confirmedregister.py:1143validatesLiteral["tryout", "remote"]with default"tryout"-- frontend values match exactlyregistration_typefor webhook reconciliation (line 1365) -- full chain is wiredAccessibility:
role="radiogroup"witharia-labelledby="reg-type-label"-- correct.payment-optionstyling pattern from payment method selector -- consistent UX and no new CSS neededComponent quality:
$stateand$derivedrunesform-notefor remote evaluation is a good UX touch -- appears only when relevantBLOCKERS
None.
This is a frontend-only SvelteKit repo with zero test infrastructure (no test files exist outside node_modules). The "new functionality with zero test coverage" blocker does not apply -- there is no test framework configured in this repo to write tests against. The backend (basketball-api) already has test coverage for
registration_typeintests/test_promo_registration.pycovering: tryout default, remote selection, Stripe metadata propagation, and webhook persistence.NITS
PR body mentions
priceCentsas a derived variable but it does not exist in the code. The PR body "Changes" section says "AddedregistrationType,price, andpriceCentsstate/derived variables" --priceCentswas never implemented (backend handles cents conversion at line 1344). Minor documentation inaccuracy.Stripe success page still says "Your tryout registration is confirmed" (line 193) and "Attend tryouts on the date listed" (lines 200, 530). These are pre-existing and outside this PR's diff, but now that remote evaluation exists as a registration type, these messages could confuse remote registrants. Recommend a follow-up ticket to make confirmation text dynamic based on registration type (would require passing
registration_typethrough the Stripe redirect or storing it in session/localStorage).SOP COMPLIANCE
165-registration-type-selectorreferences issue #165PROCESS OBSERVATIONS
'tryout'preserves existing behavior). Backend already supports the field with proper validation and defaults.Literal["tryout", "remote"]constraint on the backend prevents invalid values.VERDICT: APPROVED