Skip to content

Commit f8551be

Browse files
committed
fix(stats): remove day axis from breakdown groupBy to eliminate duplicate rows
1 parent 28d59c3 commit f8551be

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

webview-ui/src/components/dashboard/DashboardView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const DashboardView = memo(({ onDone }: DashboardViewProps) => {
170170
to,
171171
timezone,
172172
groupBy: (
173-
[currentGroupBy, "day"] as Array<
173+
[currentGroupBy] as Array<
174174
"day" | "week" | "month" | "provider" | "model" | "mode" | "status" | "source"
175175
>
176176
).filter((v, i, a) => a.indexOf(v) === i),

webview-ui/src/components/dashboard/__tests__/DashboardView.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ describe("DashboardView", () => {
303303
expect(statsMsg.requestId).toMatch(/^dashboard-/)
304304
expect(statsMsg.usageStatsQuery.preset).toBe("today")
305305
expect(statsMsg.usageStatsQuery.groupBy).toContain("model")
306-
expect(statsMsg.usageStatsQuery.groupBy).toContain("day")
306+
expect(statsMsg.usageStatsQuery.groupBy).not.toContain("day")
307307

308308
const sessionsCall = postMessageMock.mock.calls.find(
309309
(c) => (c[0] as { type: string }).type === "getDashboardSessions",

0 commit comments

Comments
 (0)