fix: restore Sep+Oct adult merge and stop auto-truncating period selector #28
Reference in New Issue
Block a user
Delete Branch "fix/period-selector-restore"
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?
Why
User reported the adults dashboard's From/To period selector showed only Dec 2025 onwards — Sep+Oct 2025, Nov 2025, and Dec 2025 had vanished from the dropdown compared to production.
Diagnosis (full plan in
docs/plans/2026-05-08-1052-period-selector-missing-old-months.md):02.12.2025; Sep/Oct/Nov 2025 columns were deleted. Restoring those from Sheets version history is required to actually see those periods on the dashboard.1257f0d(Mar 9) commented outADULT_MERGED_MONTHS, removing theSep+Oct 2025merged label.7774301(Apr 9) added a JS onload defaultdefaultFrom = maxMonthIdx − 4that immediately filtered the table to the last 5 months on every page load, hiding older periods even when they were present.This PR fixes the two code regressions.
Changes
scripts/attendance.py,go/internal/services/membership/sources.go: restored2025-09 → 2025-10mapping. Per product decision the2025-12 → 2026-01mapping stays disabled (Dec and Jan billed separately for adults; juniors keep both merges).templates/adults.html,templates/juniors.html: dropped thedefaultFrom = maxMonthIdx − 4lines. From-selector now starts at the oldest available month; future-month removal and column-hiding still in place.go/internal/services/membership/sources_test.go:TestLoadAdults/TestLoadAdults_Feeupdated to assert Sep dates merge into2025-10.Test plan
make test(Python, 31 tests pass)cd go && go test ./...(Go, all packages pass)POST /flush-cacheon both Python and Go backends/adults→ confirm dropdown listsSep+Oct 2025,Nov 2025,Dec 2025,Jan 2026, … as separate options and the table shows all non-future months on first load/juniors→ confirm dropdown still showsSep+Oct 2025,Nov 2025,Dec 2025+Jan 2026(juniors keeps both merges)make parityreports zero diffs on/api/adultsand/api/juniors🤖 Generated with Claude Code