ccsync icon indicating copy to clipboard operation
ccsync copied to clipboard

Delete task only updates status to "D" instead of removing task

Open HarshRaj29004 opened this issue 10 months ago • 3 comments

Describe the bug When attempting to delete a task, the task is not actually removed. Instead, its status is changed to “D” (Deleted), but the task continues to appear in the tasks list UI.

To Reproduce Steps to reproduce the behavior:

  1. Go to /home#tasks
  2. Create a new task
  3. Click on the task
  4. Click on the Delete
  5. Click on sync
  6. Observe the task list
  7. Expected behavior: the task should either be completely removed from the list (hard delete), or be hidden from the UI if the delete action is intended as a soft delete (status = 'D')
  8. Actual behavior: The task status is updated to “D” and still displayed in the UI

Screenshots

Image

Desktop:

  • OS: Windows 10
  • Browser Brave (Chromium-based)
  • Version Latest

Smartphone (please complete the following information):

  • Not tested

Additional context This appears to be an incomplete soft-delete implementation. If soft delete is intended, the API or UI should filter out tasks with status = 'D'. I can work on fixing this if needed.

HarshRaj29004 avatar Jan 23 '26 13:01 HarshRaj29004

I have reviewed the issue and confirmed the behavior. It appears the system is correctly performing a "soft delete" by updating the task status to 'D', but the API endpoint responsible for fetching tasks is not filtering these records out.

Proposal: I recommend resolving this on the backend rather than the frontend. I plan to modify the task retrieval query to explicitly exclude any records where status == 'D'.

Why this approach?

Performance: It prevents unnecessary data (deleted tasks) from being sent over the network.

Security: It ensures that data marked as "deleted" is not accessible via the API response or browser developer tools.

@its-me-abhishek , @HarshRaj29004 Could you please assign this issue to me?

ParasKhandelwal1616 avatar Jan 23 '26 13:01 ParasKhandelwal1616

This behavior is intentional. In TW 3.0, tasks are first marked as deleted and are automatically removed after a certain period of time. This allows the list to work as a complete history, in case someone wants to restore or modify deleted tasks. If users prefer not to see deleted tasks, they can simply apply filters as we support a variety of those. Additionally, hard deletion is not available via the CLI running purge will remove all tasks that are marked as deleted.

its-me-abhishek avatar Jan 23 '26 16:01 its-me-abhishek

Closing the issue for now

its-me-abhishek avatar Jan 23 '26 16:01 its-me-abhishek