tududi/frontend/components/Task
Chris e8c7eed226
fix: prevent subtasks from disappearing when updating parent task (#984)
This commit addresses a critical bug where subtasks would disappear when
updating the parent task (e.g., assigning tags). The issue had multiple
potential causes:

1. Backend vulnerability: The updateSubtasks() function would delete all
   subtasks if an empty array was sent, treating it as "delete everything
   not in this list"

2. Frontend state management: After reloading a task, subtasks weren't
   being preserved if the backend response didn't include them

3. Unclear error messages: "Invalid parent task" errors didn't provide
   enough context for debugging

Changes:
- Added defensive logging in updateSubtasks() to warn when all subtasks
  are being deleted with an empty array
- Enhanced validateParentTaskAccess() error messages to provide detailed
  diagnostics (task not found vs. permission issues vs. wrong user)
- Updated handleTagsUpdate() in TaskDetails to explicitly preserve
  subtasks when reloading task after tag updates

This fix is defensive in nature and adds better observability for
diagnosing similar issues in the future.

Fixes issue reported by user where subtasks disappeared after assigning
tags to parent task, and "Invalid parent task" errors occurred when
trying to update the orphaned subtasks.
2026-04-01 17:37:20 +03: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: prevent subtasks from disappearing when updating parent task (#984) 2026-04-01 17:37:20 +03: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