Code review fixes: race conditions, stale state, dead code#6
Merged
Conversation
Critical: - Fix DB singleton race condition (store Future<Database> not Database?) - Route Today's 5 mutations through TaskProvider (not direct DB access) - Fix deleteTask crash when called on _currentParent - Fix _previousLastWorkedAt shared state corruption across tasks Important: - Enable PRAGMA foreign_keys = ON - Add Task.copyWith() replacing 8 fragile manual reconstructions - Guard completion animation overlay removal (check mounted) - Fix biased "Go Deeper" selection to use pickWeightedN - Extract shared card colors to lib/theme/app_colors.dart Minor: - Extract displayUrl to shared utility - Remove dead indicatorStyle code and branches - Fix _todayKey() date format (zero-padded) - Assert on invalid repeat intervals Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # .gitignore # lib/widgets/task_card.dart
…fect - CR-1: Remove dead indicatorStyle branches (compile error from merge) - CR-2: Add completeTaskOnly() so Today's 5 doesn't alter All Tasks nav - CR-3: _workedOn undo now restores isStarted state - CR-4: Leaf detail undo passes correct restoreTo timestamp - M8: getRootTaskIds uses lightweight ID-only query Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The plugin_marketplaces + plugins approach was crashing (exit code 1, 148ms, 0 cost). Switched to the official prompt-based pattern from claude-code-action docs. Also fixed pull-requests permission to write. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
API credit balance issue; removing until needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_currentParent+ fix shared_previousLastWorkedAtcorruption across tasksTask.copyWith()— replaces 8 fragile manual reconstructions in TaskProvider (-142 lines)PRAGMA foreign_keys = ON, guard overlay removal, fix biased random selectiondisplayUrlutility, remove deadindicatorStylecodeTest plan
flutter test)🤖 Generated with Claude Code