--- id: task-001 title: Fix aggregator drag & drop line ending bug status: Done assignee: [@claude] created_date: '2025-12-05 12:21' labels: [dev-ops, bug-fix] priority: high dependencies: [] --- ## Description Fixed the aggregator web UI drag & drop functionality that was failing to update task status. The issue was that the `updateTaskField`, `addUpdatedDate`, and `updateTaskDescription` functions only handled Unix line endings (`\n`), while the markdown parser correctly handled both Windows (`\r\n`) and Unix line endings. When task files had Windows line endings (CRLF), the frontmatter regex would fail to match, causing the update to silently fail (returning unchanged content). The PATCH request would return success, but the actual file wasn't modified, so the WebSocket broadcast would revert the UI back to the old status. ## Plan 1. [x] Investigate drag & drop functionality in aggregator web UI 2. [x] Identify root cause: line ending mismatch between parser and update functions 3. [x] Update `updateTaskField` to handle both CRLF and LF line endings 4. [x] Update `addUpdatedDate` with same fix 5. [x] Update `updateTaskDescription` with same fix 6. [x] Test the fix with both line ending types 7. [x] Push changes to remote ## Acceptance Criteria - [x] Drag & drop works with Unix (LF) line endings - [x] Drag & drop works with Windows (CRLF) line endings - [x] Original line ending style is preserved when writing back ## Notes Files modified: `src/aggregator/index.ts` The fix detects the original line ending style and preserves it when writing back to maintain file consistency.