<feed xmlns='http://www.w3.org/2005/Atom'>
<title>doot.git/internal/handlers/meals.go, branch master</title>
<subtitle>doot — personal productivity web app
</subtitle>
<id>https://git.terst.org/doot.git/atom?h=master</id>
<link rel='self' href='https://git.terst.org/doot.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.terst.org/doot.git/'/>
<updated>2026-03-18T10:04:57+00:00</updated>
<entry>
<title>refactor: RF-03/06 extract groupMeals helper, eliminate convertSyncItemToTask wrapper</title>
<updated>2026-03-18T10:04:57+00:00</updated>
<author>
<name>Claude</name>
<email>agent@claude.ai</email>
</author>
<published>2026-03-18T10:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/doot.git/commit/?id=e85b42d373de55781af9d699b246c0d6a492aec1'/>
<id>urn:sha1:e85b42d373de55781af9d699b246c0d6a492aec1</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
