From 0fd54eddc40f517cf491310d4f8a60b0d79dc937 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 4 Mar 2026 11:12:44 -1000 Subject: feat: sync log, cache clear endpoint, Todoist projects from cached tasks - migration 016: sync_log table - store: AddSyncLogEntry, GetRecentSyncLog, InvalidateAllCaches, GetProjectsFromTasks - settings: HandleClearCache (POST /settings/clear-cache), SyncLog in page data - settings: use GetProjectsFromTasks instead of deprecated Todoist REST /projects - handlers: populate atom projects from store - agent: log warning on registration failure instead of silently swallowing - google_tasks: simplify URL literal - tests: sync log CRUD, clear cache handler, settings page includes sync log, sync sources adds log entry, incremental sync paths, task completion response/headers, calendar cache fallback Co-Authored-By: Claude Sonnet 4.6 --- internal/handlers/agent.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/handlers/agent.go') diff --git a/internal/handlers/agent.go b/internal/handlers/agent.go index b285520..aa3f000 100644 --- a/internal/handlers/agent.go +++ b/internal/handlers/agent.go @@ -5,6 +5,7 @@ import ( "crypto/rand" "encoding/base64" "encoding/json" + "log" "net/http" "time" @@ -253,8 +254,8 @@ func (h *Handler) HandleAgentAuthApprove(w http.ResponseWriter, r *http.Request) // Register/update agent in the trusted agents table if err := h.store.CreateOrUpdateAgent(session.AgentName, session.AgentID); err != nil { - // Log but don't fail - the session was approved - // This just affects future trust level checks + // Don't fail - the session was approved; this just affects future trust level checks + log.Printf("warning: failed to register agent %q: %v", session.AgentName, err) } w.Header().Set("Content-Type", "application/json") -- cgit v1.2.3