From 945c34590677e161a711ccaff0e1077197b1b178 Mon Sep 17 00:00:00 2001 From: Doot Agent Date: Mon, 6 Jul 2026 00:00:59 +0000 Subject: feat: remove Todoist integration entirely Native tasks (native_tasks table) fully replace Todoist. All Todoist API code, store functions, handlers, routes, templates, and tests have been removed. Migration 021 drops the now-unused tasks cache table. Co-Authored-By: Claude Sonnet 4.6 --- internal/handlers/settings.go | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'internal/handlers/settings.go') diff --git a/internal/handlers/settings.go b/internal/handlers/settings.go index 32e0215..dc345db 100644 --- a/internal/handlers/settings.go +++ b/internal/handlers/settings.go @@ -34,7 +34,7 @@ func (h *Handler) HandleSettingsPage(w http.ResponseWriter, r *http.Request) { WebAuthnEnabled bool }{ Configs: bySource, - Sources: []string{"trello", "todoist", "gcal", "gtasks"}, + Sources: []string{"trello", "gcal", "gtasks"}, Toggles: toggles, SyncLog: syncLog, Agents: agents, @@ -68,20 +68,6 @@ func (h *Handler) HandleSyncSources(w http.ResponseWriter, r *http.Request) { } } - // Sync Todoist projects from cached tasks (avoids deprecated REST API) - if projects, err := h.store.GetProjectsFromTasks(); err == nil && len(projects) > 0 { - var items []models.SourceConfig - for _, p := range projects { - items = append(items, models.SourceConfig{ - Source: "todoist", - ItemType: "project", - ItemID: p.ID, - ItemName: p.Name, - }) - } - _ = h.store.SyncSourceConfigs("todoist", "project", items) - } - // Sync Google Calendar calendars if h.googleCalendarClient != nil { calendars, err := h.googleCalendarClient.GetCalendarList(ctx) @@ -122,18 +108,13 @@ func (h *Handler) HandleSyncSources(w http.ResponseWriter, r *http.Request) { h.HandleSettingsPage(w, r) } -// HandleClearCache invalidates all caches and clears the Todoist sync token +// HandleClearCache invalidates all caches func (h *Handler) HandleClearCache(w http.ResponseWriter, r *http.Request) { if err := h.store.InvalidateAllCaches(); err != nil { JSONError(w, http.StatusInternalServerError, "Failed to clear cache", err) return } - if err := h.store.ClearSyncToken("todoist"); err != nil { - JSONError(w, http.StatusInternalServerError, "Failed to clear sync token", err) - return - } - _ = h.store.AddSyncLogEntry("cache_clear", "Cache cleared — next load fetches fresh data") syncLog, _ := h.store.GetRecentSyncLog(20) @@ -167,8 +148,6 @@ func (h *Handler) HandleToggleSourceConfig(w http.ResponseWriter, r *http.Reques switch source { case "trello": _ = h.store.InvalidateCache("trello_boards") - case "todoist": - _ = h.store.InvalidateCache("todoist_tasks") } w.Header().Set("Content-Type", "application/json") -- cgit v1.2.3