ccsync icon indicating copy to clipboard operation
ccsync copied to clipboard

"Delete all tasks" button does not trigger API call or actually delete tasks

Open Rustix69 opened this issue 1 year ago • 2 comments

Describe the bug
Clicking Delete all tasks in the account dropdown only updates the UI momentarily; no API request is triggered, and tasks reappear after a page refresh.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the app and sign in.
  2. Open the account menu (click on the avatar/profile icon).
  3. Click on Delete all tasks.
  4. Observe: No network request (XHR/fetch) is made, and after refreshing the page, all tasks still remain.

Expected behavior
The Delete all tasks button should call the backend API to permanently remove all tasks from the database and update the UI accordingly. A success or failure message (toast) should appear after the operation.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Ubuntu 22.04 (Linux x86_64)
  • Browser: Google Chrome
  • Version: 138

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A
  • Version: N/A

Additional context
No API call is fired on click — likely the button handler is only affecting local state or missing an integration with the delete endpoint.
Location: Header → Account dropdown → Delete all tasks

Rustix69 avatar Nov 12 '25 13:11 Rustix69

@its-me-abhishek If we want to fix this bug then I can work on it.

Rustix69 avatar Nov 12 '25 13:11 Rustix69

It is really not intended to trigger any API call to prune tasks on the backend via this button and is used to delete tasks ONLY from the locaL IndexedDB Database

I think it would be helpful to show a dialog explaining that this button only deletes tasks from the browser’s local storage. Inside that dialog, we can include another button to trigger the API that runs task prune.

However, clicking that new button should open an additional confirmation dialog, warning the user that this action will permanently delete all tasks from the Taskserver and from the user’s Taskwarrior as well, if it’s synced.

its-me-abhishek avatar Nov 12 '25 13:11 its-me-abhishek