From f08f06bef47aac2c9effb4cec650d99c2deb2dd7 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 18 Jul 2026 00:14:45 +0000 Subject: Rework Tasks tab: Chains section, checklist modal, project visibility The flat Tasks-tab atom list was silently dumping every chain step (locked and unlocked) and dormant bucket-pool items in as ordinary undated cards, with no chain/project context and no protection against completing a locked step out of order. - CompleteNativeTask now rejects completing a locked chain task (ErrChainTaskLocked), mapped to 400 in both the widget and web complete-atom handlers. - Chain tasks and dormant bucket items are excluded from the flat atom list; a new "Chains" section shows one card per active/paused chain with the current step and N/M progress. - New chain checklist modal (GET /chains/{id}) lists every position in order with pause/resume/abandon -- the web view originally deferred as Android-only. - Fixed a real bug this surfaced: resuming a paused chain only flipped the status flag, never unlocking the deferred successor, so a chain paused right after a completion stayed stuck forever. SetChainStatus now catches up the deferred advancement on resume, idempotently. - Atom cards gained a project-name chip for general visibility. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL --- cmd/dashboard/main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cmd/dashboard/main.go') diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index 893a46f..3699a12 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -161,7 +161,7 @@ func main() { r.Use(middleware.Recoverer) r.Use(middleware.Timeout(config.RequestTimeout)) r.Use(appmiddleware.SecurityHeaders(cfg.Debug)) // Security headers - r.Use(sessionManager.LoadAndSave) // Session middleware must be applied globally + r.Use(sessionManager.LoadAndSave) // Session middleware must be applied globally // Service gateway — upstream services proxied through doot's auth + SSL layer. // Each mount registers a path prefix, upstream URL, and any public webhook paths. @@ -296,7 +296,6 @@ func main() { }) } - // Protected routes (auth required) r.Group(func(r chi.Router) { r.Use(authHandlers.Middleware().CSRFProtect) @@ -330,6 +329,12 @@ func main() { r.Post("/uncomplete-atom", h.HandleUncompleteAtom) r.Post("/defer-atom", h.HandleDeferAtom) + // Chain checklist view (Tasks tab) + r.Get("/chains/{id}", h.HandleChainDetailView) + r.Post("/chains/{id}/pause", h.HandleChainPause) + r.Post("/chains/{id}/resume", h.HandleChainResume) + r.Post("/chains/{id}/abandon", h.HandleChainAbandon) + // Unified Quick Add (for Tasks tab) r.Post("/unified-add", h.HandleUnifiedAdd) r.Get("/partials/lists", h.HandleGetListsOptions) -- cgit v1.2.3