diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-07 10:39:28 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-07 10:39:28 +0000 |
| commit | eadd17df2946a1219fdf02f2ee0a0ac19734e56d (patch) | |
| tree | e0460d1cdd9c17fd47ce7cce2fe7845378d8011e /web/templates/settings.html | |
| parent | 06450fe69ade2928deb9274bb67b7ba60d394b4f (diff) | |
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL
Diffstat (limited to 'web/templates/settings.html')
| -rw-r--r-- | web/templates/settings.html | 50 |
1 files changed, 1 insertions, 49 deletions
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 @@ <div class="max-w-4xl mx-auto"> <a href="/" onclick="if (window.history.length > 1) { history.back(); return false; }" class="inline-block mb-6 text-slate-400 hover:text-white transition-colors">← Back to Dashboard</a> <h1 class="text-4xl font-light text-white mb-2 tracking-tight">Settings</h1> - <p class="text-slate-400 mb-10">Configure feature toggles and data sources.</p> + <p class="text-slate-400 mb-10">Configure auth, agent access, and data sources.</p> <!-- Passkeys Section --> {{if .WebAuthnEnabled}} @@ -221,54 +221,6 @@ </div> </section> - <!-- Maintenance Buckets Section --> - <section class="mb-12"> - <h2 class="text-xl font-medium text-white mb-6 pb-2 border-b border-white/10">Maintenance Buckets</h2> - {{template "buckets-section" .}} - <form class="mt-4 flex flex-wrap gap-3 p-4 bg-slate-900/40 rounded-xl border border-white/5" hx-post="/settings/buckets" hx-target="#buckets-list" hx-swap="outerHTML" hx-on::after-request="if(event.detail.successful) this.reset()"> - <input type="text" name="name" placeholder="Bucket name" required - class="flex-1 bg-slate-950 border border-white/10 rounded-lg px-4 py-2 text-sm focus:ring-1 focus:ring-blue-500 outline-none"> - <input type="number" name="cycle_days" placeholder="Cycle (days)" required min="1" - class="w-32 bg-slate-950 border border-white/10 rounded-lg px-4 py-2 text-sm focus:ring-1 focus:ring-blue-500 outline-none"> - <input type="number" name="pick_n" placeholder="Pick N" required min="1" - class="w-28 bg-slate-950 border border-white/10 rounded-lg px-4 py-2 text-sm focus:ring-1 focus:ring-blue-500 outline-none"> - <button type="submit" class="bg-blue-600 hover:bg-blue-500 text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors">Create Bucket</button> - </form> - </section> - - <!-- Projects Section (read-only) --> - <section class="mb-12"> - <h2 class="text-xl font-medium text-white mb-6 pb-2 border-b border-white/10">Projects</h2> - <div class="grid gap-2 sm:grid-cols-2 lg:grid-cols-3"> - {{if .Projects}} - {{range .Projects}} - <div class="card flex items-center gap-3 py-2"> - <span class="w-3 h-3 rounded-full flex-shrink-0" style="background-color: {{.Color}}"></span> - <span class="text-sm text-slate-200 truncate">{{.Name}}</span> - </div> - {{end}} - {{else}} - <div class="card col-span-full text-center text-slate-500 py-6 text-sm italic">No projects yet.</div> - {{end}} - </div> - </section> - - <!-- Labels Section (read-only) --> - <section class="mb-12"> - <h2 class="text-xl font-medium text-white mb-6 pb-2 border-b border-white/10">Labels</h2> - <div class="grid gap-2 sm:grid-cols-2 lg:grid-cols-3"> - {{if .Labels}} - {{range .Labels}} - <div class="card flex items-center gap-3 py-2"> - <span class="w-3 h-3 rounded-full flex-shrink-0" style="background-color: {{.Color}}"></span> - <span class="text-sm text-slate-200 truncate">{{.Name}}</span> - </div> - {{end}} - {{else}} - <div class="card col-span-full text-center text-slate-500 py-6 text-sm italic">No labels assigned a color yet.</div> - {{end}} - </div> - </section> </div> </body> </html> |
