mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-01-25 14:09:16 -06:00
Fix multiple issues with CalDAV calendar integration: Error Handling & User Experience: - Fix 'Integration not found' error after saving CalDAV configuration - Improve error handling in view_integration route to gracefully handle missing/invalid credentials - Add connector error display in integration view template with helpful links - Fix 'Test Connection' button always showing errors by improving credential validation - Add better error messages for SSL, timeout, and connection errors with actionable guidance Sync Improvements: - Fix sync returning 0 items with no feedback - now provides detailed messages - Add support for DURATION-based events (not just DTEND) - Improve sync result messages to distinguish between 'no events found' vs 'all events already imported' - Add synced_items field for compatibility with scheduled sync tasks - Better handling of duplicate UID race conditions during import CalDAV Client Enhancements: - Improve XML parsing error handling with clear error messages - Handle empty responses gracefully (return empty multistatus for no events) - Add time range validation in fetch_events - Better error handling in calendar discovery with step-by-step error messages - Improve iCalendar parsing with better error logging Configuration & Setup: - Add auto_sync configuration option in CalDAV setup form - Add URL validation for server_url and calendar_url - Ensure credentials are properly saved and integration marked as active - Improve CalDAV setup route to handle missing credentials during initial setup Logging & Debugging: - Add comprehensive logging throughout sync process - Log calendar discovery steps and event fetch operations - Better error context in logs for troubleshooting This addresses user-reported issues where: - Users couldn't click on integration after saving - Test Connection always failed with generic errors - Sync showed 0 items with no explanation - Credentials weren't being saved properly