diff options
| author | Claude <agent@claude.ai> | 2026-03-18 10:04:57 +0000 |
|---|---|---|
| committer | Claude <agent@claude.ai> | 2026-03-18 10:04:57 +0000 |
| commit | e85b42d373de55781af9d699b246c0d6a492aec1 (patch) | |
| tree | 50e40abda62e60144186c1916ddd0f683533c2f4 /web/templates/agent-status.html | |
| parent | e3195a6534bae000a63e884ff647fac95d9d2498 (diff) | |
refactor: RF-03/06 extract groupMeals helper, eliminate convertSyncItemToTask wrapper
RF-03: Extract shared groupMeals helper into internal/handlers/meals.go.
Both HandleTabMeals and BuildTimeline now call groupMeals instead of
duplicating the date+mealType grouping algorithm inline. CombinedMeal
gains ID and Meals fields to carry the first-meal ID and original records
needed by BuildTimeline when constructing TimelineItems.
RF-06: Add api.ConvertSyncItemToTask for single-item conversion.
ConvertSyncItemsToTasks now delegates to it, eliminating duplication.
The Handler.convertSyncItemToTask wrapper (which allocated a one-element
slice just to unwrap it) is deleted; its caller uses api.ConvertSyncItemToTask
directly. Covered by TestConvertSyncItemToTask in internal/api/todoist_test.go.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'web/templates/agent-status.html')
0 files changed, 0 insertions, 0 deletions
