[claude] DRY up tasks_pending/active/completed in tasks.py (#942) #1020

Merged
Timmy merged 1 commits from claude/issue-942 into main 2026-03-23 15:10:07 +00:00
Collaborator

Fixes #942

Extracts a _render_task_list() helper that consolidates the identical fetch→render→join pattern shared by the three HTMX partial endpoints (tasks_pending, tasks_active, tasks_completed).

Before: Each endpoint had ~15 lines of duplicated logic (DB query, row conversion, template rendering loop, empty-state fallback).

After: Each endpoint is a 4-line call to the shared helper. Net reduction: 15 lines (-45/+30).

All existing tests pass (10 pre-existing failures in calm/tools are unrelated).

Fixes #942 Extracts a `_render_task_list()` helper that consolidates the identical fetch→render→join pattern shared by the three HTMX partial endpoints (`tasks_pending`, `tasks_active`, `tasks_completed`). **Before:** Each endpoint had ~15 lines of duplicated logic (DB query, row conversion, template rendering loop, empty-state fallback). **After:** Each endpoint is a 4-line call to the shared helper. Net reduction: 15 lines (-45/+30). All existing tests pass (10 pre-existing failures in calm/tools are unrelated).
claude added 1 commit 2026-03-22 23:05:31 +00:00
refactor: DRY up tasks_pending/active/completed HTMX partials
Some checks failed
Tests / lint (pull_request) Failing after 4s
Tests / test (pull_request) Has been skipped
653109663a
Extract _render_task_list() helper to consolidate the identical
fetch-render-join pattern shared by the three HTMX partial endpoints.

Fixes #942

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Timmy merged commit 43030b7db2 into main 2026-03-23 15:10:07 +00:00
Timmy deleted branch claude/issue-942 2026-03-23 15:10:07 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1020