From b007fee8fb5b39a5f9b369c59af71ac9e795ceaf Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Fri, 17 Jul 2026 22:22:37 +0000 Subject: Implement linear task chains and recurring maintenance buckets Backend, web timeline, and Android widget wiring for the last two unimplemented items from doot-future-task-scheduling-ideas. Chains: task_chains table + chain_id/chain_position/chain_unlocked on native_tasks (migration 026), WIP-limit-1 advancement hooked into CompleteNativeTask, locked tasks excluded from all date-based queries, 5 new /api/widget/chains* endpoints, an N/M position badge on web and Android widget rows. Buckets: maintenance_buckets table + bucket_id/bucket_state/ bucket_last_active_at on native_tasks (migration 027), staleness-then-priority selection scoring, a new RunBucketCycleCheck scheduler loop, 5 new endpoints including the distinct Defer action, a Defer button on web and Android widget rows. Also corrected stale "not yet approved" status headers on the two already-shipped specs this work depended on (labels/projects, budgets/ availability) -- their headers were never updated after implementation. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL --- internal/models/widget.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/models/widget.go') diff --git a/internal/models/widget.go b/internal/models/widget.go index bf148fd..1ac082e 100644 --- a/internal/models/widget.go +++ b/internal/models/widget.go @@ -19,6 +19,9 @@ type WidgetItem struct { Completable bool `json:"completable"` // true = doot task (checkbox shown) RecurringEventID string `json:"recurring_event_id,omitempty"` ProjectColor *string `json:"project_color,omitempty"` + ChainPosition int `json:"chain_position,omitempty"` // 1-indexed; 0 = not a chain task + ChainTotal int `json:"chain_total,omitempty"` + BucketState string `json:"bucket_state,omitempty"` // "active" when this is a maintenance-bucket item } // WidgetResponse is the full /api/widget response body. -- cgit v1.2.3