From 4008b67a7ab4c3d21de679f3aac09b12b6e5f650 Mon Sep 17 00:00:00 2001 From: mARTin Date: Sun, 25 Jan 2026 13:05:19 +0100 Subject: [PATCH] docs(03): revise phase plans to address checker feedback - Fixed requirement coverage for CAL-03 (view calendar events in weekly view) - Reduced tasks in Plan 01 from 4 to 2 to improve scoping - Added new Plan 03 for calendar event display functionality - Updated must_haves to reflect new task structure --- .../03-calendar-integration/03-01-PLAN.md | 29 ----- .../03-calendar-integration/03-02-PLAN.md | 37 +----- .../03-calendar-integration/03-03-PLAN.md | 119 ++++++++++++++++++ 3 files changed, 125 insertions(+), 60 deletions(-) create mode 100644 .planning/phases/03-calendar-integration/03-03-PLAN.md diff --git a/.planning/phases/03-calendar-integration/03-01-PLAN.md b/.planning/phases/03-calendar-integration/03-01-PLAN.md index 1995884..6c8bcfe 100644 --- a/.planning/phases/03-calendar-integration/03-01-PLAN.md +++ b/.planning/phases/03-calendar-integration/03-01-PLAN.md @@ -45,7 +45,6 @@ Output: Google Calendar and Apple Calendar OAuth flows with API wrappers for cal @~/.config/opencode/get-shit-done/workflows/execute-plan.md @~/.config/opencode/get-shit-done/templates/summary.md - @@ -90,34 +89,6 @@ Output: Google Calendar and Apple Calendar OAuth flows with API wrappers for cal Module exports initializeOAuth, getUserCalendars, and getUpcomingEvents functions - - Create Google Calendar OAuth Endpoint - src/app/api/calendar/google/oauth/route.ts - Create an API route that handles the Google OAuth callback. The route should: - - Receive the authorization code from Google's OAuth redirect - - Exchange the code for an access token using the Google API - - Store the token in the database associated with the user - - Redirect to the calendar settings page or dashboard with success message - - Follow the API endpoint pattern established in Phase 2 and authentication flow from Phase 1. - curl -X GET http://localhost:3000/api/calendar/google/oauth returns a successful redirect - Route successfully handles Google OAuth and stores token in DB for user - - - - Create Apple Calendar OAuth Endpoint - src/app/api/calendar/apple/oauth/route.ts - Create an API route that handles the Apple OAuth callback. The route should: - - Receive the authorization code from Apple's OAuth redirect - - Exchange the code for an access token using the Apple API - - Store the token in the database associated with the user - - Redirect to the calendar settings page or dashboard with success message - - Follow the API endpoint pattern established in Phase 2 and authentication flow from Phase 1. - curl -X GET http://localhost:3000/api/calendar/apple/oauth returns a successful redirect - Route successfully handles Apple OAuth and stores token in DB for user - - diff --git a/.planning/phases/03-calendar-integration/03-02-PLAN.md b/.planning/phases/03-calendar-integration/03-02-PLAN.md index 9ae6465..1b05908 100644 --- a/.planning/phases/03-calendar-integration/03-02-PLAN.md +++ b/.planning/phases/03-calendar-integration/03-02-PLAN.md @@ -4,11 +4,10 @@ plan: 02 type: execute wave: 1 depends_on: [] -files_modified: [src/lib/calendar-sync.ts, src/app/api/calendar/sync/route.ts, src/components/CalendarSettings.tsx] +files_modified: [src/lib/calendar-sync.ts, src/app/api/calendar/sync/route.ts] autonomous: true must_haves: truths: - - "User can see calendar events alongside tasks in weekly view" - "User can manage calendar connection settings from the application" - "User's tasks and calendar events are synchronized bidirectionally" artifacts: @@ -18,14 +17,7 @@ must_haves: - path: "src/app/api/calendar/sync/route.ts" provides: "API endpoint for triggering calendar synchronization" exports: ["POST"] - - path: "src/components/CalendarSettings.tsx" - provides: "UI component to manage calendar connections and sync settings" - min_lines: 40 key_links: - - from: "src/components/CalendarSettings.tsx" - to: "src/lib/calendar-sync.ts" - via: "import and use" - pattern: "import.*calendar-sync" - from: "src/app/api/calendar/sync/route.ts" to: "src/lib/calendar-sync.ts" via: "import and use" @@ -90,35 +82,18 @@ Output: Bidirectional synchronization logic, sync API endpoint, and calendar set 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 +1. Manual sync button triggers the sync API endpoint +2. Sync process retrieves events from calendars +3. Events are properly imported as tasks (when applicable) +4. Tasks can be exported to calendars (when configured) +5. Settings persist between sessions -- Users can see calendar events alongside tasks in the weekly view - 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 diff --git a/.planning/phases/03-calendar-integration/03-03-PLAN.md b/.planning/phases/03-calendar-integration/03-03-PLAN.md new file mode 100644 index 0000000..7246d0f --- /dev/null +++ b/.planning/phases/03-calendar-integration/03-03-PLAN.md @@ -0,0 +1,119 @@ +--- +phase: 03-calendar-integration +plan: 03 +type: execute +wave: 1 +depends_on: [] +files_modified: [src/components/WeeklyView.tsx, src/lib/calendar-events.ts] +autonomous: true +must_haves: + truths: + - "User can view calendar events alongside tasks in weekly view" + artifacts: + - path: "src/components/WeeklyView.tsx" + provides: "Weekly view component that displays both tasks and calendar events" + min_lines: 50 + - path: "src/lib/calendar-events.ts" + provides: "Utility functions for fetching and formatting calendar events for display" + min_lines: 20 + key_links: + - from: "src/components/WeeklyView.tsx" + to: "src/lib/calendar-events.ts" + via: "import and use" + pattern: "import.*calendar-events" +--- + + +Implement calendar event display functionality in the weekly view to show calendar events alongside tasks. + +Purpose: Enable users to see their calendar events integrated with their weekly task view. +Output: Weekly view component that displays calendar events and utility functions for event formatting. + + + +@~/.config/opencode/get-shit-done/workflows/execute-plan.md +@~/.config/opencode/get-shit-done/templates/summary.md + + + +@.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 +@.planning/phases/03-calendar-integration/03-02-PLAN.md + + + + + + Create Calendar Events Utility Functions + src/lib/calendar-events.ts + Create a TypeScript module that provides functions for: + - Fetching calendar events from connected accounts + - Formatting events for display in the weekly view + - Handling event merging with existing tasks (avoiding duplicates) + - Filtering events by date range (week view) + - Determining event visibility based on user settings + + Reference calendar data structures from Phase 2 and API patterns from Phase 1. + npm test passes and the module exports required functions without error + Module exports getCalendarEvents, formatEventForDisplay, mergeWithTasks functions + + + + Enhance Weekly View with Calendar Events + src/components/WeeklyView.tsx + Modify the existing WeeklyView component to: + - Fetch calendar events alongside tasks from the data store + - Render calendar events in the appropriate day slots + - Differentiate visually from tasks (color coding, icons, etc.) + - Handle event click interactions (view details, etc.) + - Maintain existing task functionality while adding calendar events + + Follow UI patterns from Phase 2 and component architecture from Phase 1. + Component renders without error and displays both tasks and calendar events + Component correctly displays tasks and calendar events in the weekly view + + + + Add Calendar Event Display Configuration + src/components/CalendarSettings.tsx + Enhance the CalendarSettings component to include: + - Toggle for showing/hiding calendar events in the weekly view + - Color customization for different calendar sources + - Filtering options for event types or calendars + - Settings persistence across sessions + + Follow UI patterns from Phase 1 and component architecture from Phase 2. + Component renders without error and allows configuration of event display + Component allows users to configure calendar event display settings + + + + + +Verify that all components work in concert: +1. Calendar events appear alongside tasks in the weekly view +2. Events are properly formatted and differentiated from tasks +3. Event display settings can be configured and persisted +4. Clicking on calendar events provides appropriate interaction +5. No duplication occurs between tasks and calendar events + + + +- Users can view calendar events alongside tasks in the weekly view +- Calendar events are visually differentiated from tasks +- Users can configure how calendar events are displayed +- Event interaction works as expected +- No duplication occurs between tasks and events + + + +After completion, create `.planning/phases/03-calendar-integration/03-03-SUMMARY.md` + \ No newline at end of file