feat(tasks): add defer task functionality and UI components#167
feat(tasks): add defer task functionality and UI components#167iamitprakash merged 6 commits intodevelopfrom
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Summary by CodeRabbit
WalkthroughThis change introduces a "Deferred" task feature to the dashboard. It adds a new API method and request type for deferring tasks, updates the UI to allow users to defer tasks via a dialog, incorporates a new dashboard tab and table for deferred tasks, and updates utility and constant files to support the new functionality. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CreateEditDialog
participant DeferredTaskButton
participant TasksApi
participant DashboardDeferredTable
User->>CreateEditDialog: Opens dialog in edit mode
CreateEditDialog->>DeferredTaskButton: Renders with todo data
User->>DeferredTaskButton: Clicks "Defer" button
DeferredTaskButton->>DeferredTaskButton: Opens date picker dialog
User->>DeferredTaskButton: Selects defer date and confirms
DeferredTaskButton->>TasksApi: PATCH /v1/tasks/{taskId}?action=defer
TasksApi-->>DeferredTaskButton: Returns updated task data
DeferredTaskButton->>DashboardDeferredTable: Triggers query invalidation
DashboardDeferredTable->>TasksApi: Fetches deferred tasks
TasksApi-->>DashboardDeferredTable: Returns deferred tasks
DashboardDeferredTable->>User: Renders updated deferred tasks table
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Redundant flex direction class ▹ view | ||
| Debug Statement in Production Code ▹ view | ||
| Missing Data Validation for Defer Button ▹ view | ||
| Generic Error Handling Without Context ▹ view | ||
| Questionable Done Status Restriction ▹ view | ||
| Imprecise date comparison ▹ view | ||
| Inconsistent Return Type for Single Task Operation ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| modules/dashboard/constants/index.ts | ✅ |
| modules/dashboard/components/dashboard-deferred-table.tsx | ✅ |
| lib/todo-util.ts | ✅ |
| api/tasks/tasks.types.ts | ✅ |
| components/create-edit-todo-dialog.tsx | ✅ |
| api/tasks/tasks.api.ts | ✅ |
| modules/dashboard/components/dashboard-tabs.tsx | ✅ |
| components/deferred-task-button.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
- Implemented `deferTask` API method to handle task deferral. - Created `DeferredTaskButton` component for deferring tasks in the UI. - Updated `CreateEditTodoDialog` to include the defer button when editing tasks. - Added `DashboardDeferredTable` to display deferred tasks in the dashboard. - Introduced new `Deferred` tab in the dashboard for better task management. - Defined `DeferTaskReqDto` type for request payload structure.
be53736 to
b20af4b
Compare
- Updated `deferTask` API method to return `TTask` type. - Introduced `TDeferredDetails` type to encapsulate deferral information. - Modified `DeferredTaskButton` component to reflect 'Todo' terminology. - Enhanced `TodoListTable` and `TodoListTableHeader` components to support deferred tasks display. - Cleaned up unused console logs in `DashboardDeferredTable` component.
- Introduced DEFERRED status in TASK_STATUS_ENUM for better task categorization. - Updated TASK_STATUS_TO_TEXT_MAP to include text representation for DEFERRED status. - Enhanced TodoStatusTable component to visually differentiate DEFERRED tasks in the UI.
- Integrated `DeferredTaskButton` into `CreateEditTodoForm` for deferring tasks. - Updated `CreateEditTodoDialog` to remove the deferred button when in create mode. - Improved state management for the deferred task modal. - Adjusted `EditTodoButton` to invalidate queries for deferred tasks upon editing.
39aa375 to
4c38b51
Compare
Date: 29 July 2025
Developer Name: @AnujChhikara
Issue Ticket Number
Description
deferTaskAPI method to handle task deferral.DeferredTaskButtoncomponent for deferring tasks in the UI.CreateEditTodoDialogto include the defer button when editing tasks.DashboardDeferredTablecomponent to display deferred tasks.DeferTaskReqDtotype for request payload.Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
defer-f.mp4
Test Coverage
Screenshot 1
Additional Notes
Description by Korbit AI
What change is being made?
Add functionality to defer tasks along with the associated UI components, API methods, and handling logic for managing deferred tasks.
Why are these changes being made?
This change addresses the need to manage tasks that users want to temporarily defer without marking them as complete. The addition of a defer option helps ensure tasks that aren’t currently actionable aren't cluttering active task lists, while still being tracked. The approach aligns with existing task management conventions by introducing a dedicated UI and API handling for deferred tasks, with clear sections for viewing and managing them separately within the application.