fix: generalize registration form and add team preference #234
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!234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "233-fix-registration-form"
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
Removes tryout-specific language from the registration form to make it suitable for general 2026 season registration. Adds a team preference dropdown that fetches available teams from the API and filters by division.
Changes
src/routes/(app)/register/+page.svelte:teamPreferencestate + teams fetch from/public/teamson mountteam_preferenceto POST payload (sends team name string or null)Test Plan
team_preference: nullReview Checklist
Related
Related Notes
N/A
QA Review — PR #234
Summary
Single-file change to
src/routes/(app)/register/+page.svelte(30 additions, 7 deletions). Generalizes registration form language and adds team preference dropdown.Findings
All requested changes verified:
team_preferenceadded to POST payload asteamPreference || null-- correctCode quality:
API_BASEfrom$lib/api.js-- consistent with codebase/public/teamsis unavailablefilteredTeamsuses$derivedcorrectly for reactive filteringteamPreferenceto empty string viaonchangehandlerfilteredTeams.length > 0-- no empty dropdownform-group,form-label,form-selectclasses -- no new CSS neededNo issues found.
VERDICT: APPROVED
PR #234 Review
DOMAIN REVIEW
Stack: SvelteKit (Svelte 5 runes), pure CSS, single-file change.
SvelteKit / Svelte 5 patterns:
$stateand$derivedrunes forteamPreference,teams, andfilteredTeams.onMountfetch with.catch(() => {})-- graceful degradation if teams endpoint is unavailable. Good.onchangehandler resetsteamPreferenceto'', preventing stale selection across division switches.{#if filteredTeams.length > 0}) correctly hides the dropdown when no teams match the selected division.team_preference: teamPreference || nullcorrectly sendsnullwhen no preference is selected (empty string is falsy).Accessibility:
<label>withfor="team-preference"matching the<select>id.<div class="form-note">provides context.CSS:
form-group,form-label,form-select,form-note. Consistent with the rest of the form.BLOCKERS
None.
team_preferencesends a string from a controlled<select>dropdown (server-populated options) or null. No free-text injection surface.NITS
Stale
registrationTypevalue: The radio button value is still'tryout'and the state initializes as'tryout'. The label now reads "Registration ($30)" but the submitted value remainsregistrationType: 'tryout'. This is cosmetic if the API expects'tryout'as the enum value, but worth tracking as discovered scope if it should be renamed to something like'standard'in a future pass.Type annotation style:
/** @type {{ name: string, division: string }[]} */is fine JSDoc, but if the repo ever adopts.svelte.tsmodules, this could become a proper TypeScript interface. Not blocking.SOP COMPLIANCE
233-fix-registration-formfollows{issue-number}-{kebab-case-purpose}conventionPROCESS OBSERVATIONS
Clean, focused PR. Single file change with no scope creep. The test plan in the PR body is thorough and covers all verification points. The team preference feature degrades gracefully -- fetch failure does not break the form. Change failure risk is low.
The
registrationType === 'tryout'enum value surviving this rename pass is minor technical debt worth a follow-up ticket if the API side wants to generalize.VERDICT: APPROVED