fix(ui): bucket calendar issues by their real day in non-UTC timezones - #262
Conversation
The Calendar layout keyed each day cell by round-tripping a local-midnight date through toISOString(), which rolls back to the previous UTC day for positive-offset clients, so every issue landed one cell late. Cell keys now come from the date's local components, and isoDate takes the leading date portion of the target_date directly instead of parsing it into a Date and reading local fields (which shifted negative-offset clients the other way). Buckets and cells now agree on the calendar day in every timezone. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Strix Security ReviewNo security issues found. Updated for Reviewed by Strix |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe calendar layout's per-day cell key generation was changed from an ISO-string round-trip to a local date-key helper, and the ChangesCalendar day-key fix
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Closes #140.
In the work-item Calendar layout, issues were bucketed into the wrong day cell for anyone outside UTC. Two date round-trips were to blame:
isoDate(date.toISOString().slice(0, 10)). The celldateis a local-midnightDate, so for a positive-offset clienttoISOString()rolls back to the previous UTC day and the cell key ends up one day early. Every issue then rendered in the next cell (a due-Jun-20 issue landed in the Jun-21 cell), and the per-day counts and "+N more" were off too.isoDateparsed thetarget_date("YYYY-MM-DDT00:00:00Z") into aDateand read its local components, which shifts negative-offset clients the other way.Fix:
localKey), i.e. the calendar day the cell actually represents.isoDatenow takes the leadingYYYY-MM-DDoftarget_datedirectly (the calendar day the backend stored), with noDateround-trip.Buckets and cells agree on the calendar day in every timezone now.
Testing
npm run typecheckandnpm run lintpass.target_date2026-06-20) now renders in the day-20 cell and "Child of Alpha" (2026-06-26) in the day-26 cell. Before the fix both were shifted +1 (day-21 / day-27).AI assistance
This change was produced with the help of Claude Code (Claude Opus 4.8). See the
Co-Authored-Bytrailer on the commit.Summary by CodeRabbit