You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(api): scope-aware SQL totals for the History summary cards #675
Follow-up to #632. Summary cards and counts on the History view are computed from the capped, filtered slice, so they under-report once a cap is hit.
Current behaviour
summarizePurchaseHistory (internal/api/handler_history.go) sums over the rows already fetched (at most limit per source). With more rows than the cap the totals are wrong, and #630 only flags truncated.
Steps to verify the gap
More than 100 rows in range: card totals differ from a manual sum of all rows.
Expected behaviour
Totals and counts computed over ALL rows matching the filters, carrying the SAME scope predicate as the row fetch (otherwise they leak cross-tenant counts).
Activity
IAmJSD commentedon Oct 20, 2026
Claiming: working on this
feat(api): scope-aware SQL totals for the History summary cards (#1200)