summaryrefslogtreecommitdiff
path: root/internal/api/google_calendar.go
AgeCommit message (Collapse)Author
2026-01-25Fix all static analysis errors (golangci-lint)Peter Stone
- Fix errcheck: handle all error return values in production code - Fix errcheck: handle all error return values in test files - Fix staticcheck: replace deprecated WithCredentialsFile with WithAuthCredentialsFile - Remove unused code: authHeaders, planToEatPlannerItem, planToEatResponse - Use defer func() { _ = x.Close() }() pattern for ignored close errors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25Refactor: extract helpers and clean up hardcoded HTMLPeter Stone
- Extract parseEventTime() and deduplicateEvents() in google_calendar.go - Add scanTask() and scanTasks() SQL helpers in sqlite.go - Move completed-atom HTML to partial template - Add loadTestTemplates() test helper for template-dependent tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25Fix timezone and date handling bugs #40, #41, #42Peter Stone
#40, #41: Fix calendar event timezone handling - Parse all-day events in local timezone using ParseInLocation - Convert timed events to local time after parsing RFC3339 - Update ComputeDaySection to normalize both now and item time to local before comparison, ensuring consistent today/tomorrow classification #42: Mobile conditions page now uses 2 columns - Changed 600px breakpoint from 1 column to 2 columns Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23Fix calendar dedup: use Unix timestamp to handle timezone differencesPeter Stone
Events copied across calendars may have different timezone representations in their RFC3339 strings. Using Unix timestamps ensures the same moment in time produces the same dedup key. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23Fix bugs #24-27: calendar dedup, uncomplete tasks, planning viewPeter Stone
Bug fixes: - #24: Deduplicate calendar events across multiple calendars using summary + start time as key - #25: Change event icon from calendar to clock to avoid confusion with date display - #26: Add task uncomplete functionality via ReopenTask API for Todoist and closed=false for Trello - #27: Restructure planning view with sections for Scheduled (timed events/tasks), Today (unscheduled), Quick Add, and Upcoming (3 days) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22Support multiple Google CalendarsPeter Stone
GOOGLE_CALENDAR_ID now accepts comma-separated calendar IDs: GOOGLE_CALENDAR_ID=cal1@group.calendar.google.com,cal2@gmail.com Events from all calendars are merged and sorted by start time. If one calendar fails to fetch, others still load. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22Add Google Calendar integrationPeter Stone
- Add GoogleCalendarClient for fetching upcoming events - Add GoogleCalendarAPI interface and CalendarEvent model - Add config for GOOGLE_CREDENTIALS_FILE and GOOGLE_CALENDAR_ID - Display events in Planning tab with date/time formatting - Update handlers and tests to support optional calendar client Config env vars: - GOOGLE_CREDENTIALS_FILE: Path to service account JSON - GOOGLE_CALENDAR_ID: Calendar ID (defaults to "primary") Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>