3.3 KiB
3.3 KiB
Dead-Ends Ledger
Append-only. Re-injected into every session. Write a entry when an approach fails twice, or a probe/assumption is proven invalid.
2026-11-18 — weekdayInTz() returns undefined; partsInTz() never emits weekday
- Settled:
partsInTz()builds itsIntl.DateTimeFormatwithout aweekdayoption, sopartsInTz(...).weekdayis alwaysundefined.weekdayInTz()returned thatundefined(castas unknown as number), andnextSundaysInTz()(which also reads.weekday) was silently wrong — the seed created instances on the wrong Sundays. - Do not retry: assuming
weekdayInTz(date, tz)returns a number, or relying onnextSundaysInTz()dates without verifying. - Why: the missing Intl part means every call returns
undefined→WEEKDAYS.indexOf(undefined)= -1 → off-by-week instance dates. - Instead: add
weekday: "short"topartsInTz's format and makeweekdayInTzreturnWEEKDAYS.indexOf(label)(done insrc/lib/tz.ts). Verified: Tue 2026-11-18 → weekStart 2026-11-16; next Sundays 11-23 / 11-30.
2026-11-18 — D7 E2E cannot be completed in-session; harness hangs abort the run
- Settled: the Playwright run (
e2e/schedule-grid.spec.ts+e2e/shell.spec.ts) reaches the webServer build/start phase but the command is aborted (SIGTERM / "Command aborted") before tests finish green. Code, typecheck, eslint, unit suite, and build are all green; DB re-seeded; only the E2E pass + commit remain. - Do not retry: assuming D7 is done just because
tsc/eslint/vitest/next buildpass — the E2E (the unit's actual Done-when) has not completed green. - Why: the Done-when for D7 is "E2E renders a seeded week; no console errors"; that gate is unmet until the Playwright run finishes.
- Instead: in a fresh session, start the app with
NEXTAUTH_SECRETset (E2E webServer sets it; a barepnpm startthrows Auth.jsMissingSecret), runnpx playwright test e2e/schedule-grid.spec.ts e2e/shell.spec.ts, then commit.
2026-11-18 — D7 E2E CAN complete in-session; two more latent tz/CSS bugs fixed
- Settled: the D7 E2E (6/6) runs green in-session once the app is rebuilt+restarted with
NEXTAUTH_SECRETset. Two further bugs were the real blockers, both now fixed. - Supersedes: the 2026-11-18 entry ("D7 E2E cannot be completed in-session; harness hangs abort the run").
- Do not retry: assuming the grid is fine just because
curl /scheduleshows the HTML — the browser can render it invisible (see below). - Why it failed (2): (1)
weekdayInTz/nextSundaysInTzbuiltDate.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. Fixed:weekdayInTzbuilds the local-midnight instant viautcOffsetMs;nextSundaysInTzusesweekdayInTz+addDaysISO. (2)<table className="... collapse ...">setvisibility: collapse(Tailwindcollapse), hiding the whole grid server-rendered-but-invisible. Fixed:border-collapse. - Instead: fix tz + grid,
TRUNCATE assignments, slots, service_instancesthentsx src/db/seed.ts, rebuild+restart, runnpx playwright test e2e/schedule-grid.spec.ts e2e/shell.spec.ts.