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):
Sheet-level data loss(out of scope of this PR) — the live adults attendance sheet header was pruned to start at 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.
Code regression #1 — 1257f0d (Mar 9) commented out ADULT_MERGED_MONTHS, removing the Sep+Oct 2025 merged label.
Code regression #2 — 7774301 (Apr 9) added a JS onload default defaultFrom = maxMonthIdx − 4 that 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: restored 2025-09 → 2025-10 mapping. Per product decision the 2025-12 → 2026-01 mapping stays disabled (Dec and Jan billed separately for adults; juniors keep both merges).
templates/adults.html, templates/juniors.html: dropped the defaultFrom = maxMonthIdx − 4 lines. 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_Fee updated to assert Sep dates merge into 2025-10.
Test plan
make test (Python, 31 tests pass)
cd go && go test ./... (Go, all packages pass)
After merging: restore Sep/Oct/Nov 2025 columns in the adults attendance sheet from Sheets version history
POST /flush-cache on both Python and Go backends
Reload /adults → confirm dropdown lists Sep+Oct 2025, Nov 2025, Dec 2025, Jan 2026, … as separate options and the table shows all non-future months on first load
Reload /juniors → confirm dropdown still shows Sep+Oct 2025, Nov 2025, Dec 2025+Jan 2026 (juniors keeps both merges)
make parity reports zero diffs on /api/adults and /api/juniors
## 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`):
1. **Sheet-level data loss** *(out of scope of this PR)* — the live adults attendance sheet header was pruned to start at `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.
2. **Code regression #1** — `1257f0d` (Mar 9) commented out `ADULT_MERGED_MONTHS`, removing the `Sep+Oct 2025` merged label.
3. **Code regression #2** — `7774301` (Apr 9) added a JS onload default `defaultFrom = maxMonthIdx − 4` that 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`: restored `2025-09 → 2025-10` mapping. Per product decision the `2025-12 → 2026-01` mapping stays disabled (Dec and Jan billed separately for adults; juniors keep both merges).
- `templates/adults.html`, `templates/juniors.html`: dropped the `defaultFrom = maxMonthIdx − 4` lines. 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_Fee` updated to assert Sep dates merge into `2025-10`.
## Test plan
- [x] `make test` (Python, 31 tests pass)
- [x] `cd go && go test ./...` (Go, all packages pass)
- [ ] After merging: restore Sep/Oct/Nov 2025 columns in the adults attendance sheet from Sheets version history
- [ ] `POST /flush-cache` on both Python and Go backends
- [ ] Reload `/adults` → confirm dropdown lists `Sep+Oct 2025`, `Nov 2025`, `Dec 2025`, `Jan 2026`, … as separate options and the table shows all non-future months on first load
- [ ] Reload `/juniors` → confirm dropdown still shows `Sep+Oct 2025`, `Nov 2025`, `Dec 2025+Jan 2026` (juniors keeps both merges)
- [ ] `make parity` reports zero diffs on `/api/adults` and `/api/juniors`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Two regressions made older periods invisible on the adults dashboard:
- 1257f0d (Mar 9) commented out ADULT_MERGED_MONTHS, removing the
Sep+Oct 2025 merged label. Restored only the 2025-09 → 2025-10
mapping (Dec and Jan are billed separately for adults; the
Dec → Jan mapping stays disabled per product decision). Mirrored
on the Go side. Test fixtures in sources_test.go now assert Sep
dates land in merged 2025-10 instead of 2025-09.
- 7774301 (Apr 9) added a JS onload default that set the From
selector to maxMonthIdx − 4 and immediately filtered the table,
hiding everything older than 5 months on first load. Dropped that
default in templates/adults.html and templates/juniors.html so
the From-selector starts at the oldest available month. Future
months are still removed from the dropdowns and hidden in the
table — only the past-month truncation is gone.
Note: the live adults attendance sheet had also been pruned to
start at 02.12.2025; restoring Sep/Oct/Nov 2025 columns from
Sheets version history is required to actually see those periods.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr
merged commit 2cbd98df1a into main2026-05-08 11:13:14 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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