feat(tasks): add all-day date support for tasks#248
Conversation
Introduce TaskDateTimeNormalizer to properly handle date-only (all-day) vs datetime inputs for tasks. The normalizer detects all-day values by checking if the time component is midnight, preserves the semantic meaning during UTC conversion, and validates that deadline date is not before planned date. Updated UI components (task card, date pickers, dialogs) to conditionally format display based on all-day status. BREAKING CHANGE: SaveTaskCommand now throws ArgumentError when deadlineDate is before plannedDate
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the task management system by adding support for all-day dates. It introduces a Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for all-day dates in tasks, enhancing the user experience by displaying dates without time when appropriate and ensuring correct UTC conversions. The changes include a new TaskDateTimeNormalizer class for date normalization and validation, updates to UI formatting, and modifications to the SaveTaskCommand constructor. The code changes look good overall, with attention to detail in handling date formats and time zones. However, there's a potential issue with the isAllDay check in TaskDateTimeNormalizer that could lead to incorrect behavior if the time is not exactly midnight. I've added a review comment to address this.
…r proper error handling - Relocates date range validation from SaveTaskCommand constructor to handler to enable proper BusinessException handling - Adds validation in TaskRecurrenceService to prevent invalid calculated dates - Removes validateDateRange from TaskDateTimeNormalizer (no longer needed) - Adds invalid_date_range translation key across all 21 locales - Updates tests to expect BusinessException instead of ArgumentError - Adds error handling with logging in TaskDetailsController
External date sources may include microsecond precision that shouldn't affect all-day task detection. This change relaxes the date-only check to only verify hour, minute, and second are zero, ignoring fractional seconds while preserving the midnight detection behavior.
Update tests to reflect new behavior where fractional seconds are ignored when detecting all-day events. Dates with milliseconds or microseconds at midnight (00:00:00.xxx) are now treated as all-day.
🚀 Motivation and Context
This PR introduces support for all-day dates in tasks. When a user selects a date without specifying a time (e.g., March 12, 2026 at midnight), the system now recognizes this as an all-day event and handles it appropriately - displaying just the date without time, and preserving the semantic meaning during UTC conversions.
⚙️ Implementation Details
SaveTaskCommandconstructor to use the normalizer📋 Checklist for Reviewer
🔗 Related
N/A