8256e57118
- Add @TableIndex on tasks.user_id and task_completions.user_id (FK scan perf) - Wrap incrementStreak in transaction to prevent lost-update race - Sentinel pattern in TaskEntity.copyWith and PetStateEntity.copyWith so nullable fields (deadline, snoozeUntil, photoPath, energyToday, etc.) can be explicitly cleared to null - Remove unused TaskCompletionEntity import from task_repository.dart - Harden completeTask: getSingleOrNull + ArgumentError instead of getSingle throw - Add doc comment to getTodayTasks clarifying no date filter (pending = today) - Regenerate app_database.g.dart (CREATE INDEX statements added) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>