4.7 KiB
Task Pushing 01 Summary — Past Task Push Controls
Status: Planned. Scope level: XHIGH implementation plan. Primary outcome: Past, incomplete scheduled tasks expose a persistent push control that can move the task to the next available slot, tomorrow's first open slot, or Backlog.
Current repo facts this plan is based on
- Scheduler core already has flexible-task push destinations:
nextAvailableSlot,tomorrowTopOfQueue, andbacklog. V1ApplicationCommandUseCasesalready exposes push-related commands for planned flexible tasks:pushFlexibleToNextAvailableSlot,pushFlexibleToTomorrowTopOfQueue,moveFlexibleToBacklog.
- The Flutter command controller currently wires completion and scheduling, but push methods are not exposed to card widgets.
- Timeline cards already have reward and difficulty controls in the trailing area.
- Timeline cards already have
showsQuickActions, but the new past-task push state must suppress hover actions while the full push button is visible. - Current backlog staleness uses task creation age; this does not satisfy the requested behavior that pushing to Backlog resets the backlog freshness timer.
- Date Selection 01 should make selected-day reloads and cross-date persistence reliable before this plan starts.
Product behavior
- A task that is scheduled in the past and not complete still uses its normal card styling.
- While in this past/incomplete state, the card shows a right-side
Pushbutton next to reward and difficulty icons. - The push button has visual priority over the card time text and sits on a higher layer if layout overlaps.
- Hover quick-action buttons do not show while the full
Pushbutton is shown. - Marking the task complete removes the push button and returns the card to normal completed behavior.
- Clicking
Pushopens a menu with:Push to next,Push to tomorrow,Push to backlog.
- Push to next moves the task to the next available no-overlap slot after the current owner-local time. If a valid slot exists later today, use that.
- Push to tomorrow moves the task to the first valid no-overlap slot on the next owner-local day.
- Push to backlog removes schedule placement and marks the backlog freshness timer as fresh regardless of the task's original age.
- All push results persist and survive close/reopen.
Scope assumption to verify in Block 01
V1 core push commands are currently flexible-task oriented. This plan should apply the push button to planned flexible tasks first. Required, locked, surprise, and free-slot cards must not receive unsupported push commands unless Block 01 deliberately expands backend support with tests.
Definition of done
Task Pushing 01 is complete when all of the following are true:
- The read/presentation model can identify a past, incomplete, planned flexible task.
- Past incomplete planned flexible cards show a full
Pushbutton beside the reward/difficulty icons. - The full push button suppresses hover quick actions.
- Completed cards never show the full push button.
- Clicking the push button opens a menu with exactly the three requested destinations.
- Push to next uses backend scheduling and never places the task before current owner-local time.
- Push to next uses a same-day slot when one is available later today.
- Push to tomorrow uses the next owner-local day and places into the first valid no-overlap slot.
- Push to backlog clears scheduled start/end and resets backlog freshness to fresh without rewriting original task creation truth.
- Push commands are persisted through SQLite and survive close/reopen.
- UI widgets do not contain scheduling, Drift, SQL, or repository logic.
- Validation gates pass, or unavailable commands are documented.
Non-goals
- No drag-and-drop push behavior.
- No schedule review modal unless existing backend result UX already requires it.
- No week/month views.
- No Shield/Recovery flow.
- No recurring task rollover.
- No calendar sync.
- No redesign of reward/difficulty icons beyond layout needed for the Push button.
- No frontend-only task movement.
Architecture rule
The push flow must be command-driven:
Past-task presentation flag
-> card Push button
-> push destination menu
-> SchedulerCommandController method
-> V1ApplicationCommandUseCases
-> scheduling core / ApplicationUnitOfWork
-> SQLite persistence
-> selected-date read refresh
The card may decide whether to show a button from presentation flags. It must not calculate canonical new slots or mutate task times.