Skip to content

delete all actually deletes all the tasks in database, not only current tab. #43

@riodelphino

Description

@riodelphino

Describe the bug
delete all seems to delete the displayed tasks in current tab.
But actually it deletes all the tasks in the database, not only the tasks in current tab.
The tasks list becomes completely empty.
This will cause fatal accidents for users. (I've already experienced 😂)

To Reproduce
Steps to reproduce the behavior:

  1. d key in the list view
  2. Asked DELETE? y/enter: confirm a: delete all n/esc: cancel
  3. Hit a key to delete all the tasks displayed in current tab. (Most users will think like this.)
  4. All the tasks in the database are disappeared. Nothing in the database... Oh no...

It happens because:

  • The delete command is not related to the current tab.
  • The delete all naming cause misleading.

Expected behavior
4. Only the tasks displayed in current tab are deleted.

Screenshots
Image

Environment (please complete the following information):

  • OS: macOS Sequoia
  • Kairo Version: 1.5.4
  • Go Version: go1.26.1 darwin/amd64

Additional context

The simple solution is:

  • Add t: delete all in current tab

A much safer solution (Recommended):

  • Add t: delete all in current tab
  • Remove the existing delete all functionality from delete command.
  • Then hide it into the ctrl+p menu.
  • Rename the delete all functionality to Reset database or so.

Because there are very few situations where we would delete all tasks without applying any filters.

Thank you.

Metadata

Metadata

Labels

backendanything related to core logiccool afcool feature, must be added 100%documentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is neededimportantvery urgent, must be done asap

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions