feat: add annotations, undo system, and schema updates
Add annotations as JSON column on tasks table with Annotate/Denotate methods and CLI commands. Add undo system backed by change_log with lightweight undo_stack table (capped at 10 entries). All mutating CLI commands (add, done, delete, modify, start, stop) now record undo entries. Undo restores prior task state from change_log data. Schema changes (in v1 migration): - annotations TEXT column on tasks - undo_stack table - annotations field in change_log triggers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ var commandNames = []string{
|
||||
"add", "done", "modify", "delete",
|
||||
"start", "stop", "count", "projects", "tags",
|
||||
"info", "edit", "server", "sync", "reports", "setup",
|
||||
"version",
|
||||
"version", "annotate", "denotate", "undo",
|
||||
}
|
||||
|
||||
// Report names (dynamically populated)
|
||||
@@ -45,8 +45,9 @@ var reportNames = []string{
|
||||
}
|
||||
|
||||
var commandsWithModifiers = map[string]bool{
|
||||
"add": true,
|
||||
"modify": true,
|
||||
"add": true,
|
||||
"modify": true,
|
||||
"annotate": true,
|
||||
}
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
@@ -235,6 +236,9 @@ func init() {
|
||||
rootCmd.AddCommand(editCmd)
|
||||
rootCmd.AddCommand(reportsCmd)
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
rootCmd.AddCommand(annotateCmd)
|
||||
rootCmd.AddCommand(denotateCmd)
|
||||
rootCmd.AddCommand(undoCmd)
|
||||
|
||||
// Enable --version flag on root command
|
||||
rootCmd.Version = Version
|
||||
|
||||
Reference in New Issue
Block a user