Files
PROJECT-CONTORL/openspec/changes/cleanup-debug-logging/tasks.md
beabigegg ed8d30e9bd spec: add proposals for debug logging cleanup and i18n completion
Two new proposals from comprehensive QA review:

1. cleanup-debug-logging
   - Remove 60+ console.log/error statements from frontend
   - Create environment-aware logging utility
   - Prevent sensitive data exposure in browser console

2. complete-i18n-coverage
   - Add missing translations to WeeklyReportPreview
   - Add missing translations to ReportHistory
   - Add missing translations to AuditPage modal
   - Use dynamic locale for date formatting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:28:27 +08:00

1.1 KiB

1. Create Logging Utility

  • 1.1 Create utils/logger.ts with environment-aware logging
  • 1.2 Export debug, info, warn, error functions
  • 1.3 Only output logs when import.meta.env.DEV is true

2. Cleanup Context Files

  • 2.1 Remove/replace console statements in NotificationContext.tsx
  • 2.2 Remove/replace console statements in ProjectSyncContext.tsx
  • 2.3 Remove/replace console statements in AuthContext.tsx

3. Cleanup Component Files

  • 3.1 Remove/replace console statements in GanttChart.tsx
  • 3.2 Remove/replace console statements in CalendarView.tsx
  • 3.3 Audit and clean remaining components

4. Cleanup Page Files

  • 4.1 Remove/replace console statements in Tasks.tsx
  • 4.2 Remove/replace console statements in other page files
  • 4.3 Audit and clean remaining pages

5. Cleanup Service Files

  • 5.1 Remove/replace console statements in api.ts
  • 5.2 Audit and clean remaining services

6. Verification

  • 6.1 Run frontend build successfully
  • 6.2 Verify no console.log in production build
  • 6.3 Test error handling still works correctly