Skip to content

Weekly Review's Waiting For / Someday → Next promotion leaves tasks actionless #293

@TMaYaD

Description

@TMaYaD

Problem

When the Weekly Review wizard promotes a task to Next from Waiting For or Someday/Maybe, the routing writes intent='next' but leaves next_action_text unchanged (typically NULL). The user just decided this task is actionable — but didn't say what the action is. The task lands on the Next Actions list immediately, actionless, and then surfaces in the daily re-clarification queue (_needsReviewWhere, todo_dao.dart:383-393) until the user re-processes it. Avoidable round-trip.

The pattern is established elsewhere in the codebase:

  • Inbox → Next already mirrors the title into next_action_text via InboxClarifyCard's title-as-action coupling (ARCHITECTURE.md:413).
  • DPR task-review step already uses the ProcessAction.nextActionDialog modifier to force a phrase when updating a next action (task_review_step.dart:183, dialog at next_action_dialog.dart).

The weekly review's Waiting For and Someday/Maybe steps just haven't been wired up the same way.

Audit of promotion-to-Next paths in the Weekly Review

Step Config Promotes to Next? Prompts for text?
Inbox InboxClarifyCard Yes Yes (title mirror)
Waiting For waiting_for_step.dart:62-65 include:{keep}, except:{waitingFor} Yes (plain next in defaults) No
Next Actions (after #290) except:{next} N/A (already on list)
Someday/Maybe someday_maybe_step.dart:59-66 include:{keep} (plain next in defaults) Yes No

Proposed fix

In waiting_for_step.dart and someday_maybe_step.dart, swap the plain Next default for the dialog modifier:

process: ProcessToHandlers(
  todo: todo,
  include: const {ProcessAction.keep, ProcessAction.nextActionDialog},
  except: const {ProcessAction.next, ProcessAction.waitingFor /* or someday */},
  ...
  onAfterRoute: (action) async {
    if (action == ProcessAction.nextActionDialog) {
      // Same pattern as task_review_step.dart:194-210:
      // read back the persisted text; if blank, don't record routing;
      // otherwise record as a `next` routing for the step's stats.
      ...
    }
    // existing branches
  },
),

The dialog opens prefilled with whatever (if anything) is on next_action_text, the user types a phrase, save writes the new text + stamps last_clarified_at (per setNextActionText at todo_dao.dart:367-377), and the wizard records a Next routing for waitingForRoutings / somedayRoutings. If the user clears the field and saves blank, no routing is recorded and the step stays on the current item (same pattern task_review_step.dart:201-204 uses).

Test plan

  • Widget test: tapping "Next" on a Waiting For item opens NextActionDialog. Saving a phrase writes next_action_text, intent='next', and clears the person tag (current behaviour — confirm not regressed via the orthogonality invariant) — actually do NOT strip the person tag, per the existing intent ⊥ delegate rule (ARCHITECTURE.md:396); if the user wants the delegate gone, they remove it explicitly.
  • Widget test: tapping "Next" on a Someday item opens the dialog. Saving routes to Next with the phrase.
  • Widget test: clearing the dialog and saving blank does NOT route the task and the wizard stays on the same item.
  • Integration: after the weekly review, the daily re-clarification queue (getNeedsReview) does NOT include items that were promoted via this dialog (because next_action_text is set and last_clarified_at is fresh).
  • flutter analyze clean.

Related

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions