Skip to content

fix(ui): stop Gantt dates shifting a day for clients behind UTC#358

Open
cavidelizade wants to merge 1 commit into
Devlaner:mainfrom
cavidelizade:fix/gantt-date-offset
Open

fix(ui): stop Gantt dates shifting a day for clients behind UTC#358
cavidelizade wants to merge 1 commit into
Devlaner:mainfrom
cavidelizade:fix/gantt-date-offset

Conversation

@cavidelizade

Copy link
Copy Markdown
Contributor

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

  • Bug fix (fix:)

Surface

  • UI (apps/web/)

What changed

parseDay used Date.parse(input) then read local components off the resulting UTC instant, so 2026-07-16 became the 15th in the Americas. fmtDay then re-serialized from those shifted components, so a one-day drag computed 15th + 1 = 16th and saved the original date. Now parseDay takes the leading YYYY-MM-DD and builds a local-midnight date, matching how the calendar layout handles it.

Test plan

  • npm run typecheck + npm run lint pass
  • Manual (UTC-5 browser): a target date of 2026-07-16 now renders on the 16th, and dragging by a day saves 2026-07-17

AI assistance

  • AI tools were used, tool(s): Claude Code (Opus 4.8), commits carry a Co-Authored-By: trailer

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>
@cavidelizade
cavidelizade requested a review from a team as a code owner July 16, 2026 20:51
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@cavidelizade, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 56243c99-932c-45ce-9e45-1996b9a521c0

📥 Commits

Reviewing files that changed from the base of the PR and between 61bc903 and d405640.

📒 Files selected for processing (1)
  • apps/web/src/components/work-item/layouts/IssueLayoutGantt.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gantt dates are off by one day and drags are no-ops in timezones behind UTC

1 participant