fix: group local teams by team_name not practice label #216
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!216
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "209-fix-local-teams-grouping"
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
Local teams section on
/scheduledisplayed 4 cards (one per practice slot labeled "16U LOCAL KINGS MON PRACTICE") instead of 2 cards grouped by team name. Root cause:groupByTeamusedp.labelas the primary grouping key instead ofp.team_name.Changes
src/routes/(public)/schedule/+page.svelte:groupByTeam: Changed grouping key fromp.label || p.team_nametop.team_name || p.labelso practices are grouped by team namekingsTravelPractices/kingsLocalPracticesfilters: Changed to checkp.team_namefirst for "Local" detection, falling back top.labelthenp.groupgroupByDay: Changed team name extraction to preferp.team_nameover regex-strippedp.labelTest Plan
/scheduleand select Kingsteam_namefield in FALLBACK_PRACTICESReview Checklist
svelte-checkpasses with 0 errors+page.sveltemodified -- no API changesteam_namefield)Related Notes
None.
Related
Closes #209
QA Review -- PR #216
Diff Analysis
1 file changed, 6 additions, 6 deletions. All changes in
src/routes/(public)/schedule/+page.svelte.Findings
Correctness -- PASS
groupByTeamnow keys onp.team_name || p.label || 'Practice'instead ofp.label || p.team_name || 'Practice'. This correctly groups all practice slots for the same team into a single card.p.team_namefirst for "Local" substring, with clean three-tier fallback chain:team_name->label->group.groupByDayteam name extraction prefersp.team_nameover regex-strippedp.label, producing cleaner display names in travel day cards.Backward Compatibility -- PASS
FALLBACK_PRACTICES) hasteam_namefields, so the fallback path still works correctly.team_name, falls back tolabelthengroup-- no breakage.Scope -- PASS
groupByDay.Build Validation -- PASS
svelte-checkpasses with 0 errors (7 pre-existing warnings in unrelated files).No issues found.
VERDICT: APPROVED