summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-06-29 08:53:48 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-06-29 08:53:48 +0000
commit3fbfdd1f9441299eb146bf215449f238977deb66 (patch)
treea01d0cd35309afbab6cc8989e26e2e824442c898 /cmd
parentde3e37cca4f34a30f9c0beef05f67c3d515d64c2 (diff)
feat: native task management + Todoist migration
Adds doot-owned task storage (native_tasks table) so tasks can be managed without Todoist. CompleteTask for 'doot' source just updates the DB — no external API call, no token dependency. Migration path: POST /settings/import-from-todoist — copies Todoist cache → native_tasks Then remove TODOIST_TOKEN from .env to disable Todoist Changes: - migration 020: native_tasks table - store: GetNativeTasks, GetNativeTasksByDateRange, GetUndatedNativeTasks, CreateNativeTask, CompleteNativeTask, UncompleteNativeTask, UpdateNativeTask, ImportFromTodoist - timeline: native tasks appear as source="doot" (teal) - handleAtomToggle: "doot" case — no external API needed - HandleWidgetComplete: method on Handler, handles "doot" natively - HandleUnifiedAdd: "doot" source creates in native_tasks - widget: "doot" tasks are completable, teal color indicator Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dashboard/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go
index 92a149b..c154d9b 100644
--- a/cmd/dashboard/main.go
+++ b/cmd/dashboard/main.go
@@ -342,6 +342,9 @@ func main() {
r.Post("/passkeys/register/finish", authHandlers.HandlePasskeyRegisterFinish)
r.Delete("/passkeys/{id}", authHandlers.HandleDeletePasskey)
+ // Native task management
+ r.Post("/settings/import-from-todoist", h.HandleImportFromTodoist)
+
// Settings
r.Get("/settings", h.HandleSettingsPage)
r.Post("/settings/sync", h.HandleSyncSources)
@@ -362,7 +365,7 @@ func main() {
return handlers.WidgetAuthMiddleware(cfg.WidgetToken, next)
}
r.With(widgetAuth).Get("/api/widget", h.HandleWidgetGet)
- r.With(widgetAuth).Post("/api/widget/complete", handlers.HandleWidgetComplete(todoistClient))
+ r.With(widgetAuth).Post("/api/widget/complete", h.HandleWidgetComplete)
} else {
log.Println("WIDGET_TOKEN not set — /api/widget disabled")
}