Summary
ListAsync calls GetByUserAsync(userId) which materializes the entire user's LLM request history into memory (no limit or status filter), then filters/pages in C#. For users with thousands of captures, this loads all rows on every inbox load.
Location
backend/src/Taskdeck.Application/Services/CaptureService.cs, lines 101-159
Suggested Fix
Add an indexed, server-side query with LIMIT and optional status filter on GetByUserAsync, or introduce GetCaptureItemsPagedAsync(userId, status, limit, offset).
Source
Found during codebase health analysis (2026-06-06).
Summary
ListAsynccallsGetByUserAsync(userId)which materializes the entire user's LLM request history into memory (no limit or status filter), then filters/pages in C#. For users with thousands of captures, this loads all rows on every inbox load.Location
backend/src/Taskdeck.Application/Services/CaptureService.cs, lines 101-159Suggested Fix
Add an indexed, server-side query with LIMIT and optional status filter on
GetByUserAsync, or introduceGetCaptureItemsPagedAsync(userId, status, limit, offset).Source
Found during codebase health analysis (2026-06-06).