Files
glenloch-media/e2e
Tiel Coder 6982a8040d D7: read-only schedule grid UI (rows=instances, cols=positions, week nav)
Server-component schedule page backed by a pure data layer (src/db/grid.ts):
gridForWeek() returns positions + instances (->slots->assignments), and
defaultWeekStart() defaults to the earliest upcoming published instance so a
seeded DB shows data on first load. Week nav via ?week=YYYY-MM-DD (server
rendered, no client state).

Fixes two latent bugs that kept the grid empty/incorrect:
- tz: weekdayInTz()/nextSundaysInTz() built Date.UTC(y,mo-1,d) from a LOCAL
  date string and read its weekday; for America/New_York (UTC-5) UTC midnight
  lands the previous evening, so the seed materialized instances on Mondays and
  the default week was off by one. weekdayInTz now builds the local-midnight
  instant via utcOffsetMs; nextSundaysInTz uses weekdayInTz + addDaysISO.
- grid: occursOn (date mode) was run through dateInTimezone(), reinterpreting
  the UTC instant as wall-clock and shifting a day early; now extracts the UTC
  calendar date directly (occursOnISO).
- schedule-grid: <table className=... collapse ...> set visibility: collapse
  (Tailwind 'collapse'), hiding the whole grid server-rendered-but-invisible;
  changed to border-collapse.

E2E: new schedule-grid.spec.ts + shell.spec.ts grid assertion. Full suite green:
tsc, eslint, 178 unit tests, next build, 6/6 Playwright.
2026-11-18 16:19:17 +00:00
..