fix(frontend): Weekly view must always send an explicit date to /grade #104

Merged
admin_emi merged 4 commits from fix/weekly-utc-today-date into dev 2026-07-26 06:20:20 +00:00
Showing only changes of commit 2d45af8d3a - Show all commits

View file

@ -6,16 +6,14 @@ midnight for any viewer east of UTC. Reported from Kaunas (UTC+3): asking for
the Weekly tab on 7/26 rendered 7/25.
There is no JS/DOM test harness in this repo to drive app.js and assert on the
real fetch() URL it builds: static/package.json declares zero dependencies (no
jest/playwright/node test runner), no such runner is wired into scripts/test.sh
or any workflow, and server/**/*_test.go (the Go suite CI actually gates on)
covers the Go SSR layer only, never static/*.js's runtime behavior. So this
can't be a behavioral test. What it CAN do, hermetically, through the same
served-asset route test_pages.py already exercises (`GET {B}/app.js`), is treat
the real shipped source as data and assert the structural property the fix
guarantees: runGrade() builds exactly one grade URL and always includes an
explicit `date=`, rather than branching on whether the selected date is "today"
and omitting it in that case.
real fetch() URL it builds -- static/package.json declares zero dependencies, so
there is no jest/playwright/node runner wired into CI, and nothing else covers
static/*.js runtime behavior. So this can't be a behavioral test. What it CAN
do, hermetically, through the same served-asset route test_pages.py already
exercises (`GET {B}/app.js`), is treat the real shipped source as data and
assert the structural property the fix guarantees: runGrade() builds exactly one
grade URL and always includes an explicit `date=`, rather than branching on
whether the selected date is "today" and omitting it in that case.
This fails against the pre-fix source and passes against the fixed source --
a source guard, not a substitute for a real behavioral test.