summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-09-03 02:34:25 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-09-03 02:34:25 +0000
commit1477ee531045388de9e7e797200e5cd14e4a6d0e (patch)
treeb5369768ed0da759d492fda7957ab25833759d78 /web
parent699e31989e2c36513e02861f49672f8984ffe336 (diff)
Make the day's list a pull of committed work, not a push of everything unblocked
due_date had been carrying two incompatible meanings: "this has a real deadline" (Bills, meds, a signup cutoff) and "this is when I intend to work on it." Chains leaned entirely on the second -- every step was stamped due_date = now the moment it unlocked -- so a five-minute call and a six-month certification both arrived looking overdue, and the only way to quiet them was to hand-reschedule. The list therefore always contained work that could not be finished that day, which made ending a day at zero impossible by construction rather than by effort. Splits the two apart: - due_date keeps only its real meaning: an externally-imposed deadline. - committed_date (new, migration 031) means "I chose this for today." Chain steps no longer get a due date on unlock (CreateChain, advanceChain, and the delete-promotion path), and are excluded from the undated list so they don't simply fall through to it instead. They reach the day only by being committed, via a "+ today" control on the chain card. Bucket-active items get the same control. BuildTimeline pulls in committed tasks, deduped against tasks already present for a different reason (committed and due-today are two reasons for one row, not two rows). Migration 031 also clears the auto-stamped due dates from open chain steps; completed steps keep theirs as historical record. Two supporting changes made while in here: - Extracted the native_tasks SELECT list into nativeTaskColumns. It had been copy-pasted into nine queries that must each agree exactly with scanNativeTasks' field order; adding committed_date meant editing all nine correctly or silently breaking whichever was missed. - Extracted templateFuncMap() and added TestTemplates_AllParse. New() only logs a warning when template parsing fails, so a malformed template shipped silently and surfaced as a broken page at runtime. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'web')
-rw-r--r--web/templates/partials/buckets-section.html11
-rw-r--r--web/templates/partials/tasks-tab.html13
2 files changed, 24 insertions, 0 deletions
diff --git a/web/templates/partials/buckets-section.html b/web/templates/partials/buckets-section.html
index 53b1e35..73c4307 100644
--- a/web/templates/partials/buckets-section.html
+++ b/web/templates/partials/buckets-section.html
@@ -23,6 +23,17 @@
<div class="flex items-center justify-between gap-2 text-sm py-1">
<span class="text-white/80">{{.Content}}</span>
<div class="flex items-center gap-3 flex-shrink-0">
+ {{if eq .BucketState "active"}}
+ {{if .CommittedDate}}
+ <button hx-post="/tasks/{{.ID}}/uncommit" hx-swap="none"
+ class="text-xs px-2 py-0.5 rounded bg-sky-500/20 text-sky-200 hover:bg-sky-500/30 transition-colors"
+ title="Remove from today">on today &times;</button>
+ {{else}}
+ <button hx-post="/tasks/{{.ID}}/commit" hx-swap="none"
+ class="text-xs px-2 py-0.5 rounded bg-white/10 text-white/70 hover:bg-white/20 hover:text-white transition-colors"
+ title="Pull into today">+ today</button>
+ {{end}}
+ {{end}}
<span class="text-[10px] uppercase tracking-wider {{if eq .BucketState "active"}}text-green-400{{else}}text-white/30{{end}}">{{.BucketState}}</span>
<button class="text-xs text-red-400/60 hover:text-red-300 transition-colors"
hx-post="/settings/buckets/items/remove"
diff --git a/web/templates/partials/tasks-tab.html b/web/templates/partials/tasks-tab.html
index 1ac6703..a2780ff 100644
--- a/web/templates/partials/tasks-tab.html
+++ b/web/templates/partials/tasks-tab.html
@@ -31,6 +31,19 @@
<div class="flex flex-wrap items-center gap-2 mt-1 text-xs text-white/50">
<span class="text-purple-300/80">{{.ProjectName}} &middot; {{.Position}}/{{.Total}}</span>
{{if eq .Chain.Status "paused"}}<span class="text-amber-300/80">paused</span>{{end}}
+ {{if and .CurrentTask (eq .Chain.Status "active")}}
+ {{if .CurrentTask.CommittedDate}}
+ <button hx-post="/tasks/{{.CurrentTask.ID}}/uncommit"
+ hx-swap="none"
+ class="px-2 py-0.5 rounded bg-sky-500/20 text-sky-200 hover:bg-sky-500/30 transition-colors"
+ title="Remove from today">on today &times;</button>
+ {{else}}
+ <button hx-post="/tasks/{{.CurrentTask.ID}}/commit"
+ hx-swap="none"
+ class="px-2 py-0.5 rounded bg-white/10 text-white/70 hover:bg-white/20 hover:text-white transition-colors"
+ title="Pull this step into today">+ today</button>
+ {{end}}
+ {{end}}
</div>
</div>
</div>