Skip to content

Daily re-clarification surface floods with waiting-for tasks as "actionless" (#289)#295

Merged
TMaYaD merged 2 commits into
mainfrom
issue-289/daily-re-clarification-surface-floods-with-waiting
May 14, 2026
Merged

Daily re-clarification surface floods with waiting-for tasks as "actionless" (#289)#295
TMaYaD merged 2 commits into
mainfrom
issue-289/daily-re-clarification-surface-floods-with-waiting

Conversation

@trixy-the-ai-bot
Copy link
Copy Markdown
Collaborator

Summary

  • Excluded delegated tasks (those carrying a person-typed tag) from the actionless branch of _needsReviewWhere in todo_dao.dart so the daily Review Next Actions step stops flooding with waiting-fors whose next_action_text is legitimately empty. The stale branch is untouched, so a waiting-for nudged more recently than it was last clarified still surfaces.
  • Widened readsFrom for watchNeedsReview / getNeedsReview / getNeedsReviewCount / isNeedsReview from {todos} to {todos, todoTags, tags} so Drift invalidates the stream when a person tag is attached or detached — without this, a newly tagged task would linger on the daily card until cold reload.
  • Added a staleWaitingFor ReclarifyHint variant to task_review_step.dart: stale delegated tasks now badge with "Waiting for {person} — still waiting?" and default to a one-tap "Still waiting" action that stamps last_clarified_at without a person-picker round trip.
  • Loaded person tags for the review snapshot in FocusSessionPlanningNotifier.advanceStep via a single batched getPersonTagsForTodos call and stored them on FocusSessionPlanningState.reviewPersonTags, so the card renders delegate names without a per-frame DAO call.

Test plan

  • Unit: intent='next' task with a person tag and empty next_action_text does NOT appear in watchNeedsReview().
  • Unit: same delegated task with last_next_action_completion_at > last_clarified_at DOES appear (stale branch still fires).
  • Unit: non-delegated actionless and stale tasks behave unchanged (regression).
  • Unit: stream invalidates when a person tag is attached to / detached from an actionless task.
  • Widget: TaskReviewStep renders the staleWaitingFor badge with the delegate name and "Still waiting" as the primary action for a stale waiting-for.
  • Widget: tapping "Still waiting" stamps last_clarified_at and clears the card without opening the person picker.
  • Manual: run the daily planning ritual on a DB with delegated tasks and confirm the Review Next Actions queue no longer surfaces fresh waiting-fors.

🤖 Generated with Claude Code

Closes #289

@trixy-the-ai-bot trixy-the-ai-bot self-assigned this May 14, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c91670d4-9755-456f-a5e9-e208ce85d785

📥 Commits

Reviewing files that changed from the base of the PR and between 808875a and 5819053.

📒 Files selected for processing (8)
  • NOTES.md
  • app/lib/database/daos/todo_dao.dart
  • app/lib/providers/focus_session_planning_provider.dart
  • app/lib/screens/planning/steps/task_review_step.dart
  • app/test/database/todo_dao_needs_review_test.dart
  • app/test/screens/planning/steps/task_review_step_hint_test.dart
  • app/test/screens/planning/steps/task_review_step_waiting_for_test.dart
  • app/test/screens/tag_cloud_test.dart
💤 Files with no reviewable changes (1)
  • app/test/screens/tag_cloud_test.dart

Walkthrough

This PR implements issue #289, which addresses daily re-clarification surface flooding with delegated (waiting-for) tasks marked as "actionless." The fix spans four areas: (1) a SQL predicate update in TodoDao._needsReviewWhere that excludes person-tagged tasks from the actionless branch via NOT EXISTS, paired with expanded Drift readsFrom declarations; (2) state plumbing to batch-load person tags into FocusSessionPlanningState.reviewPersonTags during Step 1 entry; (3) refactored hint logic that introduces a new ReclarifyHint.staleWaitingFor enum variant and separate helper functions for staleness detection; and (4) UI rendering that displays stale delegated tasks with a person-aware badge ("Waiting for {name}") and a "Still waiting" quick-action label. Tests cover the DAO predicate, hint logic, and widget rendering across delegated/non-delegated/actionless/stale combinations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • TMaYaD/Jeeves#280: Both PRs refine the actionless classification in TodoDao._needsReviewWhere and realign task_review_step.dart hint logic, though this PR adds the delegated person-tag and staleness dimension.

Suggested labels

domain-modelling, engineering

Suggested reviewers

  • TMaYaD
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main problem: the daily review surface incorrectly flooding with waiting-for tasks as actionless. This is the core issue being resolved.
Description check ✅ Passed The description comprehensively details the changes made: exclusion of delegated tasks from actionless branch, stream invalidation updates, staleWaitingFor hint variant, and batched person tag loading.
Linked Issues check ✅ Passed The PR successfully addresses all core requirements from #289: excludes delegated tasks from actionless predicate via person-tag check, preserves stale-branch behavior, adds staleWaitingFor UI with delegate names, loads person tags efficiently, and adds comprehensive tests for predicate, staleness, UI rendering, and stream invalidation.
Out of Scope Changes check ✅ Passed All changes are directly scoped to #289: predicate fixes, stream invalidation, UI enhancements, and tests. The removal of explicit Tag import in tag_cloud_test.dart aligns with re-exporting Tag from the provider.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-289/daily-re-clarification-surface-floods-with-waiting

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@trixy-the-ai-bot trixy-the-ai-bot requested a review from TMaYaD May 14, 2026 02:40
@trixy-the-ai-bot trixy-the-ai-bot added the in-progress Bot is actively working on this label May 14, 2026
@TMaYaD
Copy link
Copy Markdown
Owner

TMaYaD commented May 14, 2026

@CodeRabbit resume

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

✅ Actions performed

Reviews resumed.

@TMaYaD
Copy link
Copy Markdown
Owner

TMaYaD commented May 14, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@trixy-the-ai-bot trixy-the-ai-bot removed the in-progress Bot is actively working on this label May 14, 2026
@trixy-the-ai-bot
Copy link
Copy Markdown
Collaborator Author

Merge conflicts resolved.

Merged main into the feature branch, resolving a NOTES.md conflict by keeping both 2026-05-14 entries (from issues #289 and #290) while the other 9 files auto-merged cleanly. Pre-commit hooks passed (build_runner, flutter analyze, 661 tests green) and commit 5819053 was pushed to origin/issue-289/daily-re-clarification-surface-floods-with-waiting.

@coderabbitai coderabbitai Bot added engineering domain-modelling Domain / data modelling — entities, relationships, state, lifecycle labels May 14, 2026
@TMaYaD TMaYaD merged commit f3973e6 into main May 14, 2026
5 checks passed
@TMaYaD TMaYaD deleted the issue-289/daily-re-clarification-surface-floods-with-waiting branch May 14, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain-modelling Domain / data modelling — entities, relationships, state, lifecycle engineering

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Daily re-clarification surface floods with waiting-for tasks as "actionless"

2 participants