Issue/Description:
Currently, the app allows creating tasks with no text (just space) sub-tasks with no char at all and saving existing tasks as empty. This leads to meaningless entries. Additionally, if a user accidentally clears text during edit (e.g., via the "X" button), there is no way to recover what was typed, resulting in an empty task.
Steps to Reproduce:
- Open Tasks app
- Create a new task with just space & create
- Observe an empty task being created
- Edit an existing task with valid text
- Clear all text (e.g., using the "X" button) and save
- Observe the task becomes empty with no recovery option
Expected Behavior:
- Creating a new task with no text should be discarded (no task created on Enter).
- Creating a new sub-task with no text should be discarded
- Editing an existing task:
- If text becomes empty and is saved, it should trigger a delete action instead of saving an empty task.
- The delete action then trigger undo, allowing the user to restore the task to original text (before edit).
Other Notes:
This change would prevent accidental creation of empty tasks and provide a safer editing experience by enabling recovery through undo or trash.
- tasks & sub-tasks with no meaningful information

Issue/Description:
Currently, the app allows creating tasks with no text (just space) sub-tasks with no char at all and saving existing tasks as empty. This leads to meaningless entries. Additionally, if a user accidentally clears text during edit (e.g., via the "X" button), there is no way to recover what was typed, resulting in an empty task.
Steps to Reproduce:
Expected Behavior:
Other Notes:
This change would prevent accidental creation of empty tasks and provide a safer editing experience by enabling recovery through undo or trash.