fix(ui): stop Gantt dates shifting a day for clients behind UTC#358
fix(ui): stop Gantt dates shifting a day for clients behind UTC#358cavidelizade wants to merge 1 commit into
Conversation
parseDay ran the date through Date.parse then read local components off the resulting UTC instant, so "2026-07-16" landed on the 15th in any negative-UTC timezone. Bars rendered a day early and a visible one-day drag re-serialized to the same stored date, making the move a no-op. Parse the leading YYYY-MM-DD parts into a local-midnight date instead, the same way the calendar layout does. Closes Devlaner#337 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 10 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
On the Gantt layout, dates were off by one day for anyone in a timezone behind UTC, and dragging a bar by a day saved the date it already had.
Linked issues
Closes #337
Type of change
fix:)Surface
apps/web/)What changed
parseDayusedDate.parse(input)then read local components off the resulting UTC instant, so2026-07-16became the 15th in the Americas.fmtDaythen re-serialized from those shifted components, so a one-day drag computed 15th + 1 = 16th and saved the original date. NowparseDaytakes the leadingYYYY-MM-DDand builds a local-midnight date, matching how the calendar layout handles it.Test plan
npm run typecheck+npm run lintpassAI assistance
Claude Code (Opus 4.8), commits carry aCo-Authored-By:trailer