Merged
Conversation
Added protection to prevent users from deleting the "personal" project, which is the default project for all tasks. The personal project is automatically created during database initialization and should not be deletable. Changes: - Modified DeleteProject to check if project name is "personal" and return an error if attempting to delete it - Updated UI settings to handle the deletion error and display it to the user - Added comprehensive test coverage for the deletion protection Fixes: #149 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
DeleteProject()ininternal/db/tasks.goto check if the project name is "personal" and return an error if deletion is attemptedinternal/ui/settings.goto properly handle and display deletion errors to usersTestDeletePersonalProject()ininternal/db/tasks_test.goto verify the protection works correctlyTest plan
go test ./internal/db- all tests pass including new testgo build ./...- project builds successfullyAdditional Notes
This fix ensures the personal project, which serves as the default workspace for tasks, cannot be accidentally deleted by users. The protection is implemented at the database layer for maximum safety.
Fixes #149
🤖 Generated with Claude Code