address greptile review: per-provider deficit notch, startedAt filter, weekRange refresh, deduplicate providerDisplayName

This commit is contained in:
Sai Shankar authored and Dotta committed 2026-03-16 15:08:54 -05:00
1 parent 94018e0239
commit 82bc00a3ae
4 files changed
+36 -42

No files matched your search

+2 -2
View File
@@ -172,8 +172,8 @@ export function costService(db: Db) {
.orderBy(desc(sql`coalesce(sum(${costEvents.costCents}), 0)::int`));
const runConditions: ReturnType<typeof eq>[] = [eq(heartbeatRuns.companyId, companyId)];
if (range?.from) runConditions.push(gte(heartbeatRuns.finishedAt, range.from));
if (range?.to) runConditions.push(lte(heartbeatRuns.finishedAt, range.to));
if (range?.from) runConditions.push(gte(heartbeatRuns.startedAt, range.from));
if (range?.to) runConditions.push(lte(heartbeatRuns.startedAt, range.to));
const runRows = await db
.select({