-
Notifications
You must be signed in to change notification settings - Fork 0
Add UI to show completed tasks in Tasks Overview and My Tasks #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: dkhalife <[email protected]>
Co-authored-by: dkhalife <[email protected]>
Co-authored-by: dkhalife <[email protected]>
Co-authored-by: dkhalife <[email protected]>
Co-authored-by: dkhalife <[email protected]>
Co-authored-by: dkhalife <[email protected]>
|
@copilot address the following feedback: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…leted Co-authored-by: dkhalife <[email protected]>
All feedback addressed in commit c35cfeb:
The implementation is now simpler and follows the existing patterns in the codebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the ability to view completed tasks in both the Tasks Overview and My Tasks sections of the UI. The backend API endpoint for retrieving completed tasks was already available, but the frontend lacked this functionality.
- Added toggle buttons to show/hide completed tasks in both views
- Implemented Redux state management for completed tasks with localStorage persistence
- Created new API integration for fetching completed tasks
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/src/api/tasks.ts | Added GetCompletedTasks API function to fetch completed tasks |
| frontend/src/store/tasksSlice.ts | Added Redux state, actions, and thunks for managing completed tasks |
| frontend/src/views/Tasks/TasksOverview.tsx | Added toggle button and completed tasks table display |
| frontend/src/views/Tasks/MyTasks.tsx | Added toggle button and completed tasks card section |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: dkhalife <[email protected]>
… system (#195) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: dkhalife <[email protected]> Co-authored-by: Dany Khalife <[email protected]>
Overview
This PR implements the ability to view completed tasks in both the Tasks Overview and My Tasks sections of the UI. The backend API endpoint (
/api/v1/tasks/completed) was already available, but the frontend lacked the functionality to display this data.Problem
Users had no way to view their completed tasks in the UI, making it difficult to review task history or verify completion status without navigating to individual task history pages.
Solution
Added a toggle button in both views that allows users to show/hide completed tasks on demand. The implementation follows existing conventions and patterns in the codebase.
Tasks Overview (Table View)
My Tasks (Card View)
Implementation Details
Frontend Changes
API Layer (
frontend/src/api/tasks.ts)Redux State (
frontend/src/store/tasksSlice.ts)completedItemsarray to store completed tasksshowCompletedboolean state (persisted in localStorage)fetchCompletedTasksasync thunk following the same pattern asfetchTaskstoggleShowCompletedaction to manage visibility stateUI Components
TasksOverview.tsx: Added toggle button and completed tasks tableMyTasks.tsx: Added toggle button and completed tasks sectionKey Features
group_by) and restored on page loadTesting
Screenshots
The UI now includes toggle buttons to show/hide completed tasks in both views, with completed tasks displayed in a visually distinct section below active tasks.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.