From eadd17df2946a1219fdf02f2ee0a0ac19734e56d Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Fri, 7 Aug 2026 10:39:28 +0000 Subject: Wire the Tasks tab into nav; fold in buckets/projects/labels and recurrence The Tasks tab (/tabs/tasks) existed server-side and was tested, but nothing in the nav linked to it -- it was pure dead weight in the other direction. Wiring it up as the natural home for everything that was either misplaced in Settings or missing a web UI entirely: - Maintenance Buckets, Projects, and Labels moved out of Settings and into the Tasks tab (restyled from Settings' opaque slate cards to the glass/backdrop-blur look already used by the tab's chain/atom cards -- they're now embedded in index.html's page shell, not a standalone page, so the shared bg-card/bg-input classes from that shell apply). Settings keeps only what's actually settings: Passkeys, Trusted Agents, Data Sources. - Added a Recurrence section to the task-detail modal (freq/interval/ weekday form, posting to a new POST /tasks/recurrence -- the HTMX counterpart to the widget API's HandleWidgetTaskRecurrence). Native task recurrence previously had zero web UI at all, only reachable via the Android widget's RecurrenceEditDialog. Also fixed a real bug found while touching this code: HandleGetTaskDetail's source switch only had a case for "trello" -- opening any native ("doot") task's detail modal, which is most tasks in this tab, showed a blank title and description. Factored both call sites (initial GET and the re-render after a recurrence edit) through one loadTaskDetailData helper and added the missing "doot" case. Also fixed task-detail.html's styling, which was still using pre-dark-theme classes (text-gray-900 etc.) -- functionally invisible text on the modal's dark background. Verified with a throwaway local server (real templates + real DB, not the MockRenderer the unit tests use) seeded with a recurring task, a bucket, a project, and a label -- confirmed all five touched routes render 200 with the expected content, including the populated Buckets/Projects/Labels sections and a real weekly-recurrence form with the correct weekdays pre-checked. Caught and fixed a copy bug this way too ("every 2 weeklys" -> "every 2 weeks"). Not committed; deleted after use. go build ./..., go vet ./..., and go test ./... all clean. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL --- web/templates/index.html | 9 ++++ web/templates/partials/buckets-section.html | 26 ++++++------ web/templates/partials/task-detail.html | 66 +++++++++++++++++++++++++++-- web/templates/partials/tasks-tab.html | 66 +++++++++++++++++++++++++++++ web/templates/settings.html | 50 +--------------------- 5 files changed, 151 insertions(+), 66 deletions(-) (limited to 'web/templates') diff --git a/web/templates/index.html b/web/templates/index.html index 7be2c52..b11b557 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -81,6 +81,15 @@ title="Timeline"> + @@ -21,10 +21,10 @@ {{if .Items}} {{range .Items}}
- {{.Content}} + {{.Content}}
- {{.BucketState}} -
- + class="flex-1 bg-input border border-white/20 rounded-lg px-3 py-1.5 text-sm text-white placeholder-white/50 outline-none focus:ring-1 focus:ring-white/30"> +
{{end}} {{else}} -
No maintenance buckets yet.
+
No maintenance buckets yet.
{{end}} {{end}} diff --git a/web/templates/partials/task-detail.html b/web/templates/partials/task-detail.html index ace604f..135c38f 100644 --- a/web/templates/partials/task-detail.html +++ b/web/templates/partials/task-detail.html @@ -1,12 +1,70 @@ {{define "task-detail"}}
-

{{.Title}}

+

{{.Title}}

- - - + + +
+ + {{if .IsDoot}} +
+

Recurrence

+ {{if .RecurrenceFreq}} +

+ Repeats every {{if gt .RecurrenceInterval 1}}{{.RecurrenceInterval}} {{recurrenceUnit .RecurrenceFreq}}s{{else}}{{recurrenceUnit .RecurrenceFreq}}{{end}}{{if and (eq .RecurrenceFreq "weekly") .RecurrenceWeekdays}} on {{weekdayNames .RecurrenceWeekdays}}{{end}} +

+ {{end}} +
+ +
+ + +
+
+ + + + + + + +
+ +
+
+ {{end}}
{{end}} diff --git a/web/templates/partials/tasks-tab.html b/web/templates/partials/tasks-tab.html index b506716..1ac6703 100644 --- a/web/templates/partials/tasks-tab.html +++ b/web/templates/partials/tasks-tab.html @@ -143,5 +143,71 @@ {{end}} + + +
+ + 🪣 Maintenance Buckets + + + + + {{template "buckets-section" .}} +
+ + + + +
+
+ + +
+ + 📁 Projects + ({{len .Projects}}) + + + + +
+ {{if .Projects}} + {{range .Projects}} +
+ + {{.Name}} +
+ {{end}} + {{else}} +
No projects yet.
+ {{end}} +
+
+ + +
+ + 🏷️ Labels + ({{len .Labels}}) + + + + +
+ {{if .Labels}} + {{range .Labels}} +
+ + {{.Name}} +
+ {{end}} + {{else}} +
No labels assigned a color yet.
+ {{end}} +
+
{{end}} diff --git a/web/templates/settings.html b/web/templates/settings.html index f07700d..acee1ee 100644 --- a/web/templates/settings.html +++ b/web/templates/settings.html @@ -17,7 +17,7 @@
← Back to Dashboard

Settings

-

Configure feature toggles and data sources.

+

Configure auth, agent access, and data sources.

{{if .WebAuthnEnabled}} @@ -221,54 +221,6 @@
- -
-

Maintenance Buckets

- {{template "buckets-section" .}} -
- - - - -
-
- - -
-

Projects

-
- {{if .Projects}} - {{range .Projects}} -
- - {{.Name}} -
- {{end}} - {{else}} -
No projects yet.
- {{end}} -
-
- - -
-

Labels

-
- {{if .Labels}} - {{range .Labels}} -
- - {{.Name}} -
- {{end}} - {{else}} -
No labels assigned a color yet.
- {{end}} -
-
-- cgit v1.2.3