From c9c17431cdddb64a8d44f77c43281a29270f81c2 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 22 Jan 2026 15:54:25 -1000 Subject: Add debug logging for Trello card fetching Log API responses and errors to diagnose empty boards issue. Co-Authored-By: Claude Opus 4.5 --- internal/handlers/handlers.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/handlers/handlers.go') diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 1cb978d..84a00fd 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -523,6 +523,16 @@ func (h *Handler) fetchBoards(ctx context.Context, forceRefresh bool) ([]models. return nil, err } + // Debug: log what we got from API + totalCards := 0 + for _, b := range boards { + totalCards += len(b.Cards) + if len(b.Cards) > 0 { + log.Printf("Trello API: Board %q has %d cards", b.Name, len(b.Cards)) + } + } + log.Printf("Trello API: Fetched %d boards with %d total cards", len(boards), totalCards) + // Save to cache if err := h.store.SaveBoards(boards); err != nil { log.Printf("Failed to save boards to cache: %v", err) -- cgit v1.2.3