My-Weekly-ToDo-List/.planning/phases/03-calendar-integration/03-02-PLAN.md
mARTin c82572935c feat: dark mode color adjustment, multi-source quotes, UI text wrapping, and versioning rules
- Add dark mode color adjustment helper for category colors
- Support multiple motivational quote source URLs
- Fix text wrapping for tasks/events to prevent horizontal overflow
- Improve someday list item layout for long text
- Add CLAUDE.md with semantic versioning and git workflow rules
- Update test/doc URLs and planning docs

v1.1.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:33:25 +01:00

4.9 KiB

phase plan type wave depends_on files_modified autonomous must_haves
03-calendar-integration 02 execute 1
src/lib/calendar-sync.ts
src/app/api/calendar/sync/route.ts
src/components/CalendarSettings.tsx
true
truths artifacts key_links
User can manage calendar connection settings from the application
User's tasks and calendar events are synchronized bidirectionally
path provides min_lines
src/lib/calendar-sync.ts Bidirectional synchronization logic for calendars and tasks 30
path provides exports
src/app/api/calendar/sync/route.ts API endpoint for triggering calendar synchronization
POST
path provides min_lines
src/components/CalendarSettings.tsx UI component to manage calendar connections and sync settings 40
from to via pattern
src/components/CalendarSettings.tsx src/lib/calendar-sync.ts import and use import.*calendar-sync
from to via pattern
src/app/api/calendar/sync/route.ts src/lib/calendar-sync.ts import and use import.*calendar-sync
Implement calendar synchronization features enabling bidirectional syncing of calendar events and tasks.

Purpose: Allow seamless integration of calendar events with weekly task view and enable users to manage calendar connections. Output: Bidirectional synchronization logic, sync API endpoint, and calendar settings UI.

<execution_context> @~/.config/opencode/get-shit-done/workflows/execute-plan.md @~/.config/opencode/get-shit-done/templates/summary.md </execution_context>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/REQUIREMENTS.md

Relevant context from previous phases

@.planning/phases/01-setup-and-authentication/01-01-PLAN.md @.planning/phases/01-setup-and-authentication/01-02-PLAN.md @.planning/phases/02-task-management/02-01-PLAN.md @.planning/phases/03-calendar-integration/03-01-PLAN.md

Implement Bidirectional Sync Logic src/lib/calendar-sync.ts Create a TypeScript module that implements the core synchronization logic: - Determine which calendars are connected and active - Fetch events from calendar APIs - Identify tasks that need to be imported from calendars - Identify calendar events that need to be converted to tasks - Handle conflicts in naming, dates, or other attributes - Handle updates and deletions from both sides

Reference calendar data structures from Phase 2 and API patterns from Phase 1. npm test passes and the module exports syncCalendarEvents and syncCalendarTasks functions without error Module exports syncCalendarEvents and syncCalendarTasks functions that handle bidirectional sync

Create Calendar Sync API Endpoint src/app/api/calendar/sync/route.ts Create a POST API endpoint that: - Validates user authentication - Triggers the calendar synchronization process - Calls the sync logic from calendar-sync.ts - Returns appropriate status codes and responses - Handles errors gracefully with appropriate messaging

Follow the API endpoint pattern established in Phase 2 and authentication flow from Phase 1. curl -X POST http://localhost:3001/api/calendar/sync returns 200 with successful sync status Endpoint successfully triggers sync process and returns status JSON

Create Calendar Settings UI Component src/components/CalendarSettings.tsx Create a React component that: - Displays a list of connected calendars - Allows toggling calendar sync settings - Shows last sync timestamp for each calendar - Provides a button to trigger manual sync - Includes options to disconnect calendars

Follow UI patterns from Phase 1 and component architecture from Phase 2. Component renders without error in development environment Component renders properly with all calendar management options

Verify that all components work in concert: 1. Calendar settings UI displays connected calendars 2. Manual sync button triggers the sync API endpoint 3. Sync process retrieves events from calendars 4. Events are properly imported as tasks (when applicable) 5. Tasks can be exported to calendars (when configured) 6. Settings persist between sessions

<success_criteria>

  • Users can manage calendar connections and sync settings from UI
  • Bidirectional synchronization works between calendar events and tasks
  • Events are properly imported from calendars to tasks
  • Tasks can be created from calendar events when configured </success_criteria>
After completion, create `.planning/phases/03-calendar-integration/03-02-SUMMARY.md`