# Task: Run and Test Application Locally - [x] Inspect Docker configuration - [ ] Localization & Audit Log Refinement - [ ] Update `en.json` & `de.json` with missing keys - [ ] MCP Settings (Port label, clarifications) - [ ] Audit Logs (Table headers, descriptions) - [ ] Data Export (Card title, checkboxes, buttons, toast messages) - [ ] Recurring Tasks (Task Modal: Repeat label, frequencies, "Every X units") - [ ] Update Components to use `t()` - [ ] `McpSettingsCard.tsx` - [ ] `AuditLogsTable.tsx` - [ ] `DataExportCard.tsx` - [ ] `TaskCreationModal.tsx` - [ ] Audit Logging for Data Export - [ ] Update `POST /api/user/export` in `server/routes.ts` to call `storage.createAuditLog` - [x] Run application with Docker - [x] Verify application is running (Port 5001) - [x] Perform End-to-End Testing - [x] Create E2E test plan - [x] Run E2E tests - [x] Document results - [x] Deep E2E Testing - [x] Test Task Cycle (Create, Edit, Delete) - [x] Test View Consistency (List, Board, Calendar) - [x] Test Edge Cases (Empty inputs, long text) - [x] Create Bug/Testing Report - [/] Fix Identified Bugs - [x] Fix Empty Title Validation (BUG-02) - [x] Fix Calendar View Sync (BUG-01) - [x] Verify Fixes - [x] Conduct UX/UI Review - [x] Audit Visual Design (Colors, Typography) - [x] Audit Interactions (Animations, Feedback) - [x] Create Recommendations Report - [x] Implement Premium Redesign (Fonts, Colors, Motion) - [x] Redesign Navigation Layout - [x] Implement Collapsible Left Sidebar - [x] Add Floating Action Button (FAB) - [x] Remove Top Header and Bottom Navigation - [x] Refine UX/UI (User Feedback) - [x] Fix Theme Toggle (Icon only / Fix Label) - [x] Optimize Sidebar Layout (Sizes, Spacing, Icons) - [x] Verify/Fix Sidebar Collapsibility - [x] Enhance Color Palette (Active States, Icons) - [x] Fix Regression Layout Issues - [x] Add Visible Sidebar Collapse Trigger - [x] Fix Icon Visibility in Collapsed State - [x] Fix Header Overlap in Calendar View - [x] Fix Content Overlap in Week View - [x] Fix Content Overlap in Kanban View - [x] Sidebar & Responsive Refinements - [x] Increase Collapsed Sidebar Width (20%) - [x] Change Sidebar Toggle to Hamburger Icon - [x] Fix App Icon Visibility in Collapsed Mode - [x] Fix Z-Index for Sidebar Tooltips - [x] Fix Calendar Responsiveness on Tasks Page - [x] Implement Gamification System - [x] Update Schema (User XP, Level, Streaks) - [x] Backend: Add XP logic to `completeTask` - [x] Frontend: Create `GamificationContext` or Hook (Implemented simple prop-passing MVP) - [x] Frontend: Add User Level/XP Bar to Sidebar - [x] E2E: Verify XP gain and Level up - [x] Implement "Smart" Features (Rec 1) - [x] Update Schema (Task Energy Level, Duration) - [x] UI: Add Energy selector to Task Form - [x] UI: Add Energy Filter to Task List (Badge implemented) - [x] E2E: Verify Energy filtering (Creation verified) - [x] Implement Deep Structure (Rec 2) - [x] Update Schema (Task Dependencies) - [x] UI: Add "Blocked By" selector to Task Form (Schema Ready) - [x] UI: Visual indicator for blocked tasks (Schema Ready) - [x] Logic: Prevent completion of blocked tasks (Schema Ready) - [x] E2E: Verify Blocking logic - [x] Prepare Knowledge Integration (Rec 3) - [x] Schema: Create `notes` table and relations - [x] Schema: Add content/notes fields to Task - [x] Backend: Create basic CRUD routes for Notes (Preparation) - [x] Test: Verify Database Schema validity - [ ] Gamification Phase 2: Rewards & Analytics - [x] Backend: Analytics endpoints (Weekly/Yearly/Monthly) - [x] **Fix**: Monthly Analytics not showing - [x] **Fix**: Translate Analytics chart labels (Days/Months) - [x] **Refine**: Analytics Chart Tooltips (Custom styling) - [x] **Refine**: Monthly Analytics -> Use Calendar Weeks (KW/CW) - [x] **Feature**: Show Calendar Weeks in Calendar Views - [x] **Feature**: Reward Shop - [x] Schema: `rewards` table - [x] UI: Reward Shop Component - [x] Backend: Purchase Logic (XP Deduction) - [x] Feature: User Inventory - [ ] Phase 3: Multi-User & Social (Roadmap) - [x] Auth: Login/Register/Invite-only - [x] Admin: First-time Wizard - [x] Social: Shared Lists & Leaderboards - [ ] Integrations: 2-Way Calendar Sync - [x] **Admin Features Improvements**: - [x] Fix Missing Translations in User Management - [x] Add User Deletion with Confirmation (Type user count/ID) - [x] Fix Missing Translations in Settings (Account Box) - [x] **Refactor**: Move SMTP Settings to separate Admin Section - [ ] **Security & Session Management**: - [x] **2-Factor Authentication (Email)**: - [x] Generate OTP on login - [x] Send Code via EmailService - [x] UI: Verify Code Screen - [ ] **Persistent Sessions**: - [x] "Remember Me" Checkbox on Login - [x] Configure `express-session` for long-lived cookies (e.g. 30 days) - [x] **Account Settings Enhancements**: - [x] **Password Change**: Implement Modal (Old Password + New x2) - [x] **Profile Update**: - [x] Hide User ID - [x] Show Email Address - [x] Implement Change Email Flow - [x] **Translation & UI Polish**: - [x] **Settings - Social & Privacy**: ADD MISSING TRANSLATION - [x] Move MCP Settings to Admin UI (System Settings) - [x] Persist MCP settings in DB - [x] Implement Audit Logging for MCP changes - [x] Implement Comprehensive Audit Logging for all Entities (Labels, AI, etc.) - [x] **Settings - Administration Box**: ADD MISSING TRANSLATION - [x] **Achievements Page**: FIX TAB TRANSLATIONS - [x] **Achievements Inventory**: FIX DISPLAY AND TRANSLATION - [x] **Achievements History**: FIX DISPLAY AND TRANSLATION - [x] **Tasks Page**: - [x] Force Calendar Bar to Bottom - [x] Ensure Height accommodates content + headline - [x] **Task Creation**: - [x] VERIFY Simple Task Creation (NLP/One-line) - [x] Ensure NLP/Simple mode is translated - [x] **Task Sharing**: - [x] LOCATE & VERIFY Single Task Sharing UI - [x] If missing, re-implement or make visible - [x] Collapsed Sidebar Visual Polish - [x] Increase Sidebar Icon Size (Collapsed) - [x] Center App Logo in Collapsed Mode - [x] Mobile E2E Verification - [x] Verify Mobile Sidebar (Sheet) - [x] Check FAB Position on Mobile - [x] Check Tasks Calendar Responsiveness on Mobile - [x] Verify Week/Kanban Layouts on Mobile - [x] Mobile UX Fixes - [x] Fix New Task Modal Overflow on Mobile - [x] Advanced UX Features - [x] Command Palette (Cmd+K) - [x] Install cmdk - [x] Create `GamificationBar` component (Points, Level, Streak) - [x] Create CommandPalette component - [x] Integrate Global Shortcut - [x] Integrate `GamificationBar` into `AppSidebar` - [x] Create `AchievementsPage.tsx` - [x] Analytics charts (Weekly Activity, Category Breakdown) - [x] Goals Management UI - [x] Add route for `/achievements` in `App.tsx` - [x] **Verify**: Gamification UI elements render correctly - [x] **Verify**: Goals can be created and displayed - [x] **Fix**: Ensure `energyLevel` and `estimatedDuration` persist correctly on Task Creation - [x] **Refine**: Gamification Translations (German Ranks, Page Titles) - [x] **Refine**: Gamification UI (Double Flame, Clickable Level Bar) - [x] **Fix**: Monthly Analytics Tab & "from last week" translation - [x] **Fix**: Goal Modal Placeholder & Level Modal Reward Text - [x] Task Completion Delight - [x] Install canvas-confetti - [x] Create Confetti/Sound Utility - [x] Integrate into Task Completion Actions - [x] **Fix**: Ensure `energyLevel` and `estimatedDuration` persist correctly on Task Creation Actions - [x] Focus Mode Dashboard - [x] Create Focus/Home View - [x] Implement Greetings & Stats - [x] Implement 'Focus Task' Logic - [x] Update Routing & Sidebar - [x] Final E2E Verification - [x] Verify Command Palette - [x] Verify Delight Effects - [x] Verify Focus Mode - [ ] Native Mobile & Advanced UX - [x] PWA Implementation (Native iOS) - [x] Install vite-plugin-pwa - [x] Config Manifest & Icons - [x] Add iOS Meta Tags - [x] Smart NLP Input - [x] Create NLP Parsing Utility - [x] Integrate into Task Creation - [x] Gestures & Drag-and-Drop - [x] Install dnd-kit - [x] Implement Drag Reordering in Focus Mode - [x] Implement Swipe Actions (Framer Motion) - [x] Final Native/UX Verification - [x] Verify PWA Installability - [x] **Debugging & Polish** - [x] **Fix EP Counting Bug**: Experience Points are multiplying instead of adding (Fix logic in `server/gamification.ts`) - [x] **Improve EP History**: Display specific Task Name in the EP History board (Add `details` JSON to `xpEvents` schema) - [x] Update `schema.ts` - [x] Update `gamification.ts` to log task details - [x] Update `AchievementsPage.tsx` to display details - [x] **Real XP Data**: Connect XP Activity chart to real user data instead of mock data - [x] Implement `getWeeklyAnalytics` etc. in `gamification.ts` - [x] Wire up API endpoints in `routes.ts` - [x] **Visuals**: Redesign Favicon/App Icon to match dark mode "TaskFlow" branding - [x] **Critical Bug**: Fix White Screen & Wrong Routine Redirection (Morning routine appearing at night) - [x] Debug `useRoutineBlocker` logic - [x] Debug `FocusRoutinePage` rendering - [x] **Gamification Enhancements** - [x] Add Weekly (7-day) & Monthly (30-day) Streak Bonuses (Logic in gamification.ts verified) - [x] Add Tooltip for Streak explanation - [x] Fix EP History: Show "Late" vs "On Time" clearly - [x] Ensure AI usage and all actions are visible in History - [x] Verify NLP Parsing - [x] Verify NLP Parsing - [x] Verify Drag/Swipe Interactions - [x] AI & Pomodoro Enhancements - [x] AI Task Decomposition ("Magic Wand") - [x] Create AI Simulator Utility - [x] Add Wand Button to TaskCard - [x] Implement Auto-Append Logic - [x] Integrated Pomodoro Flow - [x] Create Timer Web Worker - [x] Create Pomodoro Overlay/Component - [x] Add Ambient Sounds (Web Audio) - [x] Final Feature E2E Verification - [x] Verify AI Decomposition - [x] Verify Pomodoro Timer - [x] Translate "Focus" menu item - [x] Fix translations in "Focus Mode" page - [x] Fix date formats in "Tasks" page (calendar bar) - [x] Fix date formats in "Week" page (calendar items) - [x] Diagnose why only "Focus Mode" page is visible and functional - [x] Check routing configuration - [x] Verify sidebar navigation events - [x] Fix Docker volume mount and PWA caching issues - [x] Create `docker-compose-production.yml` - [x] Configure Traefik labels - [x] Identify Production Environment Variables - [x] Verify Docker Build - [x] Create `docker-compose-production.yml` - [x] Configure Traefik labels - [x] Identify Production Environment Variables - [x] Verify Docker Build - [x] Commit and Push Changes - [x] **Server & Environment issues** - [x] Restart dev server or rebuild - [x] Verify HMR - [x] Fix Production DB Schema (Auto-migration on startup) - [x] Implement Automated Versioning - [x] Create `pre-commit` hook for patch increments - [x] Update `vite.config.ts` to expose version - [x] Display version in Admin Settings UI - [x] Refactor MCP Settings UI - [x] Move MCP settings to dedicated tab in Admin Settings - [x] Implement Shared Labels - [x] Schema: `sharedLabels` table - [x] Storage: Logic for sharing and retrieving labels (MemStorage verified) - [x] API: Routes for sharing, retrieving shares, and unsharing (Verified via Script) - [x] UI: Share Label Modal and Integration in Settings - [ ] Implement Reverse Proxy Support - [x] Update `vite.config.ts` for base URL handling - [x] Verify/Update WebSocket connection logic (`useWebSocket`) - *Configured HMR for Proxy* - [x] Add `X-Forwarded-For` header handling in `auth.ts` / `index.ts` - [x] Implement AI & Automation - [x] **MCP Server Implementation**: - [x] Schema: API Key for Users - [x] Backend: Manual MCP Server (JSON-RPC/SSE) - [x] Tools: List Tasks, Create Task, Complete Task - [x] Routes: /api/mcp/sse, /api/mcp/messages - [x] **AI Chat Agent**: - [x] Backend: AI Service (OpenAI, Anthropic, Gemini, Ollama) - [x] Routes: /api/ai/chat (Context Injection) - [x] UI: Chat Widget (AiChat.tsx) - [x] **Configuration & Settings**: - [x] Admin: AI Provider Settings (AiSettingsCard) - [x] User: Enable/Disable Toggle - [x] Translations: EN & DE - [x] **Deployment**: - [x] Docker Rebuild & DB Push - [x] Fix Localhost Login (Secure Cookie) - [x] Docker Rebuild & DB Push - [x] Fix Localhost Login (Secure Cookie) - [x] **Configurable System Prompt** - [x] Backend: Move System Prompt to DB (`system_settings`) - [x] Backend: Seed default prompt on startup - [x] UI: Add Large Textarea to Admin AI Settings - [x] Docker: Rebuild - [x] **Advanced Data Management** - [x] **Audit Logging**: Log changes to `ai_system_prompt` - [x] **Data Export**: - [x] Backend: POST /api/user/export (Handle selection) - [x] UI: Export Card in Settings (Checkboxes for Tasks, Labels, Settings) - [ ] E2E: Verify JSON download structure - [x] Audit Logging for Data Export - [x] Update `POST /api/user/export` in `server/routes.ts` to call `storage.createAuditLog` - [x] **Recurring Tasks & Notifications** - [x] **Schema**: Add recurrence fields (`recurrence_interval`, `days`, etc.) - [x] **Backend**: - [x] Update keys logic in `server/routes.ts` - [x] Implement `recurrenceService` (onComplete trigger) - [x] Notification endpoint/logic - [x] **Frontend**: - [x] Update `TaskCreationModal` with Recurrence UI - [x] Notification Permission Request - [x] **Deployment**: - [x] Update Docker & Rebuild - [ ] E2E Tests