fix(planner): preserve local dates for schedule exceptions - #14
Conversation
|
Review-fix scope: preserve exception calendar dates across creating, finding, editing, removing, and PDF generation; invalidate outdated PDF results after schedule changes. Threat model: ordinary authenticated browser use in positive and negative UTC offsets, including year boundaries and requests finishing after edits. No persisted exception migration is needed because these exceptions live in the planner screen state. Scanner changes and unrelated planner improvements are out of scope. Astra high will run two separate read-only lenses: (1) behavior and invariants, covering date handling, asynchronous state, and regression coverage; (2) premise and integration, covering the reported workflow, accessibility, shared date contracts, and architectural boundaries, excluding the first lens’s date arithmetic and request-race analysis. Baseline: |
Accessible-name finding: block, fixed. The visible “Edit” action was absent from its accessible name, breaking voice targeting by the displayed label. The integration lens reproduced it; the worker first reproduced the same Axe failure in desktop and mobile, then corrected the label without changing visible text. The existing post-save browser state now asserts the name and runs the explicit The behavior lens found no functional blocker and independently exercised create/find/update/apply/remove in Berlin and Los Angeles on September 8, 2026 and December 30, 2025. The planner browser matrix covers both viewports, both zones, the ISO year boundary, PDF request contents, late results after edits, regeneration, and removal. No new test fixture or dependency was introduced. No database migration is required: exceptions are local screen state. No deferred work or unreviewed repair remains. The complete final gate passed; CI is running for the repair commit. Total review-cycle wall time: 417 seconds. Existing user authorization permits merge and trusted deployment after CI passes. |
|
Main now includes the independently reviewed scan-week fix from #15. GitHub's required up-to-date policy merged it into this branch as |
Before. Adding an exception for Tuesday placed it under Monday in timezones ahead of UTC. Editing, removing, and generating the PDF also used UTC conversions, so the displayed and printed schedules could disagree.
Now. Exceptions keep their local calendar date throughout the planner. Changing or removing an exception clears an outdated PDF, and a generation request that finishes after a schedule change cannot restore it.
Screenshots
Same Tuesday museum-visit exception, Berlin timezone, 2026-W37, demo timetable, and 1280×800 viewport. Before renders main
757da41; after renders this change.Verification
Completed checks
bun run check:fixat final reviewed head529f67c: all 25 tasks passed in 19.769 seconds. Astra high reviewed both initial lenses and verified the accessible-name repair.Check it yourself
Run
gh pr checkout fix/tuesday-exception-date, start the app withbun run dev:web, and open Planner with a configured timetable. Add a Tuesday exception, reopen it, generate a PDF, and remove it. Only Tuesday changes, and changing the exception requires generating a fresh PDF.