tududi/frontend/components/Task
Chris 402d5b05e1
Fix Today page task completion issues (#970)
* Fix Today page task completion issues

- Fix completed task border color staying as priority color
  - Add isInCompletedSection prop to TaskItem for explicit completed state
  - Tasks in completed section now always show green border regardless of priority
  - Fixes race condition where status wasn't updated during optimistic UI update

- Fix completed task reappearing after unmarking and page refresh
  - Add defensive check in backend to force clear completed_at when status is not DONE
  - Add development logging in tasksService for debugging completion toggle
  - Ensures database state is consistent even if handleCompletionStatus doesn't clear it

- Update TaskList and TasksToday components to pass isInCompletedSection prop
  - Explicitly marks tasks rendered in the completed section
  - Prevents border color flickering during state transitions

* Add comprehensive logging to debug completion issues

* Fix duplicate API requests causing completion state issues

- Separate state update logic from API call in handleTaskUpdate
- Create new updateTaskInState function for state-only updates
- Pass onTaskCompletionToggle to completed section to avoid duplicate calls
- This fixes the persistence issue where unmarked tasks came back after refresh
- Completion toggles now only make ONE API call instead of two

* Add debug logging to updateTaskInState
2026-03-24 16:45:31 +02:00
..
TaskDetails Fix date format inconsistency in Task detail screen (#956) 2026-03-21 18:47:33 +02:00
TaskForm Fix subtask completion not persisting to backend (#920) (#936) 2026-03-10 17:30:45 +02:00
getDescription.ts Limit recurring tasks in tasks list view (#298) 2025-09-04 17:00:33 +03:00
getTitleAndIcon.ts Limit recurring tasks in tasks list view (#298) 2025-09-04 17:00:33 +03:00
GroupedTaskList.tsx Fix refactor pt2 (#734) 2025-12-27 17:46:34 +02:00
NewTask.tsx Tc refactor pt1 (#589) 2025-11-23 21:48:49 +02:00
NextTaskSuggestion.tsx Fix bug 733 (#735) 2025-12-27 21:00:52 +02:00
RecurrenceDisplay.tsx Add tooltips (#744) 2025-12-28 12:03:50 +02:00
statusStyles.ts Cleanup statuses (#724) 2025-12-19 11:13:27 +02:00
TaskDetails.tsx Fix defer date validation for recurring task instances (#910) 2026-03-05 08:20:30 +02:00
TaskDueDate.tsx Fix timezone missed rollout (#832) 2026-02-10 22:28:14 +02:00
TaskHeader.tsx Fix visual overlap between subtasks icon and status dropdown (#958) 2026-03-22 12:12:28 +02:00
TaskItem.tsx Fix Today page task completion issues (#970) 2026-03-24 16:45:31 +02:00
TaskList.tsx Fix Today page task completion issues (#970) 2026-03-24 16:45:31 +02:00
TaskStatusControl.tsx Fix status dropdown z-index behind subtasks in project view (#866) 2026-02-26 19:53:59 +02:00
TasksToday.tsx Fix Today page task completion issues (#970) 2026-03-24 16:45:31 +02:00
TaskTags.tsx Change tags to use uids instead of ids. (#351) 2025-09-22 17:10:29 +03:00
TaskTimeline.tsx Fix timezone missed rollout (#832) 2026-02-10 22:28:14 +02:00
TodayPlan.tsx Introduce sort utils (#709) 2025-12-14 01:13:57 +02:00
TodaySettingsDropdown.tsx Fix static base path (#549) 2025-11-16 22:43:06 +02:00
WeeklyCompletionChart.tsx Fix metrics styling (#647) 2025-12-04 13:42:05 +02:00