tududi/frontend
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
..
__tests__ Setup slugify and fix nanoid issues 2025-08-08 23:14:40 +03:00
components Fix Today page task completion issues (#970) 2026-03-24 16:45:31 +02:00
config Fix static base path (#549) 2025-11-16 22:43:06 +02:00
constants Cleanup statuses (#724) 2025-12-19 11:13:27 +02:00
contexts Fix static base path (#549) 2025-11-16 22:43:06 +02:00
entities Set stalled projects active without tasks (#793) 2026-01-23 23:06:35 +02:00
hooks Add custom keyboard shortcuts (#749) 2025-12-28 21:58:21 +02:00
store Fix tag links by refreshing tags after creation (#843) 2026-02-27 00:34:10 +02:00
styles Fix bug 661 (#682) 2025-12-08 16:14:10 +02:00
utils Fix Today page task completion issues (#970) 2026-03-24 16:45:31 +02:00
App.tsx Feat: habits (#707) 2025-12-13 08:47:52 +02:00
i18n.ts Fix static base path (#549) 2025-11-16 22:43:06 +02:00
index.tsx Fix static base path (#549) 2025-11-16 22:43:06 +02:00
Layout.tsx Load areas into store (#913) 2026-03-06 08:46:07 +02:00