Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All date comparisons were using UTC (toISOString), causing tasks to appear missing for users in non-UTC timezones. Introduces toLocalDate() utility and fixes getDatesInRange, getDueBounds, preset range computation, and doneOn comparisons to all use local calendar dates. Also adds "This Week" preset (Monday through today) and updates tests to use local date strings consistently.
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'This Week' date preset, adds a CLAUDE.md developer guide, and refactors date handling across the dashboard and tests to use a new toLocalDate helper to avoid timezone discrepancies. The reviewer feedback highlights several critical improvements: resolving a daylight saving time (DST) bug in due boundary calculations that relies on a fixed millisecond offset, defensively parsing dates to handle full ISO timestamps safely, preventing a potential midnight race condition during date initialization, and fixing a JavaScript date rollover bug in the month preset logic.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
… condition, month rollover
- Replace fixed 86400000ms offsets with setDate(+1)/getTime()-1 for DST-safe day boundaries in getDueBounds and dateRange.forEach
- Add .split('T')[0] guards in getDatesInRange and getDueBounds to handle full ISO timestamps in date fields
- Initialize startObj from endObj to eliminate midnight race condition in preset date calculation
- Fix month preset JS Date rollover bug (e.g. Mar 31 → Mar 3) by clamping to last day of previous month
- Expose getDueBounds on window for testability; add 4 tests covering the above fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
toISOString().split('T')[0]date formatting with atoLocalDate()helper that usesgetFullYear()/getMonth()/getDate()— eliminating UTC-offset bugs that caused dates to shift by one day for users in UTC− timezonestoLocalDate()helper so assertions don't fail for users in negative-offset timezones; adds a dedicated test for the new This Week preset