Repository navigation
feat: Google Calendar sync backend - #24
Merged
Merged
Conversation
New POST /api/habits/{id}/skip endpoint that advances a recurring
habit's due date to the next scheduled occurrence without creating
a HabitLog entry. Reuses existing AdvanceDueDate domain method.
Validates: habit exists, owned by user, is recurring, due today or
overdue, not already completed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace ReminderMinutesBefore (int) with ReminderTimes (List<int>) stored as jsonb, supporting multiple reminder times per habit - Update SentReminder to track MinutesBefore for per-reminder deduplication with unique index (HabitId, Date, MinutesBefore) - Update ReminderSchedulerService to iterate over all reminder times with human-readable notification text (minutes/hours/days) - Fix CreateSubHabitCommand to accept days, frequency, and dueTime overrides so AI chat sub-habits get correct active days - Update all DTOs, commands, queries, and AI chat integration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrates existing ReminderMinutesBefore values to ReminderTimes jsonb array before dropping the old column. Adds MinutesBefore to SentReminders with updated unique index. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous migration had a stale model snapshot that didn't include the value converter/comparer metadata for ReminderTimes, causing PendingModelChangesWarning in CI. Regenerated from scratch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add GoogleAccessToken/GoogleRefreshToken to User entity - Store Google tokens during OAuth login flow - Add GET /api/calendar/events (preview events for selection) - Add POST /api/calendar/import (create habits from selected events) - RRULE parsing: DAILY, WEEKLY, MONTHLY, YEARLY, BYDAY, INTERVAL - Google token refresh service with OAuth2 token endpoint - Map event reminders to Orbit reminderTimes array - DB migration for Google token columns Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add HasImportedCalendar to User entity, set after successful import - Add HasGoogleConnection (computed from token presence) to profile response - DB migration for HasImportedCalendar column Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/calendar/events- fetch events from Google Calendar for user selectionPOST /api/calendar/import- create habits from selected events with RRULE parsingConfig Required
Google:ClientIdandGoogle:ClientSecretenv vars for token refreshcalendar.readonlyscope added to Supabase Google providerTest plan
🤖 Generated with Claude Code